From b2298c8c996dd176c2bd7d424a1aa709cbb97965 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 05 二月 2021 15:34:21 +0800 Subject: [PATCH] 2021-02-05 --- src/tabviews/zshare/actionList/tabbutton/index.jsx | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx index 9223ef1..8d242e9 100644 --- a/src/tabviews/zshare/actionList/tabbutton/index.jsx +++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx @@ -134,18 +134,22 @@ return tab.MenuID !== newtab.MenuID }) - if (tabviews.length !== tabs.length) { - this.props.modifyTabview(fromJS(tabs).toJS()) - } - - this.setState({}, () => { - if (MenuID) { - tabs.splice(index + 1, 0, newtab) - } else { - tabs.push(newtab) + if (window.GLOB.navBar === 'topmenu') { + this.props.modifyTabview([newtab]) + } else { + if (tabviews.length !== tabs.length) { + this.props.modifyTabview(fromJS(tabs).toJS()) } - this.props.modifyTabview(tabs) - }) + + this.setState({}, () => { + if (MenuID) { + tabs.splice(index + 1, 0, newtab) + } else { + tabs.push(newtab) + } + this.props.modifyTabview(tabs) + }) + } MKEmitter.emit('openNewTab') if (window.GLOB.systemType === 'production') { -- Gitblit v1.8.0