Skip to content

Commit 6c67c8a

Browse files
author
piexlmax
committed
修复面包屑
1 parent 3ab0580 commit 6c67c8a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

web/src/permission.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ async function handleKeepAlive(to) {
3636

3737
router.beforeEach(async(to, from, next) => {
3838
const userStore = useUserStore()
39+
to.meta.matched = JSON.parse(JSON.stringify(to.matched))
3940
handleKeepAlive(to)
4041
const token = userStore.token
4142
// 在白名单中的判断情况

web/src/view/layout/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
</el-col>
3232
<el-col :xs="10" :lg="14" :md="14" :sm="9" :xl="14" :pull="1">
3333
<el-breadcrumb class="breadcrumb">
34+
3435
<el-breadcrumb-item
3536
v-for="item in matched.slice(1,matched.length)"
3637
:key="item.path"
@@ -119,7 +120,6 @@ import { useRouterStore } from '@/pinia/modules/router'
119120
const router = useRouter()
120121
const route = useRoute()
121122
const routerStore = useRouterStore()
122-
console.log(routerStore.keepAliveRouters)
123123
// 三种窗口适配
124124
const isCollapse = ref(false)
125125
const isSider = ref(true)
@@ -186,7 +186,7 @@ const backgroundColor = computed(() => {
186186
}
187187
})
188188
189-
const matched = computed(() => route.matched)
189+
const matched = computed(() => route.meta.matched)
190190
191191
const changeUserAuth = async(id) => {
192192
const res = await setUserAuthority({

0 commit comments

Comments
 (0)