mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 10:59:42 +08:00
fix: 修复 property 组件在初始无数据时报错问题 (#2628)
This commit is contained in:
parent
082edb6257
commit
2fdbf5d220
@ -196,7 +196,7 @@ order: 60
|
||||
},
|
||||
"body": {
|
||||
"type": "property",
|
||||
"source": "items"
|
||||
"source": "${items}"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -120,9 +120,10 @@ export default class Property extends React.Component<PropertyProps, object> {
|
||||
prepareRows() {
|
||||
const {column = 3, items, source, data} = this.props;
|
||||
|
||||
const propertyItems = items
|
||||
? items
|
||||
: (resolveVariable(source, data) as Array<PropertyItem>);
|
||||
const propertyItems =
|
||||
(items
|
||||
? items
|
||||
: (resolveVariable(source, data) as Array<PropertyItem>)) || [];
|
||||
|
||||
const rows: PropertyContent[][] = [];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user