页面缓存修改

dev-scheduling
zhangdi 2 weeks ago
parent fc13512d1b
commit b934cbefb2
  1. 10
      src/router/avue-router.js

@ -56,9 +56,9 @@ RouterPlugin.install = function (option = {}) {
children = oMenu[propsDefault.children],
query = oMenu[propsDefault.query],
meta = oMenu[propsDefault.meta];
if (option.keepAlive) {
meta.keepAlive = option.keepAlive;
}
// if (option.keepAlive) {
meta.keepAlive = true;
// }
const isChild = !!(children && children.length !== 0);
const oRouter = {
path: path,
@ -131,7 +131,7 @@ export const formatPath = (ele, first) => {
const icon = ele[propsDefault.icon];
ele[propsDefault.icon] = !icon ? propsDefault.iconDefault : icon;
ele.meta = {
keepAlive: ele.isOpen === 2,
keepAlive: true,
};
const iframeComponent = 'components/iframe/main';
const iframeSrc = href => {
@ -160,7 +160,7 @@ export const formatPath = (ele, first) => {
ele[propsDefault.children].forEach(child => {
child.component = 'views' + child[propsDefault.path];
child.meta = {
keepAlive: child.isOpen === 2,
keepAlive: true,
};
if (isURL(child[propsDefault.href])) {
let href = child[propsDefault.href];

Loading…
Cancel
Save