mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 19:38:16 +08:00
修复 value2Array bug
This commit is contained in:
parent
599271ce9d
commit
ee37d92b5a
@ -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
Block a user