clay commit : 层级结构完成

This commit is contained in:
clay
2022-10-05 15:49:17 +08:00
parent b40b54f255
commit e450dfac97
4 changed files with 134 additions and 35 deletions

View File

@@ -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;
}
}
}