@a2simcode/ui 0.0.14 → 0.0.15
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/simcode-ui.es.js +969 -968
- package/dist/simcode-ui.umd.js +2 -2
- package/dist/stats.html +1 -1
- package/package.json +1 -1
package/dist/simcode-ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as G, computed as
|
|
1
|
+
import { defineComponent as G, computed as V, createElementBlock as T, openBlock as i, mergeProps as we, createVNode as K, unref as U, shallowRef as rt, ref as j, watch as ke, withModifiers as ze, normalizeClass as Te, createBlock as w, createCommentVNode as D, renderSlot as te, toDisplayString as ie, resolveComponent as F, normalizeStyle as re, withCtx as L, Fragment as ue, renderList as de, createSlots as Ue, createTextVNode as Se, createElementVNode as W, useSlots as zt, reactive as Ye, onMounted as Xe, onUnmounted as tt, onBeforeUnmount as xt, inject as Ve, nextTick as xe, resolveDynamicComponent as We, resolveDirective as ct, withDirectives as Ee, provide as dt, withKeys as Vt, vShow as nt, useTemplateRef as Me, mergeModels as pt, useModel as Tt, watchEffect as Lt, normalizeProps as Ft } from "vue";
|
|
2
2
|
import { getIcon as vt, Icon as gt } from "@iconify/vue";
|
|
3
3
|
import jt from "dayjs";
|
|
4
4
|
import { encrypt as It, decrypt as St } from "crypto-js/aes";
|
|
@@ -38,13 +38,13 @@ const Fe = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
38
38
|
isDiv: { type: Boolean, default: !0 }
|
|
39
39
|
},
|
|
40
40
|
setup(e) {
|
|
41
|
-
const l = e, o =
|
|
41
|
+
const l = e, o = V(() => {
|
|
42
42
|
const n = l.icon;
|
|
43
43
|
if (n.indexOf(":") === -1)
|
|
44
44
|
return vt(`jcode:${l.icon}`) == null && console.log(n, "icon"), `jcode:${l.icon}`;
|
|
45
45
|
const s = `jcode:${n.split(":")[1]}`;
|
|
46
46
|
return vt(s) != null ? s : (console.log(n, "icon"), n);
|
|
47
|
-
}), t =
|
|
47
|
+
}), t = V(() => ({
|
|
48
48
|
...l,
|
|
49
49
|
icon: o.value
|
|
50
50
|
}));
|
|
@@ -179,11 +179,11 @@ const Fe = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
179
179
|
setup(e, { expose: l, emit: o }) {
|
|
180
180
|
const t = e, n = o, a = (p) => {
|
|
181
181
|
!m.value && !t.disabled && (n("click", p), t.href && window.open(t.href, t.target ? t.target : "_self"));
|
|
182
|
-
}, s = rt(null),
|
|
182
|
+
}, s = rt(null), r = () => {
|
|
183
183
|
s.value?.focus();
|
|
184
|
-
},
|
|
184
|
+
}, g = () => {
|
|
185
185
|
s.value?.blur();
|
|
186
|
-
},
|
|
186
|
+
}, c = V(() => t.notLabel || !t.label), m = j(!1);
|
|
187
187
|
ke(
|
|
188
188
|
() => t.loading,
|
|
189
189
|
(p) => {
|
|
@@ -200,8 +200,8 @@ const Fe = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
200
200
|
},
|
|
201
201
|
{ immediate: !0 }
|
|
202
202
|
);
|
|
203
|
-
const
|
|
204
|
-
return l({ focus:
|
|
203
|
+
const u = V(() => t.label || "");
|
|
204
|
+
return l({ focus: r, blur: g }), (p, h) => (i(), T("button", {
|
|
205
205
|
ref_key: "buttonNodeRef",
|
|
206
206
|
ref: s,
|
|
207
207
|
type: "button",
|
|
@@ -221,7 +221,7 @@ const Fe = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
221
221
|
"j-button-round": e.shape == "round",
|
|
222
222
|
"j-button-block": e.block == !0,
|
|
223
223
|
"j-button-loading": m.value == !0,
|
|
224
|
-
"j-button-icon-only":
|
|
224
|
+
"j-button-icon-only": c.value == !0,
|
|
225
225
|
"j-button-compact": e.compact == !0,
|
|
226
226
|
"j-button-last-compact-item": e.lastCompactItem == !0,
|
|
227
227
|
"j-button-first-compact-item": e.firstCompactItem == !0
|
|
@@ -240,7 +240,7 @@ const Fe = (e) => !!(e == null || typeof e == "string" && e.trim() === "" || Arr
|
|
|
240
240
|
key: 1,
|
|
241
241
|
icon: e.icon
|
|
242
242
|
}, null, 8, ["icon"])) : D("", !0),
|
|
243
|
-
e.notLabel ? D("", !0) : (i(), T("div", Ht, ie(
|
|
243
|
+
e.notLabel ? D("", !0) : (i(), T("div", Ht, ie(u.value), 1)),
|
|
244
244
|
te(p.$slots, "iconAfter")
|
|
245
245
|
], 10, Pt));
|
|
246
246
|
}
|
|
@@ -315,8 +315,8 @@ function Kt(e, l, o) {
|
|
|
315
315
|
return e;
|
|
316
316
|
let n = e;
|
|
317
317
|
for (let a = 0; a < t.length - 1; a++) {
|
|
318
|
-
const s = t[a],
|
|
319
|
-
(!(s in n) || typeof n[s] != "object" || n[s] === null) && (n[s] = /^\d+$/.test(
|
|
318
|
+
const s = t[a], r = t[a + 1];
|
|
319
|
+
(!(s in n) || typeof n[s] != "object" || n[s] === null) && (n[s] = /^\d+$/.test(r) ? [] : {}), n = n[s];
|
|
320
320
|
}
|
|
321
321
|
return n[t[t.length - 1]] = o, e;
|
|
322
322
|
}
|
|
@@ -428,8 +428,8 @@ function wt(e) {
|
|
|
428
428
|
const a = document.createElement("span");
|
|
429
429
|
a.className = "j-loading-spin-dot";
|
|
430
430
|
for (let s = 0; s < 4; s++) {
|
|
431
|
-
const
|
|
432
|
-
a.appendChild(
|
|
431
|
+
const r = document.createElement("i");
|
|
432
|
+
a.appendChild(r);
|
|
433
433
|
}
|
|
434
434
|
n.appendChild(a), t.appendChild(n), document.body.appendChild(t);
|
|
435
435
|
}
|
|
@@ -614,55 +614,55 @@ const il = /* @__PURE__ */ G({
|
|
|
614
614
|
readonly: Boolean
|
|
615
615
|
},
|
|
616
616
|
setup(e) {
|
|
617
|
-
const l = e, o =
|
|
617
|
+
const l = e, o = V(() => {
|
|
618
618
|
if (Object.keys(l.group).length > 0)
|
|
619
619
|
return l.group;
|
|
620
|
-
const a = {}, s = et(l.list),
|
|
621
|
-
for (let
|
|
622
|
-
const
|
|
623
|
-
|
|
620
|
+
const a = {}, s = et(l.list), r = s.length;
|
|
621
|
+
for (let g = 0; g < r; g++) {
|
|
622
|
+
const c = s[g];
|
|
623
|
+
c.groupId = c.groupId || ft(), a[c.groupId] = a[c.groupId] || [], a[c.groupId].push(c);
|
|
624
624
|
}
|
|
625
625
|
return a;
|
|
626
626
|
}), t = j(), { handleClick: n } = sl(t);
|
|
627
627
|
return (a, s) => {
|
|
628
|
-
const
|
|
629
|
-
return i(), w(
|
|
628
|
+
const r = F("j-button"), g = F("el-space"), c = F("el-dropdown"), m = F("j-dynamic-layer");
|
|
629
|
+
return i(), w(g, {
|
|
630
630
|
style: re({ display: e.readonly ? "none" : "" }),
|
|
631
631
|
size: e.isLink ? 0 : 8
|
|
632
632
|
}, {
|
|
633
633
|
default: L(() => [
|
|
634
|
-
(i(!0), T(ue, null, de(o.value, (
|
|
635
|
-
(i(!0), T(ue, null, de(
|
|
636
|
-
h.children?.length && h.children?.length > 0 ? (i(), w(
|
|
634
|
+
(i(!0), T(ue, null, de(o.value, (u, p) => (i(), T("div", we({ key: p }, { ref_for: !0 }, a.$attrs), [
|
|
635
|
+
(i(!0), T(ue, null, de(u, (h, d) => (i(), T(ue, { key: d }, [
|
|
636
|
+
h.children?.length && h.children?.length > 0 ? (i(), w(c, { key: 0 }, {
|
|
637
637
|
dropdown: L(() => [
|
|
638
|
-
K(
|
|
638
|
+
K(g, { direction: "vertical" }, {
|
|
639
639
|
default: L(() => [
|
|
640
|
-
(i(!0), T(ue, null, de(h.children || [], (
|
|
641
|
-
key:
|
|
642
|
-
label:
|
|
640
|
+
(i(!0), T(ue, null, de(h.children || [], (v) => (i(), w(r, {
|
|
641
|
+
key: v.prop,
|
|
642
|
+
label: v.label,
|
|
643
643
|
type: "text",
|
|
644
|
-
danger:
|
|
644
|
+
danger: v.danger,
|
|
645
645
|
size: e.size,
|
|
646
|
-
disabled:
|
|
647
|
-
icon:
|
|
648
|
-
onClick: ze((
|
|
646
|
+
disabled: v.disabled,
|
|
647
|
+
icon: v.icon,
|
|
648
|
+
onClick: ze((b) => U(n)(v), ["stop"])
|
|
649
649
|
}, null, 8, ["label", "danger", "size", "disabled", "icon", "onClick"]))), 128))
|
|
650
650
|
]),
|
|
651
651
|
_: 2
|
|
652
652
|
}, 1024)
|
|
653
653
|
]),
|
|
654
654
|
default: L(() => [
|
|
655
|
-
K(
|
|
655
|
+
K(r, {
|
|
656
656
|
label: h.label,
|
|
657
657
|
type: e.isLink ? "link" : h.type,
|
|
658
658
|
danger: h.danger,
|
|
659
659
|
size: e.size,
|
|
660
660
|
icon: h.icon,
|
|
661
|
-
onClick: ze((
|
|
661
|
+
onClick: ze((v) => U(n)(h), ["stop"])
|
|
662
662
|
}, null, 8, ["label", "type", "danger", "size", "icon", "onClick"])
|
|
663
663
|
]),
|
|
664
664
|
_: 2
|
|
665
|
-
}, 1024)) : (i(), w(
|
|
665
|
+
}, 1024)) : (i(), w(r, {
|
|
666
666
|
key: 1,
|
|
667
667
|
label: h.label,
|
|
668
668
|
type: e.isLink ? "link" : h.type,
|
|
@@ -670,9 +670,9 @@ const il = /* @__PURE__ */ G({
|
|
|
670
670
|
size: e.size,
|
|
671
671
|
icon: h.icon,
|
|
672
672
|
compact: !0,
|
|
673
|
-
"last-compact-item":
|
|
674
|
-
"first-compact-item":
|
|
675
|
-
onClick: ze((
|
|
673
|
+
"last-compact-item": d === u.length - 1,
|
|
674
|
+
"first-compact-item": d === 0,
|
|
675
|
+
onClick: ze((v) => U(n)(h), ["stop"])
|
|
676
676
|
}, null, 8, ["label", "type", "danger", "size", "icon", "last-compact-item", "first-compact-item", "onClick"]))
|
|
677
677
|
], 64))), 128))
|
|
678
678
|
], 16))), 128)),
|
|
@@ -726,7 +726,7 @@ const il = /* @__PURE__ */ G({
|
|
|
726
726
|
},
|
|
727
727
|
emits: ["update:modelValue", "input", "focus", "blur", "clear", "change"],
|
|
728
728
|
setup(e, { emit: l }) {
|
|
729
|
-
const o = e, t = l, n =
|
|
729
|
+
const o = e, t = l, n = V({
|
|
730
730
|
get() {
|
|
731
731
|
return o.modelValue;
|
|
732
732
|
},
|
|
@@ -737,18 +737,18 @@ const il = /* @__PURE__ */ G({
|
|
|
737
737
|
t("input", m);
|
|
738
738
|
}, s = (m) => {
|
|
739
739
|
t("focus", m);
|
|
740
|
-
},
|
|
740
|
+
}, r = (m) => {
|
|
741
741
|
t("blur", m);
|
|
742
|
-
},
|
|
742
|
+
}, g = () => {
|
|
743
743
|
t("clear");
|
|
744
|
-
},
|
|
744
|
+
}, c = (m) => {
|
|
745
745
|
t("change", m);
|
|
746
746
|
};
|
|
747
|
-
return (m,
|
|
747
|
+
return (m, u) => {
|
|
748
748
|
const p = F("j-icon"), h = F("el-input");
|
|
749
749
|
return i(), w(h, we({
|
|
750
750
|
modelValue: n.value,
|
|
751
|
-
"onUpdate:modelValue":
|
|
751
|
+
"onUpdate:modelValue": u[0] || (u[0] = (d) => n.value = d),
|
|
752
752
|
type: e.type,
|
|
753
753
|
"model-modifiers": e.modelModifiers,
|
|
754
754
|
maxlength: e.maxlength,
|
|
@@ -783,9 +783,9 @@ const il = /* @__PURE__ */ G({
|
|
|
783
783
|
}, m.$attrs, {
|
|
784
784
|
onInput: a,
|
|
785
785
|
onFocus: s,
|
|
786
|
-
onBlur:
|
|
787
|
-
onClear:
|
|
788
|
-
onChange:
|
|
786
|
+
onBlur: r,
|
|
787
|
+
onClear: g,
|
|
788
|
+
onChange: c
|
|
789
789
|
}), Ue({ _: 2 }, [
|
|
790
790
|
e.prefixIcon ? {
|
|
791
791
|
name: "prefix",
|
|
@@ -858,13 +858,13 @@ const il = /* @__PURE__ */ G({
|
|
|
858
858
|
},
|
|
859
859
|
emits: ["update:modelValue"],
|
|
860
860
|
setup(e, { emit: l }) {
|
|
861
|
-
const o = e, t = l, n =
|
|
861
|
+
const o = e, t = l, n = V({
|
|
862
862
|
get() {
|
|
863
863
|
let a = o.options;
|
|
864
864
|
if (!Fe(o.modelValue) && a && a.length > 0) {
|
|
865
|
-
let s = o.modelValue + "",
|
|
866
|
-
if (
|
|
867
|
-
return
|
|
865
|
+
let s = o.modelValue + "", r = o.options.find((g) => g.value + "" === s);
|
|
866
|
+
if (r)
|
|
867
|
+
return r.value;
|
|
868
868
|
}
|
|
869
869
|
return o.modelValue;
|
|
870
870
|
},
|
|
@@ -873,41 +873,41 @@ const il = /* @__PURE__ */ G({
|
|
|
873
873
|
}
|
|
874
874
|
});
|
|
875
875
|
return (a, s) => {
|
|
876
|
-
const
|
|
876
|
+
const r = F("el-radio-button"), g = F("el-tag"), c = F("el-radio"), m = F("el-radio-group");
|
|
877
877
|
return i(), w(m, {
|
|
878
878
|
modelValue: n.value,
|
|
879
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
879
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => n.value = u),
|
|
880
880
|
disabled: e.readonly
|
|
881
881
|
}, {
|
|
882
882
|
default: L(() => [
|
|
883
|
-
e.isButton ? (i(!0), T(ue, { key: 0 }, de(e.options, (
|
|
884
|
-
key:
|
|
885
|
-
value:
|
|
883
|
+
e.isButton ? (i(!0), T(ue, { key: 0 }, de(e.options, (u) => (i(), w(r, {
|
|
884
|
+
key: u.value,
|
|
885
|
+
value: u.value,
|
|
886
886
|
size: e.size
|
|
887
887
|
}, {
|
|
888
888
|
default: L(() => [
|
|
889
|
-
Se(ie(
|
|
889
|
+
Se(ie(u.label), 1)
|
|
890
890
|
]),
|
|
891
891
|
_: 2
|
|
892
|
-
}, 1032, ["value", "size"]))), 128)) : (i(!0), T(ue, { key: 1 }, de(e.options, (
|
|
893
|
-
key:
|
|
894
|
-
value:
|
|
892
|
+
}, 1032, ["value", "size"]))), 128)) : (i(!0), T(ue, { key: 1 }, de(e.options, (u, p) => (i(), w(c, {
|
|
893
|
+
key: u.value,
|
|
894
|
+
value: u.value,
|
|
895
895
|
size: e.size
|
|
896
896
|
}, {
|
|
897
897
|
default: L(() => [
|
|
898
|
-
e.isColor ? (i(), w(
|
|
898
|
+
e.isColor ? (i(), w(g, {
|
|
899
899
|
key: 0,
|
|
900
|
-
color: e.colors[p] ||
|
|
900
|
+
color: e.colors[p] || u.color || "",
|
|
901
901
|
size: e.size,
|
|
902
902
|
hit: !1,
|
|
903
903
|
effect: "dark",
|
|
904
904
|
style: { "border-width": "0" }
|
|
905
905
|
}, {
|
|
906
906
|
default: L(() => [
|
|
907
|
-
Se(ie(
|
|
907
|
+
Se(ie(u.label), 1)
|
|
908
908
|
]),
|
|
909
909
|
_: 2
|
|
910
|
-
}, 1032, ["color", "size"])) : (i(), T("span", fl, ie(
|
|
910
|
+
}, 1032, ["color", "size"])) : (i(), T("span", fl, ie(u.label), 1))
|
|
911
911
|
]),
|
|
912
912
|
_: 2
|
|
913
913
|
}, 1032, ["value", "size"]))), 128))
|
|
@@ -943,59 +943,59 @@ const il = /* @__PURE__ */ G({
|
|
|
943
943
|
},
|
|
944
944
|
emits: ["update:modelValue", "change"],
|
|
945
945
|
setup(e, { emit: l }) {
|
|
946
|
-
const o = e, t = l, n =
|
|
946
|
+
const o = e, t = l, n = V({
|
|
947
947
|
get() {
|
|
948
948
|
return o.modelValue;
|
|
949
949
|
},
|
|
950
950
|
set(m) {
|
|
951
951
|
t("update:modelValue", m);
|
|
952
952
|
}
|
|
953
|
-
}), a =
|
|
953
|
+
}), a = V(() => !Fe(n.value) && !o.multiple && o.options.filter((m) => n.value == m.value).map((m) => m.label).join(",") || ""), s = V(() => !Fe(n.value) && !o.multiple ? o.options.find((m) => m.value === n.value)?.icon : ""), r = V(() => o.selectData?.split(",") || []), g = V(() => {
|
|
954
954
|
let m = [];
|
|
955
|
-
if (o.isSelectOnlyone ? m = o.options.map((
|
|
956
|
-
...
|
|
957
|
-
disabled:
|
|
955
|
+
if (o.isSelectOnlyone ? m = o.options.map((u) => ({
|
|
956
|
+
...u,
|
|
957
|
+
disabled: r.value.includes(u.value)
|
|
958
958
|
})) : m = o.options, o.isGroup) {
|
|
959
|
-
const
|
|
959
|
+
const u = [], p = {};
|
|
960
960
|
return m.forEach((h) => {
|
|
961
|
-
let
|
|
962
|
-
const
|
|
963
|
-
p[
|
|
964
|
-
const
|
|
961
|
+
let d = {};
|
|
962
|
+
const v = h[o.groupKey || ""] || "";
|
|
963
|
+
p[v] || (d.value = v, d.label = v, p[v] = [], d.children = p[v], u.push(d));
|
|
964
|
+
const b = {
|
|
965
965
|
value: h.value,
|
|
966
966
|
label: h.label,
|
|
967
967
|
icon: h.icon,
|
|
968
968
|
disabled: h.disabled
|
|
969
969
|
};
|
|
970
|
-
p[
|
|
971
|
-
}),
|
|
970
|
+
p[v].push(b);
|
|
971
|
+
}), u;
|
|
972
972
|
}
|
|
973
973
|
return m;
|
|
974
|
-
}),
|
|
974
|
+
}), c = (m) => {
|
|
975
975
|
if (o.multiple) {
|
|
976
976
|
if (m.length == 0) {
|
|
977
977
|
t("change", void 0);
|
|
978
978
|
return;
|
|
979
979
|
}
|
|
980
|
-
const
|
|
980
|
+
const u = [];
|
|
981
981
|
m.forEach((p) => {
|
|
982
|
-
const h = o.options.find((
|
|
983
|
-
h &&
|
|
984
|
-
}), t("change",
|
|
982
|
+
const h = o.options.find((d) => d.value == p);
|
|
983
|
+
h && u.push(h);
|
|
984
|
+
}), t("change", u);
|
|
985
985
|
} else {
|
|
986
986
|
if (m == "" || m == null || m == null) {
|
|
987
987
|
t("change", void 0);
|
|
988
988
|
return;
|
|
989
989
|
}
|
|
990
|
-
const
|
|
991
|
-
t("change",
|
|
990
|
+
const u = o.options.find((p) => p.value == m);
|
|
991
|
+
t("change", u);
|
|
992
992
|
}
|
|
993
993
|
};
|
|
994
|
-
return (m,
|
|
995
|
-
const p = F("el-tooltip"), h = F("el-option"),
|
|
996
|
-
return i(), w(
|
|
994
|
+
return (m, u) => {
|
|
995
|
+
const p = F("el-tooltip"), h = F("el-option"), d = F("el-option-group"), v = F("el-select");
|
|
996
|
+
return i(), w(v, we(m.$attrs, {
|
|
997
997
|
modelValue: n.value,
|
|
998
|
-
"onUpdate:modelValue":
|
|
998
|
+
"onUpdate:modelValue": u[0] || (u[0] = (b) => n.value = b),
|
|
999
999
|
class: [{ "no-border": e.noBorder, "rows-background": e.isRows }],
|
|
1000
1000
|
teleported: e.teleported,
|
|
1001
1001
|
size: e.size,
|
|
@@ -1006,15 +1006,15 @@ const il = /* @__PURE__ */ G({
|
|
|
1006
1006
|
"collapse-tags": e.collapseTags,
|
|
1007
1007
|
"collapse-tags-tooltip": e.collapseTagsTooltip,
|
|
1008
1008
|
placeholder: e.placeholder,
|
|
1009
|
-
onChange:
|
|
1009
|
+
onChange: c
|
|
1010
1010
|
}), Ue({
|
|
1011
1011
|
default: L(() => [
|
|
1012
|
-
e.isGroup ? (i(!0), T(ue, { key: 0 }, de(
|
|
1013
|
-
key:
|
|
1014
|
-
label:
|
|
1012
|
+
e.isGroup ? (i(!0), T(ue, { key: 0 }, de(g.value, (b) => (i(), w(d, {
|
|
1013
|
+
key: b.label,
|
|
1014
|
+
label: b.label
|
|
1015
1015
|
}, {
|
|
1016
1016
|
default: L(() => [
|
|
1017
|
-
(i(!0), T(ue, null, de(
|
|
1017
|
+
(i(!0), T(ue, null, de(b.children, (k) => (i(), w(h, {
|
|
1018
1018
|
key: k.value,
|
|
1019
1019
|
label: k.label,
|
|
1020
1020
|
value: k.value || " ",
|
|
@@ -1034,20 +1034,20 @@ const il = /* @__PURE__ */ G({
|
|
|
1034
1034
|
}, 1032, ["label", "value", "disabled"]))), 128))
|
|
1035
1035
|
]),
|
|
1036
1036
|
_: 2
|
|
1037
|
-
}, 1032, ["label"]))), 128)) : (i(!0), T(ue, { key: 1 }, de(
|
|
1038
|
-
key:
|
|
1039
|
-
label:
|
|
1040
|
-
value:
|
|
1041
|
-
disabled: !!
|
|
1037
|
+
}, 1032, ["label"]))), 128)) : (i(!0), T(ue, { key: 1 }, de(g.value, (b) => (i(), w(h, {
|
|
1038
|
+
key: b.value,
|
|
1039
|
+
label: b.label,
|
|
1040
|
+
value: b.value + "",
|
|
1041
|
+
disabled: !!b.disabled
|
|
1042
1042
|
}, {
|
|
1043
1043
|
default: L(() => [
|
|
1044
1044
|
W("div", hl, [
|
|
1045
|
-
|
|
1045
|
+
b.icon ? (i(), w(Je, {
|
|
1046
1046
|
key: 0,
|
|
1047
1047
|
class: "j-select-option-icon",
|
|
1048
|
-
icon:
|
|
1048
|
+
icon: b.icon
|
|
1049
1049
|
}, null, 8, ["icon"])) : D("", !0),
|
|
1050
|
-
W("div", null, ie(
|
|
1050
|
+
W("div", null, ie(b.label), 1)
|
|
1051
1051
|
])
|
|
1052
1052
|
]),
|
|
1053
1053
|
_: 2
|
|
@@ -1122,7 +1122,7 @@ const il = /* @__PURE__ */ G({
|
|
|
1122
1122
|
a.value?.clearCheckedNodes();
|
|
1123
1123
|
}
|
|
1124
1124
|
});
|
|
1125
|
-
const
|
|
1125
|
+
const c = V({
|
|
1126
1126
|
get() {
|
|
1127
1127
|
return Fe(t.modelValue) ? [] : t.modelValue?.split(",") || [];
|
|
1128
1128
|
},
|
|
@@ -1130,11 +1130,11 @@ const il = /* @__PURE__ */ G({
|
|
|
1130
1130
|
s("update:modelValue", Fe(p) ? "" : p.join(","));
|
|
1131
1131
|
}
|
|
1132
1132
|
}), m = (p, h) => {
|
|
1133
|
-
|
|
1133
|
+
c.value = p, s("change", {
|
|
1134
1134
|
value: Fe(p) ? "" : p.join(","),
|
|
1135
1135
|
data: h
|
|
1136
1136
|
});
|
|
1137
|
-
},
|
|
1137
|
+
}, u = V(() => ({
|
|
1138
1138
|
checkStrictly: t.checkStrictly,
|
|
1139
1139
|
expandTrigger: t.expandTrigger,
|
|
1140
1140
|
multiple: t.multiple,
|
|
@@ -1152,14 +1152,14 @@ const il = /* @__PURE__ */ G({
|
|
|
1152
1152
|
leaf: "leaf"
|
|
1153
1153
|
}));
|
|
1154
1154
|
return (p, h) => {
|
|
1155
|
-
const
|
|
1156
|
-
return i(), w(
|
|
1155
|
+
const d = F("el-cascader");
|
|
1156
|
+
return i(), w(d, {
|
|
1157
1157
|
ref_key: "cascaderRef",
|
|
1158
1158
|
ref: n,
|
|
1159
|
-
modelValue:
|
|
1160
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
1159
|
+
modelValue: c.value,
|
|
1160
|
+
"onUpdate:modelValue": h[0] || (h[0] = (v) => c.value = v),
|
|
1161
1161
|
"cascader-panel-ref": a.value,
|
|
1162
|
-
props:
|
|
1162
|
+
props: u.value,
|
|
1163
1163
|
options: e.options,
|
|
1164
1164
|
placeholder: e.placeholder,
|
|
1165
1165
|
disabled: e.disabled || e.readonly,
|
|
@@ -1173,24 +1173,24 @@ const il = /* @__PURE__ */ G({
|
|
|
1173
1173
|
size: e.size,
|
|
1174
1174
|
onChange: m
|
|
1175
1175
|
}, {
|
|
1176
|
-
default: L(({ node:
|
|
1176
|
+
default: L(({ node: v, data: b }) => [
|
|
1177
1177
|
te(p.$slots, "default", {
|
|
1178
|
-
node:
|
|
1179
|
-
data:
|
|
1178
|
+
node: v,
|
|
1179
|
+
data: b
|
|
1180
1180
|
}, () => [
|
|
1181
|
-
Se(ie(
|
|
1181
|
+
Se(ie(b?.label), 1)
|
|
1182
1182
|
])
|
|
1183
1183
|
]),
|
|
1184
1184
|
prefix: L(() => [
|
|
1185
1185
|
te(p.$slots, "prefix")
|
|
1186
1186
|
]),
|
|
1187
|
-
"suggestion-item": L(({ item:
|
|
1188
|
-
te(p.$slots, "suggestion-item", { item:
|
|
1187
|
+
"suggestion-item": L(({ item: v }) => [
|
|
1188
|
+
te(p.$slots, "suggestion-item", { item: v })
|
|
1189
1189
|
]),
|
|
1190
|
-
tag: L(({ option:
|
|
1190
|
+
tag: L(({ option: v, handleClose: b, disabled: k }) => [
|
|
1191
1191
|
te(p.$slots, "tag", {
|
|
1192
|
-
option:
|
|
1193
|
-
handleClose:
|
|
1192
|
+
option: v,
|
|
1193
|
+
handleClose: b,
|
|
1194
1194
|
disabled: k
|
|
1195
1195
|
})
|
|
1196
1196
|
]),
|
|
@@ -1227,7 +1227,7 @@ const il = /* @__PURE__ */ G({
|
|
|
1227
1227
|
},
|
|
1228
1228
|
emits: ["update:modelValue", "change"],
|
|
1229
1229
|
setup(e, { emit: l }) {
|
|
1230
|
-
const o = e, t = l, n =
|
|
1230
|
+
const o = e, t = l, n = V({
|
|
1231
1231
|
get() {
|
|
1232
1232
|
return o.modelValue;
|
|
1233
1233
|
},
|
|
@@ -1237,11 +1237,11 @@ const il = /* @__PURE__ */ G({
|
|
|
1237
1237
|
}), a = (s) => {
|
|
1238
1238
|
t("change", s);
|
|
1239
1239
|
};
|
|
1240
|
-
return (s,
|
|
1241
|
-
const
|
|
1240
|
+
return (s, r) => {
|
|
1241
|
+
const g = F("el-checkbox"), c = F("el-checkbox-button"), m = F("el-checkbox-group");
|
|
1242
1242
|
return i(), w(m, {
|
|
1243
1243
|
modelValue: n.value,
|
|
1244
|
-
"onUpdate:modelValue":
|
|
1244
|
+
"onUpdate:modelValue": r[0] || (r[0] = (u) => n.value = u),
|
|
1245
1245
|
disabled: e.disabled || e.readonly,
|
|
1246
1246
|
size: e.size,
|
|
1247
1247
|
min: e.min,
|
|
@@ -1255,18 +1255,18 @@ const il = /* @__PURE__ */ G({
|
|
|
1255
1255
|
onChange: a
|
|
1256
1256
|
}, {
|
|
1257
1257
|
default: L(() => [
|
|
1258
|
-
e.type === "checkbox" ? (i(!0), T(ue, { key: 0 }, de(e.options, (
|
|
1259
|
-
key:
|
|
1260
|
-
value:
|
|
1261
|
-
disabled:
|
|
1258
|
+
e.type === "checkbox" ? (i(!0), T(ue, { key: 0 }, de(e.options, (u) => (i(), w(g, {
|
|
1259
|
+
key: u.value,
|
|
1260
|
+
value: u.value,
|
|
1261
|
+
disabled: u.disabled,
|
|
1262
1262
|
size: e.size,
|
|
1263
|
-
label:
|
|
1264
|
-
}, null, 8, ["value", "disabled", "size", "label"]))), 128)) : (i(!0), T(ue, { key: 1 }, de(e.options, (
|
|
1265
|
-
key:
|
|
1266
|
-
value:
|
|
1267
|
-
disabled:
|
|
1263
|
+
label: u.label
|
|
1264
|
+
}, null, 8, ["value", "disabled", "size", "label"]))), 128)) : (i(!0), T(ue, { key: 1 }, de(e.options, (u) => (i(), w(c, {
|
|
1265
|
+
key: u.value,
|
|
1266
|
+
value: u.value,
|
|
1267
|
+
disabled: u.disabled,
|
|
1268
1268
|
size: e.size,
|
|
1269
|
-
label:
|
|
1269
|
+
label: u.label
|
|
1270
1270
|
}, null, 8, ["value", "disabled", "size", "label"]))), 128))
|
|
1271
1271
|
]),
|
|
1272
1272
|
_: 1
|
|
@@ -1304,18 +1304,18 @@ const il = /* @__PURE__ */ G({
|
|
|
1304
1304
|
},
|
|
1305
1305
|
emits: ["update:modelValue", "change", "blur", "focus"],
|
|
1306
1306
|
setup(e, { expose: l, emit: o }) {
|
|
1307
|
-
const t = e, n = j(), a = o, s =
|
|
1307
|
+
const t = e, n = j(), a = o, s = V({
|
|
1308
1308
|
get() {
|
|
1309
1309
|
return t.modelValue;
|
|
1310
1310
|
},
|
|
1311
1311
|
set(p) {
|
|
1312
1312
|
a("update:modelValue", p);
|
|
1313
1313
|
}
|
|
1314
|
-
}),
|
|
1314
|
+
}), r = (p) => {
|
|
1315
1315
|
a("change", p);
|
|
1316
|
-
},
|
|
1316
|
+
}, g = () => {
|
|
1317
1317
|
a("blur");
|
|
1318
|
-
},
|
|
1318
|
+
}, c = () => {
|
|
1319
1319
|
a("focus");
|
|
1320
1320
|
};
|
|
1321
1321
|
return l({ blur: () => {
|
|
@@ -1323,13 +1323,13 @@ const il = /* @__PURE__ */ G({
|
|
|
1323
1323
|
}, focus: () => {
|
|
1324
1324
|
n.value?.focus();
|
|
1325
1325
|
} }), (p, h) => {
|
|
1326
|
-
const
|
|
1327
|
-
return i(), w(
|
|
1326
|
+
const d = F("j-icon"), v = F("el-input-number");
|
|
1327
|
+
return i(), w(v, {
|
|
1328
1328
|
id: e.id,
|
|
1329
1329
|
ref_key: "inputNumberRef",
|
|
1330
1330
|
ref: n,
|
|
1331
1331
|
modelValue: s.value,
|
|
1332
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
1332
|
+
"onUpdate:modelValue": h[0] || (h[0] = (b) => s.value = b),
|
|
1333
1333
|
min: e.min,
|
|
1334
1334
|
max: e.max,
|
|
1335
1335
|
step: e.step,
|
|
@@ -1348,9 +1348,9 @@ const il = /* @__PURE__ */ G({
|
|
|
1348
1348
|
inputmode: e.inputmode,
|
|
1349
1349
|
align: e.align,
|
|
1350
1350
|
"disabled-scientific": e.disabledScientific,
|
|
1351
|
-
onChange:
|
|
1352
|
-
onBlur:
|
|
1353
|
-
onFocus:
|
|
1351
|
+
onChange: r,
|
|
1352
|
+
onBlur: g,
|
|
1353
|
+
onFocus: c
|
|
1354
1354
|
}, {
|
|
1355
1355
|
prefix: L(() => [
|
|
1356
1356
|
W("span", null, ie(e.prefix || ""), 1)
|
|
@@ -1359,25 +1359,25 @@ const il = /* @__PURE__ */ G({
|
|
|
1359
1359
|
W("span", null, ie(e.suffix || ""), 1)
|
|
1360
1360
|
]),
|
|
1361
1361
|
"decrease-icon": L(() => [
|
|
1362
|
-
e.decreaseIcon ? (i(), w(
|
|
1362
|
+
e.decreaseIcon ? (i(), w(d, {
|
|
1363
1363
|
key: 0,
|
|
1364
1364
|
icon: e.decreaseIcon
|
|
1365
|
-
}, null, 8, ["icon"])) : e.controlsPosition === "right" ? (i(), w(
|
|
1365
|
+
}, null, 8, ["icon"])) : e.controlsPosition === "right" ? (i(), w(d, {
|
|
1366
1366
|
key: 1,
|
|
1367
1367
|
icon: "ep:arrow-down"
|
|
1368
|
-
})) : (i(), w(
|
|
1368
|
+
})) : (i(), w(d, {
|
|
1369
1369
|
key: 2,
|
|
1370
1370
|
icon: "ep:minus"
|
|
1371
1371
|
}))
|
|
1372
1372
|
]),
|
|
1373
1373
|
"increase-icon": L(() => [
|
|
1374
|
-
e.increaseIcon ? (i(), w(
|
|
1374
|
+
e.increaseIcon ? (i(), w(d, {
|
|
1375
1375
|
key: 0,
|
|
1376
1376
|
icon: e.increaseIcon
|
|
1377
|
-
}, null, 8, ["icon"])) : e.controlsPosition === "right" ? (i(), w(
|
|
1377
|
+
}, null, 8, ["icon"])) : e.controlsPosition === "right" ? (i(), w(d, {
|
|
1378
1378
|
key: 1,
|
|
1379
1379
|
icon: "ep:arrow-up"
|
|
1380
|
-
})) : (i(), w(
|
|
1380
|
+
})) : (i(), w(d, {
|
|
1381
1381
|
key: 2,
|
|
1382
1382
|
icon: "ep:plus"
|
|
1383
1383
|
}))
|
|
@@ -1414,25 +1414,25 @@ const il = /* @__PURE__ */ G({
|
|
|
1414
1414
|
},
|
|
1415
1415
|
emits: ["update:modelValue", "select", "change", "focus", "blur"],
|
|
1416
1416
|
setup(e, { expose: l, emit: o }) {
|
|
1417
|
-
const t = e, n = j(null), a = o, s =
|
|
1417
|
+
const t = e, n = j(null), a = o, s = V({
|
|
1418
1418
|
get() {
|
|
1419
1419
|
return t.modelValue || "";
|
|
1420
1420
|
},
|
|
1421
|
-
set(
|
|
1422
|
-
a("update:modelValue",
|
|
1421
|
+
set(v) {
|
|
1422
|
+
a("update:modelValue", v);
|
|
1423
1423
|
}
|
|
1424
|
-
}),
|
|
1424
|
+
}), r = (v, b) => {
|
|
1425
1425
|
if (t.fetchSuggestions) {
|
|
1426
|
-
t.fetchSuggestions(
|
|
1426
|
+
t.fetchSuggestions(v, b);
|
|
1427
1427
|
return;
|
|
1428
1428
|
}
|
|
1429
|
-
const k =
|
|
1430
|
-
|
|
1431
|
-
},
|
|
1432
|
-
a("select",
|
|
1433
|
-
}, m = (
|
|
1434
|
-
a("change",
|
|
1435
|
-
},
|
|
1429
|
+
const k = v ? t.options.filter(g(v)) : t.options;
|
|
1430
|
+
b(k);
|
|
1431
|
+
}, g = (v) => (b) => b?.[t.valueKey]?.toLowerCase().indexOf(v.toLowerCase()) === 0, c = (v) => {
|
|
1432
|
+
a("select", v);
|
|
1433
|
+
}, m = (v) => {
|
|
1434
|
+
a("change", v);
|
|
1435
|
+
}, u = () => {
|
|
1436
1436
|
a("focus");
|
|
1437
1437
|
}, p = () => {
|
|
1438
1438
|
a("blur");
|
|
@@ -1444,14 +1444,14 @@ const il = /* @__PURE__ */ G({
|
|
|
1444
1444
|
blur: () => {
|
|
1445
1445
|
n.value?.blur();
|
|
1446
1446
|
}
|
|
1447
|
-
}), (
|
|
1447
|
+
}), (v, b) => {
|
|
1448
1448
|
const k = F("el-autocomplete");
|
|
1449
1449
|
return i(), w(k, {
|
|
1450
1450
|
ref_key: "autocompleteRef",
|
|
1451
1451
|
ref: n,
|
|
1452
1452
|
modelValue: s.value,
|
|
1453
|
-
"onUpdate:modelValue":
|
|
1454
|
-
"fetch-suggestions":
|
|
1453
|
+
"onUpdate:modelValue": b[0] || (b[0] = (C) => s.value = C),
|
|
1454
|
+
"fetch-suggestions": r,
|
|
1455
1455
|
placeholder: e.placeholder,
|
|
1456
1456
|
clearable: e.clearable,
|
|
1457
1457
|
disabled: e.disabled || e.readonly,
|
|
@@ -1469,64 +1469,64 @@ const il = /* @__PURE__ */ G({
|
|
|
1469
1469
|
"highlight-first-item": e.highlightFirstItem,
|
|
1470
1470
|
"fit-input-width": e.fitInputWidth,
|
|
1471
1471
|
"loop-navigation": e.loopNavigation,
|
|
1472
|
-
onSelect:
|
|
1472
|
+
onSelect: c,
|
|
1473
1473
|
onChange: m,
|
|
1474
|
-
onFocus:
|
|
1474
|
+
onFocus: u,
|
|
1475
1475
|
onBlur: p
|
|
1476
1476
|
}, Ue({
|
|
1477
1477
|
default: L(({ item: C }) => [
|
|
1478
|
-
te(
|
|
1478
|
+
te(v.$slots, "default", { item: C }, () => [
|
|
1479
1479
|
W("div", null, ie(C[e.valueKey] || ""), 1)
|
|
1480
1480
|
])
|
|
1481
1481
|
]),
|
|
1482
1482
|
_: 2
|
|
1483
1483
|
}, [
|
|
1484
|
-
|
|
1484
|
+
v.$slots.prefix ? {
|
|
1485
1485
|
name: "prefix",
|
|
1486
1486
|
fn: L(() => [
|
|
1487
|
-
te(
|
|
1487
|
+
te(v.$slots, "prefix")
|
|
1488
1488
|
]),
|
|
1489
1489
|
key: "0"
|
|
1490
1490
|
} : void 0,
|
|
1491
|
-
|
|
1491
|
+
v.$slots.suffix ? {
|
|
1492
1492
|
name: "suffix",
|
|
1493
1493
|
fn: L(() => [
|
|
1494
|
-
te(
|
|
1494
|
+
te(v.$slots, "suffix")
|
|
1495
1495
|
]),
|
|
1496
1496
|
key: "1"
|
|
1497
1497
|
} : void 0,
|
|
1498
|
-
|
|
1498
|
+
v.$slots.header ? {
|
|
1499
1499
|
name: "header",
|
|
1500
1500
|
fn: L(() => [
|
|
1501
|
-
te(
|
|
1501
|
+
te(v.$slots, "header")
|
|
1502
1502
|
]),
|
|
1503
1503
|
key: "2"
|
|
1504
1504
|
} : void 0,
|
|
1505
|
-
|
|
1505
|
+
v.$slots.footer ? {
|
|
1506
1506
|
name: "footer",
|
|
1507
1507
|
fn: L(() => [
|
|
1508
|
-
te(
|
|
1508
|
+
te(v.$slots, "footer")
|
|
1509
1509
|
]),
|
|
1510
1510
|
key: "3"
|
|
1511
1511
|
} : void 0,
|
|
1512
|
-
|
|
1512
|
+
v.$slots.prepend ? {
|
|
1513
1513
|
name: "prepend",
|
|
1514
1514
|
fn: L(() => [
|
|
1515
|
-
te(
|
|
1515
|
+
te(v.$slots, "prepend")
|
|
1516
1516
|
]),
|
|
1517
1517
|
key: "4"
|
|
1518
1518
|
} : void 0,
|
|
1519
|
-
|
|
1519
|
+
v.$slots.append ? {
|
|
1520
1520
|
name: "append",
|
|
1521
1521
|
fn: L(() => [
|
|
1522
|
-
te(
|
|
1522
|
+
te(v.$slots, "append")
|
|
1523
1523
|
]),
|
|
1524
1524
|
key: "5"
|
|
1525
1525
|
} : void 0,
|
|
1526
|
-
|
|
1526
|
+
v.$slots.loading ? {
|
|
1527
1527
|
name: "loading",
|
|
1528
1528
|
fn: L(() => [
|
|
1529
|
-
te(
|
|
1529
|
+
te(v.$slots, "loading")
|
|
1530
1530
|
]),
|
|
1531
1531
|
key: "6"
|
|
1532
1532
|
} : void 0
|
|
@@ -1638,7 +1638,7 @@ const il = /* @__PURE__ */ G({
|
|
|
1638
1638
|
}
|
|
1639
1639
|
},
|
|
1640
1640
|
setup(e) {
|
|
1641
|
-
const l = e, o = zt(), t = j(), n = j(), a = j(-1), s = j(-1),
|
|
1641
|
+
const l = e, o = zt(), t = j(), n = j(), a = j(-1), s = j(-1), r = j(-1), g = j(-1), c = j(0), m = j(!1), u = Ye({
|
|
1642
1642
|
type: "",
|
|
1643
1643
|
isMove: !1,
|
|
1644
1644
|
pageX: 0,
|
|
@@ -1646,109 +1646,109 @@ const il = /* @__PURE__ */ G({
|
|
|
1646
1646
|
size: 0,
|
|
1647
1647
|
h: 0,
|
|
1648
1648
|
w: 0
|
|
1649
|
-
}), p =
|
|
1649
|
+
}), p = V({
|
|
1650
1650
|
get() {
|
|
1651
1651
|
return a.value !== -1 ? a.value : l.left;
|
|
1652
1652
|
},
|
|
1653
1653
|
set(A) {
|
|
1654
1654
|
a.value = A;
|
|
1655
1655
|
}
|
|
1656
|
-
}), h =
|
|
1656
|
+
}), h = V({
|
|
1657
1657
|
get() {
|
|
1658
1658
|
return s.value !== -1 ? s.value : l.right;
|
|
1659
1659
|
},
|
|
1660
1660
|
set(A) {
|
|
1661
1661
|
s.value = A;
|
|
1662
1662
|
}
|
|
1663
|
-
}),
|
|
1663
|
+
}), d = V({
|
|
1664
1664
|
get() {
|
|
1665
|
-
return
|
|
1665
|
+
return r.value !== -1 ? r.value : l.top;
|
|
1666
1666
|
},
|
|
1667
1667
|
set(A) {
|
|
1668
|
-
|
|
1668
|
+
r.value = A;
|
|
1669
1669
|
}
|
|
1670
|
-
}),
|
|
1670
|
+
}), v = V({
|
|
1671
1671
|
get() {
|
|
1672
|
-
return
|
|
1672
|
+
return g.value !== -1 ? g.value : l.bottom;
|
|
1673
1673
|
},
|
|
1674
1674
|
set(A) {
|
|
1675
|
-
|
|
1675
|
+
g.value = A;
|
|
1676
1676
|
}
|
|
1677
|
-
}),
|
|
1677
|
+
}), b = V(() => o.left), k = V(() => o.right), C = V(() => o.top), R = V(() => o.bottom), Q = V(() => b.value ? m.value && l.hideMidWhenNarrow && k.value ? "50%" : m.value && l.hideMidWhenNarrow && !k.value ? "100%" : typeof p.value == "number" ? p.value + "px" : p.value : "0"), Y = V(() => k.value ? m.value && l.hideMidWhenNarrow && b.value ? "50%" : m.value && l.hideMidWhenNarrow && !b.value ? "100%" : typeof h.value == "number" ? h.value + "px" : h.value : "0"), f = V(() => C.value ? typeof d.value == "number" ? d.value + "px" : d.value : "0"), B = V(() => R.value ? typeof v.value == "number" ? v.value + "px" : v.value : "0"), M = V(() => ({
|
|
1678
1678
|
minWidth: l.midMinWidth + "px",
|
|
1679
1679
|
minHeight: l.midMinHeight + "px"
|
|
1680
1680
|
})), I = (A, q) => {
|
|
1681
|
-
|
|
1681
|
+
u.type = A, u.isMove = !0, u.pageX = q.pageX, u.pageY = q.pageY, u.h = n.value.clientHeight, u.w = n.value.clientWidth;
|
|
1682
1682
|
const H = t.value.clientWidth, ne = t.value.clientHeight;
|
|
1683
1683
|
switch (A) {
|
|
1684
1684
|
case "left": {
|
|
1685
1685
|
const le = p.value;
|
|
1686
|
-
|
|
1686
|
+
u.size = typeof le == "string" && le.includes("%") ? parseFloat(le) / 100 * H : Number(le);
|
|
1687
1687
|
break;
|
|
1688
1688
|
}
|
|
1689
1689
|
case "right": {
|
|
1690
1690
|
const le = h.value;
|
|
1691
|
-
|
|
1691
|
+
u.size = typeof le == "string" && le.includes("%") ? parseFloat(le) / 100 * H : Number(le);
|
|
1692
1692
|
break;
|
|
1693
1693
|
}
|
|
1694
1694
|
case "top": {
|
|
1695
|
-
const le =
|
|
1696
|
-
|
|
1695
|
+
const le = d.value;
|
|
1696
|
+
u.size = typeof le == "string" && le.includes("%") ? parseFloat(le) / 100 * ne : Number(le);
|
|
1697
1697
|
break;
|
|
1698
1698
|
}
|
|
1699
1699
|
case "bottom": {
|
|
1700
|
-
const le =
|
|
1701
|
-
|
|
1700
|
+
const le = v.value;
|
|
1701
|
+
u.size = typeof le == "string" && le.includes("%") ? parseFloat(le) / 100 * ne : Number(le);
|
|
1702
1702
|
break;
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
|
-
document.onmouseup = $, document.onmousemove =
|
|
1706
|
-
},
|
|
1707
|
-
if (
|
|
1708
|
-
switch (
|
|
1705
|
+
document.onmouseup = $, document.onmousemove = _;
|
|
1706
|
+
}, _ = (A) => {
|
|
1707
|
+
if (u.isMove)
|
|
1708
|
+
switch (u.type) {
|
|
1709
1709
|
case "left": {
|
|
1710
|
-
const q = A.pageX -
|
|
1711
|
-
let H =
|
|
1712
|
-
H < 0 ? H = 4 : H >
|
|
1710
|
+
const q = A.pageX - u.pageX;
|
|
1711
|
+
let H = u.size + q;
|
|
1712
|
+
H < 0 ? H = 4 : H > u.size + u.w - l.midMinWidth && (H = u.size + u.w - l.midMinWidth), p.value = H;
|
|
1713
1713
|
break;
|
|
1714
1714
|
}
|
|
1715
1715
|
case "right": {
|
|
1716
|
-
const q = A.pageX -
|
|
1717
|
-
let H =
|
|
1718
|
-
H < 0 ? H = 4 : H >
|
|
1716
|
+
const q = A.pageX - u.pageX;
|
|
1717
|
+
let H = u.size - q;
|
|
1718
|
+
H < 0 ? H = 4 : H > u.size + u.w - l.midMinWidth && (H = u.size + u.w - l.midMinWidth), h.value = H;
|
|
1719
1719
|
break;
|
|
1720
1720
|
}
|
|
1721
1721
|
case "top": {
|
|
1722
|
-
const q = A.pageY -
|
|
1723
|
-
let H =
|
|
1724
|
-
H < 0 ? H = 4 : H >
|
|
1722
|
+
const q = A.pageY - u.pageY;
|
|
1723
|
+
let H = u.size + q;
|
|
1724
|
+
H < 0 ? H = 4 : H > u.size + u.h - l.midMinHeight && (H = u.size + u.h - l.midMinHeight), d.value = H;
|
|
1725
1725
|
break;
|
|
1726
1726
|
}
|
|
1727
1727
|
case "bottom": {
|
|
1728
|
-
const q = A.pageY -
|
|
1729
|
-
let H =
|
|
1730
|
-
H < 0 ? H = 4 : H >
|
|
1728
|
+
const q = A.pageY - u.pageY;
|
|
1729
|
+
let H = u.size - q;
|
|
1730
|
+
H < 0 ? H = 4 : H > u.size + u.h - l.midMinHeight && (H = u.size + u.h - l.midMinHeight), v.value = H;
|
|
1731
1731
|
break;
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
1734
|
}, $ = () => {
|
|
1735
|
-
|
|
1735
|
+
u.isMove = !1, document.onmouseup = null, document.onmousemove = null;
|
|
1736
1736
|
}, se = () => {
|
|
1737
1737
|
if (!l.hideMidWhenNarrow || !t.value) {
|
|
1738
1738
|
m.value = !1;
|
|
1739
1739
|
return;
|
|
1740
1740
|
}
|
|
1741
|
-
|
|
1741
|
+
c.value = t.value.clientWidth;
|
|
1742
1742
|
let A = 0, q = 0;
|
|
1743
|
-
if (
|
|
1743
|
+
if (b.value) {
|
|
1744
1744
|
const ne = p.value;
|
|
1745
|
-
A = typeof ne == "string" && ne.includes("%") ? parseFloat(ne) / 100 *
|
|
1745
|
+
A = typeof ne == "string" && ne.includes("%") ? parseFloat(ne) / 100 * c.value : Number(ne);
|
|
1746
1746
|
}
|
|
1747
1747
|
if (k.value) {
|
|
1748
1748
|
const ne = h.value;
|
|
1749
|
-
q = typeof ne == "string" && ne.includes("%") ? parseFloat(ne) / 100 *
|
|
1749
|
+
q = typeof ne == "string" && ne.includes("%") ? parseFloat(ne) / 100 * c.value : Number(ne);
|
|
1750
1750
|
}
|
|
1751
|
-
const H =
|
|
1751
|
+
const H = c.value - A - q;
|
|
1752
1752
|
m.value = H < l.midMinWidth;
|
|
1753
1753
|
};
|
|
1754
1754
|
let J = null;
|
|
@@ -1763,7 +1763,7 @@ const il = /* @__PURE__ */ G({
|
|
|
1763
1763
|
ref: t,
|
|
1764
1764
|
class: Te(["j-layout", { "j-layout-not-hidden": e.notHidden }])
|
|
1765
1765
|
}, [
|
|
1766
|
-
|
|
1766
|
+
b.value ? (i(), T("div", {
|
|
1767
1767
|
key: 0,
|
|
1768
1768
|
class: "j-layout--left",
|
|
1769
1769
|
style: re({ width: Q.value })
|
|
@@ -1796,11 +1796,11 @@ const il = /* @__PURE__ */ G({
|
|
|
1796
1796
|
ref_key: "mid",
|
|
1797
1797
|
ref: n,
|
|
1798
1798
|
class: "j-layout--wrapper",
|
|
1799
|
-
style: re(
|
|
1799
|
+
style: re(M.value)
|
|
1800
1800
|
}, [
|
|
1801
1801
|
te(A.$slots, "default")
|
|
1802
1802
|
], 4),
|
|
1803
|
-
|
|
1803
|
+
R.value ? (i(), T("div", {
|
|
1804
1804
|
key: 1,
|
|
1805
1805
|
class: "j-layout--bottom",
|
|
1806
1806
|
style: re({ height: B.value })
|
|
@@ -1895,50 +1895,50 @@ const il = /* @__PURE__ */ G({
|
|
|
1895
1895
|
setup(e, { expose: l, emit: o }) {
|
|
1896
1896
|
const t = e, n = o, a = j(null);
|
|
1897
1897
|
let s = null;
|
|
1898
|
-
const
|
|
1898
|
+
const r = () => {
|
|
1899
1899
|
if (!a.value) return;
|
|
1900
|
-
const
|
|
1900
|
+
const d = {
|
|
1901
1901
|
records: t.records,
|
|
1902
1902
|
columns: t.columns,
|
|
1903
1903
|
autoFillWidth: !0,
|
|
1904
1904
|
autoFillHeight: !0
|
|
1905
1905
|
};
|
|
1906
|
-
t.height && (
|
|
1906
|
+
t.height && (d.height = t.height), t.stripe && (d.theme = {
|
|
1907
1907
|
...bt.themes[t.theme === "dark" ? "DARK" : "DEFAULT"],
|
|
1908
1908
|
bodyStyle: {
|
|
1909
|
-
bgColor: (
|
|
1910
|
-
const { row:
|
|
1911
|
-
return
|
|
1909
|
+
bgColor: (v) => {
|
|
1910
|
+
const { row: b } = v;
|
|
1911
|
+
return b % 2 === 0 ? t.theme === "dark" ? "#1a1a1a" : "#fafafa" : t.theme === "dark" ? "#0f0f0f" : "#ffffff";
|
|
1912
1912
|
}
|
|
1913
1913
|
}
|
|
1914
|
-
}), console.log(
|
|
1915
|
-
},
|
|
1914
|
+
}), console.log(d), s = new bt.ListTable(a.value, d), n("ready", s);
|
|
1915
|
+
}, g = () => {
|
|
1916
1916
|
s && (s.release(), s = null);
|
|
1917
|
-
},
|
|
1917
|
+
}, c = () => {
|
|
1918
1918
|
s && s.setRecords(t.records);
|
|
1919
|
-
}, m = () => s,
|
|
1920
|
-
s && s.setRecords(
|
|
1921
|
-
}, p = (
|
|
1922
|
-
s && s.setColumns(
|
|
1919
|
+
}, m = () => s, u = (d) => {
|
|
1920
|
+
s && s.setRecords(d);
|
|
1921
|
+
}, p = (d) => {
|
|
1922
|
+
s && s.setColumns(d);
|
|
1923
1923
|
}, h = () => {
|
|
1924
|
-
s && (
|
|
1924
|
+
s && (g(), r());
|
|
1925
1925
|
};
|
|
1926
1926
|
return Xe(() => {
|
|
1927
|
-
|
|
1927
|
+
r();
|
|
1928
1928
|
}), xt(() => {
|
|
1929
|
-
|
|
1929
|
+
g();
|
|
1930
1930
|
}), ke(
|
|
1931
1931
|
() => t.records,
|
|
1932
1932
|
() => {
|
|
1933
|
-
|
|
1933
|
+
c();
|
|
1934
1934
|
},
|
|
1935
1935
|
{ deep: !0 }
|
|
1936
1936
|
), l({
|
|
1937
1937
|
getInstance: m,
|
|
1938
|
-
setRecords:
|
|
1938
|
+
setRecords: u,
|
|
1939
1939
|
setColumns: p,
|
|
1940
1940
|
refresh: h
|
|
1941
|
-
}), (
|
|
1941
|
+
}), (d, v) => (i(), T("div", Ml, [
|
|
1942
1942
|
W("div", {
|
|
1943
1943
|
ref_key: "tableContainer",
|
|
1944
1944
|
ref: a,
|
|
@@ -2123,8 +2123,8 @@ const il = /* @__PURE__ */ G({
|
|
|
2123
2123
|
emits: ["update:visible", "update:stepActive", "cancel", "ok", "closed"],
|
|
2124
2124
|
setup(e, { expose: l, emit: o }) {
|
|
2125
2125
|
const t = e, n = o, { t: a } = Ve("jcode_app_provide", {
|
|
2126
|
-
t: (
|
|
2127
|
-
}), s = j(!1),
|
|
2126
|
+
t: (E) => E
|
|
2127
|
+
}), s = j(!1), r = j(!1), g = j(""), c = j(!1), m = j(!0), u = j(!1), p = j(!0), h = j(-1), d = Ye({
|
|
2128
2128
|
isMove: !1,
|
|
2129
2129
|
pageX: 0,
|
|
2130
2130
|
pageY: 0,
|
|
@@ -2132,46 +2132,46 @@ const il = /* @__PURE__ */ G({
|
|
|
2132
2132
|
top: 0,
|
|
2133
2133
|
_left: 0,
|
|
2134
2134
|
_top: 0
|
|
2135
|
-
}),
|
|
2135
|
+
}), v = j(0), b = j(), k = j(48), C = j(0), R = j(0);
|
|
2136
2136
|
ke(
|
|
2137
2137
|
() => t.visible,
|
|
2138
|
-
(
|
|
2139
|
-
|
|
2140
|
-
|
|
2138
|
+
(E) => {
|
|
2139
|
+
v.value = 1, v.value = 0, s.value = E, E === !0 && t.zoomControls && xe(() => {
|
|
2140
|
+
b.value = document.querySelector(".j-dialog"), b.value.onmousemove = Ie;
|
|
2141
2141
|
});
|
|
2142
2142
|
},
|
|
2143
2143
|
{ immediate: !0 }
|
|
2144
2144
|
);
|
|
2145
|
-
const Q =
|
|
2146
|
-
let
|
|
2147
|
-
return
|
|
2148
|
-
}), Y =
|
|
2149
|
-
let
|
|
2150
|
-
return
|
|
2151
|
-
}), f =
|
|
2152
|
-
let
|
|
2153
|
-
return
|
|
2154
|
-
}), B =
|
|
2155
|
-
let
|
|
2156
|
-
return
|
|
2157
|
-
}),
|
|
2158
|
-
|
|
2145
|
+
const Q = V(() => {
|
|
2146
|
+
let E = t.height + v.value;
|
|
2147
|
+
return E + 40 > window.innerHeight && (E = window.innerHeight - 32 - 40), E;
|
|
2148
|
+
}), Y = V(() => {
|
|
2149
|
+
let E = 0 + v.value;
|
|
2150
|
+
return E = (document.body.clientWidth - B.value) / 2, E;
|
|
2151
|
+
}), f = V(() => {
|
|
2152
|
+
let E = 0 + v.value;
|
|
2153
|
+
return E = (window.innerHeight - Q.value - 40) / 2, E;
|
|
2154
|
+
}), B = V(() => {
|
|
2155
|
+
let E = 0 + v.value;
|
|
2156
|
+
return E = t.width, E > document.body.clientWidth && (E = document.body.clientWidth - 32), E;
|
|
2157
|
+
}), M = (E) => {
|
|
2158
|
+
g.value = E || "保存数据中...", r.value = !0;
|
|
2159
2159
|
}, I = () => {
|
|
2160
|
-
|
|
2161
|
-
},
|
|
2160
|
+
r.value = !1;
|
|
2161
|
+
}, _ = () => {
|
|
2162
2162
|
t.beforeClose && t.beforeClose() === !1 || (s.value = !1, n("update:visible", !1), n("cancel"));
|
|
2163
2163
|
}, $ = () => {
|
|
2164
|
-
n("ok",
|
|
2164
|
+
n("ok", M, I);
|
|
2165
2165
|
}, se = () => {
|
|
2166
|
-
|
|
2166
|
+
d.left = 0, d.top = 0, R.value = 0, C.value = 0, t.isStep && (J.value = 0, xe(() => {
|
|
2167
2167
|
ne();
|
|
2168
2168
|
})), n("closed");
|
|
2169
|
-
}, J =
|
|
2169
|
+
}, J = V({
|
|
2170
2170
|
get() {
|
|
2171
2171
|
return h.value !== -1 ? h.value : t.stepActive;
|
|
2172
2172
|
},
|
|
2173
|
-
set(
|
|
2174
|
-
h.value =
|
|
2173
|
+
set(E) {
|
|
2174
|
+
h.value = E, n("update:stepActive", E);
|
|
2175
2175
|
}
|
|
2176
2176
|
}), A = () => {
|
|
2177
2177
|
J.value > 0 && J.value--, xe(() => {
|
|
@@ -2182,62 +2182,62 @@ const il = /* @__PURE__ */ G({
|
|
|
2182
2182
|
ne();
|
|
2183
2183
|
}));
|
|
2184
2184
|
}, H = async () => {
|
|
2185
|
-
if (
|
|
2186
|
-
const
|
|
2187
|
-
return
|
|
2185
|
+
if (c.value = !0, t.validateSteps) {
|
|
2186
|
+
const E = await t.validateSteps(t.stepActive, M, I);
|
|
2187
|
+
return c.value = !1, E;
|
|
2188
2188
|
}
|
|
2189
|
-
return
|
|
2189
|
+
return c.value = !1, !0;
|
|
2190
2190
|
}, ne = () => {
|
|
2191
|
-
switch (p.value = !0,
|
|
2191
|
+
switch (p.value = !0, u.value = !0, m.value = !0, J.value) {
|
|
2192
2192
|
case 0:
|
|
2193
|
-
|
|
2193
|
+
u.value = !1;
|
|
2194
2194
|
break;
|
|
2195
2195
|
case t.steps.length - 1:
|
|
2196
2196
|
m.value = !1, p.value = !1;
|
|
2197
2197
|
break;
|
|
2198
2198
|
default:
|
|
2199
|
-
m.value = !1,
|
|
2199
|
+
m.value = !1, u.value = !1;
|
|
2200
2200
|
break;
|
|
2201
2201
|
}
|
|
2202
|
-
}, le =
|
|
2203
|
-
t.autoHeight || (
|
|
2202
|
+
}, le = V(() => t.steps.map((E) => ({ title: E, disabled: !0 }))), Be = function(E) {
|
|
2203
|
+
t.autoHeight || (d.pageX = E.pageX, d.pageY = E.pageY, d._left = d.left, d._top = d.top, d.isMove = !0, document.onmouseup = oe, document.onmousemove = he);
|
|
2204
2204
|
}, oe = () => {
|
|
2205
|
-
|
|
2206
|
-
}, he = (
|
|
2207
|
-
if (
|
|
2208
|
-
const be =
|
|
2209
|
-
let ce =
|
|
2210
|
-
ce + Y.value < 0 && (ce = -Y.value), C.value ? ce + C.value + Y.value > document.body.clientWidth && (ce = document.body.clientWidth - C.value - Y.value) : ce + B.value + Y.value > document.body.clientWidth && (ce = document.body.clientWidth - B.value - Y.value), ye + f.value < 0 && (ye = -f.value),
|
|
2205
|
+
d.isMove = !1, document.onmouseup = null, document.onmousemove = null;
|
|
2206
|
+
}, he = (E) => {
|
|
2207
|
+
if (d.isMove) {
|
|
2208
|
+
const be = E.pageX - d.pageX, ve = E.pageY - d.pageY;
|
|
2209
|
+
let ce = d._left + be, ye = d._top + ve;
|
|
2210
|
+
ce + Y.value < 0 && (ce = -Y.value), C.value ? ce + C.value + Y.value > document.body.clientWidth && (ce = document.body.clientWidth - C.value - Y.value) : ce + B.value + Y.value > document.body.clientWidth && (ce = document.body.clientWidth - B.value - Y.value), ye + f.value < 0 && (ye = -f.value), R.value ? ye + R.value + f.value + 40 > window.innerHeight && (ye = window.innerHeight - R.value - f.value - 40) : ye + Q.value + f.value + 40 > window.innerHeight && (ye = window.innerHeight - Q.value - f.value - 40), d.left = ce, d.top = ye;
|
|
2211
2211
|
}
|
|
2212
|
-
}, Ie = (
|
|
2213
|
-
const be =
|
|
2214
|
-
if (
|
|
2215
|
-
|
|
2216
|
-
else if (be + 10 >
|
|
2217
|
-
|
|
2218
|
-
else if (
|
|
2219
|
-
|
|
2220
|
-
else if (S +
|
|
2221
|
-
|
|
2212
|
+
}, Ie = (E) => {
|
|
2213
|
+
const be = b.value.offsetLeft, ve = b.value.offsetTop, ce = b.value.clientWidth, ye = b.value.clientHeight, je = ye - k.value, S = b.value.scrollTop;
|
|
2214
|
+
if (E.clientX > be + ce - 10 && S + E.clientY > ve + ye - 10 || S + E.clientY < ve + 5 && be + 10 > E.clientX)
|
|
2215
|
+
b.value.style.cursor = "se-resize";
|
|
2216
|
+
else if (be + 10 > E.clientX && S + E.clientY > ve + ye - 10 || E.clientX > be + ce - 10 && S + E.clientY < ve + 5)
|
|
2217
|
+
b.value.style.cursor = "sw-resize";
|
|
2218
|
+
else if (E.clientX > be + ce - 10 || be + 10 > E.clientX)
|
|
2219
|
+
b.value.style.cursor = "w-resize";
|
|
2220
|
+
else if (S + E.clientY > ve + ye - 10 || S + E.clientY < ve + 5)
|
|
2221
|
+
b.value.style.cursor = "s-resize";
|
|
2222
2222
|
else {
|
|
2223
|
-
|
|
2223
|
+
b.value.style.cursor = "default", b.value.onmousedown = null;
|
|
2224
2224
|
return;
|
|
2225
2225
|
}
|
|
2226
|
-
|
|
2227
|
-
const { clientX:
|
|
2228
|
-
|
|
2229
|
-
fe.preventDefault(),
|
|
2226
|
+
b.value.onmousedown = (P) => {
|
|
2227
|
+
const { clientX: ee } = P, { clientY: pe } = P, $e = d.left + Y.value, Le = d.top + f.value;
|
|
2228
|
+
d._left = d.left, d._top = d.top, R.value || (R.value = je), C.value || (C.value = ce), ee > $e + 10 && ee < $e + ce - 10 && pe > Le + 5 && pe < Le + 47 || (document.onmousemove = function(fe) {
|
|
2229
|
+
fe.preventDefault(), ee > $e && ee < $e + 10 && (ee > fe.clientX && (C.value = ce + (ee - fe.clientX), d.left = d._left - (ee - fe.clientX)), ee < fe.clientX && C.value > t.minWidth && (C.value = ce - (fe.clientX - ee), d.left = d._left + fe.clientX - ee)), ee > $e + ce - 10 && ee < $e + ce && (ee > fe.clientX && C.value > t.minWidth && (C.value = ce - (ee - fe.clientX)), ee < fe.clientX && Y.value + d.left + C.value < document.body.clientWidth && (C.value = ce + (fe.clientX - ee))), pe > Le && pe < Le + 5 && (pe > fe.clientY && (R.value = je + pe - fe.clientY, d.top = d._top - (pe - fe.clientY)), pe < fe.clientY && R.value > t.minHeight && (R.value = je - (fe.clientY - pe), d.top = d._top + fe.clientY - pe)), S + pe > Le + je + 38 && S + pe < Le + je + 48 && (pe > fe.clientY && R.value > t.minHeight && (R.value = je - (pe - fe.clientY)), pe < fe.clientY && f.value + d.top + R.value + 48 < window.innerHeight && (R.value = je + fe.clientY - pe));
|
|
2230
2230
|
}, document.onmouseup = function() {
|
|
2231
2231
|
document.onmousemove = null, document.onmouseup = null;
|
|
2232
2232
|
});
|
|
2233
2233
|
};
|
|
2234
|
-
}, Oe = async (
|
|
2235
|
-
|
|
2234
|
+
}, Oe = async (E) => {
|
|
2235
|
+
E.click && await E.click();
|
|
2236
2236
|
};
|
|
2237
2237
|
return l({
|
|
2238
|
-
showLoading:
|
|
2238
|
+
showLoading: M,
|
|
2239
2239
|
hideLoading: I
|
|
2240
|
-
}), (
|
|
2240
|
+
}), (E, be) => {
|
|
2241
2241
|
const ve = F("j-button"), ce = F("el-space"), ye = F("el-step"), je = F("el-steps"), S = F("el-dialog");
|
|
2242
2242
|
return i(), w(S, {
|
|
2243
2243
|
modelValue: s.value,
|
|
@@ -2253,8 +2253,8 @@ const il = /* @__PURE__ */ G({
|
|
|
2253
2253
|
width: `${C.value || B.value}px`,
|
|
2254
2254
|
style: re({
|
|
2255
2255
|
position: "fixed",
|
|
2256
|
-
left: `${Y.value +
|
|
2257
|
-
top: `${f.value +
|
|
2256
|
+
left: `${Y.value + d.left}px`,
|
|
2257
|
+
top: `${f.value + d.top}px`,
|
|
2258
2258
|
"pointer-events": e.mask ? "" : "none"
|
|
2259
2259
|
}),
|
|
2260
2260
|
onClosed: se
|
|
@@ -2282,7 +2282,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2282
2282
|
K(ve, {
|
|
2283
2283
|
type: "text",
|
|
2284
2284
|
icon: "material-symbols-light:close-rounded",
|
|
2285
|
-
onClick:
|
|
2285
|
+
onClick: _
|
|
2286
2286
|
})
|
|
2287
2287
|
]),
|
|
2288
2288
|
_: 1
|
|
@@ -2295,7 +2295,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2295
2295
|
{ "j-dialog-window-hasSteps": e.isStep }
|
|
2296
2296
|
]),
|
|
2297
2297
|
style: re({
|
|
2298
|
-
height: e.autoHeight ? "auto" : (
|
|
2298
|
+
height: e.autoHeight ? "auto" : (R.value > 0 ? R.value : Q.value) + "px"
|
|
2299
2299
|
})
|
|
2300
2300
|
}, [
|
|
2301
2301
|
e.isStep ? (i(), T("div", El, [
|
|
@@ -2309,8 +2309,8 @@ const il = /* @__PURE__ */ G({
|
|
|
2309
2309
|
"finish-status": "success"
|
|
2310
2310
|
}, {
|
|
2311
2311
|
default: L(() => [
|
|
2312
|
-
(i(!0), T(ue, null, de(le.value, (P,
|
|
2313
|
-
key:
|
|
2312
|
+
(i(!0), T(ue, null, de(le.value, (P, ee) => (i(), w(ye, {
|
|
2313
|
+
key: ee,
|
|
2314
2314
|
title: U(a)(P.title)
|
|
2315
2315
|
}, null, 8, ["title"]))), 128))
|
|
2316
2316
|
]),
|
|
@@ -2318,7 +2318,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2318
2318
|
}, 8, ["active"])
|
|
2319
2319
|
], 4)
|
|
2320
2320
|
])) : D("", !0),
|
|
2321
|
-
te(
|
|
2321
|
+
te(E.$slots, "default"),
|
|
2322
2322
|
e.hasBtns ? (i(), T("div", Jl, [
|
|
2323
2323
|
K(ce, { size: 8 }, {
|
|
2324
2324
|
default: L(() => [
|
|
@@ -2332,8 +2332,8 @@ const il = /* @__PURE__ */ G({
|
|
|
2332
2332
|
e.isStep ? (i(), w(ve, {
|
|
2333
2333
|
key: 1,
|
|
2334
2334
|
size: "mini",
|
|
2335
|
-
disabled:
|
|
2336
|
-
loading:
|
|
2335
|
+
disabled: u.value,
|
|
2336
|
+
loading: c.value,
|
|
2337
2337
|
label: U(a)("下一步"),
|
|
2338
2338
|
onClick: q
|
|
2339
2339
|
}, null, 8, ["disabled", "loading", "label"])) : D("", !0),
|
|
@@ -2341,7 +2341,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2341
2341
|
key: 2,
|
|
2342
2342
|
size: "mini",
|
|
2343
2343
|
label: U(a)("取消"),
|
|
2344
|
-
onClick:
|
|
2344
|
+
onClick: _
|
|
2345
2345
|
}, null, 8, ["label"])) : D("", !0),
|
|
2346
2346
|
(i(!0), T(ue, null, de(e.buttons, (P) => (i(), w(ve, {
|
|
2347
2347
|
key: P.prop,
|
|
@@ -2350,7 +2350,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2350
2350
|
ghost: P.ghost,
|
|
2351
2351
|
type: P.type,
|
|
2352
2352
|
icon: P.icon,
|
|
2353
|
-
onClick: (
|
|
2353
|
+
onClick: (ee) => Oe(P)
|
|
2354
2354
|
}, null, 8, ["label", "danger", "ghost", "type", "icon", "onClick"]))), 128)),
|
|
2355
2355
|
e.hasSaveBtn ? (i(), w(ve, {
|
|
2356
2356
|
key: 3,
|
|
@@ -2485,67 +2485,67 @@ const il = /* @__PURE__ */ G({
|
|
|
2485
2485
|
const t = e, n = o, { logoImg: a, t: s } = Ve("jcode_app_provide", {
|
|
2486
2486
|
logoImg: "",
|
|
2487
2487
|
t: ($) => $
|
|
2488
|
-
}),
|
|
2488
|
+
}), r = j(!1), g = j(!1), c = j(""), m = j(!1), u = j(!0), p = j(!1), h = j(!0), d = j(-1);
|
|
2489
2489
|
ke(
|
|
2490
2490
|
() => t.visible,
|
|
2491
2491
|
($) => {
|
|
2492
|
-
|
|
2492
|
+
r.value = $;
|
|
2493
2493
|
},
|
|
2494
2494
|
{ immediate: !0 }
|
|
2495
2495
|
);
|
|
2496
|
-
const
|
|
2496
|
+
const v = V({
|
|
2497
2497
|
get() {
|
|
2498
|
-
return
|
|
2498
|
+
return d.value !== -1 ? d.value : t.stepActive;
|
|
2499
2499
|
},
|
|
2500
2500
|
set($) {
|
|
2501
|
-
|
|
2501
|
+
d.value = $, n("update:stepActive", $);
|
|
2502
2502
|
}
|
|
2503
|
-
}),
|
|
2504
|
-
t.beforeClose && t.beforeClose() === !1 || (
|
|
2503
|
+
}), b = () => {
|
|
2504
|
+
t.beforeClose && t.beforeClose() === !1 || (r.value = !1, n("update:visible", !1), n("cancel"));
|
|
2505
2505
|
}, k = () => {
|
|
2506
|
-
n("ok",
|
|
2506
|
+
n("ok", R, Q);
|
|
2507
2507
|
}, C = () => {
|
|
2508
|
-
t.isStep && (
|
|
2509
|
-
|
|
2508
|
+
t.isStep && (v.value = 0, xe(() => {
|
|
2509
|
+
M();
|
|
2510
2510
|
})), n("closed");
|
|
2511
|
-
},
|
|
2512
|
-
|
|
2511
|
+
}, R = ($) => {
|
|
2512
|
+
c.value = $ || "保存数据中...", g.value = !0;
|
|
2513
2513
|
}, Q = () => {
|
|
2514
|
-
|
|
2514
|
+
g.value = !1;
|
|
2515
2515
|
}, Y = () => {
|
|
2516
|
-
|
|
2517
|
-
|
|
2516
|
+
v.value > 0 && v.value--, xe(() => {
|
|
2517
|
+
M();
|
|
2518
2518
|
});
|
|
2519
2519
|
}, f = async () => {
|
|
2520
|
-
await B() && (
|
|
2521
|
-
|
|
2520
|
+
await B() && (v.value < t.steps.length - 1 && (v.value += 1), xe(() => {
|
|
2521
|
+
M();
|
|
2522
2522
|
}));
|
|
2523
2523
|
}, B = async () => {
|
|
2524
2524
|
if (m.value = !0, t.validateSteps) {
|
|
2525
|
-
const $ = await t.validateSteps(t.stepActive,
|
|
2525
|
+
const $ = await t.validateSteps(t.stepActive, R, Q);
|
|
2526
2526
|
return m.value = !1, $;
|
|
2527
2527
|
}
|
|
2528
2528
|
return m.value = !1, !0;
|
|
2529
|
-
},
|
|
2530
|
-
switch (h.value = !0, p.value = !0,
|
|
2529
|
+
}, M = () => {
|
|
2530
|
+
switch (h.value = !0, p.value = !0, u.value = !0, v.value) {
|
|
2531
2531
|
case 0:
|
|
2532
2532
|
p.value = !1;
|
|
2533
2533
|
break;
|
|
2534
2534
|
case t.steps.length - 1:
|
|
2535
|
-
|
|
2535
|
+
u.value = !1, h.value = !1;
|
|
2536
2536
|
break;
|
|
2537
2537
|
default:
|
|
2538
|
-
|
|
2538
|
+
u.value = !1, p.value = !1;
|
|
2539
2539
|
break;
|
|
2540
2540
|
}
|
|
2541
|
-
}, I =
|
|
2541
|
+
}, I = V(() => t.steps.map(($) => ({ title: $, disabled: !0 }))), _ = async ($) => {
|
|
2542
2542
|
$.click && await $.click();
|
|
2543
2543
|
};
|
|
2544
|
-
return l({ showLoading:
|
|
2544
|
+
return l({ showLoading: R, hideLoading: Q }), ($, se) => {
|
|
2545
2545
|
const J = F("el-step"), A = F("el-steps"), q = F("j-button"), H = F("el-space"), ne = F("el-divider"), le = F("el-dialog"), Be = ct("loading");
|
|
2546
2546
|
return i(), w(le, {
|
|
2547
|
-
modelValue:
|
|
2548
|
-
"onUpdate:modelValue": se[0] || (se[0] = (oe) =>
|
|
2547
|
+
modelValue: r.value,
|
|
2548
|
+
"onUpdate:modelValue": se[0] || (se[0] = (oe) => r.value = oe),
|
|
2549
2549
|
class: "j-dialog-full",
|
|
2550
2550
|
width: "100%",
|
|
2551
2551
|
"append-to-body": !0,
|
|
@@ -2558,7 +2558,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2558
2558
|
default: L(() => [
|
|
2559
2559
|
Ee((i(), T("div", {
|
|
2560
2560
|
class: "j-block j-dialog-full-window",
|
|
2561
|
-
"element-loading-text": U(s)(
|
|
2561
|
+
"element-loading-text": U(s)(c.value)
|
|
2562
2562
|
}, [
|
|
2563
2563
|
W("div", Hl, [
|
|
2564
2564
|
W("div", Yl, [
|
|
@@ -2579,7 +2579,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2579
2579
|
e.isStep ? (i(), w(A, {
|
|
2580
2580
|
key: 0,
|
|
2581
2581
|
simple: "",
|
|
2582
|
-
active:
|
|
2582
|
+
active: v.value,
|
|
2583
2583
|
space: 160,
|
|
2584
2584
|
"finish-status": "success"
|
|
2585
2585
|
}, {
|
|
@@ -2600,7 +2600,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2600
2600
|
e.isStep ? (i(), w(q, {
|
|
2601
2601
|
key: 0,
|
|
2602
2602
|
size: "mini",
|
|
2603
|
-
disabled:
|
|
2603
|
+
disabled: u.value,
|
|
2604
2604
|
label: U(s)("上一步"),
|
|
2605
2605
|
onClick: Y
|
|
2606
2606
|
}, null, 8, ["disabled", "label"])) : D("", !0),
|
|
@@ -2623,7 +2623,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2623
2623
|
type: oe.type,
|
|
2624
2624
|
disabled: oe.disabled,
|
|
2625
2625
|
icon: oe.icon ? oe.icon : "",
|
|
2626
|
-
onClick: (he) =>
|
|
2626
|
+
onClick: (he) => _(oe)
|
|
2627
2627
|
}, null, 8, ["label", "danger", "ghost", "type", "disabled", "icon", "onClick"])) : D("", !0)
|
|
2628
2628
|
], 64))), 128)),
|
|
2629
2629
|
e.hasSaveBtn ? (i(), w(q, {
|
|
@@ -2646,7 +2646,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2646
2646
|
key: 2,
|
|
2647
2647
|
type: "text",
|
|
2648
2648
|
icon: "material-symbols-light:close-rounded",
|
|
2649
|
-
onClick:
|
|
2649
|
+
onClick: b
|
|
2650
2650
|
})) : D("", !0)
|
|
2651
2651
|
]),
|
|
2652
2652
|
_: 1
|
|
@@ -2657,7 +2657,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2657
2657
|
te($.$slots, "default")
|
|
2658
2658
|
])
|
|
2659
2659
|
], 8, Pl)), [
|
|
2660
|
-
[Be,
|
|
2660
|
+
[Be, g.value]
|
|
2661
2661
|
])
|
|
2662
2662
|
]),
|
|
2663
2663
|
_: 3
|
|
@@ -2823,7 +2823,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2823
2823
|
setup(e, { expose: l, emit: o }) {
|
|
2824
2824
|
const t = e, { t: n } = Ve("jcode_app_provide", {
|
|
2825
2825
|
t: ($) => $
|
|
2826
|
-
}), a = o, s = j(!1),
|
|
2826
|
+
}), a = o, s = j(!1), r = j(""), g = V(() => ["ltr", "rtl"].indexOf(t.direction) !== -1 ? `${t.width}px` : `${t.height}px`), c = V({
|
|
2827
2827
|
get() {
|
|
2828
2828
|
return t.visible;
|
|
2829
2829
|
},
|
|
@@ -2831,20 +2831,20 @@ const il = /* @__PURE__ */ G({
|
|
|
2831
2831
|
a("update:visible", !!$);
|
|
2832
2832
|
}
|
|
2833
2833
|
}), m = ($) => {
|
|
2834
|
-
|
|
2835
|
-
},
|
|
2834
|
+
r.value = $ || "保存数据中...", s.value = !0;
|
|
2835
|
+
}, u = () => {
|
|
2836
2836
|
s.value = !1;
|
|
2837
2837
|
}, p = () => {
|
|
2838
2838
|
t.isStep && (Y.value = 0, xe(() => {
|
|
2839
2839
|
I();
|
|
2840
2840
|
})), a("closed");
|
|
2841
2841
|
}, h = () => {
|
|
2842
|
-
a("ok", m,
|
|
2843
|
-
},
|
|
2844
|
-
t.beforeClose && t.beforeClose() === !1 || (
|
|
2845
|
-
},
|
|
2842
|
+
a("ok", m, u);
|
|
2843
|
+
}, d = () => {
|
|
2844
|
+
t.beforeClose && t.beforeClose() === !1 || (c.value = !1, a("update:visible", !1), a("cancel"));
|
|
2845
|
+
}, v = async ($) => {
|
|
2846
2846
|
$.click && await $.click();
|
|
2847
|
-
},
|
|
2847
|
+
}, b = j(!1), k = j(!0), C = j(!1), R = j(!0), Q = j(-1), Y = V({
|
|
2848
2848
|
get() {
|
|
2849
2849
|
return Q.value !== -1 ? Q.value : t.stepActive;
|
|
2850
2850
|
},
|
|
@@ -2856,37 +2856,37 @@ const il = /* @__PURE__ */ G({
|
|
|
2856
2856
|
I();
|
|
2857
2857
|
});
|
|
2858
2858
|
}, B = async () => {
|
|
2859
|
-
await
|
|
2859
|
+
await M() && (Y.value < t.steps.length - 1 && (Y.value += 1), xe(() => {
|
|
2860
2860
|
I();
|
|
2861
2861
|
}));
|
|
2862
|
-
},
|
|
2863
|
-
if (
|
|
2864
|
-
const $ = await t.validateSteps(t.stepActive, m,
|
|
2865
|
-
return
|
|
2862
|
+
}, M = async () => {
|
|
2863
|
+
if (b.value = !0, t.validateSteps) {
|
|
2864
|
+
const $ = await t.validateSteps(t.stepActive, m, u);
|
|
2865
|
+
return b.value = !1, $;
|
|
2866
2866
|
}
|
|
2867
|
-
return
|
|
2867
|
+
return b.value = !1, !0;
|
|
2868
2868
|
}, I = () => {
|
|
2869
|
-
switch (
|
|
2869
|
+
switch (R.value = !0, C.value = !0, k.value = !0, Y.value) {
|
|
2870
2870
|
case 0:
|
|
2871
2871
|
C.value = !1;
|
|
2872
2872
|
break;
|
|
2873
2873
|
case t.steps.length - 1:
|
|
2874
|
-
k.value = !1,
|
|
2874
|
+
k.value = !1, R.value = !1;
|
|
2875
2875
|
break;
|
|
2876
2876
|
default:
|
|
2877
2877
|
k.value = !1, C.value = !1;
|
|
2878
2878
|
break;
|
|
2879
2879
|
}
|
|
2880
|
-
},
|
|
2881
|
-
return l({ showLoading: m, hideLoading:
|
|
2880
|
+
}, _ = V(() => t.steps.map(($) => ({ title: $, disabled: !0 })));
|
|
2881
|
+
return l({ showLoading: m, hideLoading: u }), ($, se) => {
|
|
2882
2882
|
const J = F("el-input"), A = F("j-button"), q = F("el-space"), H = F("el-step"), ne = F("el-steps"), le = F("el-drawer"), Be = ct("loading");
|
|
2883
2883
|
return i(), w(le, {
|
|
2884
|
-
modelValue:
|
|
2885
|
-
"onUpdate:modelValue": se[0] || (se[0] = (oe) =>
|
|
2884
|
+
modelValue: c.value,
|
|
2885
|
+
"onUpdate:modelValue": se[0] || (se[0] = (oe) => c.value = oe),
|
|
2886
2886
|
class: "j-drawer",
|
|
2887
2887
|
"append-to-body": !0,
|
|
2888
2888
|
direction: e.direction,
|
|
2889
|
-
size:
|
|
2889
|
+
size: g.value,
|
|
2890
2890
|
"with-header": !1,
|
|
2891
2891
|
"wrapper-closable": !0,
|
|
2892
2892
|
"destroy-on-close": e.destroyOnClose,
|
|
@@ -2898,7 +2898,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2898
2898
|
default: L(() => [
|
|
2899
2899
|
Ee((i(), T("div", {
|
|
2900
2900
|
class: Te(["j-drawer--warpper", { "j-drawer--warpper-hasSteps": e.isStep }]),
|
|
2901
|
-
"element-loading-text":
|
|
2901
|
+
"element-loading-text": r.value
|
|
2902
2902
|
}, [
|
|
2903
2903
|
W("div", {
|
|
2904
2904
|
class: "j-drawer--body",
|
|
@@ -2924,7 +2924,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2924
2924
|
key: 1,
|
|
2925
2925
|
size: "mini",
|
|
2926
2926
|
disabled: C.value,
|
|
2927
|
-
loading:
|
|
2927
|
+
loading: b.value,
|
|
2928
2928
|
label: U(n)("下一步"),
|
|
2929
2929
|
onClick: B
|
|
2930
2930
|
}, null, 8, ["disabled", "loading", "label"])) : D("", !0),
|
|
@@ -2932,7 +2932,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2932
2932
|
key: 2,
|
|
2933
2933
|
size: "mini",
|
|
2934
2934
|
label: U(n)("取消"),
|
|
2935
|
-
onClick:
|
|
2935
|
+
onClick: d
|
|
2936
2936
|
}, null, 8, ["label"])) : D("", !0),
|
|
2937
2937
|
(i(!0), T(ue, null, de(e.buttons, (oe) => (i(), w(A, {
|
|
2938
2938
|
key: oe.prop,
|
|
@@ -2941,13 +2941,13 @@ const il = /* @__PURE__ */ G({
|
|
|
2941
2941
|
ghost: oe.ghost,
|
|
2942
2942
|
type: oe.type,
|
|
2943
2943
|
icon: oe.icon,
|
|
2944
|
-
onClick: (he) =>
|
|
2944
|
+
onClick: (he) => v(oe)
|
|
2945
2945
|
}, null, 8, ["label", "danger", "ghost", "type", "icon", "onClick"]))), 128)),
|
|
2946
2946
|
e.hasSaveBtn ? (i(), w(A, {
|
|
2947
2947
|
key: 3,
|
|
2948
2948
|
size: "mini",
|
|
2949
2949
|
type: "primary",
|
|
2950
|
-
disabled:
|
|
2950
|
+
disabled: R.value && e.isStep,
|
|
2951
2951
|
label: U(n)(e.btnText),
|
|
2952
2952
|
onClick: h
|
|
2953
2953
|
}, null, 8, ["disabled", "label"])) : D("", !0)
|
|
@@ -2967,13 +2967,13 @@ const il = /* @__PURE__ */ G({
|
|
|
2967
2967
|
K(A, {
|
|
2968
2968
|
type: "text",
|
|
2969
2969
|
icon: "material-symbols-light:close-rounded",
|
|
2970
|
-
onClick:
|
|
2970
|
+
onClick: d
|
|
2971
2971
|
})
|
|
2972
2972
|
])) : D("", !0)
|
|
2973
2973
|
]),
|
|
2974
2974
|
e.isStep ? (i(), T("div", io, [
|
|
2975
2975
|
W("div", {
|
|
2976
|
-
style: re({ maxWidth: `${200 *
|
|
2976
|
+
style: re({ maxWidth: `${200 * _.value.length}px`, width: "100%" })
|
|
2977
2977
|
}, [
|
|
2978
2978
|
K(ne, {
|
|
2979
2979
|
simple: "",
|
|
@@ -2982,7 +2982,7 @@ const il = /* @__PURE__ */ G({
|
|
|
2982
2982
|
"finish-status": "success"
|
|
2983
2983
|
}, {
|
|
2984
2984
|
default: L(() => [
|
|
2985
|
-
(i(!0), T(ue, null, de(
|
|
2985
|
+
(i(!0), T(ue, null, de(_.value, (oe, he) => (i(), w(H, {
|
|
2986
2986
|
key: he,
|
|
2987
2987
|
title: U(n)(oe.title)
|
|
2988
2988
|
}, null, 8, ["title"]))), 128))
|
|
@@ -3098,33 +3098,33 @@ const il = /* @__PURE__ */ G({
|
|
|
3098
3098
|
},
|
|
3099
3099
|
emits: ["ok", "closed", "cancel"],
|
|
3100
3100
|
setup(e, { expose: l, emit: o }) {
|
|
3101
|
-
const t = o, n = j(!1), a = j(""), s = j(),
|
|
3102
|
-
a.value = k,
|
|
3103
|
-
},
|
|
3101
|
+
const t = o, n = j(!1), a = j(""), s = j(), r = j(0), g = j(""), c = j(), m = (k, C, R) => {
|
|
3102
|
+
a.value = k, c.value = R, g.value = C || "modal", n.value = !0;
|
|
3103
|
+
}, u = () => {
|
|
3104
3104
|
n.value = !1;
|
|
3105
3105
|
}, p = (k, C) => {
|
|
3106
3106
|
t("ok", k, C);
|
|
3107
3107
|
}, h = () => {
|
|
3108
|
-
|
|
3109
|
-
},
|
|
3108
|
+
r.value = 0, t("closed");
|
|
3109
|
+
}, d = () => {
|
|
3110
3110
|
t("cancel");
|
|
3111
|
-
},
|
|
3111
|
+
}, v = (k) => {
|
|
3112
3112
|
s.value && s.value.showLoading(k);
|
|
3113
|
-
},
|
|
3113
|
+
}, b = () => {
|
|
3114
3114
|
s.value && s.value.hideLoading();
|
|
3115
3115
|
};
|
|
3116
3116
|
return dt("jcode_layer_provide", {
|
|
3117
|
-
stepActive:
|
|
3118
|
-
}), l({ open: m, close:
|
|
3119
|
-
const
|
|
3120
|
-
return
|
|
3117
|
+
stepActive: r
|
|
3118
|
+
}), l({ open: m, close: u, showLoading: v, hideLoading: b }), (k, C) => {
|
|
3119
|
+
const R = F("j-dialog-full"), Q = F("j-drawer"), Y = F("j-dialog");
|
|
3120
|
+
return g.value === "full" ? (i(), w(R, {
|
|
3121
3121
|
key: 0,
|
|
3122
3122
|
ref_key: "modalRef",
|
|
3123
3123
|
ref: s,
|
|
3124
3124
|
visible: n.value,
|
|
3125
3125
|
"onUpdate:visible": C[0] || (C[0] = (f) => n.value = f),
|
|
3126
|
-
"step-active":
|
|
3127
|
-
"onUpdate:stepActive": C[1] || (C[1] = (f) =>
|
|
3126
|
+
"step-active": r.value,
|
|
3127
|
+
"onUpdate:stepActive": C[1] || (C[1] = (f) => r.value = f),
|
|
3128
3128
|
title: a.value,
|
|
3129
3129
|
"before-close": e.beforeClose,
|
|
3130
3130
|
"is-step": e.isStep,
|
|
@@ -3136,23 +3136,23 @@ const il = /* @__PURE__ */ G({
|
|
|
3136
3136
|
buttons: e.buttons,
|
|
3137
3137
|
"has-save-btn": e.hasSaveBtn,
|
|
3138
3138
|
"has-header": e.hasHeader,
|
|
3139
|
-
subtitle:
|
|
3139
|
+
subtitle: c.value,
|
|
3140
3140
|
onOk: p,
|
|
3141
3141
|
onClosed: h,
|
|
3142
|
-
onCancel:
|
|
3142
|
+
onCancel: d
|
|
3143
3143
|
}, {
|
|
3144
3144
|
default: L(() => [
|
|
3145
3145
|
te(k.$slots, "default")
|
|
3146
3146
|
]),
|
|
3147
3147
|
_: 3
|
|
3148
|
-
}, 8, ["visible", "step-active", "title", "before-close", "is-step", "steps", "validate-steps", "has-btns", "btn-text", "destroy-on-close", "buttons", "has-save-btn", "has-header", "subtitle"])) :
|
|
3148
|
+
}, 8, ["visible", "step-active", "title", "before-close", "is-step", "steps", "validate-steps", "has-btns", "btn-text", "destroy-on-close", "buttons", "has-save-btn", "has-header", "subtitle"])) : g.value === "drawer" ? (i(), w(Q, {
|
|
3149
3149
|
key: 1,
|
|
3150
3150
|
ref_key: "modalRef",
|
|
3151
3151
|
ref: s,
|
|
3152
3152
|
visible: n.value,
|
|
3153
3153
|
"onUpdate:visible": C[2] || (C[2] = (f) => n.value = f),
|
|
3154
|
-
"step-active":
|
|
3155
|
-
"onUpdate:stepActive": C[3] || (C[3] = (f) =>
|
|
3154
|
+
"step-active": r.value,
|
|
3155
|
+
"onUpdate:stepActive": C[3] || (C[3] = (f) => r.value = f),
|
|
3156
3156
|
"is-step": e.isStep,
|
|
3157
3157
|
steps: e.steps,
|
|
3158
3158
|
"validate-steps": e.validateSteps,
|
|
@@ -3162,10 +3162,10 @@ const il = /* @__PURE__ */ G({
|
|
|
3162
3162
|
buttons: e.buttons,
|
|
3163
3163
|
"has-save-btn": e.hasSaveBtn,
|
|
3164
3164
|
"has-header": e.hasHeader,
|
|
3165
|
-
subtitle:
|
|
3165
|
+
subtitle: c.value,
|
|
3166
3166
|
onOk: p,
|
|
3167
3167
|
onClosed: h,
|
|
3168
|
-
onCancel:
|
|
3168
|
+
onCancel: d
|
|
3169
3169
|
}, {
|
|
3170
3170
|
default: L(() => [
|
|
3171
3171
|
te(k.$slots, "default")
|
|
@@ -3177,8 +3177,8 @@ const il = /* @__PURE__ */ G({
|
|
|
3177
3177
|
ref: s,
|
|
3178
3178
|
visible: n.value,
|
|
3179
3179
|
"onUpdate:visible": C[4] || (C[4] = (f) => n.value = f),
|
|
3180
|
-
"step-active":
|
|
3181
|
-
"onUpdate:stepActive": C[5] || (C[5] = (f) =>
|
|
3180
|
+
"step-active": r.value,
|
|
3181
|
+
"onUpdate:stepActive": C[5] || (C[5] = (f) => r.value = f),
|
|
3182
3182
|
width: e.width,
|
|
3183
3183
|
height: e.height,
|
|
3184
3184
|
title: a.value,
|
|
@@ -3191,10 +3191,10 @@ const il = /* @__PURE__ */ G({
|
|
|
3191
3191
|
"is-step": e.isStep,
|
|
3192
3192
|
steps: e.steps,
|
|
3193
3193
|
"validate-steps": e.validateSteps,
|
|
3194
|
-
subtitle:
|
|
3194
|
+
subtitle: c.value,
|
|
3195
3195
|
onOk: p,
|
|
3196
3196
|
onClosed: h,
|
|
3197
|
-
onCancel:
|
|
3197
|
+
onCancel: d
|
|
3198
3198
|
}, {
|
|
3199
3199
|
default: L(() => [
|
|
3200
3200
|
te(k.$slots, "default")
|
|
@@ -3207,35 +3207,35 @@ const il = /* @__PURE__ */ G({
|
|
|
3207
3207
|
name: "JDynamicLayer",
|
|
3208
3208
|
__name: "dynamic-layer",
|
|
3209
3209
|
setup(e, { expose: l }) {
|
|
3210
|
-
const o = j(), t = j(600), n = j(400), a = j(!0), s = j(!0),
|
|
3210
|
+
const o = j(), t = j(600), n = j(400), a = j(!0), s = j(!0), r = j(!0), g = j(""), c = j([]), m = j(!0), u = j(), p = rt(), h = j(), { getPageName: d } = Ve("jcode_auth_page_provide", {
|
|
3211
3211
|
getPageName: () => ""
|
|
3212
|
-
}),
|
|
3213
|
-
const J =
|
|
3212
|
+
}), v = () => {
|
|
3213
|
+
const J = d();
|
|
3214
3214
|
return J || (typeof p.value == "string" ? p.value : "");
|
|
3215
|
-
},
|
|
3216
|
-
if (
|
|
3215
|
+
}, b = j(!1), k = j([]), C = async (J) => {
|
|
3216
|
+
if (u.value?.validateSteps) {
|
|
3217
3217
|
Pe(!0);
|
|
3218
|
-
const A =
|
|
3218
|
+
const A = u.value.validateSteps(J);
|
|
3219
3219
|
return Pe(!1), A;
|
|
3220
3220
|
}
|
|
3221
3221
|
return !0;
|
|
3222
|
-
},
|
|
3222
|
+
}, R = () => u.value?.beforeClose ? u.value.beforeClose() : !0;
|
|
3223
3223
|
let Q, Y, f, B = 0;
|
|
3224
|
-
const
|
|
3225
|
-
if (
|
|
3226
|
-
if (B = 0,
|
|
3227
|
-
const A =
|
|
3228
|
-
|
|
3224
|
+
const M = async (J) => {
|
|
3225
|
+
if (u.value) {
|
|
3226
|
+
if (B = 0, u.value.getConfig) {
|
|
3227
|
+
const A = u.value.getConfig();
|
|
3228
|
+
c.value = A.buttons || [], b.value = A.isStep, k.value = A.steps || [];
|
|
3229
3229
|
} else
|
|
3230
|
-
|
|
3231
|
-
if (
|
|
3230
|
+
c.value = [], b.value = !1, k.value = [];
|
|
3231
|
+
if (u.value.open)
|
|
3232
3232
|
try {
|
|
3233
|
-
const { buttons: A } = await
|
|
3233
|
+
const { buttons: A } = await u.value.open(J, o.value, () => {
|
|
3234
3234
|
Q && Q();
|
|
3235
3235
|
}) || {};
|
|
3236
3236
|
if (A && A.length > 0) {
|
|
3237
3237
|
const q = [];
|
|
3238
|
-
q.push(...
|
|
3238
|
+
q.push(...c.value), q.push(...A), c.value = q;
|
|
3239
3239
|
}
|
|
3240
3240
|
} catch (A) {
|
|
3241
3241
|
o.value.close(), console.error(A);
|
|
@@ -3247,26 +3247,26 @@ const il = /* @__PURE__ */ G({
|
|
|
3247
3247
|
return;
|
|
3248
3248
|
}
|
|
3249
3249
|
B++, setTimeout(async () => {
|
|
3250
|
-
await
|
|
3250
|
+
await M(J);
|
|
3251
3251
|
}, 100);
|
|
3252
3252
|
}
|
|
3253
3253
|
}, I = (J) => {
|
|
3254
|
-
p.value = J?.name, t.value = J?.width || 600, n.value = J?.height || 400, a.value = J?.hasBtns !== !1, s.value = J?.hasSaveBtn !== !1,
|
|
3255
|
-
o.value.showLoading("加载中"), await
|
|
3254
|
+
p.value = J?.name, t.value = J?.width || 600, n.value = J?.height || 400, a.value = J?.hasBtns !== !1, s.value = J?.hasSaveBtn !== !1, r.value = J?.hasHeader !== !1, J?.destroyOnClose !== !1 && (m.value = !0), h.value = J?.config || {}, g.value = J?.btnText || "保存", Q = J?.afterOk || null, Y = J?.afterClose || null, f = J?.afterCancel || null, o.value.open(J.title, J.type, J.subtitle), xe(async () => {
|
|
3255
|
+
o.value.showLoading("加载中"), await M(J.param || {});
|
|
3256
3256
|
});
|
|
3257
|
-
},
|
|
3258
|
-
if (
|
|
3257
|
+
}, _ = async () => {
|
|
3258
|
+
if (u.value?.ok) {
|
|
3259
3259
|
Pe(!0);
|
|
3260
|
-
const J = await
|
|
3260
|
+
const J = await u.value.ok();
|
|
3261
3261
|
J && (o.value.close(), Q && await Q(J)), Pe(!1);
|
|
3262
3262
|
}
|
|
3263
3263
|
}, $ = () => {
|
|
3264
|
-
|
|
3264
|
+
u.value?.closed && u.value.closed(), Y && Y();
|
|
3265
3265
|
}, se = () => {
|
|
3266
3266
|
f && f();
|
|
3267
3267
|
};
|
|
3268
3268
|
return dt("jcode_auth_page_provide", {
|
|
3269
|
-
getPageName:
|
|
3269
|
+
getPageName: v
|
|
3270
3270
|
}), l({ open: I }), (J, A) => {
|
|
3271
3271
|
const q = F("j-layer");
|
|
3272
3272
|
return i(), w(q, {
|
|
@@ -3274,24 +3274,24 @@ const il = /* @__PURE__ */ G({
|
|
|
3274
3274
|
ref: o,
|
|
3275
3275
|
width: t.value,
|
|
3276
3276
|
height: n.value,
|
|
3277
|
-
"before-close":
|
|
3277
|
+
"before-close": R,
|
|
3278
3278
|
"validate-steps": C,
|
|
3279
|
-
"is-step":
|
|
3279
|
+
"is-step": b.value,
|
|
3280
3280
|
steps: k.value,
|
|
3281
3281
|
"has-btns": a.value,
|
|
3282
|
-
buttons:
|
|
3283
|
-
"btn-text":
|
|
3282
|
+
buttons: c.value,
|
|
3283
|
+
"btn-text": g.value,
|
|
3284
3284
|
"destroy-on-close": m.value,
|
|
3285
3285
|
"has-save-btn": s.value,
|
|
3286
|
-
"has-header":
|
|
3287
|
-
onOk:
|
|
3286
|
+
"has-header": r.value,
|
|
3287
|
+
onOk: _,
|
|
3288
3288
|
onClosed: $,
|
|
3289
3289
|
onCancel: se
|
|
3290
3290
|
}, {
|
|
3291
3291
|
default: L(() => [
|
|
3292
3292
|
(i(), w(We(p.value), we({
|
|
3293
3293
|
ref_key: "componentRef",
|
|
3294
|
-
ref:
|
|
3294
|
+
ref: u
|
|
3295
3295
|
}, h.value), null, 16))
|
|
3296
3296
|
]),
|
|
3297
3297
|
_: 1
|
|
@@ -3312,45 +3312,45 @@ const il = /* @__PURE__ */ G({
|
|
|
3312
3312
|
},
|
|
3313
3313
|
emits: ["update:modelValue", "change", "select", "search"],
|
|
3314
3314
|
setup(e, { emit: l }) {
|
|
3315
|
-
const o = e, t = l, n = j(), a =
|
|
3315
|
+
const o = e, t = l, n = j(), a = V(
|
|
3316
3316
|
() => Fe(o.modelValue) ? [] : o.modelValue?.split(",") || []
|
|
3317
|
-
), s =
|
|
3318
|
-
let p = o.colors[
|
|
3317
|
+
), s = V(() => o.isStyleLoop ? a.value?.map((m, u) => {
|
|
3318
|
+
let p = o.colors[u % o.colors.length] || {};
|
|
3319
3319
|
return p = { ...p, borderWidth: (p.borderWidth || 0) + "px" }, p;
|
|
3320
|
-
}) || [] : o.colors),
|
|
3321
|
-
|
|
3322
|
-
},
|
|
3320
|
+
}) || [] : o.colors), r = (m) => {
|
|
3321
|
+
g(), t("select", m);
|
|
3322
|
+
}, g = () => {
|
|
3323
3323
|
n.value && (a.value.push(n.value), n.value = "", t("update:modelValue", a.value.join(",")), t("change", { value: a.value.join(",") }));
|
|
3324
|
-
},
|
|
3324
|
+
}, c = (m) => {
|
|
3325
3325
|
a.value.splice(m, 1), t("update:modelValue", a.value.join(",")), t("change", { value: a.value.join(",") });
|
|
3326
3326
|
};
|
|
3327
|
-
return (m,
|
|
3328
|
-
const p = F("el-tag"), h = F("el-space"),
|
|
3329
|
-
return i(), w(
|
|
3327
|
+
return (m, u) => {
|
|
3328
|
+
const p = F("el-tag"), h = F("el-space"), d = F("j-autocomplete");
|
|
3329
|
+
return i(), w(d, {
|
|
3330
3330
|
modelValue: n.value,
|
|
3331
|
-
"onUpdate:modelValue":
|
|
3331
|
+
"onUpdate:modelValue": u[0] || (u[0] = (v) => n.value = v),
|
|
3332
3332
|
class: "j-input-tag",
|
|
3333
3333
|
options: e.options,
|
|
3334
3334
|
style: { width: "100%" },
|
|
3335
3335
|
readonly: e.readonly,
|
|
3336
3336
|
placeholder: e.placeholder,
|
|
3337
3337
|
size: e.size,
|
|
3338
|
-
onSelect:
|
|
3339
|
-
onKeyup: Vt(
|
|
3338
|
+
onSelect: r,
|
|
3339
|
+
onKeyup: Vt(g, ["enter"])
|
|
3340
3340
|
}, {
|
|
3341
3341
|
prefix: L(() => [
|
|
3342
3342
|
K(h, null, {
|
|
3343
3343
|
default: L(() => [
|
|
3344
|
-
(i(!0), T(ue, null, de(a.value, (
|
|
3345
|
-
key:
|
|
3344
|
+
(i(!0), T(ue, null, de(a.value, (v, b) => (i(), w(p, {
|
|
3345
|
+
key: b,
|
|
3346
3346
|
type: "info",
|
|
3347
3347
|
closable: !e.readonly,
|
|
3348
|
-
style: re(s.value[
|
|
3348
|
+
style: re(s.value[b] || {}),
|
|
3349
3349
|
size: e.size,
|
|
3350
|
-
onClose: ze((k) =>
|
|
3350
|
+
onClose: ze((k) => c(b), ["prevent"])
|
|
3351
3351
|
}, {
|
|
3352
3352
|
default: L(() => [
|
|
3353
|
-
Se(ie(
|
|
3353
|
+
Se(ie(v), 1)
|
|
3354
3354
|
]),
|
|
3355
3355
|
_: 2
|
|
3356
3356
|
}, 1032, ["closable", "style", "size", "onClose"]))), 128))
|
|
@@ -3378,21 +3378,21 @@ const il = /* @__PURE__ */ G({
|
|
|
3378
3378
|
},
|
|
3379
3379
|
emits: ["update:modelValue", "change"],
|
|
3380
3380
|
setup(e, { emit: l }) {
|
|
3381
|
-
const o = e, t = l, n =
|
|
3381
|
+
const o = e, t = l, n = V({
|
|
3382
3382
|
get() {
|
|
3383
3383
|
return Number(o.modelValue);
|
|
3384
3384
|
},
|
|
3385
|
-
set(
|
|
3386
|
-
t("update:modelValue",
|
|
3385
|
+
set(g) {
|
|
3386
|
+
t("update:modelValue", g), t("change", { value: g });
|
|
3387
3387
|
}
|
|
3388
|
-
}), a =
|
|
3389
|
-
s.value =
|
|
3388
|
+
}), a = V(() => o.texts?.map((g) => g.value) || []), s = j(0), r = (g) => {
|
|
3389
|
+
s.value = g;
|
|
3390
3390
|
};
|
|
3391
|
-
return (
|
|
3391
|
+
return (g, c) => {
|
|
3392
3392
|
const m = F("el-rate");
|
|
3393
3393
|
return i(), w(m, {
|
|
3394
3394
|
modelValue: n.value,
|
|
3395
|
-
"onUpdate:modelValue":
|
|
3395
|
+
"onUpdate:modelValue": c[0] || (c[0] = (u) => n.value = u),
|
|
3396
3396
|
size: e.size,
|
|
3397
3397
|
max: e.max,
|
|
3398
3398
|
"allow-half": e.allowHalf,
|
|
@@ -3401,7 +3401,7 @@ const il = /* @__PURE__ */ G({
|
|
|
3401
3401
|
"show-text": e.showText,
|
|
3402
3402
|
texts: a.value,
|
|
3403
3403
|
"show-score": e.showScore,
|
|
3404
|
-
onHoverChange:
|
|
3404
|
+
onHoverChange: r
|
|
3405
3405
|
}, null, 8, ["modelValue", "size", "max", "allow-half", "clearable", "disabled", "show-text", "texts", "show-score"]);
|
|
3406
3406
|
};
|
|
3407
3407
|
}
|
|
@@ -3435,7 +3435,7 @@ const il = /* @__PURE__ */ G({
|
|
|
3435
3435
|
},
|
|
3436
3436
|
emits: ["update:modelValue", "change"],
|
|
3437
3437
|
setup(e, { emit: l }) {
|
|
3438
|
-
const o = e, t = l, n =
|
|
3438
|
+
const o = e, t = l, n = V({
|
|
3439
3439
|
get() {
|
|
3440
3440
|
return Number(o.modelValue);
|
|
3441
3441
|
},
|
|
@@ -3444,10 +3444,10 @@ const il = /* @__PURE__ */ G({
|
|
|
3444
3444
|
}
|
|
3445
3445
|
});
|
|
3446
3446
|
return (a, s) => {
|
|
3447
|
-
const
|
|
3448
|
-
return i(), w(
|
|
3447
|
+
const r = F("el-slider");
|
|
3448
|
+
return i(), w(r, {
|
|
3449
3449
|
modelValue: n.value,
|
|
3450
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
3450
|
+
"onUpdate:modelValue": s[0] || (s[0] = (g) => n.value = g),
|
|
3451
3451
|
min: e.min,
|
|
3452
3452
|
max: e.max,
|
|
3453
3453
|
disabled: e.readonly,
|
|
@@ -3527,51 +3527,51 @@ const il = /* @__PURE__ */ G({
|
|
|
3527
3527
|
t: (o) => o
|
|
3528
3528
|
});
|
|
3529
3529
|
return (o, t) => {
|
|
3530
|
-
const n = F("j-icon"), a = F("el-text"), s = F("j-button"),
|
|
3530
|
+
const n = F("j-icon"), a = F("el-text"), s = F("j-button"), r = F("el-progress"), g = F("el-link");
|
|
3531
3531
|
return i(), T("div", {
|
|
3532
3532
|
class: Te(["j-upload-list", { "j-upload-image-list": e.isUploadImg, "j-upload-drag-list": e.drag }])
|
|
3533
3533
|
}, [
|
|
3534
3534
|
e.drag ? (i(), T(ue, { key: 0 }, [
|
|
3535
|
-
e.showFileList ? (i(!0), T(ue, { key: 0 }, de(e.list, (
|
|
3536
|
-
key:
|
|
3535
|
+
e.showFileList ? (i(!0), T(ue, { key: 0 }, de(e.list, (c) => (i(), T("div", {
|
|
3536
|
+
key: c.id,
|
|
3537
3537
|
class: "j-upload-dragItem"
|
|
3538
3538
|
}, [
|
|
3539
3539
|
e.isUploadImg ? (i(), T("div", Co, [
|
|
3540
3540
|
W("img", {
|
|
3541
|
-
src:
|
|
3541
|
+
src: c.url,
|
|
3542
3542
|
style: { width: "100%" },
|
|
3543
3543
|
alt: ""
|
|
3544
3544
|
}, null, 8, xo)
|
|
3545
3545
|
])) : (i(), w(n, {
|
|
3546
3546
|
key: 0,
|
|
3547
3547
|
icon: "file-text",
|
|
3548
|
-
style: re({ color:
|
|
3548
|
+
style: re({ color: c.color ? `var(${c.color})` : void 0 }),
|
|
3549
3549
|
size: 72
|
|
3550
3550
|
}, null, 8, ["style"])),
|
|
3551
3551
|
W("div", jo, [
|
|
3552
3552
|
K(a, { ellipsis: "" }, {
|
|
3553
3553
|
default: L(() => [
|
|
3554
|
-
Se(ie(`${U(l)(
|
|
3554
|
+
Se(ie(`${U(l)(c.name)}${c.status === "unUpload" ? "(" + U(l)("未传") + ")" : ""}`), 1)
|
|
3555
3555
|
]),
|
|
3556
3556
|
_: 2
|
|
3557
3557
|
}, 1024),
|
|
3558
3558
|
W("div", null, [
|
|
3559
|
-
|
|
3559
|
+
c.status === "uploading" ? (i(), w(a, { key: 0 }, {
|
|
3560
3560
|
default: L(() => [
|
|
3561
|
-
Se(ie(U(Qe)(
|
|
3561
|
+
Se(ie(U(Qe)(c.uploadSize)) + "/", 1)
|
|
3562
3562
|
]),
|
|
3563
3563
|
_: 2
|
|
3564
3564
|
}, 1024)) : D("", !0),
|
|
3565
3565
|
K(a, null, {
|
|
3566
3566
|
default: L(() => [
|
|
3567
|
-
Se(ie(U(Qe)(
|
|
3567
|
+
Se(ie(U(Qe)(c.size)), 1)
|
|
3568
3568
|
]),
|
|
3569
3569
|
_: 2
|
|
3570
3570
|
}, 1024)
|
|
3571
3571
|
])
|
|
3572
3572
|
]),
|
|
3573
3573
|
Ee(W("div", So, [
|
|
3574
|
-
|
|
3574
|
+
c.status === "done" || c.status === "unUpload" ? (i(), w(s, {
|
|
3575
3575
|
key: 0,
|
|
3576
3576
|
type: "link"
|
|
3577
3577
|
}, {
|
|
@@ -3579,42 +3579,42 @@ const il = /* @__PURE__ */ G({
|
|
|
3579
3579
|
K(n, {
|
|
3580
3580
|
icon: "eye",
|
|
3581
3581
|
size: 24,
|
|
3582
|
-
onClick: ze((m) => e.previewFile(
|
|
3582
|
+
onClick: ze((m) => e.previewFile(c), ["stop"])
|
|
3583
3583
|
}, null, 8, ["onClick"])
|
|
3584
3584
|
]),
|
|
3585
3585
|
_: 2
|
|
3586
3586
|
}, 1024)) : D("", !0),
|
|
3587
|
-
!e.readonly && (
|
|
3587
|
+
!e.readonly && (c.status === "done" || c.status === "unUpload") ? (i(), w(s, {
|
|
3588
3588
|
key: 1,
|
|
3589
3589
|
icon: "delete",
|
|
3590
3590
|
type: "link",
|
|
3591
3591
|
danger: "",
|
|
3592
|
-
onClick: ze((m) => e.deleteFile(
|
|
3592
|
+
onClick: ze((m) => e.deleteFile(c), ["stop", "prevent"])
|
|
3593
3593
|
}, null, 8, ["onClick"])) : D("", !0)
|
|
3594
3594
|
], 512), [
|
|
3595
|
-
[nt,
|
|
3595
|
+
[nt, c.status === "error"]
|
|
3596
3596
|
]),
|
|
3597
|
-
|
|
3597
|
+
c.status === "uploading" ? (i(), w(r, {
|
|
3598
3598
|
key: 2,
|
|
3599
3599
|
"stroke-width": 4,
|
|
3600
3600
|
style: { position: "absolute", bottom: "-4px", left: "0", margin: "0 !important" },
|
|
3601
|
-
percent:
|
|
3601
|
+
percent: c.percent,
|
|
3602
3602
|
"show-text": !1
|
|
3603
3603
|
}, null, 8, ["percent"])) : D("", !0)
|
|
3604
3604
|
]))), 128)) : D("", !0),
|
|
3605
3605
|
te(o.$slots, "default")
|
|
3606
|
-
], 64)) : e.isUploadImg ? (i(!0), T(ue, { key: 1 }, de(e.list, (
|
|
3607
|
-
key:
|
|
3606
|
+
], 64)) : e.isUploadImg ? (i(!0), T(ue, { key: 1 }, de(e.list, (c) => (i(), T("div", {
|
|
3607
|
+
key: c.id,
|
|
3608
3608
|
class: "j-upload-imgItem"
|
|
3609
3609
|
}, [
|
|
3610
|
-
|
|
3610
|
+
c.status === "done" || c.status === "unUpload" ? (i(), T("img", {
|
|
3611
3611
|
key: 0,
|
|
3612
|
-
src:
|
|
3612
|
+
src: c.url,
|
|
3613
3613
|
style: { width: "100%" },
|
|
3614
3614
|
alt: ""
|
|
3615
3615
|
}, null, 8, Bo)) : D("", !0),
|
|
3616
3616
|
Ee(W("div", $o, [
|
|
3617
|
-
|
|
3617
|
+
c.status === "done" || c.status === "unUpload" ? (i(), w(s, {
|
|
3618
3618
|
key: 0,
|
|
3619
3619
|
type: "link"
|
|
3620
3620
|
}, {
|
|
@@ -3622,12 +3622,12 @@ const il = /* @__PURE__ */ G({
|
|
|
3622
3622
|
K(n, {
|
|
3623
3623
|
icon: "eye",
|
|
3624
3624
|
size: 24,
|
|
3625
|
-
onClick: ze((m) => e.previewFile(
|
|
3625
|
+
onClick: ze((m) => e.previewFile(c), ["stop"])
|
|
3626
3626
|
}, null, 8, ["onClick"])
|
|
3627
3627
|
]),
|
|
3628
3628
|
_: 2
|
|
3629
3629
|
}, 1024)) : D("", !0),
|
|
3630
|
-
!e.readonly && (
|
|
3630
|
+
!e.readonly && (c.status === "done" || c.status === "unUpload") ? (i(), w(s, {
|
|
3631
3631
|
key: 1,
|
|
3632
3632
|
type: "link",
|
|
3633
3633
|
danger: ""
|
|
@@ -3636,54 +3636,54 @@ const il = /* @__PURE__ */ G({
|
|
|
3636
3636
|
K(n, {
|
|
3637
3637
|
icon: "delete",
|
|
3638
3638
|
size: 24,
|
|
3639
|
-
onClick: ze((m) => e.deleteFile(
|
|
3639
|
+
onClick: ze((m) => e.deleteFile(c), ["stop", "prevent"])
|
|
3640
3640
|
}, null, 8, ["onClick"])
|
|
3641
3641
|
]),
|
|
3642
3642
|
_: 2
|
|
3643
3643
|
}, 1024)) : D("", !0)
|
|
3644
3644
|
], 512), [
|
|
3645
|
-
[nt,
|
|
3645
|
+
[nt, c.status === "error"]
|
|
3646
3646
|
]),
|
|
3647
|
-
|
|
3647
|
+
c.status === "uploading" ? (i(), w(r, {
|
|
3648
3648
|
key: 1,
|
|
3649
3649
|
"stroke-width": 4,
|
|
3650
|
-
percent:
|
|
3650
|
+
percent: c.percent,
|
|
3651
3651
|
"show-text": !1
|
|
3652
3652
|
}, null, 8, ["percent"])) : D("", !0)
|
|
3653
|
-
]))), 128)) : (i(!0), T(ue, { key: 2 }, de(e.list, (
|
|
3654
|
-
key:
|
|
3653
|
+
]))), 128)) : (i(!0), T(ue, { key: 2 }, de(e.list, (c) => (i(), T("div", {
|
|
3654
|
+
key: c.id,
|
|
3655
3655
|
class: "j-upload-item"
|
|
3656
3656
|
}, [
|
|
3657
3657
|
K(n, {
|
|
3658
3658
|
icon: "file-text",
|
|
3659
|
-
style: re({ color:
|
|
3659
|
+
style: re({ color: c.color ? `var(${c.color})` : void 0 }),
|
|
3660
3660
|
size: 16
|
|
3661
3661
|
}, null, 8, ["style"]),
|
|
3662
3662
|
W("div", zo, [
|
|
3663
|
-
K(
|
|
3663
|
+
K(g, {
|
|
3664
3664
|
type: "primary",
|
|
3665
3665
|
underline: "never",
|
|
3666
|
-
onClick: ze((m) => e.previewFile(
|
|
3666
|
+
onClick: ze((m) => e.previewFile(c), ["stop"])
|
|
3667
3667
|
}, {
|
|
3668
3668
|
default: L(() => [
|
|
3669
|
-
Se(ie(`${U(l)(
|
|
3669
|
+
Se(ie(`${U(l)(c.name)}${c.status === "unUpload" ? "(" + U(l)("未传") + ")" : ""}`), 1)
|
|
3670
3670
|
]),
|
|
3671
3671
|
_: 2
|
|
3672
3672
|
}, 1032, ["onClick"])
|
|
3673
3673
|
]),
|
|
3674
|
-
|
|
3674
|
+
c.status === "uploading" ? (i(), w(a, { key: 0 }, {
|
|
3675
3675
|
default: L(() => [
|
|
3676
|
-
Se(ie(U(Qe)(
|
|
3676
|
+
Se(ie(U(Qe)(c.uploadSize)) + "/", 1)
|
|
3677
3677
|
]),
|
|
3678
3678
|
_: 2
|
|
3679
3679
|
}, 1024)) : D("", !0),
|
|
3680
3680
|
K(a, null, {
|
|
3681
3681
|
default: L(() => [
|
|
3682
|
-
Se(ie(U(Qe)(
|
|
3682
|
+
Se(ie(U(Qe)(c.size)), 1)
|
|
3683
3683
|
]),
|
|
3684
3684
|
_: 2
|
|
3685
3685
|
}, 1024),
|
|
3686
|
-
|
|
3686
|
+
c.status === "done" && e.isShowSuccessIcon ? (i(), w(n, {
|
|
3687
3687
|
key: 1,
|
|
3688
3688
|
class: "j-upload-item-success",
|
|
3689
3689
|
icon: "check-circle",
|
|
@@ -3694,15 +3694,15 @@ const il = /* @__PURE__ */ G({
|
|
|
3694
3694
|
class: "j-upload-item-error",
|
|
3695
3695
|
icon: "delete",
|
|
3696
3696
|
size: 24,
|
|
3697
|
-
onClick: ze((m) => e.deleteFile(
|
|
3697
|
+
onClick: ze((m) => e.deleteFile(c), ["stop", "prevent"])
|
|
3698
3698
|
}, null, 8, ["onClick"])), [
|
|
3699
|
-
[nt,
|
|
3699
|
+
[nt, c.status === "error"]
|
|
3700
3700
|
]),
|
|
3701
|
-
|
|
3701
|
+
c.status === "uploading" ? (i(), w(r, {
|
|
3702
3702
|
key: 3,
|
|
3703
3703
|
style: { position: "absolute", bottom: "-4px", left: "0", margin: "0 !important" },
|
|
3704
3704
|
"stroke-width": 4,
|
|
3705
|
-
percent:
|
|
3705
|
+
percent: c.percent,
|
|
3706
3706
|
"show-text": !1
|
|
3707
3707
|
}, null, 8, ["percent"])) : D("", !0)
|
|
3708
3708
|
]))), 128))
|
|
@@ -3894,18 +3894,18 @@ const il = /* @__PURE__ */ G({
|
|
|
3894
3894
|
"notUploadChange"
|
|
3895
3895
|
],
|
|
3896
3896
|
setup(e, { emit: l }) {
|
|
3897
|
-
const o = e, t = l, { warning: n, error: a, createConfirm: s, t:
|
|
3897
|
+
const o = e, t = l, { warning: n, error: a, createConfirm: s, t: r, apiUrl: g, token: c } = Ve("jcode_app_provide", {
|
|
3898
3898
|
t: (S) => S
|
|
3899
3899
|
}), { useFile: m } = Ve("jcode_app_form_provide", {
|
|
3900
3900
|
useFile: () => ({})
|
|
3901
|
-
}), { fileChunkedUpload:
|
|
3901
|
+
}), { fileChunkedUpload: u, deleteFile: p } = m(), h = V(() => o.isUploadImg ? o.accept || "image/*" : o.accept), d = V(() => {
|
|
3902
3902
|
if (o.limit !== -1)
|
|
3903
3903
|
return o.limit;
|
|
3904
|
-
}),
|
|
3905
|
-
folderId: o.modelValue ||
|
|
3904
|
+
}), v = V(() => o.limit === -1 ? "" : `,${r("上传数量")}${o.limit}`), b = j(""), k = V(() => ({
|
|
3905
|
+
folderId: o.modelValue || b.value,
|
|
3906
3906
|
maxSize: o.maxSize,
|
|
3907
3907
|
sizeType: o.sizeType
|
|
3908
|
-
})), C = j([]),
|
|
3908
|
+
})), C = j([]), R = () => {
|
|
3909
3909
|
C.value = [...C.value];
|
|
3910
3910
|
}, Q = (S) => {
|
|
3911
3911
|
if (o.maxSize && o.sizeType) {
|
|
@@ -3946,26 +3946,26 @@ const il = /* @__PURE__ */ G({
|
|
|
3946
3946
|
}, B = (S, P) => {
|
|
3947
3947
|
if (P && P.indexOf("image") > -1)
|
|
3948
3948
|
return "file-image";
|
|
3949
|
-
const
|
|
3950
|
-
return ["webp", "bmp", "jpg", "jpge", "png", "tif", "gif", "svg"].includes(
|
|
3951
|
-
},
|
|
3952
|
-
S.status = o.autoUpload ? "uploading" : "unUpload", S.uploadSize = 0, S.icon = B(S.name, S.type),
|
|
3949
|
+
const ee = f(S);
|
|
3950
|
+
return ["webp", "bmp", "jpg", "jpge", "png", "tif", "gif", "svg"].includes(ee) ? "file-image" : Y[ee] || "file-ufo";
|
|
3951
|
+
}, M = (S) => {
|
|
3952
|
+
S.status = o.autoUpload ? "uploading" : "unUpload", S.uploadSize = 0, S.icon = B(S.name, S.type), u || (S.icon = "file-text"), S.id = S.uid, S.url = window.URL.createObjectURL(S), S.date = Ke(), S.param = k.value;
|
|
3953
3953
|
}, I = (S) => {
|
|
3954
3954
|
t("start", { file: S, list: C.value });
|
|
3955
|
-
},
|
|
3956
|
-
S.percent =
|
|
3955
|
+
}, _ = (S, P, ee) => {
|
|
3956
|
+
S.percent = ee, S.uploadSize = P, R();
|
|
3957
3957
|
}, $ = (S) => {
|
|
3958
|
-
S.status = "done", S.id += "1", S.uid += "1",
|
|
3958
|
+
S.status = "done", S.id += "1", S.uid += "1", R(), t("success", { file: S, list: C.value }), o.modelValue || (t("update:modelValue", b.value), t("change", { value: b.value }));
|
|
3959
3959
|
}, se = (S, P) => {
|
|
3960
|
-
console.error(P, "简搭提醒您:文件上传错误!"), S.status = "error",
|
|
3960
|
+
console.error(P, "简搭提醒您:文件上传错误!"), S.status = "error", R(), t("error", { file: S, list: C.value });
|
|
3961
3961
|
}, J = (S) => {
|
|
3962
3962
|
if (C.value.push(S), S.status === "unUpload") {
|
|
3963
3963
|
t("notUploadChange", { value: S.url });
|
|
3964
3964
|
return;
|
|
3965
3965
|
}
|
|
3966
|
-
!o.isNotApi && o.upload ? o.upload(S) : !o.isNotApi &&
|
|
3966
|
+
!o.isNotApi && o.upload ? o.upload(S) : !o.isNotApi && u ? u(S, {
|
|
3967
3967
|
onStart: I,
|
|
3968
|
-
onProgress:
|
|
3968
|
+
onProgress: _,
|
|
3969
3969
|
onSuccess: $,
|
|
3970
3970
|
onError: se,
|
|
3971
3971
|
uploadCallback: o.uploadCallback
|
|
@@ -3974,7 +3974,7 @@ const il = /* @__PURE__ */ G({
|
|
|
3974
3974
|
if (!Q(S.size))
|
|
3975
3975
|
return a && a("上传文件超出大小了"), !1;
|
|
3976
3976
|
}, q = (S) => {
|
|
3977
|
-
|
|
3977
|
+
M(S.file), J(S.file);
|
|
3978
3978
|
}, H = (S) => new Promise((P) => {
|
|
3979
3979
|
s ? s({
|
|
3980
3980
|
title: "提示",
|
|
@@ -3996,14 +3996,14 @@ const il = /* @__PURE__ */ G({
|
|
|
3996
3996
|
}, le = async (S) => {
|
|
3997
3997
|
await H(S) && ne(S);
|
|
3998
3998
|
}, Be = j(!1), oe = j(""), he = j(""), Ie = j(!1), Oe = j(!1);
|
|
3999
|
-
let
|
|
3999
|
+
let E = null;
|
|
4000
4000
|
const be = j(Ke(/* @__PURE__ */ new Date(), "YYYY-MM-DD")), ve = (S) => {
|
|
4001
4001
|
if (S.isPreview === !1 && !o.isUploadImg) {
|
|
4002
4002
|
n && n("无权限预览!");
|
|
4003
4003
|
return;
|
|
4004
4004
|
}
|
|
4005
4005
|
const P = S.name.split(".")[S.name.split(".").length - 1];
|
|
4006
|
-
switch (
|
|
4006
|
+
switch (E = S, Be.value = !1, oe.value = S.name, P.toLowerCase()) {
|
|
4007
4007
|
case "jpg":
|
|
4008
4008
|
case "gif":
|
|
4009
4009
|
case "png":
|
|
@@ -4031,20 +4031,20 @@ const il = /* @__PURE__ */ G({
|
|
|
4031
4031
|
be.value = Ke(/* @__PURE__ */ new Date(), "YYYY-MM-DD HH:mm:ss");
|
|
4032
4032
|
}, ce = (S) => {
|
|
4033
4033
|
const P = S.response?.fileId || S.id;
|
|
4034
|
-
if (!
|
|
4034
|
+
if (!g)
|
|
4035
4035
|
return "";
|
|
4036
|
-
const
|
|
4037
|
-
return `${
|
|
4036
|
+
const ee = Ke(/* @__PURE__ */ new Date(), "YYYY-MM-DD HH:mm:ss") + "|" + P, pe = nl.createAesEncryption({ key: "jianda" }).encrypt(ee).replace(/\//g, "|");
|
|
4037
|
+
return `${g}/system/annexesfile/preview/${pe}?token=${c?.value}`;
|
|
4038
4038
|
}, ye = () => {
|
|
4039
|
-
|
|
4040
|
-
const S =
|
|
4039
|
+
E.isDown === !1 && n && n("无权限下载!");
|
|
4040
|
+
const S = E.response?.fileId || E.id, P = `${g}/system/annexesfile/${S}?token=${c?.value}`;
|
|
4041
4041
|
ko(P);
|
|
4042
4042
|
}, je = () => {
|
|
4043
4043
|
if (o.limit !== -1 && o.limit <= C.value.length)
|
|
4044
4044
|
return n && n(`当前限制选择${o.limit}个文件`), !1;
|
|
4045
4045
|
};
|
|
4046
4046
|
return (S, P) => {
|
|
4047
|
-
const
|
|
4047
|
+
const ee = F("j-icon"), pe = F("j-button"), $e = F("el-popover"), Le = F("el-upload"), fe = F("el-text"), lt = F("j-dialog-full"), ot = ct("loading");
|
|
4048
4048
|
return i(), T("div", Vo, [
|
|
4049
4049
|
K(Le, {
|
|
4050
4050
|
action: "",
|
|
@@ -4053,7 +4053,7 @@ const il = /* @__PURE__ */ G({
|
|
|
4053
4053
|
"show-file-list": e.isUploadImg && !e.isLayer && e.showFileList,
|
|
4054
4054
|
"list-type": e.isUploadImg && !e.isLayer ? "picture-card" : void 0,
|
|
4055
4055
|
accept: h.value,
|
|
4056
|
-
limit:
|
|
4056
|
+
limit: d.value,
|
|
4057
4057
|
multiple: e.multiple,
|
|
4058
4058
|
"before-upload": A,
|
|
4059
4059
|
"http-request": q,
|
|
@@ -4065,12 +4065,12 @@ const il = /* @__PURE__ */ G({
|
|
|
4065
4065
|
}, {
|
|
4066
4066
|
default: L(() => [
|
|
4067
4067
|
e.isUploadImg && !e.isLayer && !e.readonly ? (i(), T("div", To, [
|
|
4068
|
-
K(
|
|
4069
|
-
W("div", Lo, ie(U(
|
|
4068
|
+
K(ee, { icon: "material-symbols-light:add-2-rounded" }),
|
|
4069
|
+
W("div", Lo, ie(U(r)(e.placeholder)), 1)
|
|
4070
4070
|
])) : e.isLayer && e.showFileList && C.value.length > 0 && !Ie.value ? (i(), w($e, {
|
|
4071
4071
|
key: 1,
|
|
4072
4072
|
placement: "bottom",
|
|
4073
|
-
title: e.isUploadImg ? U(
|
|
4073
|
+
title: e.isUploadImg ? U(r)("图片列表") : U(r)("文件列表")
|
|
4074
4074
|
}, {
|
|
4075
4075
|
content: L(() => [
|
|
4076
4076
|
K(Ct, {
|
|
@@ -4087,7 +4087,7 @@ const il = /* @__PURE__ */ G({
|
|
|
4087
4087
|
type: e.btnType,
|
|
4088
4088
|
size: e.btnSize,
|
|
4089
4089
|
icon: "material-symbols-light:upload-rounded",
|
|
4090
|
-
label: e.readonly ? U(
|
|
4090
|
+
label: e.readonly ? U(r)(e.btnText) : e.placeholder
|
|
4091
4091
|
}, null, 8, ["type", "size", "label"])
|
|
4092
4092
|
]),
|
|
4093
4093
|
_: 1
|
|
@@ -4104,7 +4104,7 @@ const il = /* @__PURE__ */ G({
|
|
|
4104
4104
|
e.isTip ? (i(), T("div", Fo, [
|
|
4105
4105
|
K(fe, null, {
|
|
4106
4106
|
default: L(() => [
|
|
4107
|
-
Se(ie(`${U(
|
|
4107
|
+
Se(ie(`${U(r)("只能上传不超过{0}的{1}文件", `${e.maxSize}${e.sizeType}`, `${h.value || ""}`)},${v.value}`), 1)
|
|
4108
4108
|
]),
|
|
4109
4109
|
_: 1
|
|
4110
4110
|
})
|
|
@@ -4122,9 +4122,9 @@ const il = /* @__PURE__ */ G({
|
|
|
4122
4122
|
visible: Ie.value,
|
|
4123
4123
|
"onUpdate:visible": P[1] || (P[1] = (qe) => Ie.value = qe),
|
|
4124
4124
|
"btn-text": "下载",
|
|
4125
|
-
title: `${U(
|
|
4125
|
+
title: `${U(r)("文件预览")}【${oe.value}】`,
|
|
4126
4126
|
"destroy-on-close": !0,
|
|
4127
|
-
"has-btns": !!U(
|
|
4127
|
+
"has-btns": !!U(g),
|
|
4128
4128
|
onOk: ye
|
|
4129
4129
|
}, {
|
|
4130
4130
|
default: L(() => [
|
|
@@ -4195,37 +4195,37 @@ const il = /* @__PURE__ */ G({
|
|
|
4195
4195
|
emits: ["click", "ready"],
|
|
4196
4196
|
setup(e, { expose: l, emit: o }) {
|
|
4197
4197
|
const t = e, n = o, a = j(), s = rt();
|
|
4198
|
-
let
|
|
4199
|
-
const
|
|
4200
|
-
a.value && (s.value = Nt.init(a.value, t.theme, t.initOptions), m(t.option), s.value && s.value.on("click", (
|
|
4201
|
-
n("click",
|
|
4202
|
-
}),
|
|
4198
|
+
let r = null, g = null;
|
|
4199
|
+
const c = async () => {
|
|
4200
|
+
a.value && (s.value = Nt.init(a.value, t.theme, t.initOptions), m(t.option), s.value && s.value.on("click", (d) => {
|
|
4201
|
+
n("click", d);
|
|
4202
|
+
}), r = new ResizeObserver(() => {
|
|
4203
4203
|
s.value?.resize();
|
|
4204
|
-
}),
|
|
4205
|
-
}, m = (
|
|
4206
|
-
s.value && (
|
|
4207
|
-
s.value?.setOption(
|
|
4208
|
-
}, t.updateDelay) : s.value.setOption(
|
|
4204
|
+
}), r.observe(a.value), s.value && n("ready", s.value));
|
|
4205
|
+
}, m = (d) => {
|
|
4206
|
+
s.value && (g && clearTimeout(g), t.updateDelay > 0 ? g = setTimeout(() => {
|
|
4207
|
+
s.value?.setOption(d, t.notMerge);
|
|
4208
|
+
}, t.updateDelay) : s.value.setOption(d, t.notMerge));
|
|
4209
4209
|
};
|
|
4210
4210
|
return ke(
|
|
4211
4211
|
() => t.option,
|
|
4212
|
-
(
|
|
4213
|
-
m(
|
|
4212
|
+
(d) => {
|
|
4213
|
+
m(d);
|
|
4214
4214
|
},
|
|
4215
4215
|
{ deep: !0 }
|
|
4216
4216
|
), Xe(() => {
|
|
4217
|
-
|
|
4217
|
+
c();
|
|
4218
4218
|
}), tt(() => {
|
|
4219
|
-
|
|
4219
|
+
g && clearTimeout(g), r && a.value && (r.unobserve(a.value), r.disconnect(), r = null), s.value && (s.value.dispose(), s.value = void 0);
|
|
4220
4220
|
}), l({
|
|
4221
4221
|
getInstance: () => s.value,
|
|
4222
|
-
resize: (
|
|
4223
|
-
s.value?.resize(
|
|
4222
|
+
resize: (d) => {
|
|
4223
|
+
s.value?.resize(d);
|
|
4224
4224
|
},
|
|
4225
4225
|
clear: () => {
|
|
4226
4226
|
s.value?.clear();
|
|
4227
4227
|
}
|
|
4228
|
-
}), (
|
|
4228
|
+
}), (d, v) => (i(), T("div", {
|
|
4229
4229
|
ref_key: "chartRef",
|
|
4230
4230
|
ref: a,
|
|
4231
4231
|
class: "j-echarts"
|
|
@@ -4273,19 +4273,19 @@ const il = /* @__PURE__ */ G({
|
|
|
4273
4273
|
logoCornerRadius: { default: 8 }
|
|
4274
4274
|
},
|
|
4275
4275
|
setup(e) {
|
|
4276
|
-
const l = e, o = j(), t = j(1), n = j(""), a =
|
|
4277
|
-
const
|
|
4278
|
-
return l.format === "qr" ? (
|
|
4276
|
+
const l = e, o = j(), t = j(1), n = j(""), a = V(() => {
|
|
4277
|
+
const r = {};
|
|
4278
|
+
return l.format === "qr" ? (r.text = l.modelValue + "", r.size = l.size, r.margin = l.margin, r.correctLevel = l.correctLevel, r.colorDark = l.color, r.colorLight = l.background, r.autoColor = l.autoColor, r.backgroundImage = l.backgroundImage, r.backgroundDimming = l.backgroundDimming, r.gifBackground = l.gifBackground, r.whiteMargin = l.whiteMargin, r.logoImage = l.logoImage, r.logoScale = l.logoScale, r.logoMargin = l.logoMargin, r.logoCornerRadius = l.logoCornerRadius) : (r.format = l.format, r.width = l.width, r.height = l.height, r.text = l.text, r.fontOptions = l.fontOptions, r.textAlign = l.textAlign, r.textPosition = l.textPosition, r.textMargin = l.textMargin, r.fontSize = l.fontSize, r.background = l.background, r.lineColor = l.color, r.margin = l.margin, r.marginTop = l.marginTop, r.marginRight = l.marginRight, r.marginBottom = l.marginBottom, r.marginLeft = l.marginLeft, r.displayValue = l.displayValue, r.flat = l.flat), r;
|
|
4279
4279
|
}), s = () => {
|
|
4280
4280
|
if (l.format === "qr") {
|
|
4281
4281
|
if (!window.AwesomeQR) {
|
|
4282
4282
|
console.error("缺少awesome-qr.js");
|
|
4283
4283
|
return;
|
|
4284
4284
|
}
|
|
4285
|
-
new window.AwesomeQR.AwesomeQR(a.value).draw().then((
|
|
4286
|
-
n.value =
|
|
4287
|
-
}).catch((
|
|
4288
|
-
console.error(
|
|
4285
|
+
new window.AwesomeQR.AwesomeQR(a.value).draw().then((r) => {
|
|
4286
|
+
n.value = r, t.value++;
|
|
4287
|
+
}).catch((r) => {
|
|
4288
|
+
console.error(r);
|
|
4289
4289
|
});
|
|
4290
4290
|
} else o.value ? Fe(l.modelValue) || Rt(o.value, l.modelValue + "", a.value) : Fe(l.modelValue) || setTimeout(() => {
|
|
4291
4291
|
s();
|
|
@@ -4301,7 +4301,7 @@ const il = /* @__PURE__ */ G({
|
|
|
4301
4301
|
{ immediate: !0 }
|
|
4302
4302
|
), ke(a, () => {
|
|
4303
4303
|
s();
|
|
4304
|
-
}), (
|
|
4304
|
+
}), (r, g) => n.value || e.format != "qr" && !U(Fe)(e.modelValue) ? (i(), T("img", {
|
|
4305
4305
|
key: t.value,
|
|
4306
4306
|
ref_key: "barcodeRef",
|
|
4307
4307
|
ref: o,
|
|
@@ -4326,21 +4326,21 @@ const il = /* @__PURE__ */ G({
|
|
|
4326
4326
|
const o = e, t = (...f) => {
|
|
4327
4327
|
f = f.flat();
|
|
4328
4328
|
let B = 0;
|
|
4329
|
-
for (let
|
|
4330
|
-
B += f[
|
|
4329
|
+
for (let M = 0; M < f.length; M++)
|
|
4330
|
+
B += f[M];
|
|
4331
4331
|
return B / f.length;
|
|
4332
4332
|
}, n = (f, B) => B < 0 ? -Math.ceil(f / Math.abs(B)) * B || 0 : Math.ceil(f / B) * B || 0, a = (...f) => (f = f.flat(), f.length), s = (f, B) => {
|
|
4333
|
-
let
|
|
4333
|
+
let M = 0;
|
|
4334
4334
|
if (Array.isArray(f))
|
|
4335
4335
|
if (/[><=]/.test(B)) {
|
|
4336
4336
|
const I = B.match(/^([><=]+)(.+)$/);
|
|
4337
4337
|
if (I) {
|
|
4338
|
-
const
|
|
4338
|
+
const _ = I[1], $ = Number(I[2]);
|
|
4339
4339
|
for (let se = 0; se < f.length; se++)
|
|
4340
4340
|
try {
|
|
4341
4341
|
const J = Number(f[se]);
|
|
4342
4342
|
let A = !1;
|
|
4343
|
-
switch (
|
|
4343
|
+
switch (_) {
|
|
4344
4344
|
case ">":
|
|
4345
4345
|
A = J > $;
|
|
4346
4346
|
break;
|
|
@@ -4362,7 +4362,7 @@ const il = /* @__PURE__ */ G({
|
|
|
4362
4362
|
A = J !== $;
|
|
4363
4363
|
break;
|
|
4364
4364
|
}
|
|
4365
|
-
A &&
|
|
4365
|
+
A && M++;
|
|
4366
4366
|
} catch {
|
|
4367
4367
|
console.log("计算失败");
|
|
4368
4368
|
break;
|
|
@@ -4370,52 +4370,52 @@ const il = /* @__PURE__ */ G({
|
|
|
4370
4370
|
}
|
|
4371
4371
|
} else
|
|
4372
4372
|
for (let I = 0; I < f.length; I++)
|
|
4373
|
-
f[I] === B &&
|
|
4374
|
-
return
|
|
4375
|
-
},
|
|
4373
|
+
f[I] === B && M++;
|
|
4374
|
+
return M;
|
|
4375
|
+
}, r = (f, B) => f.toFixed(B), g = (f, B) => B < 0 ? -Math.floor(f / Math.abs(B)) * B || 0 : Math.floor(f / B) * B || 0, c = (f, B) => {
|
|
4376
4376
|
if (Array.isArray(f))
|
|
4377
|
-
return f.sort((
|
|
4377
|
+
return f.sort((M, I) => I - M), f[B - 1];
|
|
4378
4378
|
}, m = (f, B) => {
|
|
4379
4379
|
if (Array.isArray(f))
|
|
4380
|
-
return f.sort((
|
|
4381
|
-
},
|
|
4380
|
+
return f.sort((M, I) => M - I), f[B - 1];
|
|
4381
|
+
}, u = (f, B) => Math.log(f) / Math.log(B), p = (f, B) => f % B, h = (...f) => {
|
|
4382
4382
|
f = f.flat();
|
|
4383
4383
|
let B = 1;
|
|
4384
|
-
for (let
|
|
4385
|
-
B *= f[
|
|
4384
|
+
for (let M = 0; M < f.length; M++)
|
|
4385
|
+
B *= f[M];
|
|
4386
4386
|
return B;
|
|
4387
|
-
},
|
|
4388
|
-
const
|
|
4389
|
-
return Number(
|
|
4390
|
-
},
|
|
4387
|
+
}, d = (f, B) => {
|
|
4388
|
+
const M = f.toFixed(B);
|
|
4389
|
+
return Number(M);
|
|
4390
|
+
}, v = (...f) => {
|
|
4391
4391
|
f = f.flat();
|
|
4392
4392
|
let B = 0;
|
|
4393
|
-
for (let
|
|
4394
|
-
B += Number(f[
|
|
4393
|
+
for (let M = 0; M < f.length; M++)
|
|
4394
|
+
B += Number(f[M]);
|
|
4395
4395
|
return B;
|
|
4396
|
-
},
|
|
4396
|
+
}, b = (...f) => f[0].map((I, _) => {
|
|
4397
4397
|
let $ = I;
|
|
4398
4398
|
for (let se = 1; se < f.length; se++)
|
|
4399
|
-
$ *= f[se][
|
|
4399
|
+
$ *= f[se][_] || 0;
|
|
4400
4400
|
return $;
|
|
4401
|
-
}).reduce((I,
|
|
4401
|
+
}).reduce((I, _) => I + _, 0), k = l, { getValue: C } = Ve("jd_form_provide", {}), R = (f) => {
|
|
4402
4402
|
const B = C(f);
|
|
4403
4403
|
if (it(B)) {
|
|
4404
4404
|
const I = [];
|
|
4405
|
-
return B.forEach((
|
|
4406
|
-
const $ = Number(
|
|
4405
|
+
return B.forEach((_) => {
|
|
4406
|
+
const $ = Number(_);
|
|
4407
4407
|
Number.isNaN($) ? I.push(0) : I.push($);
|
|
4408
4408
|
}), I;
|
|
4409
4409
|
}
|
|
4410
|
-
const
|
|
4411
|
-
return Number.isNaN(
|
|
4412
|
-
}, Q =
|
|
4410
|
+
const M = Number(B);
|
|
4411
|
+
return Number.isNaN(M) ? 0 : M;
|
|
4412
|
+
}, Q = V(() => {
|
|
4413
4413
|
if (!C)
|
|
4414
4414
|
return "";
|
|
4415
4415
|
const f = JSON.parse(o.formatJson || "[]");
|
|
4416
4416
|
let B = "";
|
|
4417
|
-
for (let
|
|
4418
|
-
const $ = f[
|
|
4417
|
+
for (let _ = 0; _ < f.length; _++) {
|
|
4418
|
+
const $ = f[_];
|
|
4419
4419
|
if ($.type === "fun" && $.value !== "(" && $.value !== ")")
|
|
4420
4420
|
if (["abs", "max", "min", "sqrt"].includes($.value))
|
|
4421
4421
|
B += `Math.${$.value}`;
|
|
@@ -4453,42 +4453,42 @@ const il = /* @__PURE__ */ G({
|
|
|
4453
4453
|
sumFun,
|
|
4454
4454
|
sumproductFun,
|
|
4455
4455
|
getCompValue)=>{ return ${B} }`;
|
|
4456
|
-
let
|
|
4456
|
+
let M;
|
|
4457
4457
|
const I = Bt(B);
|
|
4458
4458
|
if (I.res)
|
|
4459
4459
|
try {
|
|
4460
|
-
|
|
4460
|
+
M = I.fn(
|
|
4461
4461
|
t,
|
|
4462
4462
|
n,
|
|
4463
4463
|
a,
|
|
4464
4464
|
s,
|
|
4465
|
-
u,
|
|
4466
|
-
v,
|
|
4467
|
-
d,
|
|
4468
|
-
m,
|
|
4469
4465
|
r,
|
|
4466
|
+
g,
|
|
4467
|
+
c,
|
|
4468
|
+
m,
|
|
4469
|
+
u,
|
|
4470
4470
|
p,
|
|
4471
4471
|
h,
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4472
|
+
d,
|
|
4473
|
+
v,
|
|
4474
|
+
b,
|
|
4475
|
+
R
|
|
4476
4476
|
);
|
|
4477
|
-
} catch (
|
|
4478
|
-
console.log(
|
|
4477
|
+
} catch (_) {
|
|
4478
|
+
console.log(_, "计算组件公式运行错误");
|
|
4479
4479
|
}
|
|
4480
4480
|
else
|
|
4481
4481
|
return console.log(I.msg), "";
|
|
4482
|
-
return Number.isNaN(
|
|
4483
|
-
}), Y =
|
|
4482
|
+
return Number.isNaN(M) ? "" : (o.decimal !== void 0 && (M = M.toFixed(o.decimal)), M);
|
|
4483
|
+
}), Y = V(() => {
|
|
4484
4484
|
let f = Q.value;
|
|
4485
4485
|
return o.thousandSeparator && (f = Zt(f)), o.isChinese && (f = Qt(f)), f;
|
|
4486
4486
|
});
|
|
4487
4487
|
return ke(Q, (f) => {
|
|
4488
4488
|
k("update:modelValue", f), k("change", { value: f, data: Y.value });
|
|
4489
4489
|
}), (f, B) => {
|
|
4490
|
-
const
|
|
4491
|
-
return i(), w(
|
|
4490
|
+
const M = F("el-input");
|
|
4491
|
+
return i(), w(M, {
|
|
4492
4492
|
modelValue: Y.value,
|
|
4493
4493
|
"onUpdate:modelValue": B[0] || (B[0] = (I) => Y.value = I),
|
|
4494
4494
|
readonly: "",
|
|
@@ -4509,11 +4509,11 @@ const il = /* @__PURE__ */ G({
|
|
|
4509
4509
|
callback: { type: Function, default: void 0 }
|
|
4510
4510
|
},
|
|
4511
4511
|
setup(e, { expose: l }) {
|
|
4512
|
-
const o = e, t =
|
|
4512
|
+
const o = e, t = V(() => ({
|
|
4513
4513
|
...o
|
|
4514
|
-
})), n = j(), a = j(null), s =
|
|
4514
|
+
})), n = j(), a = j(null), s = V(() => o.options);
|
|
4515
4515
|
Xe(() => {
|
|
4516
|
-
o.animation &&
|
|
4516
|
+
o.animation && r();
|
|
4517
4517
|
}), ke(
|
|
4518
4518
|
() => o.decimals,
|
|
4519
4519
|
() => {
|
|
@@ -4526,7 +4526,7 @@ const il = /* @__PURE__ */ G({
|
|
|
4526
4526
|
a.value && a.value.update && a.value.update(p);
|
|
4527
4527
|
}
|
|
4528
4528
|
);
|
|
4529
|
-
const
|
|
4529
|
+
const r = () => {
|
|
4530
4530
|
a.value || (s.value.startVal = o.startValue, s.value.decimalPlaces = o.decimals, s.value.duration = o.duration, a.value = new Et(n.value, Number(o.endValue), s.value), a.value.start(() => {
|
|
4531
4531
|
o.callback?.(a.value);
|
|
4532
4532
|
}));
|
|
@@ -4538,7 +4538,7 @@ const il = /* @__PURE__ */ G({
|
|
|
4538
4538
|
}), l({
|
|
4539
4539
|
myProps: t,
|
|
4540
4540
|
el: n,
|
|
4541
|
-
init:
|
|
4541
|
+
init: r,
|
|
4542
4542
|
start: (p) => {
|
|
4543
4543
|
a.value && a.value.start && a.value.start(() => {
|
|
4544
4544
|
p?.(a.value);
|
|
@@ -4593,12 +4593,12 @@ const il = /* @__PURE__ */ G({
|
|
|
4593
4593
|
contentPosition: { default: "center" }
|
|
4594
4594
|
},
|
|
4595
4595
|
setup(e) {
|
|
4596
|
-
const l = e, o =
|
|
4596
|
+
const l = e, o = V(() => {
|
|
4597
4597
|
const n = {
|
|
4598
4598
|
color: l.color
|
|
4599
4599
|
};
|
|
4600
4600
|
return l.size && Number(l.size) && (n.fontSize = `${l.size}px`), n;
|
|
4601
|
-
}), t =
|
|
4601
|
+
}), t = V(() => ({
|
|
4602
4602
|
borderTopStyle: l.borderStyle
|
|
4603
4603
|
}));
|
|
4604
4604
|
return (n, a) => (i(), T("div", {
|
|
@@ -4650,11 +4650,11 @@ const il = /* @__PURE__ */ G({
|
|
|
4650
4650
|
},
|
|
4651
4651
|
emits: ["update:modelValue", "change"],
|
|
4652
4652
|
setup(e, { emit: l }) {
|
|
4653
|
-
const o = e, t = l, n = j(), a = j(), s = async (m,
|
|
4654
|
-
o.ok && (m("保存数据中..."), a.value = await o.ok(), t("update:modelValue", a.value), t("change", { value: a.value }),
|
|
4655
|
-
},
|
|
4653
|
+
const o = e, t = l, n = j(), a = j(), s = async (m, u) => {
|
|
4654
|
+
o.ok && (m("保存数据中..."), a.value = await o.ok(), t("update:modelValue", a.value), t("change", { value: a.value }), u(), n.value.close());
|
|
4655
|
+
}, r = () => o.beforeClose ? o.beforeClose(a.value) : !0, g = () => {
|
|
4656
4656
|
o.closed?.();
|
|
4657
|
-
},
|
|
4657
|
+
}, c = () => {
|
|
4658
4658
|
n.value.open(o.title || o.btnText, o.layerType), setTimeout(() => {
|
|
4659
4659
|
o.open?.(a.value);
|
|
4660
4660
|
}, 200);
|
|
@@ -4665,14 +4665,14 @@ const il = /* @__PURE__ */ G({
|
|
|
4665
4665
|
a.value = m;
|
|
4666
4666
|
},
|
|
4667
4667
|
{ immediate: !0 }
|
|
4668
|
-
), (m,
|
|
4668
|
+
), (m, u) => {
|
|
4669
4669
|
const p = F("j-button"), h = F("j-layer");
|
|
4670
4670
|
return i(), T(ue, null, [
|
|
4671
4671
|
K(p, we({ style: { width: "auto" } }, m.$attrs, {
|
|
4672
4672
|
type: e.type,
|
|
4673
4673
|
label: e.btnText,
|
|
4674
4674
|
size: e.size,
|
|
4675
|
-
onClick:
|
|
4675
|
+
onClick: c
|
|
4676
4676
|
}), null, 16, ["type", "label", "size"]),
|
|
4677
4677
|
K(h, {
|
|
4678
4678
|
ref_key: "layerRef",
|
|
@@ -4681,9 +4681,9 @@ const il = /* @__PURE__ */ G({
|
|
|
4681
4681
|
width: e.width,
|
|
4682
4682
|
"destroy-on-close": e.destroyOnClose,
|
|
4683
4683
|
"btn-text": "确定",
|
|
4684
|
-
"before-close":
|
|
4684
|
+
"before-close": r,
|
|
4685
4685
|
onOk: s,
|
|
4686
|
-
onClosed:
|
|
4686
|
+
onClosed: g
|
|
4687
4687
|
}, {
|
|
4688
4688
|
default: L(() => [
|
|
4689
4689
|
te(m.$slots, "default")
|
|
@@ -4712,41 +4712,41 @@ const il = /* @__PURE__ */ G({
|
|
|
4712
4712
|
},
|
|
4713
4713
|
emits: ["update:modelValue", "change"],
|
|
4714
4714
|
setup(e, { emit: l }) {
|
|
4715
|
-
const o = e, t = l, n =
|
|
4715
|
+
const o = e, t = l, n = V({
|
|
4716
4716
|
get: () => o.modelValue,
|
|
4717
|
-
set: (
|
|
4718
|
-
t("update:modelValue",
|
|
4717
|
+
set: (u) => {
|
|
4718
|
+
t("update:modelValue", u);
|
|
4719
4719
|
}
|
|
4720
|
-
}), a = j(""), s = (
|
|
4721
|
-
a.value =
|
|
4722
|
-
},
|
|
4723
|
-
t("change",
|
|
4724
|
-
}, m =
|
|
4725
|
-
return (
|
|
4726
|
-
const h = F("j-code-mirror"),
|
|
4727
|
-
return i(), w(
|
|
4720
|
+
}), a = j(""), s = (u) => {
|
|
4721
|
+
a.value = u;
|
|
4722
|
+
}, r = () => a.value, g = (u) => o.beforeClose ? o.beforeClose(u) : !0, c = (u) => {
|
|
4723
|
+
t("change", u);
|
|
4724
|
+
}, m = V(() => o.modelValue && o.modelValue.trim() ? `${o.btnText}(已设置)` : o.btnText);
|
|
4725
|
+
return (u, p) => {
|
|
4726
|
+
const h = F("j-code-mirror"), d = F("j-layout"), v = F("j-input-button");
|
|
4727
|
+
return i(), w(v, {
|
|
4728
4728
|
modelValue: n.value,
|
|
4729
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
4729
|
+
"onUpdate:modelValue": p[1] || (p[1] = (b) => n.value = b),
|
|
4730
4730
|
type: e.type,
|
|
4731
4731
|
"btn-text": m.value,
|
|
4732
4732
|
title: e.title,
|
|
4733
4733
|
size: e.size,
|
|
4734
4734
|
width: e.width,
|
|
4735
4735
|
height: e.height,
|
|
4736
|
-
"before-close":
|
|
4737
|
-
ok:
|
|
4736
|
+
"before-close": g,
|
|
4737
|
+
ok: r,
|
|
4738
4738
|
open: s,
|
|
4739
|
-
onChange:
|
|
4739
|
+
onChange: c
|
|
4740
4740
|
}, {
|
|
4741
4741
|
default: L(() => [
|
|
4742
|
-
K(
|
|
4742
|
+
K(d, {
|
|
4743
4743
|
"right-move": !1,
|
|
4744
4744
|
right: 560
|
|
4745
4745
|
}, Ue({
|
|
4746
4746
|
default: L(() => [
|
|
4747
4747
|
K(h, {
|
|
4748
4748
|
value: a.value,
|
|
4749
|
-
"onUpdate:value": p[0] || (p[0] = (
|
|
4749
|
+
"onUpdate:value": p[0] || (p[0] = (b) => a.value = b),
|
|
4750
4750
|
mode: e.mode,
|
|
4751
4751
|
"is-hint": e.isHint,
|
|
4752
4752
|
"handle-hint": e.handleHint
|
|
@@ -4783,7 +4783,7 @@ const il = /* @__PURE__ */ G({
|
|
|
4783
4783
|
weight: { default: "normal" }
|
|
4784
4784
|
},
|
|
4785
4785
|
setup(e) {
|
|
4786
|
-
const l = e, o =
|
|
4786
|
+
const l = e, o = V(() => l.class || ""), t = V(() => {
|
|
4787
4787
|
const n = {
|
|
4788
4788
|
...l.style
|
|
4789
4789
|
};
|
|
@@ -4808,22 +4808,22 @@ const il = /* @__PURE__ */ G({
|
|
|
4808
4808
|
},
|
|
4809
4809
|
emits: ["update:value", "change"],
|
|
4810
4810
|
setup(e, { expose: l, emit: o }) {
|
|
4811
|
-
const t = e, n = o, a = j(), s = j(),
|
|
4812
|
-
let
|
|
4813
|
-
const
|
|
4814
|
-
const
|
|
4815
|
-
let
|
|
4816
|
-
return t.handleHint && (
|
|
4817
|
-
list:
|
|
4818
|
-
from: window.CodeMirror.Pos(
|
|
4819
|
-
to: window.CodeMirror.Pos(
|
|
4811
|
+
const t = e, n = o, a = j(), s = j(), r = j("");
|
|
4812
|
+
let g;
|
|
4813
|
+
const c = () => {
|
|
4814
|
+
const d = g.getCursor(), v = g.getTokenAt(d), { end: b, start: k, string: C } = v;
|
|
4815
|
+
let R = [];
|
|
4816
|
+
return t.handleHint && (R = t.handleHint(C)), {
|
|
4817
|
+
list: R,
|
|
4818
|
+
from: window.CodeMirror.Pos(d.line, k),
|
|
4819
|
+
to: window.CodeMirror.Pos(d.line, b)
|
|
4820
4820
|
};
|
|
4821
4821
|
}, m = () => {
|
|
4822
4822
|
if (!window.CodeMirror) {
|
|
4823
4823
|
console.error("CodeMirror is not loaded yet");
|
|
4824
4824
|
return;
|
|
4825
4825
|
}
|
|
4826
|
-
const
|
|
4826
|
+
const d = {
|
|
4827
4827
|
lineNumbers: !0,
|
|
4828
4828
|
styleActiveLine: !0,
|
|
4829
4829
|
matchBrackets: !0,
|
|
@@ -4831,64 +4831,64 @@ const il = /* @__PURE__ */ G({
|
|
|
4831
4831
|
mode: t.mode,
|
|
4832
4832
|
indentUnit: 2,
|
|
4833
4833
|
gutters: ["CodeMirror-lint-markers", "CodeMirror-linenumbers", "CodeMirror-foldgutter"]
|
|
4834
|
-
},
|
|
4835
|
-
|
|
4836
|
-
rangeFinder: new
|
|
4837
|
-
|
|
4838
|
-
|
|
4834
|
+
}, v = window.CodeMirror;
|
|
4835
|
+
v.fold && v.fold.combine && v.fold.indent && v.fold.comment ? d.foldGutter = {
|
|
4836
|
+
rangeFinder: new v.fold.combine(
|
|
4837
|
+
v.fold.indent,
|
|
4838
|
+
v.fold.comment
|
|
4839
4839
|
)
|
|
4840
|
-
} :
|
|
4840
|
+
} : d.gutters = ["CodeMirror-lint-markers", "CodeMirror-linenumbers"], t.mode === "text/x-vue" && (d.mode = {
|
|
4841
4841
|
name: "vue"
|
|
4842
|
-
}), t.isHint && (
|
|
4843
|
-
hint:
|
|
4842
|
+
}), t.isHint && (d.hintOptions = {
|
|
4843
|
+
hint: c,
|
|
4844
4844
|
completeSingle: !1
|
|
4845
|
-
}),
|
|
4845
|
+
}), g = window.CodeMirror.fromTextArea(a.value, d), r.value = t.value, g.setValue(t.value), g.on(
|
|
4846
4846
|
"change",
|
|
4847
|
-
(
|
|
4848
|
-
t.isHint && k.origin !== "complete" && /^(?!_)(?!.*?_$)[a-zA-Z0-9_\u4e00-\u9fa5]+$/g.test(k.text[0]) &&
|
|
4849
|
-
const C =
|
|
4850
|
-
|
|
4847
|
+
(b, k) => {
|
|
4848
|
+
t.isHint && k.origin !== "complete" && /^(?!_)(?!.*?_$)[a-zA-Z0-9_\u4e00-\u9fa5]+$/g.test(k.text[0]) && b.showHint();
|
|
4849
|
+
const C = g.getValue();
|
|
4850
|
+
r.value = C, n("update:value", C), n("change", { value: C });
|
|
4851
4851
|
}
|
|
4852
4852
|
);
|
|
4853
|
-
},
|
|
4854
|
-
let
|
|
4855
|
-
|
|
4853
|
+
}, u = () => {
|
|
4854
|
+
let d = Jt(t.value);
|
|
4855
|
+
d = d.replace(/{ JCODE_SASSID }/g, "{JCODE_SASSID}").replace(/{ JCODE_SASSID_NOTT }/g, "{JCODE_SASSID_NOTT}").replace(/{ JCODE_SASSID_NOTA }/g, "{JCODE_SASSID_NOTA}").replace(/@ /g, "@"), n("update:value", d), n("change", { value: d });
|
|
4856
4856
|
}, p = () => {
|
|
4857
|
-
const
|
|
4858
|
-
|
|
4857
|
+
const d = g.getScrollInfo();
|
|
4858
|
+
g.scrollTo(d.left, d.height + d.top);
|
|
4859
4859
|
}, h = new ResizeObserver(() => {
|
|
4860
|
-
|
|
4860
|
+
g?.refresh();
|
|
4861
4861
|
});
|
|
4862
4862
|
return ke(
|
|
4863
4863
|
() => t.value,
|
|
4864
|
-
(
|
|
4865
|
-
|
|
4866
|
-
|
|
4864
|
+
(d) => {
|
|
4865
|
+
d !== r.value && (r.value = d, g?.setValue(d), setTimeout(() => {
|
|
4866
|
+
g?.refresh(), t.isScrollToBottom && p();
|
|
4867
4867
|
}));
|
|
4868
4868
|
}
|
|
4869
4869
|
), ke(
|
|
4870
4870
|
() => t.mode,
|
|
4871
|
-
(
|
|
4872
|
-
|
|
4871
|
+
(d) => {
|
|
4872
|
+
g?.setOption("mode", d);
|
|
4873
4873
|
}
|
|
4874
4874
|
), Xe(() => {
|
|
4875
|
-
let
|
|
4876
|
-
const
|
|
4877
|
-
const k = window.CodeMirror, C = k && k.fromTextArea,
|
|
4878
|
-
C &&
|
|
4879
|
-
|
|
4880
|
-
}, 300), h.observe(s.value)) : (
|
|
4875
|
+
let d = 0;
|
|
4876
|
+
const v = 50, b = () => {
|
|
4877
|
+
const k = window.CodeMirror, C = k && k.fromTextArea, R = !k?.fold || k.fold.combine && k.fold.indent && k.fold.comment;
|
|
4878
|
+
C && R ? (m(), setTimeout(() => {
|
|
4879
|
+
g?.refresh();
|
|
4880
|
+
}, 300), h.observe(s.value)) : (d++, d < v ? setTimeout(b, 100) : console.error("CodeMirror failed to load after maximum retries"));
|
|
4881
4881
|
};
|
|
4882
|
-
|
|
4882
|
+
b();
|
|
4883
4883
|
}), tt(() => {
|
|
4884
|
-
|
|
4884
|
+
g.off("change"), g = null;
|
|
4885
4885
|
}), l({
|
|
4886
4886
|
/**
|
|
4887
4887
|
* @zh sql格式化
|
|
4888
4888
|
* @public
|
|
4889
4889
|
*/
|
|
4890
|
-
sqlFormatter:
|
|
4891
|
-
}), (
|
|
4890
|
+
sqlFormatter: u
|
|
4891
|
+
}), (d, v) => (i(), T("div", {
|
|
4892
4892
|
ref_key: "codeWraperRef",
|
|
4893
4893
|
ref: s,
|
|
4894
4894
|
class: "j-code-mirror",
|
|
@@ -4908,24 +4908,24 @@ const il = /* @__PURE__ */ G({
|
|
|
4908
4908
|
toLeft: { type: Boolean }
|
|
4909
4909
|
},
|
|
4910
4910
|
setup(e, { expose: l }) {
|
|
4911
|
-
const o = e, t = Me("actionRef"), n = j("0"), a =
|
|
4912
|
-
const { actionStyle:
|
|
4911
|
+
const o = e, t = Me("actionRef"), n = j("0"), a = V(() => {
|
|
4912
|
+
const { actionStyle: r, toLeft: g } = o;
|
|
4913
4913
|
return {
|
|
4914
|
-
...
|
|
4915
|
-
left:
|
|
4914
|
+
...r,
|
|
4915
|
+
left: g ? "0" : n.value,
|
|
4916
4916
|
backgroundColor: "var(--j-color-bg-container)",
|
|
4917
4917
|
borderRadius: s.value ? "6px" : void 0,
|
|
4918
|
-
transition:
|
|
4918
|
+
transition: g ? "all 300ms cubic-bezier(0.4, 0, 0.2, 1)" : void 0
|
|
4919
4919
|
};
|
|
4920
|
-
}), s =
|
|
4920
|
+
}), s = V(() => Number.parseInt(n.value) > 10 && !o.isPassing);
|
|
4921
4921
|
return l({
|
|
4922
4922
|
getEl: () => t.value,
|
|
4923
4923
|
getStyle: () => t?.value?.style,
|
|
4924
|
-
setLeft: (
|
|
4925
|
-
n.value =
|
|
4924
|
+
setLeft: (r) => {
|
|
4925
|
+
n.value = r;
|
|
4926
4926
|
}
|
|
4927
|
-
}), (
|
|
4928
|
-
const
|
|
4927
|
+
}), (r, g) => {
|
|
4928
|
+
const c = F("j-icon");
|
|
4929
4929
|
return i(), T("div", {
|
|
4930
4930
|
ref_key: "actionRef",
|
|
4931
4931
|
ref: t,
|
|
@@ -4933,12 +4933,12 @@ const il = /* @__PURE__ */ G({
|
|
|
4933
4933
|
class: "j-slider-captcha-action",
|
|
4934
4934
|
name: "captcha-action"
|
|
4935
4935
|
}, [
|
|
4936
|
-
e.isPassing ? (i(), w(
|
|
4936
|
+
e.isPassing ? (i(), w(c, {
|
|
4937
4937
|
key: 0,
|
|
4938
4938
|
color: "var(--j-color-text-2)",
|
|
4939
4939
|
class: "nav-checked",
|
|
4940
4940
|
icon: "mdi-light:check-circle"
|
|
4941
|
-
})) : (i(), w(
|
|
4941
|
+
})) : (i(), w(c, {
|
|
4942
4942
|
key: 1,
|
|
4943
4943
|
color: "var(--j-color-text-2)",
|
|
4944
4944
|
class: "nav-checked",
|
|
@@ -4954,12 +4954,12 @@ const il = /* @__PURE__ */ G({
|
|
|
4954
4954
|
toLeft: { type: Boolean }
|
|
4955
4955
|
},
|
|
4956
4956
|
setup(e, { expose: l }) {
|
|
4957
|
-
const o = e, t = Me("barRef"), n = j("0"), a =
|
|
4958
|
-
const { barStyle: s, toLeft:
|
|
4957
|
+
const o = e, t = Me("barRef"), n = j("0"), a = V(() => {
|
|
4958
|
+
const { barStyle: s, toLeft: r } = o;
|
|
4959
4959
|
return {
|
|
4960
4960
|
...s,
|
|
4961
|
-
width:
|
|
4962
|
-
transition:
|
|
4961
|
+
width: r ? "0" : n.value,
|
|
4962
|
+
transition: r ? "width 300ms cubic-bezier(0.4, 0, 0.2, 1)" : void 0,
|
|
4963
4963
|
backgroundColor: "var(--j-color-success)",
|
|
4964
4964
|
position: "absolute",
|
|
4965
4965
|
height: "100%"
|
|
@@ -4970,7 +4970,7 @@ const il = /* @__PURE__ */ G({
|
|
|
4970
4970
|
setWidth: (s) => {
|
|
4971
4971
|
n.value = s;
|
|
4972
4972
|
}
|
|
4973
|
-
}), (s,
|
|
4973
|
+
}), (s, r) => (i(), T("div", {
|
|
4974
4974
|
ref_key: "barRef",
|
|
4975
4975
|
ref: t,
|
|
4976
4976
|
style: re(a.value)
|
|
@@ -4999,7 +4999,7 @@ const il = /* @__PURE__ */ G({
|
|
|
4999
4999
|
}
|
|
5000
5000
|
},
|
|
5001
5001
|
setup(e, { expose: l }) {
|
|
5002
|
-
const o = e, t = Me("contentRef"), n =
|
|
5002
|
+
const o = e, t = Me("contentRef"), n = V(() => {
|
|
5003
5003
|
const { contentStyle: s } = o;
|
|
5004
5004
|
return {
|
|
5005
5005
|
...s,
|
|
@@ -5009,10 +5009,10 @@ const il = /* @__PURE__ */ G({
|
|
|
5009
5009
|
l({
|
|
5010
5010
|
getEl: () => t.value
|
|
5011
5011
|
});
|
|
5012
|
-
const a =
|
|
5012
|
+
const a = V(() => ({
|
|
5013
5013
|
animation: `shine ${o.animationDuration}s linear ${o.animationIterationCount}`
|
|
5014
5014
|
}));
|
|
5015
|
-
return (s,
|
|
5015
|
+
return (s, r) => (i(), T("div", {
|
|
5016
5016
|
ref_key: "contentRef",
|
|
5017
5017
|
ref: t,
|
|
5018
5018
|
class: Te([{ success: e.isPassing }, "j-slider-captcha-content"]),
|
|
@@ -5048,12 +5048,12 @@ const il = /* @__PURE__ */ G({
|
|
|
5048
5048
|
moveDistance: 0,
|
|
5049
5049
|
startTime: 0,
|
|
5050
5050
|
toLeft: !1
|
|
5051
|
-
}), s = Me("wrapperRef"),
|
|
5051
|
+
}), s = Me("wrapperRef"), r = Me("barRef"), g = Me("contentRef"), c = Me("actionRef");
|
|
5052
5052
|
ke(
|
|
5053
5053
|
() => a.isPassing,
|
|
5054
5054
|
(k) => {
|
|
5055
5055
|
if (k) {
|
|
5056
|
-
const { endTime: C, startTime:
|
|
5056
|
+
const { endTime: C, startTime: R } = a, Q = (C - R) / 1e3;
|
|
5057
5057
|
t("success", { isPassing: k, time: Q.toFixed(1) }), n.value = k;
|
|
5058
5058
|
}
|
|
5059
5059
|
}
|
|
@@ -5063,43 +5063,43 @@ const il = /* @__PURE__ */ G({
|
|
|
5063
5063
|
function m(k) {
|
|
5064
5064
|
return "pageX" in k ? k.pageX : "touches" in k && k.touches[0] ? k.touches[0].pageX : 0;
|
|
5065
5065
|
}
|
|
5066
|
-
function
|
|
5067
|
-
a.isPassing ||
|
|
5066
|
+
function u(k) {
|
|
5067
|
+
a.isPassing || c.value && (t("start", k), a.moveDistance = m(k) - Number.parseInt(c.value.getStyle().left.replace("px", "") || "0", 10), a.startTime = Date.now(), a.isMoving = !0);
|
|
5068
5068
|
}
|
|
5069
5069
|
function p(k) {
|
|
5070
|
-
const C = s.value?.offsetWidth ?? 220,
|
|
5071
|
-
return { actionWidth:
|
|
5070
|
+
const C = s.value?.offsetWidth ?? 220, R = k?.offsetWidth ?? 40, Q = C - R - 6;
|
|
5071
|
+
return { actionWidth: R, offset: Q, wrapperWidth: C };
|
|
5072
5072
|
}
|
|
5073
5073
|
function h(k) {
|
|
5074
|
-
const { isMoving: C, moveDistance:
|
|
5074
|
+
const { isMoving: C, moveDistance: R } = a;
|
|
5075
5075
|
if (C) {
|
|
5076
|
-
const Q = U(
|
|
5076
|
+
const Q = U(c), Y = U(r);
|
|
5077
5077
|
if (!Q || !Y) return;
|
|
5078
|
-
const { actionWidth: f, offset: B, wrapperWidth:
|
|
5078
|
+
const { actionWidth: f, offset: B, wrapperWidth: M } = p(Q.getEl()), I = m(k) - R;
|
|
5079
5079
|
t("move", {
|
|
5080
5080
|
event: k,
|
|
5081
|
-
moveDistance:
|
|
5081
|
+
moveDistance: R,
|
|
5082
5082
|
moveX: I
|
|
5083
|
-
}), I > 0 && I <= B ? (Q.setLeft(`${I}px`), Y.setWidth(`${I + f / 2}px`)) : I > B && (Q.setLeft(`${
|
|
5083
|
+
}), I > 0 && I <= B ? (Q.setLeft(`${I}px`), Y.setWidth(`${I + f / 2}px`)) : I > B && (Q.setLeft(`${M - f}px`), Y.setWidth(`${M - f / 2}px`), v());
|
|
5084
5084
|
}
|
|
5085
5085
|
}
|
|
5086
|
-
function
|
|
5087
|
-
const { isMoving: C, isPassing:
|
|
5088
|
-
if (C && !
|
|
5086
|
+
function d(k) {
|
|
5087
|
+
const { isMoving: C, isPassing: R, moveDistance: Q } = a;
|
|
5088
|
+
if (C && !R) {
|
|
5089
5089
|
t("end", k);
|
|
5090
|
-
const Y =
|
|
5090
|
+
const Y = c.value, f = U(r);
|
|
5091
5091
|
if (!Y || !f) return;
|
|
5092
|
-
const B = m(k) - Q, { actionWidth:
|
|
5093
|
-
B < I ?
|
|
5092
|
+
const B = m(k) - Q, { actionWidth: M, offset: I, wrapperWidth: _ } = p(Y.getEl());
|
|
5093
|
+
B < I ? b() : (Y.setLeft(`${_ - M}px`), f.setWidth(`${_ - M / 2}px`), v()), a.isMoving = !1;
|
|
5094
5094
|
}
|
|
5095
5095
|
}
|
|
5096
|
-
function
|
|
5096
|
+
function v() {
|
|
5097
5097
|
a.endTime = Date.now(), a.isPassing = !0, a.isMoving = !1;
|
|
5098
5098
|
}
|
|
5099
|
-
function
|
|
5099
|
+
function b() {
|
|
5100
5100
|
a.isMoving = !1, a.isPassing = !1, a.moveDistance = 0, a.toLeft = !1, a.startTime = 0, a.endTime = 0;
|
|
5101
|
-
const k = U(
|
|
5102
|
-
!k || !C || !
|
|
5101
|
+
const k = U(c), C = U(r), R = U(g);
|
|
5102
|
+
!k || !C || !R || (R.getEl().style.width = "100%", a.toLeft = !0, setTimeout(() => {
|
|
5103
5103
|
a.toLeft = !1, k.setLeft("0"), C.setWidth("0");
|
|
5104
5104
|
}, 300));
|
|
5105
5105
|
}
|
|
@@ -5108,32 +5108,32 @@ const il = /* @__PURE__ */ G({
|
|
|
5108
5108
|
ref: s,
|
|
5109
5109
|
class: Te(["j-slider-captcha slider-border", o.class]),
|
|
5110
5110
|
style: re([{ "background-color": "var(--j-color-bg)" }, e.wrapperStyle]),
|
|
5111
|
-
onMouseleave:
|
|
5111
|
+
onMouseleave: d,
|
|
5112
5112
|
onMousemove: h,
|
|
5113
|
-
onMouseup:
|
|
5114
|
-
onTouchend:
|
|
5113
|
+
onMouseup: d,
|
|
5114
|
+
onTouchend: d,
|
|
5115
5115
|
onTouchmove: h
|
|
5116
5116
|
}, [
|
|
5117
5117
|
K(wa, {
|
|
5118
5118
|
ref_key: "barRef",
|
|
5119
|
-
ref:
|
|
5119
|
+
ref: r,
|
|
5120
5120
|
"bar-style": e.barStyle,
|
|
5121
5121
|
"to-left": a.toLeft
|
|
5122
5122
|
}, null, 8, ["bar-style", "to-left"]),
|
|
5123
5123
|
K(ka, {
|
|
5124
5124
|
ref_key: "contentRef",
|
|
5125
|
-
ref:
|
|
5125
|
+
ref: g,
|
|
5126
5126
|
"content-style": e.contentStyle,
|
|
5127
5127
|
"is-passing": a.isPassing
|
|
5128
5128
|
}, null, 8, ["content-style", "is-passing"]),
|
|
5129
5129
|
K(ba, {
|
|
5130
5130
|
ref_key: "actionRef",
|
|
5131
|
-
ref:
|
|
5131
|
+
ref: c,
|
|
5132
5132
|
"action-style": e.actionStyle,
|
|
5133
5133
|
"is-passing": a.isPassing,
|
|
5134
5134
|
"to-left": a.toLeft,
|
|
5135
|
-
onMousedown:
|
|
5136
|
-
onTouchstart:
|
|
5135
|
+
onMousedown: u,
|
|
5136
|
+
onTouchstart: u
|
|
5137
5137
|
}, null, 8, ["action-style", "is-passing", "to-left"])
|
|
5138
5138
|
], 38));
|
|
5139
5139
|
}
|
|
@@ -5203,48 +5203,48 @@ const il = /* @__PURE__ */ G({
|
|
|
5203
5203
|
},
|
|
5204
5204
|
emits: ["update:modelValue", "change"],
|
|
5205
5205
|
setup(e, { emit: l }) {
|
|
5206
|
-
const o = e, t = l, { formData: n, onChange: a } = Ve("jcode_form_provide", {}), s =
|
|
5207
|
-
() => mt(
|
|
5208
|
-
),
|
|
5206
|
+
const o = e, t = l, { formData: n, onChange: a } = Ve("jcode_form_provide", {}), s = V(
|
|
5207
|
+
() => mt(c.value) && !o.config?.notInput || o.config?.isInput
|
|
5208
|
+
), r = V({
|
|
5209
5209
|
get() {
|
|
5210
5210
|
return o.row ? o.modelValue : n ? n[o.id] : o.modelValue;
|
|
5211
5211
|
},
|
|
5212
5212
|
set(p) {
|
|
5213
5213
|
o.row ? t("update:modelValue", p) : n ? n[o.id] = p : t("update:modelValue", p);
|
|
5214
5214
|
}
|
|
5215
|
-
}),
|
|
5215
|
+
}), g = V(() => He({
|
|
5216
5216
|
config: o.config,
|
|
5217
5217
|
getCompConfig: o.getCompConfig,
|
|
5218
5218
|
formData: n,
|
|
5219
5219
|
row: o.row
|
|
5220
|
-
})),
|
|
5220
|
+
})), c = V(() => o.getCompType ? o.getCompType({ config: o.config, formData: n, row: o.row }) : o.type), m = V(() => {
|
|
5221
5221
|
const p = {};
|
|
5222
5222
|
return o.children.forEach((h) => {
|
|
5223
5223
|
h.slot ? (p[h.slot] = p[h.slot] || [], p[h.slot].push(h)) : (p.default = p.default || [], p.default.push(h));
|
|
5224
5224
|
}), p;
|
|
5225
|
-
}),
|
|
5225
|
+
}), u = (p) => {
|
|
5226
5226
|
o.config?.onChange && o.config?.onChange({ ...p, formData: n, row: o.row, id: o.id }), a && a({ ...p, formData: n, row: o.row, id: o.id }), t("change", p);
|
|
5227
5227
|
};
|
|
5228
5228
|
return (p, h) => {
|
|
5229
|
-
const
|
|
5230
|
-
return s.value ? (i(), w(We(
|
|
5231
|
-
modelValue:
|
|
5232
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
5233
|
-
onChange:
|
|
5229
|
+
const d = F("j-comp");
|
|
5230
|
+
return s.value ? (i(), w(We(c.value), we({ key: 0 }, g.value, {
|
|
5231
|
+
modelValue: r.value,
|
|
5232
|
+
"onUpdate:modelValue": h[0] || (h[0] = (v) => r.value = v),
|
|
5233
|
+
onChange: u
|
|
5234
5234
|
}), Ue({ _: 2 }, [
|
|
5235
|
-
de(m.value, (
|
|
5236
|
-
name:
|
|
5235
|
+
de(m.value, (v, b) => ({
|
|
5236
|
+
name: b,
|
|
5237
5237
|
fn: L(() => [
|
|
5238
|
-
(i(!0), T(ue, null, de(
|
|
5238
|
+
(i(!0), T(ue, null, de(v, (k) => (i(), w(d, we({
|
|
5239
5239
|
key: k.id
|
|
5240
5240
|
}, { ref_for: !0 }, k), null, 16))), 128))
|
|
5241
5241
|
])
|
|
5242
5242
|
}))
|
|
5243
|
-
]), 1040, ["modelValue"])) : (i(), w(We(
|
|
5244
|
-
de(m.value, (
|
|
5245
|
-
name:
|
|
5243
|
+
]), 1040, ["modelValue"])) : (i(), w(We(c.value), we({ key: 1 }, g.value, { onChange: u }), Ue({ _: 2 }, [
|
|
5244
|
+
de(m.value, (v, b) => ({
|
|
5245
|
+
name: b,
|
|
5246
5246
|
fn: L(() => [
|
|
5247
|
-
(i(!0), T(ue, null, de(
|
|
5247
|
+
(i(!0), T(ue, null, de(v, (k) => (i(), w(d, we({
|
|
5248
5248
|
key: k.id
|
|
5249
5249
|
}, { ref_for: !0 }, k), null, 16))), 128))
|
|
5250
5250
|
])
|
|
@@ -5263,7 +5263,7 @@ async function $a(e, l, o) {
|
|
|
5263
5263
|
try {
|
|
5264
5264
|
await n.validate({ [e]: l });
|
|
5265
5265
|
} catch (s) {
|
|
5266
|
-
s.errors ? a = s.errors.map(({ message:
|
|
5266
|
+
s.errors ? a = s.errors.map(({ message: r }) => r) : a = [t.message || "校验错误"];
|
|
5267
5267
|
}
|
|
5268
5268
|
return a.length > 0 ? a[0] : "";
|
|
5269
5269
|
}
|
|
@@ -5271,7 +5271,7 @@ async function za(e, l, o) {
|
|
|
5271
5271
|
const t = o.map((n, a) => ({
|
|
5272
5272
|
...n,
|
|
5273
5273
|
ruleIndex: a
|
|
5274
|
-
})).sort(({ warningOnly: n, ruleIndex: a }, { warningOnly: s, ruleIndex:
|
|
5274
|
+
})).sort(({ warningOnly: n, ruleIndex: a }, { warningOnly: s, ruleIndex: r }) => !!n == !!s ? a - r : n ? 1 : -1);
|
|
5275
5275
|
for (let n = 0; n < t.length; n += 1) {
|
|
5276
5276
|
const a = t[n];
|
|
5277
5277
|
"pattern" in a && (l += "");
|
|
@@ -5281,33 +5281,33 @@ async function za(e, l, o) {
|
|
|
5281
5281
|
}
|
|
5282
5282
|
}
|
|
5283
5283
|
function Va(e, l) {
|
|
5284
|
-
const o = (a, s,
|
|
5284
|
+
const o = (a, s, r, g, c) => {
|
|
5285
5285
|
Object.keys(s).forEach((m) => {
|
|
5286
|
-
let
|
|
5287
|
-
|
|
5288
|
-
const p = s[m], { rules: h, myGridtableId:
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5286
|
+
let u = m;
|
|
5287
|
+
r && (u = `${r}.${m}`);
|
|
5288
|
+
const p = s[m], { rules: h, myGridtableId: d } = l(
|
|
5289
|
+
u,
|
|
5290
|
+
r ? s : void 0,
|
|
5291
|
+
g,
|
|
5292
|
+
c
|
|
5293
5293
|
);
|
|
5294
5294
|
if (h.length) {
|
|
5295
|
-
const
|
|
5296
|
-
a.push(
|
|
5295
|
+
const v = t(u, p, h);
|
|
5296
|
+
a.push(v);
|
|
5297
5297
|
}
|
|
5298
|
-
|
|
5299
|
-
o(a,
|
|
5298
|
+
d && p.forEach((v) => {
|
|
5299
|
+
o(a, v, d, p, r ? s : void 0);
|
|
5300
5300
|
});
|
|
5301
5301
|
});
|
|
5302
|
-
}, t = (a, s,
|
|
5302
|
+
}, t = (a, s, r) => za(a, s, r);
|
|
5303
5303
|
return {
|
|
5304
5304
|
validateForm: async () => {
|
|
5305
5305
|
const a = U(e), s = [];
|
|
5306
5306
|
o(s, a, "");
|
|
5307
|
-
const
|
|
5308
|
-
return
|
|
5309
|
-
|
|
5310
|
-
}),
|
|
5307
|
+
const r = await Promise.all(s), g = {};
|
|
5308
|
+
return r.forEach((c) => {
|
|
5309
|
+
c && (g[c.name] = { msg: c.errors });
|
|
5310
|
+
}), g;
|
|
5311
5311
|
},
|
|
5312
5312
|
validateField: t
|
|
5313
5313
|
};
|
|
@@ -5344,151 +5344,151 @@ const Ta = /* @__PURE__ */ G({
|
|
|
5344
5344
|
},
|
|
5345
5345
|
emits: ["change"],
|
|
5346
5346
|
setup(e, { expose: l, emit: o }) {
|
|
5347
|
-
const t = e, n = o, { useData: a, existField: s, httpGet:
|
|
5347
|
+
const t = e, n = o, { useData: a, existField: s, httpGet: r, httpPost: g, success: c, warning: m, error: u, info: p, t: h } = Ve(
|
|
5348
5348
|
"jcode_app_form_provide",
|
|
5349
5349
|
{
|
|
5350
|
-
t: (
|
|
5350
|
+
t: (y) => y
|
|
5351
5351
|
}
|
|
5352
5352
|
);
|
|
5353
|
-
let
|
|
5354
|
-
a && (
|
|
5355
|
-
const
|
|
5356
|
-
|
|
5357
|
-
},
|
|
5358
|
-
() =>
|
|
5359
|
-
), f = Ye({}), B = j({}),
|
|
5353
|
+
let d;
|
|
5354
|
+
a && (d = a());
|
|
5355
|
+
const v = (y) => {
|
|
5356
|
+
u && u(y);
|
|
5357
|
+
}, b = j(!1), k = V(() => t.config?.gutter || 16), C = V(() => t.config?.span || 24), R = V(() => t.config?.labelWidth), Q = V(() => t.config?.labelPosition || "right"), Y = V(
|
|
5358
|
+
() => M.length === 1 && (M[0].type === "j-tabs" || M[0].type === "j-layout" || M[0].config?.isAutoWindow)
|
|
5359
|
+
), f = Ye({}), B = j({}), M = [], I = {}, _ = j({});
|
|
5360
5360
|
let $ = {}, se = {}, J = [], A = {};
|
|
5361
|
-
const q = (
|
|
5362
|
-
n("change",
|
|
5363
|
-
}, H = (
|
|
5361
|
+
const q = (y) => {
|
|
5362
|
+
n("change", y);
|
|
5363
|
+
}, H = (y) => mt(I[y]?.type) && !I[y]?.config?.notInput || I[y]?.config?.isInput, ne = (y) => ["j-table", "j-input-rows", "j-input-cards"].includes(I[y]?.type || "");
|
|
5364
5364
|
let le;
|
|
5365
|
-
const Be = (
|
|
5366
|
-
Object.keys(
|
|
5367
|
-
const
|
|
5368
|
-
N && (x = N + "." + x),
|
|
5365
|
+
const Be = (y, N) => {
|
|
5366
|
+
Object.keys(y).forEach((x) => {
|
|
5367
|
+
const z = y[x];
|
|
5368
|
+
N && (x = N + "." + x), z != null && typeof z == "object" && !it(z) && Be(z, x), f[x] = z;
|
|
5369
5369
|
});
|
|
5370
|
-
}, oe = (
|
|
5371
|
-
let x =
|
|
5372
|
-
return x || (
|
|
5373
|
-
}, he = (
|
|
5374
|
-
|
|
5375
|
-
|
|
5370
|
+
}, oe = (y, N) => {
|
|
5371
|
+
let x = y.id;
|
|
5372
|
+
return x || (y.config?.table && y.config?.field ? x = `${y.config.table}.${y.config.field}` : y.config?.table ? x = y.config?.table : y.config?.field && (x = y.config?.field), N && ne(N) && (x = `${N}.${x}`)), x || ft("j");
|
|
5373
|
+
}, he = (y, N, x, z = "") => {
|
|
5374
|
+
y.forEach((O) => {
|
|
5375
|
+
O.id = oe(O, z);
|
|
5376
5376
|
const X = {
|
|
5377
|
-
id:
|
|
5378
|
-
slot:
|
|
5379
|
-
type:
|
|
5380
|
-
getCompType:
|
|
5381
|
-
getCompConfig:
|
|
5377
|
+
id: O.id,
|
|
5378
|
+
slot: O.slot,
|
|
5379
|
+
type: O.type,
|
|
5380
|
+
getCompType: O.getCompType,
|
|
5381
|
+
getCompConfig: O.getCompConfig,
|
|
5382
5382
|
config: {},
|
|
5383
5383
|
children: []
|
|
5384
5384
|
};
|
|
5385
5385
|
N.push(X);
|
|
5386
|
-
const { children: ae } =
|
|
5387
|
-
ut(X,
|
|
5386
|
+
const { children: ae } = O;
|
|
5387
|
+
ut(X, O, ["children", "config"]), ut(X.config, O.config || {}, []), I[O.id] && console.warn("有重复的组件id:" + O.id), I[O.id] = X, t.readonly === !0 && (X.config.readonly = !0);
|
|
5388
5388
|
let me = !1, Ce;
|
|
5389
|
-
|
|
5389
|
+
z !== "" && ne(z) && (me = !0, X.config = O.config || {}, X.config.parentTableId = z, Ce = I[z]?.config?.table);
|
|
5390
5390
|
const ge = X.config || {};
|
|
5391
|
-
if (H(
|
|
5392
|
-
!x && me === !1 && (ge?.defaultValue === 0 ? f[
|
|
5391
|
+
if (H(O.id))
|
|
5392
|
+
!x && me === !1 && (ge?.defaultValue === 0 ? f[O.id] = ge?.defaultValue : f[O.id] = ge?.defaultValue || void 0), ge.table && ge.field ? $[`${ge.table}_${ge.field}`.toLowerCase()] = O.id : ge.field && (me ? $[`${Ce}_${ge.field}`.toLowerCase()] = O.id : $[`${ge.field}`.toLowerCase()] = O.id);
|
|
5393
5393
|
else if (me && ge.field)
|
|
5394
|
-
$[`${Ce}_${ge.field}`.toLowerCase()] =
|
|
5395
|
-
else if (ne(
|
|
5396
|
-
!x && !ge.isSubTable && (f[
|
|
5394
|
+
$[`${Ce}_${ge.field}`.toLowerCase()] = O.id;
|
|
5395
|
+
else if (ne(O.id))
|
|
5396
|
+
!x && !ge.isSubTable && (f[O.id] = []), ge.table && ($[ge.table.toLowerCase() || ""] = O.id), ge.isSubTable || J.push(X);
|
|
5397
5397
|
else if (ge?.defaultValue)
|
|
5398
|
-
f[
|
|
5399
|
-
else if (
|
|
5398
|
+
f[O.id] = ge?.defaultValue;
|
|
5399
|
+
else if (O.type === "collapse" && ge?.isExpand) {
|
|
5400
5400
|
const at = [];
|
|
5401
5401
|
(ge?.groups || []).forEach(($t) => {
|
|
5402
5402
|
at.push($t.i);
|
|
5403
|
-
}), f[
|
|
5403
|
+
}), f[O.id] = at;
|
|
5404
5404
|
}
|
|
5405
5405
|
ae && ae.length > 0 && he(ae, X.children, x, X.id);
|
|
5406
5406
|
});
|
|
5407
|
-
}, Ie = async (
|
|
5408
|
-
|
|
5407
|
+
}, Ie = async (y, N) => {
|
|
5408
|
+
b.value = !1;
|
|
5409
5409
|
const x = !!N;
|
|
5410
|
-
|
|
5411
|
-
|
|
5410
|
+
M.splice(0, M.length), $ = {}, se = {}, J = [], le = N, _e(f), _.value = {}, x && Be(N, ""), he(y, M, x), A = et(f), xe(() => {
|
|
5411
|
+
b.value = !0, xe(() => {
|
|
5412
5412
|
ot(t.config?.codeInit, {});
|
|
5413
5413
|
});
|
|
5414
5414
|
});
|
|
5415
|
-
}, Oe = (
|
|
5416
|
-
const
|
|
5417
|
-
return N.forEach((
|
|
5415
|
+
}, Oe = (y, N, x) => {
|
|
5416
|
+
const z = [];
|
|
5417
|
+
return N.forEach((O) => {
|
|
5418
5418
|
const X = {};
|
|
5419
|
-
Object.keys(
|
|
5420
|
-
if (!x || x(ae,
|
|
5421
|
-
const me =
|
|
5419
|
+
Object.keys(O).forEach((ae) => {
|
|
5420
|
+
if (!x || x(ae, O[ae], y)) {
|
|
5421
|
+
const me = ee(ae);
|
|
5422
5422
|
if (me?.type === "j-table")
|
|
5423
|
-
X[me?.id || ""] = Oe(ae,
|
|
5423
|
+
X[me?.id || ""] = Oe(ae, O[ae], x);
|
|
5424
5424
|
else {
|
|
5425
|
-
let Ce = $[`${
|
|
5426
|
-
Ce = Ce.indexOf(".") !== -1 ? Ce.split(".")[1] : Ce, X[Ce] =
|
|
5425
|
+
let Ce = $[`${y}_${ae}`.toLowerCase()] || ae;
|
|
5426
|
+
Ce = Ce.indexOf(".") !== -1 ? Ce.split(".")[1] : Ce, X[Ce] = O[ae];
|
|
5427
5427
|
}
|
|
5428
5428
|
}
|
|
5429
|
-
}),
|
|
5430
|
-
}),
|
|
5431
|
-
},
|
|
5432
|
-
Object.keys(
|
|
5433
|
-
let
|
|
5434
|
-
const
|
|
5435
|
-
if (
|
|
5436
|
-
|
|
5437
|
-
if (!N || N(x,
|
|
5429
|
+
}), z.push(X);
|
|
5430
|
+
}), z;
|
|
5431
|
+
}, E = (y, N) => {
|
|
5432
|
+
Object.keys(y || {}).forEach((x) => {
|
|
5433
|
+
let z = y[x];
|
|
5434
|
+
const O = ee(x);
|
|
5435
|
+
if (O === void 0)
|
|
5436
|
+
z && (it(z) && (z = z[0] || {}), typeof z == "object" ? Object.keys(z).forEach((X) => {
|
|
5437
|
+
if (!N || N(x, z[X], x)) {
|
|
5438
5438
|
let ae = X;
|
|
5439
|
-
x !== "main" && (ae = `${x}_${X}`), se[ae] = x, f[$[ae.toLowerCase()] || X] =
|
|
5439
|
+
x !== "main" && (ae = `${x}_${X}`), se[ae] = x, f[$[ae.toLowerCase()] || X] = z[X];
|
|
5440
5440
|
}
|
|
5441
|
-
}) : f[x] =
|
|
5442
|
-
else if (ne(
|
|
5443
|
-
if (!Array.isArray(
|
|
5441
|
+
}) : f[x] = z);
|
|
5442
|
+
else if (ne(O.id || "")) {
|
|
5443
|
+
if (!Array.isArray(z)) {
|
|
5444
5444
|
console.warn("表格数据不是数组:" + x);
|
|
5445
5445
|
return;
|
|
5446
5446
|
}
|
|
5447
|
-
|
|
5447
|
+
z?.length > 0 ? f[$[x.toLowerCase()] || x] = Oe(x, z, N) : f[$[x.toLowerCase()] || x] = [];
|
|
5448
5448
|
} else
|
|
5449
|
-
(!N || N(x,
|
|
5449
|
+
(!N || N(x, z, x)) && (f[$[x.toLowerCase()] || x] = z);
|
|
5450
5450
|
}), le && Object.keys(f).forEach((x) => {
|
|
5451
|
-
const
|
|
5452
|
-
(
|
|
5451
|
+
const z = ee(x);
|
|
5452
|
+
(z === void 0 || !["tabs", "collapse"].includes(z.type || "")) && Kt(le, x, f[x]);
|
|
5453
5453
|
});
|
|
5454
|
-
}, be = (
|
|
5454
|
+
}, be = (y, N = !1) => {
|
|
5455
5455
|
const x = {};
|
|
5456
|
-
return Object.keys(
|
|
5457
|
-
if (
|
|
5458
|
-
const
|
|
5459
|
-
if (
|
|
5460
|
-
const X =
|
|
5456
|
+
return Object.keys(y).forEach((z) => {
|
|
5457
|
+
if (z === "parentRow") return;
|
|
5458
|
+
const O = I[z];
|
|
5459
|
+
if (O) {
|
|
5460
|
+
const X = O.config?.table, ae = O.config?.field;
|
|
5461
5461
|
if (N)
|
|
5462
|
-
ae ? x[ae] =
|
|
5463
|
-
else if (ne(
|
|
5462
|
+
ae ? x[ae] = y[z] : x[z] = y[z];
|
|
5463
|
+
else if (ne(z)) {
|
|
5464
5464
|
const me = [];
|
|
5465
|
-
|
|
5465
|
+
y[z].forEach((Ce) => {
|
|
5466
5466
|
me.push(be(Ce, !0));
|
|
5467
|
-
}), x[X ||
|
|
5468
|
-
} else X && ae ? (x[X] = x[X] || {}, x[X][ae] =
|
|
5469
|
-
} else N ?
|
|
5467
|
+
}), x[X || z] = me;
|
|
5468
|
+
} else X && ae ? (x[X] = x[X] || {}, x[X][ae] = y[z]) : ae && (x[ae] = y[z]);
|
|
5469
|
+
} else N ? z !== "_X_ROW_KEY" && z !== "_isHover" && (x[z] = y[z]) : se[z] ? (x[se[z]] = x[se[z]] || {}, x[se[z]][z.replace(`${se[z]}_`, "")] = y[z]) : x[z] = y[z];
|
|
5470
5470
|
}), x;
|
|
5471
|
-
}, ve = (
|
|
5472
|
-
let
|
|
5473
|
-
if (
|
|
5474
|
-
const ae =
|
|
5475
|
-
|
|
5471
|
+
}, ve = (y = !0) => y ? be(f) : f, ce = (y, N, x, z) => {
|
|
5472
|
+
let O = I[y];
|
|
5473
|
+
if (O == null) {
|
|
5474
|
+
const ae = y.split(".");
|
|
5475
|
+
O = I[ae[ae.length - 1]] || {};
|
|
5476
5476
|
}
|
|
5477
|
-
if (!
|
|
5477
|
+
if (!O)
|
|
5478
5478
|
return {};
|
|
5479
5479
|
const X = He({
|
|
5480
|
-
config:
|
|
5481
|
-
getCompConfig:
|
|
5480
|
+
config: { ...O.config || {}, ..._.value[O.id] || {} },
|
|
5481
|
+
getCompConfig: O.getCompConfig,
|
|
5482
5482
|
formData: f,
|
|
5483
5483
|
tableData: x,
|
|
5484
5484
|
row: N,
|
|
5485
|
-
pRowData:
|
|
5485
|
+
pRowData: z
|
|
5486
5486
|
});
|
|
5487
|
-
return X._componentId =
|
|
5488
|
-
}, ye = (
|
|
5489
|
-
const
|
|
5490
|
-
if (
|
|
5491
|
-
const X =
|
|
5487
|
+
return X._componentId = O?.id, X;
|
|
5488
|
+
}, ye = (y, N, x, z) => {
|
|
5489
|
+
const O = ce(y, N, x, z);
|
|
5490
|
+
if (O.isNotRule !== !0 && O.display !== !1) {
|
|
5491
|
+
const X = O.rule || [], ae = X.find((me) => me.type === "only");
|
|
5492
5492
|
return ae && (ae.validator = async (me, Ce) => {
|
|
5493
5493
|
if (Ce) {
|
|
5494
5494
|
const ge = {
|
|
@@ -5509,103 +5509,103 @@ const Ta = /* @__PURE__ */ G({
|
|
|
5509
5509
|
}
|
|
5510
5510
|
}), {
|
|
5511
5511
|
rules: X,
|
|
5512
|
-
myGridtableId: ne(
|
|
5512
|
+
myGridtableId: ne(O._componentId) ? O._componentId : ""
|
|
5513
5513
|
};
|
|
5514
5514
|
}
|
|
5515
5515
|
return { rules: [], myGridtableId: "" };
|
|
5516
5516
|
}, { validateForm: je } = Va(f, ye), S = async () => {
|
|
5517
5517
|
B.value = {};
|
|
5518
|
-
const
|
|
5519
|
-
return Object.keys(
|
|
5520
|
-
`${h(I[Object.keys(
|
|
5518
|
+
const y = await je();
|
|
5519
|
+
return Object.keys(y).length > 0 ? (B.value = y, v(
|
|
5520
|
+
`${h(I[Object.keys(y)[0]]?.config?.label)}:${h(y[Object.keys(y)[0]].msg)}`
|
|
5521
5521
|
), !1) : !0;
|
|
5522
5522
|
}, P = () => {
|
|
5523
|
-
B.value = {}, _e(f), Object.keys(A || {}).forEach((
|
|
5524
|
-
f[
|
|
5523
|
+
B.value = {}, _e(f), Object.keys(A || {}).forEach((y) => {
|
|
5524
|
+
f[y] = A[y];
|
|
5525
5525
|
});
|
|
5526
|
-
},
|
|
5527
|
-
let N = I[
|
|
5528
|
-
return N === void 0 && $[
|
|
5529
|
-
}, pe = ({ id:
|
|
5530
|
-
if (
|
|
5531
|
-
f[
|
|
5532
|
-
else if (
|
|
5533
|
-
f[
|
|
5526
|
+
}, ee = (y) => {
|
|
5527
|
+
let N = I[y];
|
|
5528
|
+
return N === void 0 && $[y.toLowerCase()] && (N = I[$[y.toLowerCase()]]), N;
|
|
5529
|
+
}, pe = ({ id: y, i: N, value: x, type: z }) => {
|
|
5530
|
+
if (z === "add")
|
|
5531
|
+
f[y].push(x);
|
|
5532
|
+
else if (z === "delete")
|
|
5533
|
+
f[y].splice(N, 1);
|
|
5534
5534
|
else {
|
|
5535
|
-
const
|
|
5536
|
-
|
|
5535
|
+
const O = ee(y);
|
|
5536
|
+
O && (O.config.parentTableId ? f[O.config.parentTableId][N][y] = x : f[y] = x);
|
|
5537
5537
|
}
|
|
5538
|
-
}, $e = ({ id:
|
|
5539
|
-
const x =
|
|
5538
|
+
}, $e = ({ id: y, i: N }) => {
|
|
5539
|
+
const x = ee(y);
|
|
5540
5540
|
if (x) {
|
|
5541
5541
|
if (x.config.parentTableId) {
|
|
5542
|
-
const
|
|
5542
|
+
const z = f[x.config.parentTableId], O = x.id ? x.id.replace(`${x.config.parentTableId}.`, "") : "";
|
|
5543
5543
|
if (N != null)
|
|
5544
|
-
return (
|
|
5544
|
+
return (z[N] || {})[O || ""];
|
|
5545
5545
|
const X = [];
|
|
5546
|
-
return
|
|
5547
|
-
X.push(ae[
|
|
5546
|
+
return z && z.forEach((ae) => {
|
|
5547
|
+
X.push(ae[O || ""]);
|
|
5548
5548
|
}), X;
|
|
5549
5549
|
}
|
|
5550
5550
|
if (ne(x.id || "")) {
|
|
5551
|
-
const
|
|
5552
|
-
return f[x.id || ""].forEach((
|
|
5553
|
-
|
|
5554
|
-
}),
|
|
5551
|
+
const z = [];
|
|
5552
|
+
return f[x.id || ""].forEach((O) => {
|
|
5553
|
+
z.push(be(O, !0));
|
|
5554
|
+
}), z;
|
|
5555
5555
|
}
|
|
5556
5556
|
return f[x.id || ""];
|
|
5557
5557
|
}
|
|
5558
|
-
if (f[
|
|
5559
|
-
return f[
|
|
5560
|
-
}, Le = async ({ id:
|
|
5561
|
-
const x = $e({ id:
|
|
5562
|
-
if (
|
|
5558
|
+
if (f[y])
|
|
5559
|
+
return f[y];
|
|
5560
|
+
}, Le = async ({ id: y, i: N }) => {
|
|
5561
|
+
const x = $e({ id: y, i: N }), z = ee(y);
|
|
5562
|
+
if (z && d?.getLabel)
|
|
5563
5563
|
if (N !== void 0) {
|
|
5564
|
-
const
|
|
5565
|
-
config:
|
|
5566
|
-
getCompConfig:
|
|
5564
|
+
const O = x[N], X = f[z.config.parentTableId || ""][N], ae = He({
|
|
5565
|
+
config: z.config,
|
|
5566
|
+
getCompConfig: z.getCompConfig,
|
|
5567
5567
|
formData: f,
|
|
5568
5568
|
// @ts-expect-error clone类型推断不完整,此处可安全传递
|
|
5569
|
-
tableData: f[
|
|
5569
|
+
tableData: f[z.config.parentTableId || ""],
|
|
5570
5570
|
row: X
|
|
5571
5571
|
});
|
|
5572
|
-
return await
|
|
5573
|
-
value:
|
|
5572
|
+
return await d?.getLabel({
|
|
5573
|
+
value: O,
|
|
5574
5574
|
config: ae,
|
|
5575
5575
|
formData: f,
|
|
5576
5576
|
// @ts-expect-error clone类型推断不完整,此处可安全传递
|
|
5577
|
-
tableData: f[
|
|
5577
|
+
tableData: f[z.config.parentTableId || ""],
|
|
5578
5578
|
row: X
|
|
5579
5579
|
});
|
|
5580
5580
|
} else {
|
|
5581
|
-
const
|
|
5582
|
-
config:
|
|
5583
|
-
getCompConfig:
|
|
5581
|
+
const O = He({
|
|
5582
|
+
config: z.config,
|
|
5583
|
+
getCompConfig: z.getCompConfig,
|
|
5584
5584
|
formData: f
|
|
5585
5585
|
});
|
|
5586
|
-
return await
|
|
5586
|
+
return await d?.getLabel({
|
|
5587
5587
|
value: x,
|
|
5588
|
-
config:
|
|
5588
|
+
config: O,
|
|
5589
5589
|
formData: f
|
|
5590
5590
|
});
|
|
5591
5591
|
}
|
|
5592
5592
|
return x;
|
|
5593
|
-
}, fe = async (
|
|
5593
|
+
}, fe = async (y, N) => d?.loadViewDataList ? await d?.loadViewDataList(y, N, !1) : [], lt = (y) => (y.set = pe, y.get = $e, y.setFormData = E, y.getFormData = ve, y.getLabel = Le, y.getViewData = fe, y.getDateNow = (N) => ll(/* @__PURE__ */ new Date(), N || "YYYY-MM-DD HH:mm:ss"), y.httpGet = r || (() => {
|
|
5594
5594
|
console.log("当前状态不支持");
|
|
5595
|
-
}),
|
|
5595
|
+
}), y.httpPost = g || (() => {
|
|
5596
5596
|
console.log("当前状态不支持");
|
|
5597
|
-
}),
|
|
5597
|
+
}), y.loading = (N) => {
|
|
5598
5598
|
Pe(N);
|
|
5599
|
-
},
|
|
5599
|
+
}, y.showMsg = ({ text: N, type: x }) => {
|
|
5600
5600
|
switch (x) {
|
|
5601
5601
|
case "success":
|
|
5602
|
-
|
|
5602
|
+
c && c(N);
|
|
5603
5603
|
break;
|
|
5604
5604
|
case "warning":
|
|
5605
5605
|
m && m(N);
|
|
5606
5606
|
break;
|
|
5607
5607
|
case "error":
|
|
5608
|
-
|
|
5608
|
+
u && u(N);
|
|
5609
5609
|
break;
|
|
5610
5610
|
case "info":
|
|
5611
5611
|
p && p(N);
|
|
@@ -5615,22 +5615,23 @@ const Ta = /* @__PURE__ */ G({
|
|
|
5615
5615
|
break;
|
|
5616
5616
|
}
|
|
5617
5617
|
console.log("showMsg", N, x);
|
|
5618
|
-
},
|
|
5619
|
-
if (
|
|
5620
|
-
|
|
5621
|
-
const { res: x, fn:
|
|
5622
|
-
x && await
|
|
5618
|
+
}, y), ot = async (y, N) => {
|
|
5619
|
+
if (y && y.trim()) {
|
|
5620
|
+
y = `async (jcode) => {${y}}`;
|
|
5621
|
+
const { res: x, fn: z } = Bt(y);
|
|
5622
|
+
x && await z(lt(N));
|
|
5623
5623
|
}
|
|
5624
|
-
}, qe = (
|
|
5625
|
-
|
|
5624
|
+
}, qe = (y, N) => {
|
|
5625
|
+
_.value[y] = { ..._.value[y] || {}, ...N };
|
|
5626
5626
|
};
|
|
5627
5627
|
return t.schema && Ie(t.schema), dt("jcode_form_provide", {
|
|
5628
5628
|
formData: f,
|
|
5629
|
+
compsConfig: _,
|
|
5629
5630
|
errorFields: B,
|
|
5630
5631
|
isAutoWindow: Y,
|
|
5631
5632
|
gutter: k,
|
|
5632
5633
|
span: C,
|
|
5633
|
-
labelWidth:
|
|
5634
|
+
labelWidth: R,
|
|
5634
5635
|
onChange: q
|
|
5635
5636
|
}), l({
|
|
5636
5637
|
init: Ie,
|
|
@@ -5639,27 +5640,27 @@ const Ta = /* @__PURE__ */ G({
|
|
|
5639
5640
|
setValue: pe,
|
|
5640
5641
|
getValue: $e,
|
|
5641
5642
|
getLabel: Le,
|
|
5642
|
-
setFormData:
|
|
5643
|
+
setFormData: E,
|
|
5643
5644
|
getFormData: ve,
|
|
5644
5645
|
setCompConfig: qe
|
|
5645
|
-
}), (
|
|
5646
|
-
const x = F("j-form-item"),
|
|
5647
|
-
return
|
|
5646
|
+
}), (y, N) => {
|
|
5647
|
+
const x = F("j-form-item"), z = F("el-row"), O = F("el-form");
|
|
5648
|
+
return b.value ? (i(), w(O, {
|
|
5648
5649
|
key: 0,
|
|
5649
5650
|
class: Te([{ "j-block": e.isAutoSize }, "j-form"]),
|
|
5650
5651
|
"label-position": Q.value,
|
|
5651
|
-
"label-width":
|
|
5652
|
+
"label-width": R.value,
|
|
5652
5653
|
size: e.config?.size,
|
|
5653
5654
|
onSubmit: N[0] || (N[0] = ze(() => {
|
|
5654
5655
|
}, ["prevent"]))
|
|
5655
5656
|
}, {
|
|
5656
5657
|
default: L(() => [
|
|
5657
|
-
Y.value ? (i(), w(x, Ft(we({ key: 0 },
|
|
5658
|
+
Y.value ? (i(), w(x, Ft(we({ key: 0 }, M[0])), null, 16)) : (i(), w(z, {
|
|
5658
5659
|
key: 1,
|
|
5659
5660
|
gutter: k.value
|
|
5660
5661
|
}, {
|
|
5661
5662
|
default: L(() => [
|
|
5662
|
-
(i(), T(ue, null, de(
|
|
5663
|
+
(i(), T(ue, null, de(M, (X) => K(x, we({
|
|
5663
5664
|
key: X.id,
|
|
5664
5665
|
ref_for: !0
|
|
5665
5666
|
}, X), null, 16)), 64))
|
|
@@ -5720,61 +5721,61 @@ const Ta = /* @__PURE__ */ G({
|
|
|
5720
5721
|
}
|
|
5721
5722
|
},
|
|
5722
5723
|
setup(e) {
|
|
5723
|
-
const l = e, { formData: o,
|
|
5724
|
+
const l = e, { formData: o, compsConfig: t, errorFields: n, isAutoWindow: a, span: s, labelWidth: r } = Ve(
|
|
5724
5725
|
"jcode_form_provide",
|
|
5725
5726
|
{}
|
|
5726
|
-
), { t:
|
|
5727
|
-
t: (
|
|
5728
|
-
}),
|
|
5729
|
-
config: l.config,
|
|
5727
|
+
), { t: g } = Ve("jcode_app_provide", {
|
|
5728
|
+
t: (v) => v
|
|
5729
|
+
}), c = V(() => He({
|
|
5730
|
+
config: { ...l.config || {}, ...t.value[l.id] || {} },
|
|
5730
5731
|
getCompConfig: l.getCompConfig,
|
|
5731
5732
|
formData: o
|
|
5732
|
-
})),
|
|
5733
|
-
const
|
|
5734
|
-
return
|
|
5733
|
+
})), m = V(() => l.getCompType ? l.getCompType({ config: l.config, formData: o }) : l.type), u = V(() => mt(m.value) && !c.value?.notInput || c.value?.isInput), p = V(() => c.value?.labelWidth || r.value), h = V(() => (c.value?.rule || []).some((b) => b.required === !0)), d = V(() => {
|
|
5734
|
+
const v = n.value[l.id];
|
|
5735
|
+
return v ? v.msg : "";
|
|
5735
5736
|
});
|
|
5736
|
-
return (
|
|
5737
|
-
const
|
|
5738
|
-
return
|
|
5737
|
+
return (v, b) => {
|
|
5738
|
+
const k = F("j-comp"), C = F("el-form-item"), R = F("el-col");
|
|
5739
|
+
return c.value.display !== !1 && !U(a) ? (i(), w(R, {
|
|
5739
5740
|
key: 0,
|
|
5740
|
-
span:
|
|
5741
|
+
span: c.value.span || U(s),
|
|
5741
5742
|
style: re({
|
|
5742
|
-
...
|
|
5743
|
+
...c.value.colStyle || {}
|
|
5743
5744
|
}),
|
|
5744
|
-
class: Te(
|
|
5745
|
+
class: Te(c.value.colClass || {})
|
|
5745
5746
|
}, {
|
|
5746
5747
|
default: L(() => [
|
|
5747
|
-
|
|
5748
|
+
u.value ? (i(), w(C, {
|
|
5748
5749
|
key: 0,
|
|
5749
|
-
label: U(
|
|
5750
|
-
"label-position":
|
|
5751
|
-
"label-width":
|
|
5752
|
-
required:
|
|
5753
|
-
error: U(
|
|
5750
|
+
label: U(g)(c.value.notShowLabel ? "" : c.value.label || ""),
|
|
5751
|
+
"label-position": c.value.labelPosition,
|
|
5752
|
+
"label-width": p.value,
|
|
5753
|
+
required: h.value,
|
|
5754
|
+
error: U(g)(d.value)
|
|
5754
5755
|
}, {
|
|
5755
5756
|
default: L(() => [
|
|
5756
|
-
K(
|
|
5757
|
+
K(k, {
|
|
5757
5758
|
id: e.id,
|
|
5758
|
-
type:
|
|
5759
|
-
config:
|
|
5759
|
+
type: m.value,
|
|
5760
|
+
config: c.value,
|
|
5760
5761
|
children: e.children
|
|
5761
5762
|
}, null, 8, ["id", "type", "config", "children"])
|
|
5762
5763
|
]),
|
|
5763
5764
|
_: 1
|
|
5764
|
-
}, 8, ["label", "label-position", "label-width", "required", "error"])) : (i(), w(
|
|
5765
|
+
}, 8, ["label", "label-position", "label-width", "required", "error"])) : (i(), w(k, {
|
|
5765
5766
|
key: 1,
|
|
5766
5767
|
id: e.id,
|
|
5767
|
-
type:
|
|
5768
|
-
config:
|
|
5768
|
+
type: m.value,
|
|
5769
|
+
config: c.value,
|
|
5769
5770
|
children: e.children
|
|
5770
5771
|
}, null, 8, ["id", "type", "config", "children"]))
|
|
5771
5772
|
]),
|
|
5772
5773
|
_: 1
|
|
5773
|
-
}, 8, ["span", "style", "class"])) :
|
|
5774
|
+
}, 8, ["span", "style", "class"])) : c.value.display !== !1 ? (i(), w(k, {
|
|
5774
5775
|
key: 1,
|
|
5775
5776
|
id: e.id,
|
|
5776
|
-
type:
|
|
5777
|
-
config:
|
|
5777
|
+
type: m.value,
|
|
5778
|
+
config: c.value,
|
|
5778
5779
|
children: e.children
|
|
5779
5780
|
}, null, 8, ["id", "type", "config", "children"])) : D("", !0);
|
|
5780
5781
|
};
|
|
@@ -5806,32 +5807,32 @@ const Ta = /* @__PURE__ */ G({
|
|
|
5806
5807
|
}
|
|
5807
5808
|
},
|
|
5808
5809
|
setup(e) {
|
|
5809
|
-
const l = e, o = j(!1), t = [], n = {}, a = Ye({}), s = (
|
|
5810
|
-
|
|
5810
|
+
const l = e, o = j(!1), t = [], n = {}, a = Ye({}), s = (g, c) => {
|
|
5811
|
+
g.forEach((m) => {
|
|
5811
5812
|
m.id = m.id || ft("c");
|
|
5812
|
-
const
|
|
5813
|
+
const u = {
|
|
5813
5814
|
id: m.id,
|
|
5814
5815
|
slot: m.slot,
|
|
5815
5816
|
type: m.type,
|
|
5816
5817
|
config: {},
|
|
5817
5818
|
children: []
|
|
5818
5819
|
}, { children: p } = m;
|
|
5819
|
-
n[m.id] =
|
|
5820
|
+
n[m.id] = u, ut(u.config, m.config || {}, ["defaultValue"]), m?.config?.defaultValue !== void 0 && (a.value[m.id] = m.config.defaultValue), c.push(u), p && p.length > 0 && s(p, u.children);
|
|
5820
5821
|
});
|
|
5821
|
-
},
|
|
5822
|
-
o.value = !1, t.splice(0, t.length), _e(n), _e(a), s(
|
|
5822
|
+
}, r = (g) => {
|
|
5823
|
+
o.value = !1, t.splice(0, t.length), _e(n), _e(a), s(g, t), xe(() => {
|
|
5823
5824
|
o.value = !0;
|
|
5824
5825
|
});
|
|
5825
5826
|
};
|
|
5826
|
-
return l.schema &&
|
|
5827
|
+
return l.schema && r(l.schema), (g, c) => {
|
|
5827
5828
|
const m = F("j-comp");
|
|
5828
5829
|
return i(), T("div", Oa, [
|
|
5829
|
-
(i(), T(ue, null, de(t, (
|
|
5830
|
-
key:
|
|
5831
|
-
id:
|
|
5832
|
-
type:
|
|
5833
|
-
config:
|
|
5834
|
-
children:
|
|
5830
|
+
(i(), T(ue, null, de(t, (u) => K(m, {
|
|
5831
|
+
key: u.id,
|
|
5832
|
+
id: u.id,
|
|
5833
|
+
type: u.type,
|
|
5834
|
+
config: u.config,
|
|
5835
|
+
children: u.children
|
|
5835
5836
|
}, null, 8, ["id", "type", "config", "children"])), 64))
|
|
5836
5837
|
]);
|
|
5837
5838
|
};
|
|
@@ -5853,10 +5854,10 @@ const Ta = /* @__PURE__ */ G({
|
|
|
5853
5854
|
},
|
|
5854
5855
|
{ immediate: !0 }
|
|
5855
5856
|
), (a, s) => {
|
|
5856
|
-
const
|
|
5857
|
-
return i(), w(
|
|
5857
|
+
const r = F("el-input");
|
|
5858
|
+
return i(), w(r, {
|
|
5858
5859
|
modelValue: n.value,
|
|
5859
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
5860
|
+
"onUpdate:modelValue": s[0] || (s[0] = (g) => n.value = g),
|
|
5860
5861
|
readonly: "",
|
|
5861
5862
|
size: e.size
|
|
5862
5863
|
}, null, 8, ["modelValue", "size"]);
|