clay commit : 层级结构完成
This commit is contained in:
@@ -18,10 +18,8 @@
|
||||
{{ chile.name }}<span v-if="chile.children.length>1">({{chile.children.length}}人)</span>
|
||||
</el-col>
|
||||
<el-col class="text" :offset="1" :span="23">
|
||||
<div v-for="(item,index) in chile.children" :key="index">
|
||||
<a :href="item.link">
|
||||
<div v-for="(item,index) in chile.children" :key="index" @click="linkClick(item)">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -57,6 +55,13 @@ export default {
|
||||
}],
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
linkClick(chile){
|
||||
if (chile.link){
|
||||
window.open(chile.link)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -104,16 +109,13 @@ export default {
|
||||
div {
|
||||
float: left;
|
||||
margin-top: .4rem;
|
||||
cursor: pointer;
|
||||
//width: 7.4%;
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
a{
|
||||
color: #000000;
|
||||
text-decoration: none
|
||||
}
|
||||
a:hover{
|
||||
color: #1956BC;
|
||||
}
|
||||
margin-right: 1.5rem;
|
||||
color: #000000;
|
||||
}
|
||||
div:hover{
|
||||
color: #1956BC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user