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