diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 3e567a4..74a798e 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -185,42 +185,44 @@ export default defineComponent({ - router.path === route.path ? ( - - handleRefresh(router.path, idx)}> - - 刷新 - - {idx > 1 && ( - handleCloseAhead(router.path, idx)}> - - 关闭左侧 + v-slots={{ + label: () => ( + + router.path === route.path ? ( + + handleRefresh(router.path, idx)}> + + 刷新 - )} - {idx < tabRouters.length - 1 && ( - handleCloseBehind(router.path, idx)}> - - 关闭右侧 + {idx > 1 && ( + 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 : } - - } + + ) : null, + }} + > + {!router.isHome ? router.title : } + + ), + }} removable={!router.isHome} /> ))}