From da7068bd48791cdee966c786ce0dfd46f6e03df9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 08 一月 2021 19:02:24 +0800 Subject: [PATCH] 2021-01-08 --- src/tabviews/tabmanage/index.jsx | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/tabviews/tabmanage/index.jsx b/src/tabviews/tabmanage/index.jsx index 0d78278..7be8cb2 100644 --- a/src/tabviews/tabmanage/index.jsx +++ b/src/tabviews/tabmanage/index.jsx @@ -8,6 +8,7 @@ import zhCN from '@/locales/zh-CN/main.js' import enUS from '@/locales/en-US/main.js' import Utils from '@/utils/utils.js' +import MKEmitter from '@/utils/events.js' import TransferForm from './transferform' import MutilForm from './mutilform' import subtableurl from '@/assets/img/subtable.jpg' @@ -83,6 +84,7 @@ componentDidMount () { this.getTabs() + MKEmitter.addListener('reloadMenuView', this.reloadMenuView) } shouldComponentUpdate (nextProps, nextState) { @@ -96,6 +98,25 @@ this.setState = () => { return } + MKEmitter.removeListener('reloadMenuView', this.reloadMenuView) + } + + reloadMenuView = (menuId) => { + const { MenuID } = this.props + + if (MenuID !== menuId) return + + this.setState({ + searchKey: '', + tabviews: null, + loading: true, + modaltype: '', + editTab: null, + submitloading: false, + thawVisible: false, + thawmenulist: null + }) + this.getTabs() } handleTab = (tab, type) => { -- Gitblit v1.8.0