my.setStorageSync({
    key: "activeComponent",
    data: {
        is: "pages/checkbox/index"
    }
});
import createPage from "../../common/page";
createPage({
    data: {
        checkbox1: true,
        checkbox2: true,
        checkbox3: true,
        list: ["a", "b", "c"],
        result: ["a", "b"],
        result2: [],
        result3: [],
        icon: {
            normal:
                "https://img.yzcdn.cn/public_files/2017/10/13/c547715be149dd3faa817e4a948b40c4.png",
            active:
                "https://img.yzcdn.cn/public_files/2017/10/13/793c77793db8641c4c325b7f25bf130d.png"
        }
    },

    onChange(event) {
        console.log(event);
        const { key } = event.currentTarget.dataset;
        this.setData({
            [key]: event.detail
        });
    },

    onClick(event) {
        const { value } = event.currentTarget.dataset;
        this.setData({
            radio3: value
        });
    },

    toggle(event) {
        const { index } = event.currentTarget.dataset;
        const checkbox = this.selectComponent(`.checkboxes-${index}`);
        console.log("toggle");
        checkbox.toggle();
    },

    noop() {}
});
