|
|
@@ -75,7 +75,8 @@ class Factory extends React.Component {
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
- const {fixedbox} = this.state.model;
|
|
|
+ const {title, content, fixedbox} = this.state.model;
|
|
|
+ let titleConfig = title.config || {height: 0};
|
|
|
let items = [];
|
|
|
if(fixedbox) {
|
|
|
items = fixedbox.items || [];
|
|
|
@@ -83,9 +84,9 @@ class Factory extends React.Component {
|
|
|
return (
|
|
|
<div>
|
|
|
<Title {...this.state.model.title.config} />
|
|
|
- <Container items={this.state.model.content.items} rowHeight={(window.innerHeight - this.state.model.title.config.height || 55) / 10} />
|
|
|
+ <Container items={content.items} rowHeight={(window.innerHeight - titleConfig.height || 55) / 10} />
|
|
|
{items.map((item, index) => {
|
|
|
- return <FixedBox key={`${index}`} titleHeight={this.state.model.title.config.height} {...item}/>;
|
|
|
+ return <FixedBox key={`${index}`} titleHeight={titleConfig.height} {...item}/>;
|
|
|
})}
|
|
|
</div>
|
|
|
);
|