wd-overlay.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. const common_vendor = require("../../../../common/vendor.js");
  3. if (!Math) {
  4. wdTransition();
  5. }
  6. const wdTransition = () => "../wd-transition/wd-transition.js";
  7. const __default__ = {
  8. name: "wd-overlay",
  9. options: {
  10. virtualHost: true,
  11. addGlobalClass: true,
  12. styleIsolation: "shared"
  13. }
  14. };
  15. const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  16. ...__default__,
  17. props: common_vendor.overlayProps,
  18. emits: ["click"],
  19. setup(__props, { emit: __emit }) {
  20. const emit = __emit;
  21. function handleClick() {
  22. emit("click");
  23. }
  24. function noop() {
  25. }
  26. return (_ctx, _cache) => {
  27. return {
  28. a: common_vendor.o(handleClick),
  29. b: common_vendor.o(($event) => _ctx.lockScroll ? noop : ""),
  30. c: common_vendor.p({
  31. show: _ctx.show,
  32. name: "fade",
  33. ["custom-class"]: "wd-overlay",
  34. duration: _ctx.duration,
  35. ["custom-style"]: `z-index: ${_ctx.zIndex}; ${_ctx.customStyle}`
  36. })
  37. };
  38. };
  39. }
  40. });
  41. wx.createComponent(_sfc_main);