修改语法问题

This commit is contained in:
z 2026-04-09 16:44:53 +08:00
parent ff966f5a49
commit 6737280d80

View File

@ -153,7 +153,9 @@ export async function getDict(enCode) {
}
export function getLabel(options, value) {
const item = options?.find(i => i.id === value);
return item ? item.fullName : (value || '');
if (!options || options.length === 0) return value || ''
const item = options.find(i => i.id === value)
return item ? item.fullName : (value || '')
}