| | |
| | | }) |
| | | } |
| | | |
| | | deleteCard = (id) => { |
| | | let _this = this |
| | | let config = fromJS(this.state.config).toJS() |
| | | |
| | | confirm({ |
| | | title: '确定删除元素吗?', |
| | | content: '', |
| | | onOk() { |
| | | config.components = config.components.filter(item => item.uuid !== id) |
| | | |
| | | _this.setState({ |
| | | config: config |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } |
| | | |
| | | editCard = (element) => { |
| | | this.setState({ |
| | | editElem: element |
| | |
| | | <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{dict['mob.save']}</Button> |
| | | </div> |
| | | } style={{ width: '100%' }}> |
| | | {/* {config && config.components ? <MenuShell menu={config} handleList={this.updateConfig} deleteCard={this.deleteCard} /> : null} */} |
| | | {config && config.components ? <MenuShell name="Glass" menu={config} handleList={this.updateConfig} deleteCard={this.deleteCard} /> : null} |
| | | {config && config.components ? <MenuShell menu={config} handleList={this.updateConfig} /> : null} |
| | | </Card> |
| | | </div> |
| | | </div> |