<template>
<div style="margin: 15px;">
<el-tabs v-model="title">
<el-tab-pane
:key="item.name"
v-for="(item, index) in citys"
:label="item.name"
:name="item.name"
>
<el-checkbox-group v-model="item.checked" >
<el-checkbox v-for="city in item.citys" :label="city" :key="city">{{city}}</el-checkbox>
</el-checkbox-group>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
export default {
data() {
return {
title:'广东',
isIndeterminate: true,
citys:[
{
name:'广东',
citys:['广州','佛山','中山'],
checked:[]
},
{
name:'广西',
citys:['梧州','啦啦','饿呢'],
checked:[]
},
{
name:'湖南',
citys:['郴州','湖南11','湖南22'],
checked:[]
}
]
};
},
methods: {
}
};
</script>
element-ui tabs 与 checkbox
最新推荐文章于 2023-11-01 13:43:08 发布