diff --git a/src/store/modules/app.js b/src/store/modules/app.js index 4b612ec243a9cf635c4c0b4ece41f07c105932a9..dcdb98ccc5dbed11a53084876dee4bdc6a5e9ea2 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -1,6 +1,5 @@ import Cookies from 'js-cookie'; - const app = { state: { sidebar: { diff --git a/src/views/layout/TabsView.vue b/src/views/layout/TabsView.vue index 8cab4f6f34b3698c160a89bc0ccb182b9e2720ec..28a867b93a01feedd2fbf74738ce1d23f181c2bc 100644 --- a/src/views/layout/TabsView.vue +++ b/src/views/layout/TabsView.vue @@ -1,7 +1,7 @@ <template> <div class='tabs-view-container'> <router-link class="tabs-view" v-for="tag in Array.from(visitedViews)" :to="tag.path" :key="tag.path"> - <el-tag :closable="true" @close='closeViewTabs(tag,$event)'> + <el-tag :closable="true" :type="isActive(tag.path)?'primary':''" @close='closeViewTabs(tag,$event)'> {{tag.name}} </el-tag> </router-link> @@ -29,6 +29,9 @@ }, addViewTabs() { this.$store.dispatch('addVisitedViews', this.generateRoute()) + }, + isActive(path) { + return path === this.$route.path } }, watch: {