We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcc1abe commit 271c445Copy full SHA for 271c445
web/src/store/module/router.js
@@ -22,7 +22,7 @@ const KeepAliveFilter = (routes) => {
22
routes && routes.forEach(item => {
23
// 子菜单中有 keep-alive 的,父菜单也必须 keep-alive,否则无效。这里将子菜单中有 keep-alive 的父菜单也加入。
24
if ((item.children && item.children.some(ch => ch.meta.keepAlive) || item.meta.keepAlive)) {
25
- item.component().then(val => { keepAliveRouters.push(val.default.name) })
+ item.component && item.component().then(val => { keepAliveRouters.push(val.default.name) })
26
}
27
if (item.children && item.children.length > 0) {
28
KeepAliveFilter(item.children)
0 commit comments