index.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. show1: false,
  8. show2: false,
  9. show3: false,
  10. show4: false,
  11. show5: false,
  12. show6: false,
  13. action1: [{
  14. name: "选项"
  15. }, {
  16. name: "选项"
  17. }, {
  18. name: "选项",
  19. subname: "描述信息"
  20. }],
  21. action2: [{
  22. name: "着色选项",
  23. color: "#ee0a24"
  24. }, {
  25. loading: true
  26. }, {
  27. name: "禁用选项",
  28. disabled: true
  29. }],
  30. action6: [{
  31. name: "获取用户信息",
  32. color: "#07c160",
  33. openType: "getUserInfo"
  34. }]
  35. },
  36. toggle: function toggle(type) {
  37. this.setData(_defineProperty({}, type, !this.data[type]));
  38. },
  39. toggleActionSheet1: function toggleActionSheet1() {
  40. this.toggle("show1");
  41. },
  42. toggleActionSheet2: function toggleActionSheet2() {
  43. this.toggle("show2");
  44. },
  45. toggleActionSheet3: function toggleActionSheet3() {
  46. this.toggle("show3");
  47. },
  48. toggleActionSheet4: function toggleActionSheet4() {
  49. this.toggle("show4");
  50. },
  51. toggleActionSheet5: function toggleActionSheet5() {
  52. this.toggle("show5");
  53. },
  54. toggleActionSheet6: function toggleActionSheet6() {
  55. this.toggle("show6");
  56. },
  57. onGetUserInfo: function onGetUserInfo(e) {
  58. console.log(e.detail);
  59. }
  60. });