u-overlay.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. "use strict";
  2. const common_vendor = require("../../../../common/vendor.js");
  3. const _sfc_main = {
  4. name: "u-overlay",
  5. mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$22],
  6. computed: {
  7. overlayStyle() {
  8. const style = {
  9. position: "fixed",
  10. top: 0,
  11. left: 0,
  12. right: 0,
  13. zIndex: this.zIndex,
  14. bottom: 0,
  15. "background-color": `rgba(0, 0, 0, ${this.opacity})`
  16. };
  17. return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle));
  18. }
  19. },
  20. emits: ["click"],
  21. methods: {
  22. clickHandler() {
  23. this.$emit("click");
  24. }
  25. }
  26. };
  27. if (!Array) {
  28. const _easycom_u_transition2 = common_vendor.resolveComponent("u-transition");
  29. _easycom_u_transition2();
  30. }
  31. const _easycom_u_transition = () => "../u-transition/u-transition.js";
  32. if (!Math) {
  33. _easycom_u_transition();
  34. }
  35. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  36. return {
  37. a: common_vendor.o($options.clickHandler),
  38. b: common_vendor.o(_ctx.noop),
  39. c: common_vendor.p({
  40. show: _ctx.show,
  41. ["custom-class"]: "u-overlay",
  42. duration: _ctx.duration,
  43. ["custom-style"]: $options.overlayStyle
  44. })
  45. };
  46. }
  47. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-35f7c3e5"], ["__file", "C:/Users/Administrator/Desktop/srcaaa/node_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  48. wx.createComponent(Component);