mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
Merge branch '1.x' into 'dev'
This commit is contained in:
@@ -30,7 +30,15 @@ export default sfc({
|
||||
|
||||
methods: {
|
||||
toggle() {
|
||||
this.checked = !this.checked;
|
||||
const checked = !this.checked;
|
||||
|
||||
// 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(this.toggleTask);
|
||||
this.toggleTask = setTimeout(() => {
|
||||
this.checked = checked;
|
||||
});
|
||||
},
|
||||
|
||||
onClickIcon() {
|
||||
|
Reference in New Issue
Block a user