u-overlay.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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$5],
  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.p({
  39. show: _ctx.show,
  40. ["custom-class"]: "u-overlay",
  41. duration: _ctx.duration,
  42. ["custom-style"]: $options.overlayStyle
  43. })
  44. };
  45. }
  46. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-35f7c3e5"], ["__file", "D:/project/学吧/learn_applet/node_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  47. wx.createComponent(Component);