CheckBoxCell.vue
748 Bytes
<!-- components navbar-->
<template>
<van-cell :title="title || data.name" class="radio" :class="clazz">
<template>
<van-checkbox-group v-model="comValue" direction="horizontal">
<van-checkbox :name="item.value" v-for="item in data.value" :key="item.name">{{ item.name }}</van-checkbox>
</van-checkbox-group>
</template>
</van-cell>
</template>
<script>
export default {
name: 'CheckBoxCell',
props: ['title', 'data', 'value', 'clazz'],
computed: {
comValue: {
get() {
return this.value
},
set(val) {
this.$emit('update:value', val)
}
}
},
data() {
return {}
}
}
</script>
<style lang="scss" scoped>
@include cellradio();
@include recell(0);
</style>