Commit 965bd311 by 姜雷

关闭页面后销毁页面对应store

parent 226b53fb
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"name": "rym-element-ui", "name": "rym-element-ui",
"version": "0.1.52", "version": "0.1.53",
"description": "任意门组件库", "description": "任意门组件库",
"main": "lib/rymUi.common.js", "main": "lib/rymUi.common.js",
"scripts": { "scripts": {
......
...@@ -94,15 +94,18 @@ export default { ...@@ -94,15 +94,18 @@ export default {
}); });
}, },
closeSelectedTag(view) { closeSelectedTag(view) {
if (view.store) view.store.uninstall(this.$store);
this.delVisitedViews(view).then(views => { this.delVisitedViews(view).then(views => {
if (this.isActive(view)) { if (this.isActive(view)) {
const latestView = views.slice(-1)[0]; const latestView = views.slice(-1)[0];
if (latestView) { if (latestView) {
this.$router.push(latestView.path); this.$router.push(latestView.path);
if (view.store) view.store.uninstall(this.$store);
} else { } else {
this.$router.push('/'); this.$router.push('/');
if (view.store) view.store.uninstall(this.$store);
} }
} else {
if (view.store) view.store.uninstall(this.$store);
} }
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment