slw 0.5.982 → 0.5.983

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.
package/lib/index.js CHANGED
@@ -38183,14 +38183,14 @@ const _hoisted_1$kT = ["src"], _sfc_main$3 = {
38183
38183
  emits: ["close"],
38184
38184
  setup(Q, { emit: H }) {
38185
38185
  const G = Q, X = inject("$componentMapping"), Z = inject("$base64Encode"), K = inject("$base64Decode"), ee = inject("$t");
38186
- let te = ref(!1), ne = shallowRef(), re = ref(!1), oe = ref(1e3), ae = ref({}), le = ref(500), se = ref(400), ce = ref();
38186
+ let te = ref(!1), ne = shallowRef(), re = ref(!1), oe = ref(1e3), ae = ref({}), le = ref("88%"), se = ref(75), ce = ref();
38187
38187
  const de = inject("$components"), he = inject("$componentsPath"), ue = () => {
38188
38188
  te.value = !1;
38189
38189
  };
38190
38190
  watch(
38191
38191
  () => G.actionData,
38192
38192
  async (fe) => {
38193
- fe.type === "show" ? (te.value = !0, fe.params && typeof fe.params.width < "u" && (le.value = fe.params.width), fe.params && typeof fe.params.height < "u" && (se.value = fe.params.height), fe.params && typeof fe.params.fullscreen < "u" && (re.value = fe.params.fullscreen), fe.params && typeof fe.params.zIndex < "u" && (oe.value = fe.params.zIndex), ae.value = XEUtils$1.clone(toRaw(fe.params), !0), fe.showComponent && (ne.value = (await de[`${he}/${fe.showComponent}`]()).default)) : te.value = !1;
38193
+ fe.type === "show" ? (te.value = !0, fe.params && typeof fe.params.width < "u" && (le.value = fe.params.width), fe.params && typeof fe.params.height < "u" && (typeof fe.params.height == "number" || fe.params.height.indexOf("px") > 0 ? (se.value = parseInt(fe.params.height) / document.documentElement.clientHeight * 100, se.value = Math.floor(se.value)) : fe.params.height.indexOf("%") > 0 || fe.params.height.indexOf("vh") > 0 ? se.value = parseInt(fe.params.height) : se.value = 75), fe.params && typeof fe.params.fullscreen < "u" && (re.value = fe.params.fullscreen), fe.params && typeof fe.params.zIndex < "u" && (oe.value = fe.params.zIndex), ae.value = XEUtils$1.clone(toRaw(fe.params), !0), fe.showComponent && (ne.value = (await de[`${he}/${fe.showComponent}`]()).default)) : te.value = !1;
38194
38194
  },
38195
38195
  { deep: !0 }
38196
38196
  );
@@ -38203,7 +38203,6 @@ const _hoisted_1$kT = ["src"], _sfc_main$3 = {
38203
38203
  ref_key: "selfModal",
38204
38204
  ref: ce,
38205
38205
  width: unref(le),
38206
- height: unref(se),
38207
38206
  modelValue: unref(te),
38208
38207
  "onUpdate:modelValue": me[0] || (me[0] = (ve) => isRef(te) ? te.value = ve : te = ve),
38209
38208
  visible: unref(te),
@@ -38215,6 +38214,7 @@ const _hoisted_1$kT = ["src"], _sfc_main$3 = {
38215
38214
  "append-to-body": "",
38216
38215
  transfer: "",
38217
38216
  resize: "",
38217
+ "align-center": "",
38218
38218
  "close-on-press-escape": "",
38219
38219
  "destroy-on-close": "",
38220
38220
  onShow: me[2] || (me[2] = (ve) => unref(re) ? unref(ce).maximize() : null),
@@ -38222,22 +38222,26 @@ const _hoisted_1$kT = ["src"], _sfc_main$3 = {
38222
38222
  onClosed: pe
38223
38223
  }, {
38224
38224
  default: withCtx(() => [
38225
- Q.actionData.showComponent && Q.actionData.showComponent.indexOf("http") !== -1 ? (openBlock(), createElementBlock("iframe", {
38226
- key: 0,
38227
- src: Q.actionData.showComponent,
38228
- frameborder: "0",
38229
- width: "100%",
38230
- height: "100%",
38231
- scrolling: "auto",
38232
- style: { "background-color": "#fff" }
38233
- }, null, 8, _hoisted_1$kT)) : (openBlock(), createBlock(resolveDynamicComponent(unref(ne)), {
38234
- key: 1,
38235
- componentData: unref(ae),
38236
- onClose: ue
38237
- }, null, 40, ["componentData"]))
38225
+ createElementVNode("div", {
38226
+ style: normalizeStyle({ height: unref(se) ? unref(se) + "vh" : "75vh" })
38227
+ }, [
38228
+ Q.actionData.showComponent && Q.actionData.showComponent.indexOf("http") !== -1 ? (openBlock(), createElementBlock("iframe", {
38229
+ key: 0,
38230
+ src: Q.actionData.showComponent,
38231
+ frameborder: "0",
38232
+ width: "100%",
38233
+ height: "100%",
38234
+ scrolling: "auto",
38235
+ style: { "background-color": "#fff" }
38236
+ }, null, 8, _hoisted_1$kT)) : (openBlock(), createBlock(resolveDynamicComponent(unref(ne)), {
38237
+ key: 1,
38238
+ componentData: unref(ae),
38239
+ onClose: ue
38240
+ }, null, 40, ["componentData"]))
38241
+ ], 4)
38238
38242
  ]),
38239
38243
  _: 1
38240
- }, 8, ["width", "height", "modelValue", "visible", "fullscreen", "z-index", "title"]);
38244
+ }, 8, ["width", "modelValue", "visible", "fullscreen", "z-index", "title"]);
38241
38245
  };
38242
38246
  }
38243
38247
  };
@@ -122179,7 +122183,7 @@ function reConsole() {
122179
122183
  }
122180
122184
  }
122181
122185
  console.info(
122182
- "%cSLW %cVer 0.5.981",
122186
+ "%cSLW %cVer 0.5.983",
122183
122187
  "color:#409EFF;font-size: 22px;font-weight:bolder",
122184
122188
  "color:#999;font-size: 12px"
122185
122189
  );