optimize(projects): 字典状态使用枚举值

This commit is contained in:
xlsea
2025-09-11 10:16:20 +08:00
parent ad207255bb
commit 56fd5434ca
2 changed files with 4 additions and 2 deletions

View File

@ -4,5 +4,6 @@ export enum SetupStoreId {
Auth = 'auth-store',
Route = 'route-store',
Tab = 'tab-store',
Notice = 'notice-store'
Notice = 'notice-store',
Dict = 'dict-store'
}

View File

@ -1,8 +1,9 @@
import { ref } from 'vue';
import { defineStore } from 'pinia';
import { $t } from '@/locales';
import { SetupStoreId } from '@/enum';
export const useDictStore = defineStore('dict', () => {
export const useDictStore = defineStore(SetupStoreId.Dict, () => {
const dictData = ref<{ [key: string]: Api.System.DictData[] }>({});
const getDict = (key: string) => {