Commit 9ee7eea0 by 潘建波

添加tag关闭

1 parent 12b1ca04
...@@ -172,10 +172,12 @@ html,body{ ...@@ -172,10 +172,12 @@ html,body{
cursor: pointer; cursor: pointer;
color: #888888; color: #888888;
} }
.el-tag .el-icon-close{ .nav-tag-box .el-tag .el-icon-close{
color: #888888; color: #888888;
cursor: pointer;
} }
.el-tag .el-icon-close:hover{ .nav-tag-box .el-tag .el-icon-close:hover{
background: none; background: none;
cursor: pointer;
color: #3BB7FF; color: #3BB7FF;
} }
\ No newline at end of file \ No newline at end of file
...@@ -17,10 +17,11 @@ ...@@ -17,10 +17,11 @@
<div class="nav"> <div class="nav">
<div class="nav-tag-box"> <div class="nav-tag-box">
<el-tag <el-tag
v-for="tag in topbarArr" :key="tag" v-for="(tag,index) in topbarArr" :key="index"
closable closable
@close="closetag(tag,index)"
@click="toPath(tag)" @click="toPath(tag)"
:type="tag.type"> >
<i :class="tag.icon"></i> <i :class="tag.icon"></i>
{{tag.name}} {{tag.name}}
</el-tag> </el-tag>
...@@ -65,6 +66,9 @@ export default { ...@@ -65,6 +66,9 @@ export default {
}, },
toPath(data){ toPath(data){
this.$refs.leftmenu.handleSelect(data.path) this.$refs.leftmenu.handleSelect(data.path)
},
closetag(data,index){
this.topbarArr.splice(index,1)
} }
}, },
created(){ created(){
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!