u-overlay.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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$29],
  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.index.$u.deepMerge(style, common_vendor.index.$u.addStyle(this.customStyle));
  18. }
  19. },
  20. methods: {
  21. clickHandler() {
  22. this.$emit("click");
  23. }
  24. }
  25. };
  26. if (!Array) {
  27. const _easycom_u_transition2 = common_vendor.resolveComponent("u-transition");
  28. _easycom_u_transition2();
  29. }
  30. const _easycom_u_transition = () => "../u-transition/u-transition.js";
  31. if (!Math) {
  32. _easycom_u_transition();
  33. }
  34. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  35. return {
  36. a: common_vendor.o($options.clickHandler),
  37. b: common_vendor.p({
  38. show: _ctx.show,
  39. ["custom-class"]: "u-overlay",
  40. duration: _ctx.duration,
  41. ["custom-style"]: $options.overlayStyle
  42. })
  43. };
  44. }
  45. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-35f7c3e5"], ["__file", "F:/兴元/开门柜项目/平台端管理系统小程序/node_modules/uview-plus/components/u-overlay/u-overlay.vue"]]);
  46. wx.createComponent(Component);