sl-el-utils 0.0.56 → 0.0.58

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/dist/index.js CHANGED
@@ -28845,7 +28845,7 @@ const Yae = kt({ name: "ri-fullscreen-exit-fill", render: bXt }), wXt = {
28845
28845
  for (const [r, o] of t)
28846
28846
  n[r] = o;
28847
28847
  return n;
28848
- }, EXt = /* @__PURE__ */ N8(CXt, [["__scopeId", "data-v-1a27be70"]]), RE = se([]), IYr = (e) => {
28848
+ }, EXt = /* @__PURE__ */ N8(CXt, [["__scopeId", "data-v-7928b98e"]]), RE = se([]), IYr = (e) => {
28849
28849
  e.draggable ?? (e.draggable = !0), e.fullscreen ?? (e.fullscreen = qtt()), e.fullscreenIcon ?? (e.fullscreenIcon = !0), e.closeOnClickModal ?? (e.closeOnClickModal = !1), e.center ?? (e.center = !0), e.top ?? (e.top = "10vh"), e.width ?? (e.width = "40%"), e.destroyOnClose ?? (e.destroyOnClose = !0);
28850
28850
  const t = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight, n = e.hideFooter ? 100 : 200;
28851
28851
  let r;
@@ -32100,16 +32100,9 @@ const nJt = kt({ name: "ep-refresh", render: tJt }), rJt = {
32100
32100
  }, a = se(!1), s = se(!0), l = se({ ...r.modelValue }), u = se([...r.columns]);
32101
32101
  u.value.forEach((v) => {
32102
32102
  var p;
32103
- switch (v.type) {
32104
- case "select":
32105
- (p = v.options) == null || p.forEach((h, d) => {
32106
- typeof h == "string" && (v.options[d] = { label: h, value: h });
32107
- });
32108
- break;
32109
- case "time-picker":
32110
- case "date-picker":
32111
- Array.isArray(v.value) || (v.value = [v.value]);
32112
- }
32103
+ v.type === "select" && (v.options = (p = v.options) == null ? void 0 : p.map(
32104
+ (h, d) => typeof h == "string" ? { label: h, value: d } : h
32105
+ )), (v.type === "time-picker" || v.type === "date-picker") && (Array.isArray(v.value) || (v.value = [v.value])), !formData[v.value] && v.default !== void 0 && v.default !== null && (formData[v.value] = v.default);
32113
32106
  });
32114
32107
  const c = [
32115
32108
  { label: "是", value: !0 },
@@ -32243,7 +32236,7 @@ const nJt = kt({ name: "ep-refresh", render: tJt }), rJt = {
32243
32236
  }), {
32244
32237
  default: je(() => [
32245
32238
  (Q(!0), le(it, null, pn(h.options, (y, b) => (Q(), Pe(_(zU), {
32246
- key: b,
32239
+ key: y.value || b,
32247
32240
  label: y.value,
32248
32241
  value: y.value
32249
32242
  }, {
@@ -32386,7 +32379,7 @@ const nJt = kt({ name: "ep-refresh", render: tJt }), rJt = {
32386
32379
  _: 3
32387
32380
  }, 8, ["model"]));
32388
32381
  }
32389
- }), iJt = /* @__PURE__ */ N8(oJt, [["__scopeId", "data-v-64df0bb3"]]);
32382
+ }), iJt = /* @__PURE__ */ N8(oJt, [["__scopeId", "data-v-e20d5de7"]]);
32390
32383
  function aJt() {
32391
32384
  const { isDark: e } = Ytt(), t = pe(() => ({
32392
32385
  "--el-switch-on-color": "#6abe39",
@@ -32444,16 +32437,9 @@ const sJt = {
32444
32437
  const { switchStyle: n } = aJt(), r = e, o = se(), i = se([...r.columns]), a = se({ ...r.data });
32445
32438
  i.value.forEach((c) => {
32446
32439
  var f;
32447
- switch (c.type) {
32448
- case "select":
32449
- (f = c.options) == null || f.forEach((g, v) => {
32450
- typeof g == "string" && (c.options[v] = { label: g, value: g });
32451
- });
32452
- break;
32453
- case "time-picker":
32454
- case "date-picker":
32455
- Array.isArray(c.value) || (c.value = [c.value]);
32456
- }
32440
+ c.type === "select" && (c.options = (f = c.options) == null ? void 0 : f.map(
32441
+ (g, v) => typeof g == "string" ? { label: g, value: v } : g
32442
+ )), (c.type === "time-picker" || c.type === "date-picker") && (Array.isArray(c.value) || (c.value = [c.value])), !a.value[c.value] && c.default !== void 0 && c.default !== null && (a.value[c.value] = c.default);
32457
32443
  });
32458
32444
  const s = [
32459
32445
  { label: "是", value: !0 },
@@ -32481,7 +32467,8 @@ const sJt = {
32481
32467
  sm: 24
32482
32468
  }, {
32483
32469
  default: je(() => [
32484
- K(_(hae), {
32470
+ g.hide ? Qe("", !0) : (Q(), Pe(_(hae), {
32471
+ key: 0,
32485
32472
  prop: g.prop ?? g.value,
32486
32473
  "label-width": r.labelWidth,
32487
32474
  "label-position": r.labelPosition
@@ -32526,7 +32513,7 @@ const sJt = {
32526
32513
  }), {
32527
32514
  default: je(() => [
32528
32515
  (Q(!0), le(it, null, pn(g.options ?? s, (S, O) => (Q(), Pe(_(OE), {
32529
- key: O,
32516
+ key: S.value || O,
32530
32517
  label: S.label,
32531
32518
  value: S.value
32532
32519
  }, null, 8, ["label", "value"]))), 128))
@@ -32662,7 +32649,7 @@ const sJt = {
32662
32649
  ];
32663
32650
  }),
32664
32651
  _: 2
32665
- }, 1032, ["prop", "label-width", "label-position"])
32652
+ }, 1032, ["prop", "label-width", "label-position"]))
32666
32653
  ]),
32667
32654
  _: 2
32668
32655
  }, 1032, ["value"]))), 128))