|
@@ -61,11 +61,16 @@
|
|
|
const isExist = this.tagsList.some(item => {
|
|
const isExist = this.tagsList.some(item => {
|
|
|
return item.path === route.fullPath;
|
|
return item.path === route.fullPath;
|
|
|
})
|
|
})
|
|
|
- !isExist && this.tagsList.push({
|
|
|
|
|
- title: route.meta.title,
|
|
|
|
|
- path: route.fullPath,
|
|
|
|
|
- name: route.matched[1].components.default.name
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if(!isExist){
|
|
|
|
|
+ if(this.tagsList.length >= 8){
|
|
|
|
|
+ this.tagsList.shift();
|
|
|
|
|
+ }
|
|
|
|
|
+ this.tagsList.push({
|
|
|
|
|
+ title: route.meta.title,
|
|
|
|
|
+ path: route.fullPath,
|
|
|
|
|
+ name: route.matched[1].components.default.name
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
bus.$emit('tags', this.tagsList);
|
|
bus.$emit('tags', this.tagsList);
|
|
|
},
|
|
},
|
|
|
handleTags(command){
|
|
handleTags(command){
|
|
@@ -97,6 +102,7 @@
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
padding-right: 120px;
|
|
padding-right: 120px;
|
|
|
|
|
+ box-shadow: 0 5px 10px #ddd;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.tags ul {
|
|
.tags ul {
|