feat(CheckboxGroup): add toggleAll method (#4640)

This commit is contained in:
neverland
2019-09-30 14:47:35 +08:00
committed by GitHub
parent 9a79de0456
commit 1c5463150c
7 changed files with 240 additions and 114 deletions

View File

@@ -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>;
}