index.js 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. show: {
  8. basic: false,
  9. top: false,
  10. bottom: false,
  11. left: false,
  12. right: false,
  13. round: false,
  14. closeIcon: false,
  15. customCloseIcon: false,
  16. customIconPosition: false
  17. }
  18. },
  19. toggle: function toggle(type, show) {
  20. this.setData(_defineProperty({}, "show.".concat(type), show));
  21. },
  22. showBasic: function showBasic() {
  23. this.toggle("basic", true);
  24. },
  25. hideBasic: function hideBasic() {
  26. this.toggle("basic", false);
  27. },
  28. showTop: function showTop() {
  29. this.toggle("top", true);
  30. },
  31. hideTop: function hideTop() {
  32. this.toggle("top", false);
  33. },
  34. showLeft: function showLeft() {
  35. this.toggle("left", true);
  36. },
  37. hideLeft: function hideLeft() {
  38. this.toggle("left", false);
  39. },
  40. showRight: function showRight() {
  41. this.toggle("right", true);
  42. },
  43. hideRight: function hideRight() {
  44. this.toggle("right", false);
  45. },
  46. showBottom: function showBottom() {
  47. this.toggle("bottom", true);
  48. },
  49. hideBottom: function hideBottom() {
  50. this.toggle("bottom", false);
  51. },
  52. showRound: function showRound() {
  53. this.toggle("round", true);
  54. },
  55. hideRound: function hideRound() {
  56. this.toggle("round", false);
  57. },
  58. showCloseIcon: function showCloseIcon() {
  59. this.toggle("closeIcon", true);
  60. },
  61. hideCloseIcon: function hideCloseIcon() {
  62. this.toggle("closeIcon", false);
  63. },
  64. showCustomCloseIcon: function showCustomCloseIcon() {
  65. this.toggle("customCloseIcon", true);
  66. },
  67. hideCustomCloseIcon: function hideCustomCloseIcon() {
  68. this.toggle("customCloseIcon", false);
  69. },
  70. showCustomIconPosition: function showCustomIconPosition() {
  71. this.toggle("customIconPosition", true);
  72. },
  73. hideCustomIconPosition: function hideCustomIconPosition() {
  74. this.toggle("customIconPosition", false);
  75. }
  76. });