|
@@ -2,6 +2,7 @@ import { Pen, Meta2dData } from '@meta2d/core';
|
|
|
import { MessagePlugin, NotifyPlugin, Button } from 'tdesign-vue-next';
|
|
|
import { h, ref } from 'vue';
|
|
|
import { upCdn } from './api';
|
|
|
+import axios from 'axios';
|
|
|
|
|
|
export const noLoginTip = '请先登录,否则无法保存!';
|
|
|
export const localStorageName = 'le5leV';
|
|
@@ -131,8 +132,23 @@ export function gotoAccount() {
|
|
|
}, 3000);
|
|
|
}
|
|
|
|
|
|
-export function isGif(url: string): boolean {
|
|
|
- return url.endsWith('.gif');
|
|
|
+export async function isGif(url: string): Promise<boolean> {
|
|
|
+ if (url.endsWith('.svg')) {
|
|
|
+ //请求svg图片
|
|
|
+ // if (url.startsWith('https://drive.le5lecdn.com/')) {
|
|
|
+ let res: any = await axios.get(url);
|
|
|
+ if ((res as string).indexOf('@keyframes') !== -1) {
|
|
|
+ //有动画的svg
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ // } else {
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ } else {
|
|
|
+ return url.endsWith('.gif');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|