<template>
<view>
<label>
<checkbox :value="value" :checked="allpicks" @tap="allpick" /><text>全选</text>
</label>
<checkbox-group name="allpick">
<label>
<label>
<checkbox :value="value" :checked="allpicks" /><text>A</text>
<checkbox :value="value" :checked="allpicks" /><text>B</text>
<checkbox :value="value" :checked="allpicks" /><text>C</text>
<checkbox :value="value" :checked="allpicks" /><text>D</text>
</label>
</label>
</checkbox-group>
</view>
</template>
<script>
export default {
data() {
return {
allpicks: false,
}
},
methods: {
allpick() {
this.allpicks = !this.allpicks;
}
}
}
</script>
<style>
</style>
标签:uniapp,checkbox,group,反选,allpicks,全选
From: https://www.cnblogs.com/guozhiqiang/p/18138804