| | |
| | | */ |
| | | deleteElement = (card) => { |
| | | const { config } = this.props |
| | | let _this = this |
| | | let that = this |
| | | |
| | | confirm({ |
| | | content: `确定删除 - ${card.label} ?`, |
| | | onOk() { |
| | | let _columnlist = fromJS(_this.state.columnlist).toJS() |
| | | let _columnlist = fromJS(that.state.columnlist).toJS() |
| | | |
| | | _columnlist = _columnlist.filter(item => item.uuid !== card.uuid) |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | _this.setState({ |
| | | that.setState({ |
| | | columnlist: _columnlist |
| | | }, ()=> { |
| | | _this.props.updatecolumn({...config, columns: _columnlist}) |
| | | that.props.updatecolumn({...config, columns: _columnlist}) |
| | | }) |
| | | }, |
| | | onCancel() {} |