refine tab-views
							parent
							
								
									e3198fd47d
								
							
						
					
					
						commit
						6cb64bebdc
					
				|  | @ -1,6 +1,5 @@ | |||
| import Cookies from 'js-cookie'; | ||||
| 
 | ||||
| 
 | ||||
| const app = { | ||||
|   state: { | ||||
|     sidebar: { | ||||
|  |  | |||
|  | @ -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: { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Pan
						Pan