forked from p96170835/amis
修复 value2Array bug
This commit is contained in:
parent
a47ba7c603
commit
fb63837fe6
|
@ -107,7 +107,8 @@ export function expandValue(
|
|||
if (
|
||||
valueType !== 'string' &&
|
||||
valueType !== 'number' &&
|
||||
valueType !== 'boolean'
|
||||
valueType !== 'boolean' &&
|
||||
valueType !== 'object'
|
||||
) {
|
||||
return value as Option;
|
||||
}
|
||||
|
@ -116,6 +117,14 @@ export function expandValue(
|
|||
return null;
|
||||
}
|
||||
|
||||
if (
|
||||
valueType === 'object' &&
|
||||
value &&
|
||||
value.hasOwnProperty(valueField || 'value')
|
||||
) {
|
||||
value = (value as Option)[valueField || 'value'] || '';
|
||||
}
|
||||
|
||||
return findTree(
|
||||
options,
|
||||
optionValueCompare(value, valueField || 'value')
|
||||
|
|
Loading…
Reference in New Issue