mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-12 11:55:21 +08:00
有个可能 valueField 没值
This commit is contained in:
parent
90df914d43
commit
211d2bda78
@ -114,7 +114,7 @@ export function value2array(
|
||||
return value
|
||||
.map((value: any) =>
|
||||
expandValue(value, props.options, props.valueField) ||
|
||||
(isObject(value) && value.hasOwnProperty(props.valueField))
|
||||
(isObject(value) && value.hasOwnProperty(props.valueField || 'value'))
|
||||
? value
|
||||
: undefined
|
||||
)
|
||||
@ -130,7 +130,8 @@ export function value2array(
|
||||
);
|
||||
return expandedValue
|
||||
? [expandedValue]
|
||||
: isObject(value) && (value as Option).hasOwnProperty(props.valueField)
|
||||
: isObject(value) &&
|
||||
(value as Option).hasOwnProperty(props.valueField || 'value')
|
||||
? [value as Option]
|
||||
: [];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user