From 2d1ecb2628680c31ed075261b40d6f16ca6363dd Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 11 三月 2020 13:39:29 +0800 Subject: [PATCH] 2020-03-11 --- src/tabviews/formtab/index.jsx | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/src/tabviews/formtab/index.jsx b/src/tabviews/formtab/index.jsx index dcafbe6..0ef451a 100644 --- a/src/tabviews/formtab/index.jsx +++ b/src/tabviews/formtab/index.jsx @@ -568,11 +568,42 @@ return this.formGroupRef.handleConfirm() } + reloadview = () => { + this.setState({ + loadingview: true, + viewlost: false, + lostmsg: '', + config: {}, + groups: null, + actions: null, + arr_field: '', + setting: null, + data: null, + configMap: {}, + BIDs: {}, + setsingle: false, + pickup: false, + popData: false, + visible: false, + primaryId: null, + refreshtabs: null + }, () => { + this.loadconfig() + }) + } + UNSAFE_componentWillMount () { // 缁勪欢鍔犺浇鏃讹紝鑾峰彇鑿滃崟鏁版嵁 this.loadconfig() } + UNSAFE_componentWillReceiveProps(nextProps) { + if (nextProps.refreshTab && nextProps.refreshTab.MenuID === this.props.MenuID) { + this.reloadview() + this.props.refreshTabView('') + } + } + shouldComponentUpdate (nextProps, nextState) { return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) } -- Gitblit v1.8.0