提交 9fe1d7de 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

fixed: #825

上级 aeabe8cc
...@@ -18,7 +18,7 @@ async function handleKeepAlive(to) { ...@@ -18,7 +18,7 @@ async function handleKeepAlive(to) {
if (to.matched && to.matched.length > 2) { if (to.matched && to.matched.length > 2) {
for (let i = 1; i < to.matched.length; i++) { for (let i = 1; i < to.matched.length; i++) {
const element = to.matched[i - 1] const element = to.matched[i - 1]
if (element.name === "layout") { if (element.name === 'layout') {
to.matched.splice(i, 1) to.matched.splice(i, 1)
await handleKeepAlive(to) await handleKeepAlive(to)
} }
...@@ -32,7 +32,6 @@ async function handleKeepAlive(to) { ...@@ -32,7 +32,6 @@ async function handleKeepAlive(to) {
} }
router.beforeEach(async(to, from, next) => { router.beforeEach(async(to, from, next) => {
to.meta.matcheds =JSON.parse(JSON.stringify(to.matched))
handleKeepAlive(to) handleKeepAlive(to)
const token = store.getters['user/token'] const token = store.getters['user/token']
// 在白名单中的判断情况 // 在白名单中的判断情况
......
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
return this.$route.meta.title || '当前页面' return this.$route.meta.title || '当前页面'
}, },
matched() { matched() {
return this.$route.meta.matcheds return this.$route.matched
} }
}, },
created() { created() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册