From 07c005cf28acf74e3afde82122e4c53e1000d70c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 12 六月 2023 12:06:18 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/components/tabview/index.jsx | 19 +++++-------------- 1 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/components/tabview/index.jsx b/src/components/tabview/index.jsx index ed050db..1b5e633 100644 --- a/src/components/tabview/index.jsx +++ b/src/components/tabview/index.jsx @@ -23,7 +23,6 @@ const Iframe = asyncComponent(() => import('@/tabviews/iframe')) const RoleManage = asyncComponent(() => import('@/tabviews/rolemanage')) const FormTab = asyncComponent(() => import('@/tabviews/formtab')) -const TabManage = asyncComponent(() => import('@/tabviews/tabmanage')) class TabViews extends Component { static propTpyes = { @@ -124,10 +123,10 @@ } } - modifyTabs = (tab, type, fixed) => { + modifyTabs = (tab, fixed) => { const { tabviews, activeId } = this.state - if (type === 'plus' && fixed) { + if (fixed) { let _tabs = tabviews.filter(item => item.MenuID !== tab.MenuID) let index = _tabs.findIndex(item => item.MenuID === activeId) @@ -144,7 +143,7 @@ activeId: tab.MenuID }) }) - } else if (type === 'plus') { + } else { if (tabviews.findIndex(item => item.MenuID === tab.MenuID) > -1) { let _tabs = tabviews.filter(item => item.MenuID !== tab.MenuID) this.setState({ @@ -161,11 +160,6 @@ activeId: tab.MenuID }) } - } else if (type === 'replace') { - this.setState({ - tabviews: tab ? [tab] : [], - activeId: tab ? tab.MenuID : '' - }) } let node = document.getElementById('root').parentNode.parentNode @@ -216,8 +210,6 @@ return (<RoleManage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>) } else if (view.type === 'FormTab') { return (<FormTab MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>) - } else if (view.type === 'TabManage') { - return (<TabManage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>) } else if (view.type === 'iframe') { return (<Iframe key={view.MenuID} MenuID={view.MenuID} MenuNo={view.MenuNo} title={view.MenuName} MenuName={view.MenuName} url={window.GLOB.baseurl + 'zh-CN/' + view.LinkUrl}/>) } else { @@ -269,11 +261,11 @@ const { tabviews, activeId } = this.state return ( - <section id="mk-tabview-wrap" className={'mk-tabview-wrap' + (this.props.collapse ? ' collapsed' : '') + (tabviews && tabviews.length > 0 ? ' hastab' : '')}> + <section className={'mk-tabview-wrap' + (this.props.collapse ? ' collapsed' : '')}> <div className="content-header"> {tabviews && tabviews.length > 0 && <Tabs activeKey={activeId}> - {tabviews.map((view, index) => { + {tabviews.map(view => { return ( <Tabs.TabPane tab={ @@ -297,7 +289,6 @@ </div> </div> </BackTop> - {/* {options.sysType === 'local' && window.GLOB.systemType !== 'production' ? <div className="mk-water-mark">娴嬭瘯绯荤粺</div> : null} */} </Tabs.TabPane> ) })} -- Gitblit v1.8.0