File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ async function handleKeepAlive(to) {
18
18
if ( to . matched && to . matched . length > 2 ) {
19
19
for ( let i = 1 ; i < to . matched . length ; i ++ ) {
20
20
const element = to . matched [ i - 1 ]
21
- if ( element . name === " layout" ) {
21
+ if ( element . name === ' layout' ) {
22
22
to . matched . splice ( i , 1 )
23
23
await handleKeepAlive ( to )
24
24
}
@@ -32,7 +32,6 @@ async function handleKeepAlive(to) {
32
32
}
33
33
34
34
router . beforeEach ( async ( to , from , next ) => {
35
- to . meta . matcheds = JSON . parse ( JSON . stringify ( to . matched ) )
36
35
handleKeepAlive ( to )
37
36
const token = store . getters [ 'user/token' ]
38
37
// 在白名单中的判断情况
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ export default {
152
152
return this .$route .meta .title || ' 当前页面'
153
153
},
154
154
matched () {
155
- return this .$route .meta . matcheds
155
+ return this .$route .matched
156
156
}
157
157
},
158
158
created () {
You can’t perform that action at this time.
0 commit comments