!77 dictionary的key改成可选参数避免提示报错

dictionary的key改成可选参数避免提示报错
This commit is contained in:
dvadmin
2024-08-29 00:13:45 +00:00
committed by Gitee

View File

@@ -4,7 +4,7 @@ import { DictionaryStore } from '/@/stores/dictionary';
/** /**
* @method 获取指定name字典 * @method 获取指定name字典
*/ */
export const dictionary = (name: string,key:string|number|undefined) => { export const dictionary = (name: string,key?:string|number|undefined) => {
const dict = DictionaryStore() const dict = DictionaryStore()
const dictionary = toRaw(dict.data) const dictionary = toRaw(dict.data)
if(key!=undefined){ if(key!=undefined){