commit
1193ccd0a8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue