@ganwei-web/gw-base-components-plus 1.0.50 → 1.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1136,13 +1136,13 @@
1136
1136
  }
1137
1137
  .el-alert .el-alert__close-btn:hover {
1138
1138
  color: var(--frame-main-color);
1139
- }.gw-overlay-mask[data-v-b335d597] {
1139
+ }.gw-overlay-mask[data-v-cf048b89] {
1140
1140
  pointer-events: none;
1141
1141
  opacity: 0;
1142
1142
  transition: opacity 0.2s linear;
1143
1143
  will-change: opacity;
1144
1144
  }
1145
- .gw-overlay-mask--visible[data-v-b335d597] {
1145
+ .gw-overlay-mask--visible[data-v-cf048b89] {
1146
1146
  opacity: 1;
1147
1147
  pointer-events: auto;
1148
1148
  }.el-dialog {
@@ -1052,7 +1052,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
1052
1052
  }
1053
1053
  }
1054
1054
  };
1055
- const GwOverlayMaskKey = "__gwOverlayMaskRegistry__";
1055
+ const GwOverlayMaskKey = "__gwOverlayMaskActive__";
1056
1056
  const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
1057
1057
  __name: "index",
1058
1058
  props: {
@@ -1066,25 +1066,13 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
1066
1066
  setup(__props, { emit: __emit }) {
1067
1067
  const props = __props;
1068
1068
  const emit = __emit;
1069
- const existingRegistry = window[GwOverlayMaskKey];
1070
- const registry = (existingRegistry == null ? void 0 : existingRegistry.owner) && Array.isArray(existingRegistry.instances) ? existingRegistry : {
1071
- owner: vue.ref(null),
1072
- instances: []
1073
- };
1074
- window[GwOverlayMaskKey] = registry;
1075
- const instanceId = Symbol("GwOverlayMask");
1076
- registry.instances.push(instanceId);
1077
- if (!registry.owner.value) {
1078
- registry.owner.value = instanceId;
1069
+ const isInstance = !window[GwOverlayMaskKey];
1070
+ if (isInstance) {
1071
+ window[GwOverlayMaskKey] = true;
1079
1072
  }
1080
- const isInstance = vue.computed(() => registry.owner.value === instanceId);
1081
1073
  vue.onUnmounted(() => {
1082
- const index2 = registry.instances.indexOf(instanceId);
1083
- if (index2 !== -1) {
1084
- registry.instances.splice(index2, 1);
1085
- }
1086
- if (registry.owner.value === instanceId) {
1087
- registry.owner.value = registry.instances[0] || null;
1074
+ if (isInstance) {
1075
+ window[GwOverlayMaskKey] = false;
1088
1076
  }
1089
1077
  });
1090
1078
  const overlayStyle = vue.computed(() => ({
@@ -1105,7 +1093,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
1105
1093
  };
1106
1094
  return (_ctx, _cache) => {
1107
1095
  return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
1108
- isInstance.value ? (vue.openBlock(), vue.createElementBlock("div", {
1096
+ isInstance ? (vue.openBlock(), vue.createElementBlock("div", {
1109
1097
  key: 0,
1110
1098
  class: vue.normalizeClass(["gw-overlay-mask", { "gw-overlay-mask--visible": __props.visible }]),
1111
1099
  style: vue.normalizeStyle(overlayStyle.value),
@@ -1116,7 +1104,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
1116
1104
  };
1117
1105
  }
1118
1106
  });
1119
- const index_vue_vue_type_style_index_0_scoped_b335d597_lang = "";
1107
+ const index_vue_vue_type_style_index_0_scoped_cf048b89_lang = "";
1120
1108
  const _export_sfc = (sfc, props) => {
1121
1109
  const target = sfc.__vccOpts || sfc;
1122
1110
  for (const [key, val] of props) {
@@ -1124,7 +1112,7 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
1124
1112
  }
1125
1113
  return target;
1126
1114
  };
1127
- const GwOverlayMask = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-b335d597"]]);
1115
+ const GwOverlayMask = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-cf048b89"]]);
1128
1116
  const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
1129
1117
  __name: "index",
1130
1118
  setup(__props, { expose: __expose }) {
@@ -1136,7 +1124,6 @@ var ElementPlusAdapter = function(exports, elementPlus, vue) {
1136
1124
  const { nextZIndex } = elementPlus.useZIndex();
1137
1125
  const dialogModal = vue.computed(() => !isInIframe);
1138
1126
  function handleOpen() {
1139
- console.log("[ElDialog adapter] handleOpen", isInIframe);
1140
1127
  if (isInIframe) {
1141
1128
  const currentCount = window.__elDialogOverlayCount__ || 0;
1142
1129
  if (currentCount === 0) {