diff --git a/CHANGELOG.md b/CHANGELOG.md index 86ec8dc..1659bac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ 🎉🎉🔥 `vue-prev-admin` 基于 vue2.x + webpack + element ui,适配手机、平板、pc 的后台开源免费模板库(vue3.x 请切换 master 分支) +## 1.2.3 + +`2023.04.12` + +- 🐞 修复 [#I6UW2I 关闭标签页后,分栏没有消失,需要手动点击首页才会消失](https://gitee.com/lyt-top/vue-next-admin/issues/I6UW2I),感谢[@小菜鸟儿](https://gitee.com/cainiaoer) +- 🎯 优化 `layout/navBars/breadcrumb` 文件夹名称改成 `layout/navBars/topBar` 更易理解(可全局替换),感谢群友@傲世盛唐 +- 🎯 优化 `layout/navBars/topBar/user.vue` 组件,`UserNews` 点击消息图标触发范围,防止点击消息通知背景色时不触发 Popover 弹出框 + ## 1.2.2 `2023.02.23` diff --git a/package.json b/package.json index de1ea7a..c9a806a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-prev-admin", - "version": "1.2.2", + "version": "1.2.3", "private": true, "description": "vue2 webpack admin template", "author": "lyt_20201208", diff --git a/src/App.vue b/src/App.vue index 46c0ab7..9412438 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,7 +11,7 @@ import config from '/package.json'; import setIntroduction from '@/utils/setIconfont.js'; import { Local } from '@/utils/storage.js'; -import Setings from '@/layout/navBars/breadcrumb/setings.vue'; +import Setings from '@/layout/navBars/topBar/setings.vue'; import Upgrade from '@/layout/upgrade/index.vue'; import Sponsors from '@/layout/sponsors/index.vue'; export default { diff --git a/src/layout/component/columnsAside.vue b/src/layout/component/columnsAside.vue index 20fae55..7dc61fd 100644 --- a/src/layout/component/columnsAside.vue +++ b/src/layout/component/columnsAside.vue @@ -87,18 +87,22 @@ export default { this.setColumnsAsideMove(k); }); }, - // 设置/过滤路由(非静态路由/是否显示在菜单中) - setFilterRoutes() { - if (this.$store.state.routesList.routesList.length <= 0) return false; - this.columnsAsideList = this.filterRoutesFun(this.$store.state.routesList.routesList); - const resData = this.setSendChildren(this.$route.path); - if (Object.keys(resData).length <= 0) return false; - this.onColumnsAsideDown(resData.item[0].k); - // 刷新时,初始化一个路由设置自动收起菜单 + // 设置只有一个路由时设置自动收起菜单 + // https://gitee.com/lyt-top/vue-next-admin/issues/I6UW2I + setMenuAutoCollaps(path) { + const resData = this.setSendChildren(path); // https://gitee.com/lyt-top/vue-next-admin/issues/I6HW7H resData.children.length <= 1 ? (this.$store.state.themeConfig.themeConfig.isCollapse = true) : (this.$store.state.themeConfig.themeConfig.isCollapse = false); + return resData; + }, + // 设置/过滤路由(非静态路由/是否显示在菜单中) + setFilterRoutes() { + if (this.$store.state.routesList.routesList.length <= 0) return false; + this.columnsAsideList = this.filterRoutesFun(this.$store.state.routesList.routesList); + const resData = this.setMenuAutoCollaps(this.$route.path); + this.onColumnsAsideDown(resData.item[0].k); this.bus.$emit('setSendColumnsChildren', resData); }, // 传送当前子级数据到菜单中 @@ -151,8 +155,9 @@ export default { // 监听路由的变化 $route: { handler(to) { + const resData = this.setMenuAutoCollaps(to.path); this.setColumnsMenuHighlight(to.path); - this.bus.$emit('setSendColumnsChildren', this.setSendChildren(to.path)); + this.bus.$emit('setSendColumnsChildren', resData); }, deep: true, }, diff --git a/src/layout/navBars/index.vue b/src/layout/navBars/index.vue index 5a1ac7b..16de127 100644 --- a/src/layout/navBars/index.vue +++ b/src/layout/navBars/index.vue @@ -6,7 +6,7 @@