diff --git a/src/pages/layout/proTabs/index.jsx b/src/pages/layout/proTabs/index.jsx index 635ad31d5..d009a47ca 100644 --- a/src/pages/layout/proTabs/index.jsx +++ b/src/pages/layout/proTabs/index.jsx @@ -22,12 +22,12 @@ const ProTabs = (props) => { const fullPath = pathname + search const { - token: { colorBgContainer }, + token: { colorBgContainer } } = theme.useToken() const renderTabBar = (props, DefaultTabBar) => ( - + ) @@ -35,7 +35,7 @@ const ProTabs = (props) => { document.querySelector('#container').scrollTo({ top: 0, left: 0, - behavior: 'smooth', + behavior: 'smooth' }) }, [pathname]) @@ -106,12 +106,12 @@ const ProTabs = (props) => { const tabRightMenu = [ { label: '关闭其他', - key: 'other', + key: 'other' }, { label: '全部关闭', - key: 'all', - }, + key: 'all' + } ] const fixError = () => { @@ -121,48 +121,50 @@ const ProTabs = (props) => { return ( + ), right: ( <> - + - {panes.length > 2 ? ( - { - onTabContextMenu(key) - }, - }} - trigger={['hover']} - > - - - ) : null} + {panes.length > 2 + ? ( + { + onTabContextMenu(key) + } + }} + trigger={['hover']} + > + + + ) + : null} - ), + ) }} items={panes.map((pane) => ({ label: ( @@ -171,7 +173,7 @@ const ProTabs = (props) => { )} @@ -183,15 +185,17 @@ const ProTabs = (props) => { forceRender: true, children: ( -
- {isReload && pane.key === fullPath && pane.key !== '/404' ? ( - - ) : ( - <>{pane.content} - )} +
+ {isReload && pane.key === fullPath && pane.key !== '/404' + ? ( + + ) + : ( + <>{pane.content} + )}
- ), + ) }))} /> )