@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.
@@ -1054,7 +1054,7 @@ const overlayMask = {
1054
1054
  }
1055
1055
  }
1056
1056
  };
1057
- const GwOverlayMaskKey = "__gwOverlayMaskRegistry__";
1057
+ const GwOverlayMaskKey = "__gwOverlayMaskActive__";
1058
1058
  const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
1059
1059
  __name: "index",
1060
1060
  props: {
@@ -1068,25 +1068,13 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
1068
1068
  setup(__props, { emit: __emit }) {
1069
1069
  const props = __props;
1070
1070
  const emit = __emit;
1071
- const existingRegistry = window[GwOverlayMaskKey];
1072
- const registry = (existingRegistry == null ? void 0 : existingRegistry.owner) && Array.isArray(existingRegistry.instances) ? existingRegistry : {
1073
- owner: vue.ref(null),
1074
- instances: []
1075
- };
1076
- window[GwOverlayMaskKey] = registry;
1077
- const instanceId = Symbol("GwOverlayMask");
1078
- registry.instances.push(instanceId);
1079
- if (!registry.owner.value) {
1080
- registry.owner.value = instanceId;
1071
+ const isInstance = !window[GwOverlayMaskKey];
1072
+ if (isInstance) {
1073
+ window[GwOverlayMaskKey] = true;
1081
1074
  }
1082
- const isInstance = vue.computed(() => registry.owner.value === instanceId);
1083
1075
  vue.onUnmounted(() => {
1084
- const index2 = registry.instances.indexOf(instanceId);
1085
- if (index2 !== -1) {
1086
- registry.instances.splice(index2, 1);
1087
- }
1088
- if (registry.owner.value === instanceId) {
1089
- registry.owner.value = registry.instances[0] || null;
1076
+ if (isInstance) {
1077
+ window[GwOverlayMaskKey] = false;
1090
1078
  }
1091
1079
  });
1092
1080
  const overlayStyle = vue.computed(() => ({
@@ -1107,7 +1095,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
1107
1095
  };
1108
1096
  return (_ctx, _cache) => {
1109
1097
  return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
1110
- isInstance.value ? (vue.openBlock(), vue.createElementBlock("div", {
1098
+ isInstance ? (vue.openBlock(), vue.createElementBlock("div", {
1111
1099
  key: 0,
1112
1100
  class: vue.normalizeClass(["gw-overlay-mask", { "gw-overlay-mask--visible": __props.visible }]),
1113
1101
  style: vue.normalizeStyle(overlayStyle.value),
@@ -1118,7 +1106,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
1118
1106
  };
1119
1107
  }
1120
1108
  });
1121
- const index_vue_vue_type_style_index_0_scoped_b335d597_lang = "";
1109
+ const index_vue_vue_type_style_index_0_scoped_cf048b89_lang = "";
1122
1110
  const _export_sfc = (sfc, props) => {
1123
1111
  const target = sfc.__vccOpts || sfc;
1124
1112
  for (const [key, val] of props) {
@@ -1126,7 +1114,7 @@ const _export_sfc = (sfc, props) => {
1126
1114
  }
1127
1115
  return target;
1128
1116
  };
1129
- const GwOverlayMask = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-b335d597"]]);
1117
+ const GwOverlayMask = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-cf048b89"]]);
1130
1118
  const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
1131
1119
  __name: "index",
1132
1120
  setup(__props, { expose: __expose }) {
@@ -1138,7 +1126,6 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
1138
1126
  const { nextZIndex } = elementPlus.useZIndex();
1139
1127
  const dialogModal = vue.computed(() => !isInIframe);
1140
1128
  function handleOpen() {
1141
- console.log("[ElDialog adapter] handleOpen", isInIframe);
1142
1129
  if (isInIframe) {
1143
1130
  const currentCount = window.__elDialogOverlayCount__ || 0;
1144
1131
  if (currentCount === 0) {