Pre Merge pull request !74 from MeaoFun/N/A

pull/74/MERGE
MeaoFun 2025-04-15 13:34:42 +00:00 committed by Gitee
commit 22b5dc7c27
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 4 additions and 3 deletions

View File

@ -64,10 +64,11 @@ export function getDictOptions(dictType: string, valueType?: 'string' | 'number'
export function getDictObj(dictType: string, value: any) {
const dictOptions: DictDataType[] = getDictDatas(dictType)
if (dictOptions) {
dictOptions.forEach((dict: DictDataType) => {
if (dict.value === value.toString())
for (const dict of dictOptions) {
if (dict.value === value.toString()) {
return dict
})
}
}
}
else {
return null