页面缓存修改

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

Loading…
Cancel
Save