【优化】优化一个前端字典函数

pull/94/head
小诺 2023-03-17 02:01:05 +08:00 committed by 俞宝山
parent 65e48f847f
commit 5352269b09
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ tool.dictTypeData = (dictValue, value) => {
}
const children = tree.children
const dict = children.find((item) => item.dictValue === value)
return dict?.name || '无此字典'
return dict ? dict.dictLabel : '无此字典项'
}
// 获取某个code下字典的列表多用于字典下拉框