docs(Checkbox): 修改checkbox文档

This commit is contained in:
rex 2018-10-31 09:47:36 +08:00 committed by GitHub
parent c9e89ec594
commit 15f7a81773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View File

@ -32,5 +32,7 @@ Page({
const { name } = event.currentTarget.dataset; const { name } = event.currentTarget.dataset;
const checkbox = this.selectComponent(`.checkboxes-${name}`); const checkbox = this.selectComponent(`.checkboxes-${name}`);
checkbox.toggle(); checkbox.toggle();
} },
noop() {}
}); });

View File

@ -51,7 +51,7 @@
data-name="{{ item }}" data-name="{{ item }}"
bind:click="toggle" bind:click="toggle"
> >
<van-checkbox class="checkboxes-{{ item }}" name="{{ item }}" /> <van-checkbox catch:tap="noop" class="checkboxes-{{ item }}" name="{{ item }}" />
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</van-checkbox-group> </van-checkbox-group>

View File

@ -115,7 +115,7 @@ Page({
data-name="{{ item }}" data-name="{{ item }}"
bind:click="toggle" bind:click="toggle"
> >
<van-checkbox class="checkboxes-{{ item }}" name="{{ item }}" /> <van-checkbox catch:tap="noop" class="checkboxes-{{ item }}" name="{{ item }}" />
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</van-checkbox-group> </van-checkbox-group>
@ -138,7 +138,9 @@ Page({
const { name } = event.currentTarget.dataset; const { name } = event.currentTarget.dataset;
const checkbox = this.selectComponent(`.checkboxes-${name}`); const checkbox = this.selectComponent(`.checkboxes-${name}`);
checkbox.toggle(); checkbox.toggle();
} },
noop() {}
}); });
``` ```