🔨 Refactor(custom): add config file type

This commit is contained in:
Kuingsmile
2024-04-09 15:03:32 +08:00
parent ae40a1615e
commit c35776201a
52 changed files with 803 additions and 407 deletions
+3 -2
View File
@@ -132,6 +132,7 @@ import dayjs from 'dayjs'
// Element Plus 下拉菜单组件
import { ElDropdown, ElMessage } from 'element-plus'
import { configPaths } from '~/universal/utils/configPaths'
const type = ref('')
const config = ref<IPicGoPluginConfig[]>([])
@@ -227,8 +228,8 @@ function handleNameClick () {
async function handleCopyApi () {
try {
const { port = 36677, host = '127.0.0.1' } = await getConfig<IStringKeyMap>('settings.server') || {}
const serverKey = await getConfig('settings.serverKey') || ''
const { port = 36677, host = '127.0.0.1' } = await getConfig<IStringKeyMap>(configPaths.settings.server) || {}
const serverKey = await getConfig(configPaths.settings.serverKey) || ''
const uploader = await getConfig('uploader') as IStringKeyMap || {}
const picBedConfigList = uploader[$route.params.type as string].configList || []
const picBedConfig = picBedConfigList.find((item: IUploaderConfigListItem) => item._id === $route.params.configId)