diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 1feebef..610dbaf 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -11,6 +11,7 @@ import LayoutContent from './components/Content.vue'; import Setting from './setting.vue'; import { prefix } from '@/config/global'; +import { TRouterInfo } from '@/interface'; import '@/style/layout.less'; @@ -161,7 +162,7 @@ export default defineComponent({ style={{ maxWidth: '100%', position: 'fixed', overflow: 'visible' }} onRemove={handleRemove} > - {tabRouters.map((router: any, idx: number) => ( + {tabRouters.map((router: TRouterInfo, idx: number) => ( ( - - handleRefresh(router.path, idx)}> - - 刷新 - - {idx > 0 && ( - handleCloseAhead(router.path, idx)}> - - 关闭左侧 + dropdown: () => + router.path === route.path ? ( + + handleRefresh(router.path, idx)}> + + 刷新 - )} - {idx < tabRouters.length - 1 && ( - handleCloseBehind(router.path, idx)}> - - 关闭右侧 + {idx > 0 && ( + handleCloseAhead(router.path, idx)}> + + 关闭左侧 + + )} + {idx < tabRouters.length - 1 && ( + handleCloseBehind(router.path, idx)}> + + 关闭右侧 + + )} + handleCloseOther(router.path, idx)}> + + 关闭其它 - )} - handleCloseOther(router.path, idx)}> - - 关闭其它 - - - ), + + ) : null, }} > {!router.isHome ? router.title : }