优化权限代码

dev
xuechunyuan 3 years ago
parent cf85ab154d
commit b76e9f0576
  1. 3
      src/permission.js

@ -17,12 +17,13 @@ router.beforeEach((to, from, next) => {
} else { } else {
window.onresize = () => { window.onresize = () => {
if (location.href.indexOf('home') < 0) { if (location.href.indexOf('home') < 0) {
return;
} }
else {
var dev_width = document.documentElement.clientWidth || document.body.clientWidth var dev_width = document.documentElement.clientWidth || document.body.clientWidth
document.documentElement.style.fontSize = (dev_width / 1920) * 100 + 'px' document.documentElement.style.fontSize = (dev_width / 1920) * 100 + 'px'
} }
} }
}
const meta = to.meta || {}; const meta = to.meta || {};
const isMenu = meta.menu === undefined ? to.query.menu : meta.menu; const isMenu = meta.menu === undefined ? to.query.menu : meta.menu;
store.commit('SET_IS_MENU', isMenu === undefined); store.commit('SET_IS_MENU', isMenu === undefined);

Loading…
Cancel
Save