Commit b605f218 authored by jingnan's avatar jingnan 👀

点击app只切换菜单,不做跳转

parent a2b23331
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
v-show="!['系统管理','应用中心','安全中心','运维中心'].includes(activeModel.name)" v-show="!['系统管理','应用中心','安全中心','运维中心'].includes(activeModel.name)"
ref="homeLink" ref="homeLink"
class="home tags-view-item" class="home tags-view-item"
:to="{ path: '/',query:{showMenu:false}}" :to="{ path: '/'}"
tag="span" tag="span"
> >
<i class="el-icon-s-home" /> <i class="el-icon-s-home" />
......
...@@ -233,7 +233,12 @@ export default { ...@@ -233,7 +233,12 @@ export default {
} }
toPage.query.menuRootAppId = app.id toPage.query.menuRootAppId = app.id
localStorage.setItem('moduleName', app.title) localStorage.setItem('moduleName', app.title)
this.$router.push(toPage) // this.$router.push(toPage)
// 点击app只切换菜单,不做跳转
this.$store.dispatch('menu/activeModel', {
appId: app.id,
pageInfo: toPage
})
this.$store.dispatch('app/openSideBar', { withoutAnimation: false }) this.$store.dispatch('app/openSideBar', { withoutAnimation: false })
}, },
getActiveTab(menus) { getActiveTab(menus) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment