index.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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. radio1: "1",
  8. radio2: "2",
  9. radio3: "1",
  10. radio4: "1",
  11. radio5: "1",
  12. radioSize: "1",
  13. radioLabel: "1",
  14. radioShape: "1",
  15. icon: {
  16. normal: "https://img.yzcdn.cn/public_files/2017/10/13/c547715be149dd3faa817e4a948b40c4.png",
  17. active: "https://img.yzcdn.cn/public_files/2017/10/13/793c77793db8641c4c325b7f25bf130d.png"
  18. }
  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 name = event.currentTarget.dataset.name;
  26. this.setData({
  27. radio5: name
  28. });
  29. }
  30. });