更新 Web/src/stores/userInfo.ts

修复val是undefined情况,tostring报错问题
This commit is contained in:
362270511 2024-07-11 18:49:58 +08:00
parent a9f719a9b5
commit 7deab039a9

View File

@ -132,6 +132,8 @@ export const useUserInfo = defineStore('userInfo', {
// 根据字典类型和代码取字典项
getDictItemByCode(typePCode: string, val: string) {
if(val!=undefined)
{
val = val.toString();
if (val) {
const _val = val.toString();
@ -143,6 +145,7 @@ export const useUserInfo = defineStore('userInfo', {
}
}
}
}
return {};
},