mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
feat(CheckboxGroup): add toggleAll method (#4640)
This commit is contained in:
@@ -23,6 +23,14 @@ export default createComponent({
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
toggleAll(checked) {
|
||||
this.children.forEach(item => {
|
||||
item.toggle(checked);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
render() {
|
||||
return <div class={bem()}>{this.slots()}</div>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user