| | |
| | | } |
| | | |
| | | if (editMenu.MenuID && editMenu.property === 'menu' && res.property !== 'menu') { |
| | | const _this = this |
| | | const that = this |
| | | confirm({ |
| | | content: '菜单将被重置,确定修改吗?', |
| | | onOk() { |
| | |
| | | } |
| | | return item |
| | | }) |
| | | _this.setState({menus: _menus, editMenu: null, visible: false}, () => { |
| | | _this.props.updateConfig(_menus) |
| | | that.setState({menus: _menus, editMenu: null, visible: false}, () => { |
| | | that.props.updateConfig(_menus) |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | |
| | | */ |
| | | deleteElement = (card) => { |
| | | const { menus } = this.state |
| | | let _this = this |
| | | let that = this |
| | | |
| | | confirm({ |
| | | content: `确定删除《${card.name}》吗?`, |
| | | onOk() { |
| | | let _menus = menus.filter(item => item.MenuID !== card.MenuID) |
| | | |
| | | _this.setState({ |
| | | that.setState({ |
| | | menus: _menus |
| | | }, () => { |
| | | _this.props.updateConfig(_menus) |
| | | that.props.updateConfig(_menus) |
| | | }) |
| | | }, |
| | | onCancel() {} |