更新 Web/src/stores/userInfo.ts
修复val是undefined情况,tostring报错问题
This commit is contained in:
parent
a9f719a9b5
commit
7deab039a9
@ -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 {};
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user