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