From c95918fb0fffb61b1117fbf4cd429e291b9594d0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 17 九月 2021 01:02:34 +0800 Subject: [PATCH] 2021-09-17 --- src/tabviews/formtab/index.jsx | 31 ++++--------------------------- 1 files changed, 4 insertions(+), 27 deletions(-) diff --git a/src/tabviews/formtab/index.jsx b/src/tabviews/formtab/index.jsx index ed54cf2..35e72b5 100644 --- a/src/tabviews/formtab/index.jsx +++ b/src/tabviews/formtab/index.jsx @@ -16,7 +16,6 @@ import FormGroup from './formgroup' import FormAction from './actionList' import NotFount from '@/components/404' -import { modifyTabview } from '@/store/action' import './index.scss' const { TabPane } = Tabs @@ -507,16 +506,7 @@ MKEmitter.emit('reloadData', this.props.param.parentId, 'formtab', btn) } - let tabs = this.props.tabviews.filter(tab => { - tab.selected = false - if (tab.MenuID === this.props.param.parentId) { - tab.selected = true - } - - return tab.MenuID !== this.props.MenuID - }) - - this.props.modifyTabview(tabs) + MKEmitter.emit('closeTabView', this.props.MenuID) } else if (type === 'error' && btn.afterExecError === 'notclose') { if (btn.execError === 'refresh') { this.loadmaindata() @@ -525,17 +515,7 @@ if (btn.execError !== 'never') { MKEmitter.emit('reloadData', this.props.param.parentId, 'formtab', btn) } - - let tabs = this.props.tabviews.filter(tab => { - tab.selected = false - if (tab.MenuID === this.props.param.parentId) { - tab.selected = true - } - - return tab.MenuID !== this.props.MenuID - }) - - this.props.modifyTabview(tabs) + MKEmitter.emit('closeTabView', this.props.MenuID) } } @@ -692,15 +672,12 @@ const mapStateToProps = (state) => { return { menuType: state.editLevel, - tabviews: state.tabviews, permAction: state.permAction } } -const mapDispatchToProps = (dispatch) => { - return { - modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews)) - } +const mapDispatchToProps = () => { + return {} } export default connect(mapStateToProps, mapDispatchToProps)(NormalTable) \ No newline at end of file -- Gitblit v1.8.0