index.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. "use strict";
  2. var _page = _interopRequireDefault(require("../../common/page"));
  3. var _notify = _interopRequireDefault(require("../../dist/notify/notify"));
  4. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
  5. (0, _page["default"])({
  6. showNotify: function showNotify() {
  7. (0, _notify["default"])("通知内容");
  8. },
  9. showCustomColor: function showCustomColor() {
  10. (0, _notify["default"])({
  11. message: "自定义颜色",
  12. color: "#ad0000",
  13. background: "#ffe1e1"
  14. });
  15. setTimeout(_notify["default"].clear, 1000);
  16. },
  17. showCustomDuration: function showCustomDuration() {
  18. (0, _notify["default"])({
  19. duration: 1000,
  20. message: "自定义时长"
  21. });
  22. },
  23. showNotifyByType: function showNotifyByType(event) {
  24. var type = event.currentTarget.dataset.type;
  25. (0, _notify["default"])({
  26. type: type,
  27. message: "通知内容"
  28. });
  29. },
  30. showSafe: function showSafe() {
  31. (0, _notify["default"])({
  32. message: "通知内容",
  33. safeAreaInsetTop: true
  34. });
  35. }
  36. });