From e762056e801c1459f98a453ab0a0cf6b7d3d5f04 Mon Sep 17 00:00:00 2001 From: Pan Date: Mon, 23 Oct 2017 13:45:09 +0800 Subject: [PATCH] refactor: tabsview --- src/views/layout/components/TabsView.vue | 74 +++++++++++++++++++++--- 1 file changed, 67 insertions(+), 7 deletions(-) diff --git a/src/views/layout/components/TabsView.vue b/src/views/layout/components/TabsView.vue index 7f1eaa9f..3ba62820 100644 --- a/src/views/layout/components/TabsView.vue +++ b/src/views/layout/components/TabsView.vue @@ -1,9 +1,8 @@ @@ -15,6 +14,9 @@ export default { return this.$store.state.app.visitedViews.slice(-6) } }, + mounted() { + this.$store.dispatch('addVisitedViews', this.generateRoute()) + }, methods: { closeViewTabs(view, $event) { this.$store.dispatch('delVisitedViews', view).then((views) => { @@ -52,12 +54,70 @@ export default { + +