Skip to content

Commit 9fe1d7d

Browse files
author
piexlmax
committed
1 parent aeabe8c commit 9fe1d7d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

web/src/permission.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async function handleKeepAlive(to) {
1818
if (to.matched && to.matched.length > 2) {
1919
for (let i = 1; i < to.matched.length; i++) {
2020
const element = to.matched[i - 1]
21-
if (element.name === "layout") {
21+
if (element.name === 'layout') {
2222
to.matched.splice(i, 1)
2323
await handleKeepAlive(to)
2424
}
@@ -32,7 +32,6 @@ async function handleKeepAlive(to) {
3232
}
3333

3434
router.beforeEach(async(to, from, next) => {
35-
to.meta.matcheds =JSON.parse(JSON.stringify(to.matched))
3635
handleKeepAlive(to)
3736
const token = store.getters['user/token']
3837
// 在白名单中的判断情况

web/src/view/layout/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export default {
152152
return this.$route.meta.title || '当前页面'
153153
},
154154
matched() {
155-
return this.$route.meta.matcheds
155+
return this.$route.matched
156156
}
157157
},
158158
created() {

0 commit comments

Comments
 (0)