| | |
| | | this.setState({card, group}) |
| | | this.props.updateConfig(card) |
| | | } |
| | | |
| | | plusFields = (items) => { |
| | | let _group = fromJS(this.state.group).toJS() |
| | | |
| | | _group.fields.push(...items) |
| | | |
| | | this.updateGroup(_group) |
| | | } |
| | | |
| | | changecols = (type) => { |
| | | let card = fromJS(this.state.card).toJS() |
| | |
| | | /> |
| | | {group ? <div className="form-area"> |
| | | <Icon className="plus" title="添加表单" onClick={this.addForm} type="plus" /> |
| | | <FieldsComponent config={group} type="form" updatefield={this.updateGroup} /> |
| | | <FieldsComponent config={group} type="form" plusFields={this.plusFields} /> |
| | | <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> |
| | | {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(1)}>1列</Button> : null} |
| | | {appType !== 'mob' ? <Button className="mk-cols-change" onClick={() => this.changecols(2)}>2列</Button> : null} |