From 1d14ade6b5b75b7f7e37958d95f8bb6a6dcc036d Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期一, 10 四月 2023 18:33:40 +0800 Subject: [PATCH] 优化避免鼠标移出时无法隐藏滚动条的问题 --- src/components/TopNav/index.vue | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue index 003e5f6..c2d1a74 100644 --- a/src/components/TopNav/index.vue +++ b/src/components/TopNav/index.vue @@ -3,6 +3,7 @@ :default-active="activeMenu" mode="horizontal" @select="handleSelect" + :ellipsis="false" > <template v-for="(item, index) in topMenus"> <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber" @@ -96,7 +97,9 @@ if (path !== undefined && path.lastIndexOf("/") > 0 && hideList.indexOf(path) === -1) { const tmpPath = path.substring(1, path.length); activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/")); - appStore.toggleSideBarHide(false); + if (!route.meta.link) { + appStore.toggleSideBarHide(false); + } } else if(!route.children) { activePath = path; appStore.toggleSideBarHide(true); @@ -138,6 +141,8 @@ } if(routes.length > 0) { permissionStore.setSidebarRouters(routes); + } else { + appStore.toggleSideBarHide(true); } return routes; } -- Gitblit v1.9.3