We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3198fd commit 6cb64beCopy full SHA for 6cb64be
src/store/modules/app.js
@@ -1,6 +1,5 @@
1
import Cookies from 'js-cookie';
2
3
-
4
const app = {
5
state: {
6
sidebar: {
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>
7
</router-link>
@@ -29,6 +29,9 @@
29
},
30
addViewTabs() {
31
this.$store.dispatch('addVisitedViews', this.generateRoute())
32
+ },
33
+ isActive(path) {
34
+ return path === this.$route.path
35
}
36
37
watch: {
0 commit comments