提交 8b87d79f 编写于 作者: L lin-xin

'tags栏保持在顶部/tags标签最多显示8个'

上级 14e48d2c
...@@ -61,11 +61,16 @@ ...@@ -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({ if(!isExist){
title: route.meta.title, if(this.tagsList.length >= 8){
path: route.fullPath, this.tagsList.shift();
name: route.matched[1].components.default.name }
}) 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 @@ ...@@ -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 {
......
...@@ -26,7 +26,6 @@ a { ...@@ -26,7 +26,6 @@ a {
right: 0; right: 0;
top: 70px; top: 70px;
bottom: 0; bottom: 0;
overflow-y: scroll;
-webkit-transition: left .3s ease-in-out; -webkit-transition: left .3s ease-in-out;
transition: left .3s ease-in-out; transition: left .3s ease-in-out;
background: #f0f0f0; background: #f0f0f0;
...@@ -34,7 +33,10 @@ a { ...@@ -34,7 +33,10 @@ a {
.content { .content {
width: auto; width: auto;
height: 100%;
padding: 40px; padding: 40px;
overflow-y: scroll;
box-sizing: border-box;
} }
.content-collapse { .content-collapse {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册