refactor: 字典相关功能重构 采用一个Map储存字典(之前为两个Map)

This commit is contained in:
dap
2025-01-08 13:22:47 +08:00
parent 74198a0edc
commit 51c29fcc9c
7 changed files with 23 additions and 39 deletions

View File

@@ -45,12 +45,13 @@ function fetchAndCacheDictData<T>(
/**
* 这里是提供给渲染标签使用的方法
* @deprecated 使用getDictOptions代替 于下个版本删除
* @param dictName 字典名称
* @returns 字典信息
*/
export function getDict(dictName: string) {
const { getDict } = useDictStore();
return fetchAndCacheDictData(dictName, () => getDict(dictName));
const { getDictOptions } = useDictStore();
return fetchAndCacheDictData(dictName, () => getDictOptions(dictName));
}
/**