JayFate 8f569168a1
fix(checkbox): remove unused method (#4527)
Signed-off-by: JayFate <37610029@qq.com>
2021-09-27 11:23:57 +08:00

33 lines
727 B
JavaScript

import Page from '../../common/page';
Page({
data: {
checkbox1: true,
checkbox2: true,
checkbox3: true,
checkboxLabel: true,
checkboxSize: true,
checkboxShape: true,
list: ['a', 'b', 'c'],
result: ['a', 'b'],
result2: [],
result3: [],
result4: [],
activeIcon: 'https://img.yzcdn.cn/vant/user-active.png',
inactiveIcon: 'https://img.yzcdn.cn/vant/user-inactive.png',
},
onChange(event) {
const { key } = event.currentTarget.dataset;
this.setData({ [key]: event.detail });
},
toggle(event) {
const { index } = event.currentTarget.dataset;
const checkbox = this.selectComponent(`.checkboxes-${index}`);
checkbox.toggle();
},
noop() {},
});