+
+
+
+ {{ tag.title }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/layout/components/Topbar.vue b/src/layout/components/Topbar.vue
index 6386335..69675d4 100644
--- a/src/layout/components/Topbar.vue
+++ b/src/layout/components/Topbar.vue
@@ -174,7 +174,7 @@ export default {
handleSelect(key, keyPath) {
// 把选中路由的子路由保存store
const route = this.routes.find(item => item.path === key)
- this.$store.commit('permission/SET_CURRENT_ROUTES', route)
+ this.$store.commit('SET_CURRENT_ROUTES', route)
this.setSidebarHide(route)
},
// 设置侧边栏的显示和隐藏
diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js
index 70ed46a..27e4868 100644
--- a/src/store/modules/permission.js
+++ b/src/store/modules/permission.js
@@ -8,7 +8,8 @@ const permission = {
routers: constantRouterMap,
addRouters: [],
sidebarRouters: [],
- navMenus: []
+ navMenus: [],
+ currentRoutes: {}
},
// 同步更改状态
mutations: {
@@ -21,6 +22,9 @@ const permission = {
},
SET_NAV_MENUS: (state, routers) => {
state.navMenus = routers
+ },
+ SET_CURRENT_ROUTES: (state, routers) => {
+ state.currentRoutes = routers
}
},
// 发送异步请求拿到数据
@@ -34,6 +38,9 @@ const permission = {
SetNavMenus({ commit }, sidebarRouter) {
commit('SET_NAV_MENUS', sidebarRouter)
}
+ // SetCurrentRoutes({ commit }, routes) {
+ // commit('SET_CURRENT_ROUTES', routes)
+ // }
}
}