案例演示
代码
<u-checkbox-group @change="changeCheckbox">
<u-checkbox activeColor="#304D99" name="true" label="设为默认地址" shape="circle" labelColor="#999999"
:checked="checked"></u-checkbox>
</u-checkbox-group>
changeCheckbox(e) {
// console.log(e);
if (!e.length) {
this.checked = false
console.log("未选");
console.log(this.checked);
return;
}
if (e.length) {
this.checked = true
console.log("已选");
console.log(this.checked);
return;
}
},