From f3167f8371d19d0ea8fe7d0e7af5517ff0b08cd2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 07 四月 2021 23:25:29 +0800 Subject: [PATCH] 2021-04-07 --- src/tabviews/zshare/actionList/tabbutton/index.jsx | 31 ++++++++++++++++--------------- 1 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx index 9223ef1..28bf3f2 100644 --- a/src/tabviews/zshare/actionList/tabbutton/index.jsx +++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx @@ -73,11 +73,9 @@ } let primaryId = '' - let _data = null if (btn.Ot === 'requiredSgl') { primaryId = data[0][setting.primaryKey] || '' - _data = data[0] } let newtab = {} @@ -117,8 +115,7 @@ ...menu, selected: true, param: { - BID: primaryId, - data: _data + $BID: primaryId } } } @@ -134,18 +131,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 (['linkage_navigation', 'linkage'].includes(window.GLOB.navBar)) { + 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