fix(Checkbox): bind-group prop not work #7447

This commit is contained in:
chenjiahan
2020-11-22 19:12:27 +08:00
parent 2cb5e5e566
commit ec5684c53e
3 changed files with 18 additions and 8 deletions
+4 -1
View File
@@ -30,7 +30,10 @@ export default createComponent({
emit('update:modelValue', []);
} else {
const names = children
.filter((item) => checked || !item.checked.value)
.filter((item) => {
const willCheck = checked || !item.checked.value;
return item.props.bindGroup && willCheck;
})
.map((item) => item.name);
emit('update:modelValue', names);
}