|
@@ -5,18 +5,18 @@ Vue.mixin({
|
|
|
if (this.$route.meta.keepAlive === true) {
|
|
if (this.$route.meta.keepAlive === true) {
|
|
|
const result = this.$route.meta.keepAlive === true && store.state.tags.tagList.some(ele => {
|
|
const result = this.$route.meta.keepAlive === true && store.state.tags.tagList.some(ele => {
|
|
|
return ele.value === this.$route.fullPath;
|
|
return ele.value === this.$route.fullPath;
|
|
|
- })
|
|
|
|
|
|
|
+ });
|
|
|
if (this.$vnode && !result) {
|
|
if (this.$vnode && !result) {
|
|
|
if (this.$vnode.parent && this.$vnode.parent.componentInstance && this.$vnode.parent.componentInstance.cache) {
|
|
if (this.$vnode.parent && this.$vnode.parent.componentInstance && this.$vnode.parent.componentInstance.cache) {
|
|
|
if (this.$vnode.componentOptions) {
|
|
if (this.$vnode.componentOptions) {
|
|
|
- var key = this.$vnode.key == null
|
|
|
|
|
|
|
+ let key = this.$vnode.key == null
|
|
|
? this.$vnode.componentOptions.Ctor.cid + (this.$vnode.componentOptions.tag ? `::${this.$vnode.componentOptions.tag}` : '')
|
|
? this.$vnode.componentOptions.Ctor.cid + (this.$vnode.componentOptions.tag ? `::${this.$vnode.componentOptions.tag}` : '')
|
|
|
: this.$vnode.key;
|
|
: this.$vnode.key;
|
|
|
- var cache = this.$vnode.parent.componentInstance.cache;
|
|
|
|
|
- var keys = this.$vnode.parent.componentInstance.keys;
|
|
|
|
|
|
|
+ let cache = this.$vnode.parent.componentInstance.cache;
|
|
|
|
|
+ let keys = this.$vnode.parent.componentInstance.keys;
|
|
|
if (cache[key]) {
|
|
if (cache[key]) {
|
|
|
if (keys.length) {
|
|
if (keys.length) {
|
|
|
- var index = keys.indexOf(key);
|
|
|
|
|
|
|
+ let index = keys.indexOf(key);
|
|
|
if (index > -1) {
|
|
if (index > -1) {
|
|
|
keys.splice(index, 1);
|
|
keys.splice(index, 1);
|
|
|
}
|
|
}
|
|
@@ -27,7 +27,6 @@ Vue.mixin({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
next();
|
|
next();
|
|
|
},
|
|
},
|
|
|
-});
|
|
|
|
|
|
|
+});
|