diff --git a/src/config.ts b/src/config.ts index f60553a..1ead83b 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,10 +1,13 @@ export const aIUrl = 'https://metaso.cn/?s=uitab&referrer_s=uitab&q=' export const translateUrl = 'https://fanyi.baidu.com/mtpe-individual/multimodal?lang=zh2en&query=' -// 获取 oss 根目录地址 +// oss地址 export const ossBase = import.meta.env.PROD ? 'http://btab.oss-cn-hangzhou.aliyuncs.com' : 'http://btab.oss-cn-hangzhou.aliyuncs.com' +// oss cdn 加速地址 +export const ossCdnBase = import.meta.env.PROD ? ossBase : ossBase + // 后端地址 export const apiBase = import.meta.env.PROD ? 'http://192.168.110.28:8300' @@ -12,3 +15,52 @@ export const apiBase = import.meta.env.PROD // 后端 cdn 加速地址 export const cdnBase = import.meta.env.PROD ? apiBase : apiBase + +// 图片后缀名 +export const imgArr = [ + 'bmp', + 'cod', + 'gif', + 'lef', + 'jpe', + 'jpeg', + 'jpg', + 'jfif', + 'svg', + 'tif', + 'tiff', + 'ras', + 'cmx', + 'ico', + 'pnm', + 'pbm', + 'pgm', + 'rgb', + 'xbm', + 'xpm', + 'xwd', + 'png' +] +// 视频后缀名 +export const videoArr = [ + 'mp4', + 'mpg', + 'mpeg', + 'mpe', + 'qt', + 'mov', + 'm4v', + 'wmv', + 'avi', + 'webm', + 'flv', + 'mp2', + 'mpa', + 'mpv2', + 'lsf', + 'lsx', + 'asf', + 'asr', + 'asx', + 'movie' +] diff --git a/src/layout/adder/AdderPage.tsx b/src/layout/adder/AdderPage.tsx index 62b8520..19869bd 100644 --- a/src/layout/adder/AdderPage.tsx +++ b/src/layout/adder/AdderPage.tsx @@ -5,6 +5,7 @@ import { OhVueIcon, addIcons } from 'oh-vue-icons' import { MdKeyboardcommandkey, FaCompass, FaPencilRuler } from 'oh-vue-icons/icons' import CustomAdder from './CustomAdder' import clsx from 'clsx' +import ThemeProvider from '@/utils/ThemeProvider' addIcons(MdKeyboardcommandkey, FaCompass, FaPencilRuler) const ItemButton = defineComponent({ @@ -54,55 +55,57 @@ export default defineComponent(() => { const isGame = computed(() => layout.state.current === 0) const type = ref(1) return () => ( -
- {isGame.value && } -
- { - type.value = 0 - }} - /> - { - type.value = 1 - }} - /> - { - type.value = 2 - }} - /> -
-
e.stopPropagation()} - > -
-