breaking change(Checkbox): need @click.stop inside a cell #7023

This commit is contained in:
chenjiahan
2020-10-02 21:36:31 +08:00
parent 839b8654ee
commit c0ea21dcd3
6 changed files with 17 additions and 19 deletions
+1 -8
View File
@@ -62,15 +62,8 @@ export default createComponent({
},
});
let toggleTimer;
const toggle = (newValue = !checked.value) => {
// When toggle method is called multiple times at the same time,
// only the last call is valid.
// This is a hack for usage inside Cell.
clearTimeout(toggleTimer);
toggleTimer = setTimeout(() => {
checked.value = newValue;
});
checked.value = newValue;
};
watch(