diff --git a/src/utils/index.ts b/src/utils/index.ts index d9bedb9..d52b012 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -2,3 +2,4 @@ export * from './icon' export * from './storage' export * from './array' export * from './i18n' +export * from './dict' diff --git a/src/views/setting/dictionary/index.vue b/src/views/setting/dictionary/index.vue index 610cc06..e08ab9c 100644 --- a/src/views/setting/dictionary/index.vue +++ b/src/views/setting/dictionary/index.vue @@ -4,7 +4,7 @@ import { NButton, NFlex, NPopconfirm } from 'naive-ui' import DictModal from './components/DictModal.vue' import { fetchDictList } from '@/service' import { useBoolean } from '@/hooks' -import { useDictStore } from '@/store' +import { getDictByNet } from '@/utils' import CopyText from '@/components/custom/CopyText.vue' const { bool: dictLoading, setTrue: startDictLoading, setFalse: endDictLoading } = useBoolean(false) @@ -20,8 +20,6 @@ onMounted(() => { const dictData = ref([]) const dictContentData = ref([]) -const { getDictByNet } = useDictStore() - async function getDictList() { startDictLoading() const { data, isSuccess } = await fetchDictList()