diff --git a/src/router/avue-router.js b/src/router/avue-router.js index a4e3ac1..61b462b 100644 --- a/src/router/avue-router.js +++ b/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];