Browse Source

change keepalive bug

master
396316021 10 months ago
parent
commit
7dab2df975
  1. 7
      src/permission.js

7
src/permission.js

@ -6,6 +6,13 @@ import 'nprogress/nprogress.css'; // progress bar style
NProgress.configure({ showSpinner: false });
const lockPage = '/lock'; //锁屏页
router.beforeEach((to, from, next) => {
// console.log('to',to)
// console.log('from',from)
// console.log('next',next)
//keep-alive BUG matched超过两层就不能缓存
if(to.matched && to.matched.length>2){
to.matched.splice(1,to.matched.length -2)
}
const meta = to.meta || {};
const isMenu = meta.menu === undefined ? to.query.menu : meta.menu;
store.commit('SET_IS_MENU', isMenu === undefined);

Loading…
Cancel
Save