diff --git a/src/components/cache/AKeepAlive.js b/src/components/cache/AKeepAlive.js index 8c0eb8b..23f0031 100644 --- a/src/components/cache/AKeepAlive.js +++ b/src/components/cache/AKeepAlive.js @@ -127,7 +127,7 @@ export default { // same constructor may get registered as different local components // so cid alone is not enough (#3269) ? componentOptions.Ctor.cid + (componentOptions.tag ? `::${componentOptions.tag}` : '') - : vnode.key + : vnode.key + componentOptions.Ctor.cid if (cache[key]) { vnode.componentInstance = cache[key].componentInstance // make current key freshest diff --git a/src/layouts/tabs/TabsView.vue b/src/layouts/tabs/TabsView.vue index 96a6978..46d0430 100644 --- a/src/layouts/tabs/TabsView.vue +++ b/src/layouts/tabs/TabsView.vue @@ -261,7 +261,8 @@ export default { const page = this.pageList.find(item => item.fullPath === route.fullPath) page.unclose = route.meta && route.meta.page && (route.meta.page.closable === false) if (!page._init_) { - page.cachedKey = this.$refs.tabContent.$vnode.key + const vnode = this.$refs.tabContent.$vnode + page.cachedKey = vnode.key + vnode.componentOptions.Ctor.cid page._init_ = true } },