mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 20:48:49 +08:00
修复 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
Block a user