From 753ac5f57b10588e225c1d82203b13a81bc9c9a7 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 03 十二月 2020 18:36:26 +0800 Subject: [PATCH] 2020-12-03 --- src/tabviews/commontable/index.jsx | 19 ++++++++----------- 1 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index d5e7747..8d087d5 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -319,7 +319,7 @@ if (_hideCol.includes(col.uuid)) return if (col.linkmenu && col.linkmenu.length > 0) { - let menu_id = col.linkmenu[col.linkmenu.length - 1] + let menu_id = col.linkmenu.slice(-1)[0] col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || '' } else { col.linkThdMenu = '' @@ -329,13 +329,13 @@ if (col.type === 'colspan' && col.sublist) { let _col = fromJS(col).toJS() - let subColumn = [] + let subcols = [] _col.sublist.forEach(sub => { if (colMap.has(sub)) { - subColumn.push(colMap.get(sub)) + subcols.push(colMap.get(sub)) } }) - _col.subColumn = subColumn + _col.subcols = subcols _columns.push(_col) } else { _columns.push(col) @@ -465,13 +465,10 @@ _ActiveTabId = _tab.uuid }) - this.setState({ - tabActive: {...this.state.tabActive, [_groupId]: _ActiveTabId} - }, () => { + if (_ActiveTabId && this.state.tabActive[_groupId] === _ActiveTabId) { MKEmitter.emit('triggerBtnId', triggerId) - }) - - return true + return true + } } return false }) @@ -1056,7 +1053,7 @@ </Row> : null } {setting && setting.onload !== 'false' && config.tabgroups.map(group => ( - <Tabs activeKey={tabActive[group.uuid]} key={group.uuid} onChange={(key) => this.setState({tabActive: {...tabActive, [group.uuid]: key}})}> + <Tabs key={group.uuid} onChange={(key) => this.setState({tabActive: {...tabActive, [group.uuid]: key}})}> {group.sublist.map(_tab => { return ( <TabPane tab={ -- Gitblit v1.8.0