|
@@ -411,7 +411,7 @@ import {
|
|
|
imageDrive,
|
|
|
} from '@/services/api';
|
|
|
import { convertPen } from '@/services/upgrade';
|
|
|
-import { isGif } from '@/services/utils';
|
|
|
+import { getImgUrl, isGif } from '@/services/utils';
|
|
|
import { autoSave, delAttrs, blank, useFolder, chargeDialogShow } from '@/services/common';
|
|
|
import { debounce, throttle } from '@/services/debouce';
|
|
|
import { searchObjectPinyin } from '@/services/pinyin';
|
|
@@ -1358,8 +1358,7 @@ const dragStart = async (event: DragEvent | MouseEvent|TouchEvent, item: any) =>
|
|
|
// firefox naturalWidth svg 图片 可能是 0
|
|
|
const width = target.naturalWidth || target.width;
|
|
|
const height = target.naturalHeight || target.height;
|
|
|
- const urlPrefix = item.image.startsWith('http') ? '' : import.meta.env.VITE_IMG_API + '/'
|
|
|
- const [name, lockedOnCombine] = await isGif(urlPrefix + item.image)
|
|
|
+ const [name, lockedOnCombine] = await isGif(getImgUrl(item.image))
|
|
|
? ['gif', 0]
|
|
|
: ['image', undefined];
|
|
|
|
|
@@ -1368,7 +1367,7 @@ const dragStart = async (event: DragEvent | MouseEvent|TouchEvent, item: any) =>
|
|
|
width,
|
|
|
height,
|
|
|
isBottom:true,
|
|
|
- image: urlPrefix + item.image,
|
|
|
+ image: getImgUrl(item.image),
|
|
|
imageRatio: true,
|
|
|
ratio: true,
|
|
|
lockedOnCombine,
|
|
@@ -2230,8 +2229,7 @@ const onFold = () => {
|
|
|
};
|
|
|
|
|
|
const getImgSrc = (elem) => {
|
|
|
- const urlPrefix = elem.image.startsWith('http') ? '' : import.meta.env.VITE_IMG_API + '/'
|
|
|
- return urlPrefix + elem.image + (activeAssets.value === 'user' ? '' : ('?' + Math.random()))
|
|
|
+ return getImgUrl(elem.image + (activeAssets.value === 'user' ? '' : ('?' + Math.random())))
|
|
|
}
|
|
|
|
|
|
const loadImage = (elem: any) => {
|