😎优化前端字典处理
This commit is contained in:
parent
aed214710c
commit
81006dde67
@ -142,7 +142,7 @@ export const useUserInfo = defineStore('userInfo', {
|
||||
const _code = code.toString();
|
||||
const ds = this.getDictDataByCode(typePCode);
|
||||
for (const element of ds) {
|
||||
if (element.code.toString() === _code) {
|
||||
if (element.code == _code) {
|
||||
return element;
|
||||
}
|
||||
}
|
||||
@ -156,7 +156,7 @@ export const useUserInfo = defineStore('userInfo', {
|
||||
const _val = val.toString();
|
||||
const ds = this.getDictDataByCode(typePCode);
|
||||
for (const element of ds) {
|
||||
if (element.value.toString() === _val) {
|
||||
if (element.value == _val) {
|
||||
return element;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user