index.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. "use strict";
  2. var _page = _interopRequireDefault(require("../../common/page"));
  3. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
  4. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  5. (0, _page["default"])({
  6. data: {
  7. checkbox1: true,
  8. checkbox2: true,
  9. checkbox3: true,
  10. checkboxLabel: true,
  11. checkboxSize: true,
  12. checkboxShape: true,
  13. list: ["a", "b", "c"],
  14. result: ["a", "b"],
  15. result2: [],
  16. result3: [],
  17. activeIcon: "https://img.yzcdn.cn/vant/user-active.png",
  18. inactiveIcon: "https://img.yzcdn.cn/vant/user-inactive.png"
  19. },
  20. onChange: function onChange(event) {
  21. var key = event.currentTarget.dataset.key;
  22. this.setData(_defineProperty({}, key, event.detail));
  23. },
  24. onClick: function onClick(event) {
  25. var value = event.currentTarget.dataset.value;
  26. this.setData({
  27. radio3: value
  28. });
  29. },
  30. toggle: function toggle(event) {
  31. var index = event.currentTarget.dataset.index;
  32. var checkbox = this.selectComponent(".checkboxes-".concat(index));
  33. checkbox.toggle();
  34. },
  35. noop: function noop() {},
  36. antmoveAction: function antmoveAction() {//执行时动态赋值,请勿删除
  37. }
  38. });