cc1-form 1.2.29 → 1.3.0
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/cc1-form.js +415 -416
- package/dist/cc1-form.umd.cjs +1 -1
- package/dist/index.d.ts +1 -2
- package/package.json +1 -1
package/dist/cc1-form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElMessage as Ke, ElLoading as He, ElFormItem as be, ElInput as _, ElSwitch as se, ElSelect as ne, ElOption as ee, ElRadioGroup as xe, ElRadioButton as Ge, ElRadio as Ve, ElCheckboxGroup as Ne, ElCheckboxButton as We, ElCheckbox as Je, ElColorPicker as Qe, ElSlider as qe, ElTreeSelect as Xe, ElDatePicker as Se, ElForm as Y, ElDialog as ye, ElButton as T, ElTableColumn as ue, ElDropdown as Ye, ElDropdownMenu as Ze, ElDropdownItem as he, ElPagination as ke, ElTable as _e } from "element-plus";
|
|
2
2
|
import "vue-router";
|
|
3
|
-
import { defineComponent as G, reactive as ge, onMounted as ze, resolveComponent as le, openBlock as s, createElementBlock as y, renderSlot as
|
|
3
|
+
import { defineComponent as G, reactive as ge, onMounted as ze, resolveComponent as le, openBlock as s, createElementBlock as y, renderSlot as x, createVNode as D, withCtx as b, createTextVNode as $, createCommentVNode as v, Fragment as F, renderList as L, createBlock as h, normalizeClass as I, normalizeStyle as ce, unref as r, createElementVNode as M, mergeProps as k, toHandlers as V, createSlots as J, toDisplayString as O, resolveDynamicComponent as X, computed as Z, ref as q, watch as et, normalizeProps as pe, guardReactiveProps as we, getCurrentInstance as tt, withModifiers as ot, resolveDirective as at, withDirectives as nt } from "vue";
|
|
4
4
|
import { Scope as $e } from "cc1-vue3";
|
|
5
5
|
class z {
|
|
6
6
|
/**
|
|
@@ -616,9 +616,9 @@ class W {
|
|
|
616
616
|
const o = U.config.table.rowKey;
|
|
617
617
|
l[a].push(
|
|
618
618
|
n.reduce(
|
|
619
|
-
(d,
|
|
620
|
-
let
|
|
621
|
-
return
|
|
619
|
+
(d, c) => {
|
|
620
|
+
let u = c.default ?? "";
|
|
621
|
+
return c.type === "number" && (u = c.default ?? 0), c.type === "boolean" && (u = c.default ?? !1), c.type === "time" && (u = c.default ?? /* @__PURE__ */ new Date()), d[c.value] = u, d;
|
|
622
622
|
},
|
|
623
623
|
{ [o]: W.getIdFun() }
|
|
624
624
|
)
|
|
@@ -712,14 +712,14 @@ const lt = {
|
|
|
712
712
|
});
|
|
713
713
|
const i = a;
|
|
714
714
|
return (n, o) => {
|
|
715
|
-
const d = le("el-button"),
|
|
715
|
+
const d = le("el-button"), c = le("el-input");
|
|
716
716
|
return t.show ? (s(), y("div", lt, [
|
|
717
|
-
|
|
717
|
+
x(n.$slots, "list-start", { row: e.row }),
|
|
718
718
|
e.addBottom ? v("", !0) : (s(), y("div", it, [
|
|
719
719
|
D(d, {
|
|
720
720
|
link: "",
|
|
721
721
|
type: "primary",
|
|
722
|
-
onClick: o[0] || (o[0] = (
|
|
722
|
+
onClick: o[0] || (o[0] = (u) => t.add(e.field, e.row, e.itemFields))
|
|
723
723
|
}, {
|
|
724
724
|
default: b(() => [...o[3] || (o[3] = [
|
|
725
725
|
$("添加", -1)
|
|
@@ -727,27 +727,27 @@ const lt = {
|
|
|
727
727
|
_: 1
|
|
728
728
|
})
|
|
729
729
|
])),
|
|
730
|
-
(s(!0), y(F, null, L(e.row[e.field], (
|
|
731
|
-
|
|
732
|
-
item:
|
|
730
|
+
(s(!0), y(F, null, L(e.row[e.field], (u) => (s(), y("div", rt, [
|
|
731
|
+
x(n.$slots, "item-start", {
|
|
732
|
+
item: u,
|
|
733
733
|
row: e.row
|
|
734
734
|
}),
|
|
735
|
-
(s(!0), y(F, null, L(e.itemFields, (
|
|
736
|
-
modelValue:
|
|
737
|
-
"onUpdate:modelValue": (
|
|
735
|
+
(s(!0), y(F, null, L(e.itemFields, (m) => (s(), h(c, {
|
|
736
|
+
modelValue: u[m.value],
|
|
737
|
+
"onUpdate:modelValue": (p) => u[m.value] = p,
|
|
738
738
|
style: ce({ width: e.inputWidth }),
|
|
739
739
|
class: I(e.inputClass),
|
|
740
|
-
placeholder:
|
|
741
|
-
onChange: o[1] || (o[1] = (
|
|
740
|
+
placeholder: m[e.label] || m[e.value],
|
|
741
|
+
onChange: o[1] || (o[1] = (p) => i("change"))
|
|
742
742
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
|
|
743
|
-
|
|
744
|
-
item:
|
|
743
|
+
x(n.$slots, "item-end", {
|
|
744
|
+
item: u,
|
|
745
745
|
row: e.row
|
|
746
746
|
}),
|
|
747
747
|
D(d, {
|
|
748
748
|
link: "",
|
|
749
749
|
type: "danger",
|
|
750
|
-
onClick: (
|
|
750
|
+
onClick: (m) => t.remove(e.field, e.row, u)
|
|
751
751
|
}, {
|
|
752
752
|
default: b(() => [...o[4] || (o[4] = [
|
|
753
753
|
$("删除", -1)
|
|
@@ -759,7 +759,7 @@ const lt = {
|
|
|
759
759
|
D(d, {
|
|
760
760
|
link: "",
|
|
761
761
|
type: "primary",
|
|
762
|
-
onClick: o[2] || (o[2] = (
|
|
762
|
+
onClick: o[2] || (o[2] = (u) => t.add(e.field, e.row, e.itemFields))
|
|
763
763
|
}, {
|
|
764
764
|
default: b(() => [...o[5] || (o[5] = [
|
|
765
765
|
$("添加", -1)
|
|
@@ -767,7 +767,7 @@ const lt = {
|
|
|
767
767
|
_: 1
|
|
768
768
|
})
|
|
769
769
|
])) : v("", !0),
|
|
770
|
-
|
|
770
|
+
x(n.$slots, "list-end", { row: e.row })
|
|
771
771
|
])) : v("", !0);
|
|
772
772
|
};
|
|
773
773
|
}
|
|
@@ -793,21 +793,21 @@ const lt = {
|
|
|
793
793
|
}, {
|
|
794
794
|
default: b(() => [
|
|
795
795
|
M("div", st, [
|
|
796
|
-
|
|
796
|
+
x(a.$slots, "form-" + e.item.key + "-start", {
|
|
797
797
|
row: e.form,
|
|
798
798
|
item: e.item
|
|
799
799
|
}),
|
|
800
800
|
M("div", ut, [
|
|
801
801
|
M("div", ct, [
|
|
802
|
-
|
|
802
|
+
x(a.$slots, "form-" + e.item.key, {
|
|
803
803
|
row: e.form,
|
|
804
804
|
item: e.item
|
|
805
805
|
}, () => [
|
|
806
|
-
e.item.type === "input" ? (s(), h(r(_),
|
|
806
|
+
e.item.type === "input" ? (s(), h(r(_), k({
|
|
807
807
|
key: 0,
|
|
808
808
|
modelValue: e.form[e.item.key],
|
|
809
809
|
"onUpdate:modelValue": l[0] || (l[0] = (t) => e.form[e.item.key] = t)
|
|
810
|
-
}, e.getBind(e.item),
|
|
810
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
811
811
|
disabled: e.getDisabled(e.item)
|
|
812
812
|
}), J({ _: 2 }, [
|
|
813
813
|
e.getBind(e.item).prepend ? {
|
|
@@ -817,124 +817,124 @@ const lt = {
|
|
|
817
817
|
]),
|
|
818
818
|
key: "0"
|
|
819
819
|
} : void 0
|
|
820
|
-
]), 1040, ["modelValue", "disabled"])) : e.item.type === "number" ? (s(), h(r(_),
|
|
820
|
+
]), 1040, ["modelValue", "disabled"])) : e.item.type === "number" ? (s(), h(r(_), k({
|
|
821
821
|
key: 1,
|
|
822
822
|
type: "number",
|
|
823
823
|
modelValue: e.form[e.item.key],
|
|
824
824
|
"onUpdate:modelValue": l[1] || (l[1] = (t) => e.form[e.item.key] = t)
|
|
825
|
-
}, e.getBind(e.item),
|
|
825
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
826
826
|
disabled: e.getDisabled(e.item)
|
|
827
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "textarea" ? (s(), h(r(_),
|
|
827
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "textarea" ? (s(), h(r(_), k({
|
|
828
828
|
key: 2,
|
|
829
829
|
type: "textarea",
|
|
830
830
|
modelValue: e.form[e.item.key],
|
|
831
831
|
"onUpdate:modelValue": l[2] || (l[2] = (t) => e.form[e.item.key] = t)
|
|
832
|
-
}, e.getBind(e.item),
|
|
832
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
833
833
|
disabled: e.getDisabled(e.item)
|
|
834
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "switch" ? (s(), h(r(se),
|
|
834
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "switch" ? (s(), h(r(se), k({
|
|
835
835
|
key: 3,
|
|
836
836
|
modelValue: e.form[e.item.key],
|
|
837
837
|
"onUpdate:modelValue": l[3] || (l[3] = (t) => e.form[e.item.key] = t)
|
|
838
|
-
}, e.getBind(e.item),
|
|
838
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
839
839
|
disabled: e.getDisabled(e.item)
|
|
840
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "select" ? (s(), h(r(ne),
|
|
840
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "select" ? (s(), h(r(ne), k({
|
|
841
841
|
key: 4,
|
|
842
842
|
modelValue: e.form[e.item.key],
|
|
843
843
|
"onUpdate:modelValue": l[4] || (l[4] = (t) => e.form[e.item.key] = t)
|
|
844
|
-
}, e.getBind(e.item),
|
|
844
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
845
845
|
disabled: e.getDisabled(e.item),
|
|
846
846
|
style: { width: "100%" }
|
|
847
847
|
}), {
|
|
848
848
|
default: b(() => [
|
|
849
|
-
(s(!0), y(F, null, L(e.getBind(e.item).data || [], (t) => (s(), h(r(ee),
|
|
849
|
+
(s(!0), y(F, null, L(e.getBind(e.item).data || [], (t) => (s(), h(r(ee), k({
|
|
850
850
|
key: t.value
|
|
851
|
-
}, { ref_for: !0 }, t,
|
|
851
|
+
}, { ref_for: !0 }, t, V(t.on || {})), null, 16))), 128))
|
|
852
852
|
]),
|
|
853
853
|
_: 1
|
|
854
|
-
}, 16, ["modelValue", "disabled"])) : e.item.type === "radio" ? (s(), h(r(xe),
|
|
854
|
+
}, 16, ["modelValue", "disabled"])) : e.item.type === "radio" ? (s(), h(r(xe), k({
|
|
855
855
|
key: 5,
|
|
856
856
|
modelValue: e.form[e.item.key],
|
|
857
857
|
"onUpdate:modelValue": l[5] || (l[5] = (t) => e.form[e.item.key] = t)
|
|
858
|
-
}, e.getBind(e.item),
|
|
858
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
859
859
|
disabled: e.getDisabled(e.item),
|
|
860
860
|
style: { width: "100%" }
|
|
861
861
|
}), {
|
|
862
862
|
default: b(() => [
|
|
863
|
-
e.getBind(e.item).type === "group" ? (s(!0), y(F, { key: 0 }, L(e.getBind(e.item).data || [], (t) => (s(), h(r(Ge),
|
|
863
|
+
e.getBind(e.item).type === "group" ? (s(!0), y(F, { key: 0 }, L(e.getBind(e.item).data || [], (t) => (s(), h(r(Ge), k({
|
|
864
864
|
key: t.value
|
|
865
|
-
}, { ref_for: !0 }, t,
|
|
865
|
+
}, { ref_for: !0 }, t, V(t.on || {})), null, 16))), 128)) : (s(!0), y(F, { key: 1 }, L(e.getBind(e.item).data || [], (t) => (s(), h(r(Ve), k({
|
|
866
866
|
key: t.value
|
|
867
|
-
}, { ref_for: !0 }, t,
|
|
867
|
+
}, { ref_for: !0 }, t, V(t.on || {})), null, 16))), 128))
|
|
868
868
|
]),
|
|
869
869
|
_: 1
|
|
870
|
-
}, 16, ["modelValue", "disabled"])) : e.item.type === "checkbox" ? (s(), h(r(Ne),
|
|
870
|
+
}, 16, ["modelValue", "disabled"])) : e.item.type === "checkbox" ? (s(), h(r(Ne), k({
|
|
871
871
|
key: 6,
|
|
872
872
|
modelValue: e.form[e.item.key],
|
|
873
873
|
"onUpdate:modelValue": l[6] || (l[6] = (t) => e.form[e.item.key] = t)
|
|
874
|
-
}, e.getBind(e.item),
|
|
874
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
875
875
|
disabled: e.getDisabled(e.item),
|
|
876
876
|
style: { width: "100%" }
|
|
877
877
|
}), {
|
|
878
878
|
default: b(() => [
|
|
879
|
-
e.getBind(e.item).type === "group" ? (s(!0), y(F, { key: 0 }, L(e.getBind(e.item).data || [], (t) => (s(), h(r(We),
|
|
879
|
+
e.getBind(e.item).type === "group" ? (s(!0), y(F, { key: 0 }, L(e.getBind(e.item).data || [], (t) => (s(), h(r(We), k({
|
|
880
880
|
key: t.value
|
|
881
|
-
}, { ref_for: !0 }, t,
|
|
881
|
+
}, { ref_for: !0 }, t, V(t.on || {})), null, 16))), 128)) : (s(!0), y(F, { key: 1 }, L(e.getBind(e.item).data || [], (t) => (s(), h(r(Je), k({
|
|
882
882
|
key: t.value
|
|
883
|
-
}, { ref_for: !0 }, t,
|
|
883
|
+
}, { ref_for: !0 }, t, V(t.on || {})), null, 16))), 128))
|
|
884
884
|
]),
|
|
885
885
|
_: 1
|
|
886
|
-
}, 16, ["modelValue", "disabled"])) : e.item.type === "color" ? (s(), h(r(Qe),
|
|
886
|
+
}, 16, ["modelValue", "disabled"])) : e.item.type === "color" ? (s(), h(r(Qe), k({
|
|
887
887
|
key: 7,
|
|
888
888
|
modelValue: e.form[e.item.key],
|
|
889
889
|
"onUpdate:modelValue": l[7] || (l[7] = (t) => e.form[e.item.key] = t)
|
|
890
|
-
}, e.getBind(e.item),
|
|
890
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
891
891
|
disabled: e.getDisabled(e.item)
|
|
892
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "slider" ? (s(), h(r(qe),
|
|
892
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "slider" ? (s(), h(r(qe), k({
|
|
893
893
|
key: 8,
|
|
894
894
|
modelValue: e.form[e.item.key],
|
|
895
895
|
"onUpdate:modelValue": l[8] || (l[8] = (t) => e.form[e.item.key] = t)
|
|
896
|
-
}, e.getBind(e.item),
|
|
896
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
897
897
|
disabled: e.getDisabled(e.item)
|
|
898
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "list" ? (s(), h(Ee,
|
|
898
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "list" ? (s(), h(Ee, k({
|
|
899
899
|
key: 9,
|
|
900
900
|
row: e.form,
|
|
901
901
|
field: e.item.key
|
|
902
|
-
}, e.getBind(e.item),
|
|
902
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
903
903
|
disabled: e.getDisabled(e.item),
|
|
904
904
|
style: { width: "100%" }
|
|
905
|
-
}), null, 16, ["row", "field", "disabled"])) : e.item.type === "treeSelect" ? (s(), h(r(Xe),
|
|
905
|
+
}), null, 16, ["row", "field", "disabled"])) : e.item.type === "treeSelect" ? (s(), h(r(Xe), k({
|
|
906
906
|
key: 10,
|
|
907
907
|
modelValue: e.form[e.item.key],
|
|
908
908
|
"onUpdate:modelValue": l[9] || (l[9] = (t) => e.form[e.item.key] = t)
|
|
909
|
-
}, e.getBind(e.item),
|
|
909
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
910
910
|
disabled: e.getDisabled(e.item),
|
|
911
911
|
style: { width: "100%" }
|
|
912
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "datetime" ? (s(), h(r(Se),
|
|
912
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "datetime" ? (s(), h(r(Se), k({
|
|
913
913
|
key: 11,
|
|
914
914
|
modelValue: e.form[e.item.key],
|
|
915
915
|
"onUpdate:modelValue": l[10] || (l[10] = (t) => e.form[e.item.key] = t)
|
|
916
|
-
}, e.getBind(e.item),
|
|
916
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
917
917
|
disabled: e.getDisabled(e.item)
|
|
918
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type && typeof e.item.type == "object" ? (s(), h(X(e.item.type),
|
|
918
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type && typeof e.item.type == "object" ? (s(), h(X(e.item.type), k({
|
|
919
919
|
key: 12,
|
|
920
920
|
modelValue: e.form[e.item.key],
|
|
921
921
|
"onUpdate:modelValue": l[11] || (l[11] = (t) => e.form[e.item.key] = t)
|
|
922
|
-
}, e.getBind(e.item),
|
|
922
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
923
923
|
disabled: e.getDisabled(e.item)
|
|
924
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type && (r(P).customComponent[e.item.type] || r(P).customComponent[e.item.type]?.form) ? (s(), h(X(r(P).customComponent[e.item.type]?.form || r(P).customComponent[e.item.type]),
|
|
924
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type && (r(P).customComponent[e.item.type] || r(P).customComponent[e.item.type]?.form) ? (s(), h(X(r(P).customComponent[e.item.type]?.form || r(P).customComponent[e.item.type]), k({
|
|
925
925
|
key: 13,
|
|
926
926
|
modelValue: e.form[e.item.key],
|
|
927
927
|
"onUpdate:modelValue": l[12] || (l[12] = (t) => e.form[e.item.key] = t)
|
|
928
|
-
}, e.getBind(e.item),
|
|
928
|
+
}, e.getBind(e.item), V(e.getOn(e.item)), {
|
|
929
929
|
disabled: e.getDisabled(e.item)
|
|
930
930
|
}), null, 16, ["modelValue", "disabled"])) : v("", !0)
|
|
931
931
|
]),
|
|
932
|
-
|
|
932
|
+
x(a.$slots, "form-" + e.item.key + "-right", {
|
|
933
933
|
row: e.form,
|
|
934
934
|
item: e.item
|
|
935
935
|
})
|
|
936
936
|
]),
|
|
937
|
-
|
|
937
|
+
x(a.$slots, "form-" + e.item.key + "-tip", {
|
|
938
938
|
row: e.form,
|
|
939
939
|
item: e.item
|
|
940
940
|
}, () => [
|
|
@@ -945,7 +945,7 @@ const lt = {
|
|
|
945
945
|
}, null, 8, ft)) : v("", !0)
|
|
946
946
|
])
|
|
947
947
|
]),
|
|
948
|
-
|
|
948
|
+
x(a.$slots, "form-" + e.item.key + "-end", {
|
|
949
949
|
row: e.form,
|
|
950
950
|
item: e.item
|
|
951
951
|
})
|
|
@@ -991,7 +991,7 @@ const gt = {
|
|
|
991
991
|
mergeColumn: "合并栏位",
|
|
992
992
|
expandColumn: "展开栏位"
|
|
993
993
|
};
|
|
994
|
-
class
|
|
994
|
+
class w {
|
|
995
995
|
/** 解析国际化值:函数则执行并返回字符串,字符串则替换 `{key}` 占位符 */
|
|
996
996
|
static t(a, ...l) {
|
|
997
997
|
if (typeof a == "function")
|
|
@@ -1001,7 +1001,7 @@ class p {
|
|
|
1001
1001
|
return a.replace(/{([^}]+)}/g, (i, n) => t < l.length ? String(l[t++]) : `{${n}}`);
|
|
1002
1002
|
}
|
|
1003
1003
|
static setI18n = (a) => {
|
|
1004
|
-
|
|
1004
|
+
w.curd = ObjectUtil.deepMerge(w.curd, a);
|
|
1005
1005
|
};
|
|
1006
1006
|
/** 解析curd国际化值 */
|
|
1007
1007
|
static tCurd(a, ...l) {
|
|
@@ -1090,7 +1090,7 @@ const fe = (e) => {
|
|
|
1090
1090
|
getOptions: (i) => {
|
|
1091
1091
|
const n = e();
|
|
1092
1092
|
try {
|
|
1093
|
-
const d = Be(n.update.formGrid?.length ? n.update.formGrid : n.update.formColumn).find((
|
|
1093
|
+
const d = Be(n.update.formGrid?.length ? n.update.formGrid : n.update.formColumn).find((c) => c.item.key === i)?.item;
|
|
1094
1094
|
return d ? {
|
|
1095
1095
|
options: d.options,
|
|
1096
1096
|
//@ts-ignore
|
|
@@ -1122,9 +1122,9 @@ const fe = (e) => {
|
|
|
1122
1122
|
try {
|
|
1123
1123
|
o.update.type = i;
|
|
1124
1124
|
const d = i === de.Add;
|
|
1125
|
-
o.update.edit.data = d ? void 0 : JSONUtil.cp(n), o.update.title =
|
|
1126
|
-
const
|
|
1127
|
-
Q.setValue(o.update.form,
|
|
1125
|
+
o.update.edit.data = d ? void 0 : JSONUtil.cp(n), o.update.title = w.tCurd(d ? "add" : i === de.View ? "view" : "edit");
|
|
1126
|
+
const c = d ? ObjectUtil.deepMerge(JSONUtil.cp(o.update.formDefault), n ? JSONUtil.cp(n) : {}) : JSONUtil.cp(n);
|
|
1127
|
+
Q.setValue(o.update.form, c, !0), await o.initApiData("update"), await a.option.form?.openBefore?.(o.update.form, o.update), (!a.option.table?.inlineEdit || d) && (o.update.show = !0, o.update.showContent = !0), a.option.form?.openAfter?.(o.update.form, o.update);
|
|
1128
1128
|
} catch (d) {
|
|
1129
1129
|
console.error(d);
|
|
1130
1130
|
} finally {
|
|
@@ -1142,7 +1142,7 @@ const fe = (e) => {
|
|
|
1142
1142
|
i.formRef.validate()
|
|
1143
1143
|
]), !0;
|
|
1144
1144
|
} catch {
|
|
1145
|
-
z.fail(
|
|
1145
|
+
z.fail(w.tCurd("checkFormData"));
|
|
1146
1146
|
}
|
|
1147
1147
|
},
|
|
1148
1148
|
submit: async () => {
|
|
@@ -1158,18 +1158,18 @@ const fe = (e) => {
|
|
|
1158
1158
|
}
|
|
1159
1159
|
let d = ObjectUtil.deepMerge(i.update.form, {});
|
|
1160
1160
|
delete d.children;
|
|
1161
|
-
const
|
|
1162
|
-
Object.keys(d).forEach((
|
|
1163
|
-
if (
|
|
1164
|
-
const
|
|
1165
|
-
isNaN(
|
|
1161
|
+
const c = new Set(a.option.column.filter((u) => u.type === "datetime").map((u) => u.key));
|
|
1162
|
+
Object.keys(d).forEach((u) => {
|
|
1163
|
+
if (c.has(u) && d[u] != null) {
|
|
1164
|
+
const m = new Date(d[u]).getTime();
|
|
1165
|
+
isNaN(m) || (d[u] = m);
|
|
1166
1166
|
}
|
|
1167
1167
|
});
|
|
1168
1168
|
try {
|
|
1169
1169
|
if (!o) return;
|
|
1170
1170
|
await o({ ...d }), i.update.close(), await i.table.getList(), a.option.form?.submitAfter?.(d, i.update);
|
|
1171
|
-
} catch (
|
|
1172
|
-
console.error(
|
|
1171
|
+
} catch (u) {
|
|
1172
|
+
console.error(u);
|
|
1173
1173
|
} finally {
|
|
1174
1174
|
i.update.loading = !1;
|
|
1175
1175
|
}
|
|
@@ -1198,17 +1198,17 @@ const fe = (e) => {
|
|
|
1198
1198
|
}, Me = (e, a, l = []) => {
|
|
1199
1199
|
const t = te(e), n = e.options?.[a === z.EDialog.Add ? "formAdd" : "formUpdate"]?.[t]?.on || e.options?.[t]?.on || {}, o = {};
|
|
1200
1200
|
return Object.keys(n).forEach((d) => {
|
|
1201
|
-
const
|
|
1202
|
-
typeof
|
|
1203
|
-
return
|
|
1204
|
-
} : o[d] =
|
|
1201
|
+
const c = n[d];
|
|
1202
|
+
typeof c == "function" ? o[d] = function(...u) {
|
|
1203
|
+
return c.apply(this, [...u, ...l]);
|
|
1204
|
+
} : o[d] = c;
|
|
1205
1205
|
}), o;
|
|
1206
1206
|
}, Fe = (e, a, l, t, i) => {
|
|
1207
1207
|
const n = e, o = n.colSpan ?? e.span;
|
|
1208
1208
|
if (!e.item.form?.spanCol)
|
|
1209
1209
|
return o;
|
|
1210
|
-
const d = i?.maxSpan || 12,
|
|
1211
|
-
return o +
|
|
1210
|
+
const d = i?.maxSpan || 12, c = i?.defaultSpan || d / 2, u = n.gridBand, p = a.filter((f) => u != null ? f.gridBand === u && !z.isFun(f.item.show?.form, l, t) : f.gridRow === n.gridRow && !z.isFun(f.item.show?.form, l, t)).reduce((f, g) => f + (g.colSpan ?? g.span ?? c), 0);
|
|
1211
|
+
return o + p;
|
|
1212
1212
|
}, Ue = (e) => {
|
|
1213
1213
|
const a = /* @__PURE__ */ new Map();
|
|
1214
1214
|
return e.forEach((l) => {
|
|
@@ -1247,49 +1247,49 @@ const fe = (e) => {
|
|
|
1247
1247
|
}), E += j;
|
|
1248
1248
|
}), { cells: S, maxSpan: l };
|
|
1249
1249
|
}
|
|
1250
|
-
const d = /* @__PURE__ */ new Set(),
|
|
1251
|
-
let
|
|
1252
|
-
const
|
|
1250
|
+
const d = /* @__PURE__ */ new Set(), c = [];
|
|
1251
|
+
let u = 0, m = 0;
|
|
1252
|
+
const p = (S) => Math.floor(S / K) * K, f = (S, E) => `${S},${E}`, g = (S, E, B, j) => {
|
|
1253
1253
|
if (E + B > l) return !1;
|
|
1254
1254
|
for (let A = 0; A < j; A++)
|
|
1255
1255
|
for (let R = 0; R < B; R++)
|
|
1256
|
-
if (d.has(
|
|
1256
|
+
if (d.has(f(S + A, E + R))) return !1;
|
|
1257
1257
|
return !0;
|
|
1258
|
-
},
|
|
1258
|
+
}, C = (S, E, B, j) => {
|
|
1259
1259
|
for (let A = 0; A < j; A++)
|
|
1260
1260
|
for (let R = 0; R < B; R++)
|
|
1261
|
-
d.add(
|
|
1261
|
+
d.add(f(S + A, E + R));
|
|
1262
1262
|
}, H = (S, E, B, j) => {
|
|
1263
|
-
for (let R =
|
|
1264
|
-
const je = R + K, Pe = R ===
|
|
1263
|
+
for (let R = p(S); R < 500 * K; R += K) {
|
|
1264
|
+
const je = R + K, Pe = R === p(S) ? Math.max(R, S) : R;
|
|
1265
1265
|
for (let ae = Pe; ae < je; ae++) {
|
|
1266
1266
|
const Ie = ae === S ? E : 0;
|
|
1267
1267
|
for (let re = Ie; re <= l - B; re++)
|
|
1268
|
-
if (
|
|
1268
|
+
if (g(ae, re, B, j))
|
|
1269
1269
|
return { tr: ae, tc: re };
|
|
1270
1270
|
}
|
|
1271
1271
|
}
|
|
1272
1272
|
return { tr: S, tc: E };
|
|
1273
1273
|
}, N = (S, E, B, j) => {
|
|
1274
|
-
const A =
|
|
1274
|
+
const A = p(S);
|
|
1275
1275
|
if (j < K && S + j < A + K) {
|
|
1276
|
-
|
|
1276
|
+
u = S + j, m = E;
|
|
1277
1277
|
return;
|
|
1278
1278
|
}
|
|
1279
1279
|
const R = E + B;
|
|
1280
1280
|
if (R < l) {
|
|
1281
|
-
|
|
1281
|
+
m = R, u = A;
|
|
1282
1282
|
return;
|
|
1283
1283
|
}
|
|
1284
|
-
|
|
1284
|
+
m = 0, u = A + K;
|
|
1285
1285
|
};
|
|
1286
1286
|
for (const S of o) {
|
|
1287
1287
|
const E = S.span === 0 ? l : S.span, B = ve(S.item);
|
|
1288
|
-
S.item.form?.rowBreak &&
|
|
1289
|
-
let { tr: j, tc: A } =
|
|
1290
|
-
|
|
1288
|
+
S.item.form?.rowBreak && c.length && (m = 0, u = p(u) + K);
|
|
1289
|
+
let { tr: j, tc: A } = g(u, m, E, B) ? { tr: u, tc: m } : H(u, m, E, B);
|
|
1290
|
+
g(j, A, E, B) || ({ tr: j, tc: A } = H(0, 0, E, B)), C(j, A, E, B);
|
|
1291
1291
|
const R = j + 1;
|
|
1292
|
-
|
|
1292
|
+
c.push({
|
|
1293
1293
|
...S,
|
|
1294
1294
|
span: E,
|
|
1295
1295
|
colSpan: E,
|
|
@@ -1299,7 +1299,7 @@ const fe = (e) => {
|
|
|
1299
1299
|
gridBand: ie({ gridRow: R })
|
|
1300
1300
|
}), N(j, A, E, B);
|
|
1301
1301
|
}
|
|
1302
|
-
return { cells:
|
|
1302
|
+
return { cells: c, maxSpan: l };
|
|
1303
1303
|
}, kt = (e) => e.map((a) => a.item?.show?.form), vt = (e, a, l) => {
|
|
1304
1304
|
if (!e.rules) return;
|
|
1305
1305
|
const t = typeof e.rules == "boolean" ? [
|
|
@@ -1321,14 +1321,14 @@ const fe = (e) => {
|
|
|
1321
1321
|
return t;
|
|
1322
1322
|
}), Ct = (e) => Re((a) => {
|
|
1323
1323
|
const l = {
|
|
1324
|
-
input:
|
|
1325
|
-
select:
|
|
1324
|
+
input: w.tCurd("placeholderInput"),
|
|
1325
|
+
select: w.tCurd("placeholderSelect")
|
|
1326
1326
|
}, t = (l[te(a) || "input"] || l.input) + a.label;
|
|
1327
1327
|
return (e?.error || P.error.callback)?.(a.key, a) || t;
|
|
1328
1328
|
}), xt = (e, a, l) => {
|
|
1329
1329
|
const t = {}, i = {}, n = a?.maxSpan || 12, o = a?.defaultSpan || n / 2, d = Ct(a);
|
|
1330
|
-
e.forEach((
|
|
1331
|
-
const { cells:
|
|
1330
|
+
e.forEach((m) => me(m, !0)), Te(e, t, i, (m) => d(m, l));
|
|
1331
|
+
const { cells: c, maxSpan: u } = Ae(e, {
|
|
1332
1332
|
maxSpan: n,
|
|
1333
1333
|
defaultSpan: o,
|
|
1334
1334
|
layout: a?.layout
|
|
@@ -1336,9 +1336,9 @@ const fe = (e) => {
|
|
|
1336
1336
|
return {
|
|
1337
1337
|
formDefault: t,
|
|
1338
1338
|
rules: i,
|
|
1339
|
-
formGrid:
|
|
1340
|
-
formMaxSpan:
|
|
1341
|
-
formColumn: Ue(
|
|
1339
|
+
formGrid: c,
|
|
1340
|
+
formMaxSpan: u,
|
|
1341
|
+
formColumn: Ue(c)
|
|
1342
1342
|
};
|
|
1343
1343
|
}, Te = (e, a, l, t) => {
|
|
1344
1344
|
const i = (n) => {
|
|
@@ -1369,57 +1369,57 @@ const fe = (e) => {
|
|
|
1369
1369
|
},
|
|
1370
1370
|
setup(e) {
|
|
1371
1371
|
const a = z.isFun, l = e, t = Z(
|
|
1372
|
-
() => l.formGrid.filter((
|
|
1372
|
+
() => l.formGrid.filter((f) => a(f.item.show?.form, l.form, l.type))
|
|
1373
1373
|
), i = Z(() => {
|
|
1374
|
-
const
|
|
1374
|
+
const f = Array.from(
|
|
1375
1375
|
new Set(
|
|
1376
|
-
t.value.map((
|
|
1376
|
+
t.value.map((g) => g.gridBand ?? ie(g))
|
|
1377
1377
|
)
|
|
1378
|
-
).sort((
|
|
1379
|
-
return new Map(
|
|
1378
|
+
).sort((g, C) => g - C);
|
|
1379
|
+
return new Map(f.map((g, C) => [g, C]));
|
|
1380
1380
|
}), n = Z(() => ({
|
|
1381
1381
|
gridTemplateColumns: `repeat(${l.maxSpan}, minmax(0, 1fr))`
|
|
1382
1382
|
})), o = Z(() => {
|
|
1383
|
-
let
|
|
1384
|
-
return t.value.forEach((
|
|
1385
|
-
const
|
|
1386
|
-
|
|
1387
|
-
}),
|
|
1388
|
-
}), d = (
|
|
1389
|
-
const
|
|
1390
|
-
return i.value.get(
|
|
1391
|
-
},
|
|
1383
|
+
let f = 0;
|
|
1384
|
+
return t.value.forEach((g) => {
|
|
1385
|
+
const C = g.gridRow + g.rowSpan - 1;
|
|
1386
|
+
C > f && (f = C);
|
|
1387
|
+
}), f;
|
|
1388
|
+
}), d = (f) => f.gridRow + f.rowSpan - 1 >= o.value, c = (f) => f.rowSpan >= K, u = (f) => {
|
|
1389
|
+
const g = f.gridBand ?? ie(f);
|
|
1390
|
+
return i.value.get(g) ?? g;
|
|
1391
|
+
}, m = (f) => Fe(f, l.formGrid, l.form, l.type, {
|
|
1392
1392
|
maxSpan: l.maxSpan,
|
|
1393
1393
|
defaultSpan: l.formOption?.defaultSpan
|
|
1394
|
-
}),
|
|
1395
|
-
const
|
|
1394
|
+
}), p = (f) => {
|
|
1395
|
+
const g = m(f) || f.colSpan;
|
|
1396
1396
|
return {
|
|
1397
|
-
gridRow: `${
|
|
1398
|
-
gridColumn: `${
|
|
1397
|
+
gridRow: `${f.gridRow} / span ${f.rowSpan}`,
|
|
1398
|
+
gridColumn: `${f.gridColumn} / span ${g}`
|
|
1399
1399
|
};
|
|
1400
1400
|
};
|
|
1401
|
-
return (
|
|
1402
|
-
|
|
1401
|
+
return (f, g) => r(a)(r(kt)(e.formGrid), e.form, e.type) ? (s(), y(F, { key: 0 }, [
|
|
1402
|
+
x(f.$slots, "form-start", { row: e.form }),
|
|
1403
1403
|
M("div", {
|
|
1404
1404
|
class: I(["curd-form-grid", { stripe: e.stripe !== !1 }]),
|
|
1405
1405
|
style: ce(n.value)
|
|
1406
1406
|
}, [
|
|
1407
|
-
(s(!0), y(F, null, L(t.value, (
|
|
1408
|
-
key:
|
|
1407
|
+
(s(!0), y(F, null, L(t.value, (C) => (s(), y("div", {
|
|
1408
|
+
key: C.item.key,
|
|
1409
1409
|
class: I(["curd-form-grid-cell", [
|
|
1410
|
-
e.stripe !== !1 &&
|
|
1411
|
-
|
|
1412
|
-
e.stripe !== !1 && d(
|
|
1413
|
-
|
|
1414
|
-
`form-item-col-${
|
|
1410
|
+
e.stripe !== !1 && u(C) % 2 === 0 ? "stripe-band-odd" : "",
|
|
1411
|
+
C.gridColumn > 1 ? "has-col-border" : "",
|
|
1412
|
+
e.stripe !== !1 && d(C) ? "is-last-row" : "",
|
|
1413
|
+
c(C) ? "is-row-span" : "",
|
|
1414
|
+
`form-item-col-${C.item.key}`
|
|
1415
1415
|
]]),
|
|
1416
|
-
style: ce(
|
|
1416
|
+
style: ce(p(C))
|
|
1417
1417
|
}, [
|
|
1418
1418
|
M("div", Vt, [
|
|
1419
|
-
r(a)(
|
|
1419
|
+
r(a)(C.item.show?.form, e.form, e.type) ? (s(), h(mt, {
|
|
1420
1420
|
key: 0,
|
|
1421
|
-
class: I({ "is-row-span-field":
|
|
1422
|
-
item:
|
|
1421
|
+
class: I({ "is-row-span-field": c(C) }),
|
|
1422
|
+
item: C.item,
|
|
1423
1423
|
form: e.form,
|
|
1424
1424
|
type: e.type,
|
|
1425
1425
|
"label-width": e.labelWidth,
|
|
@@ -1427,17 +1427,17 @@ const fe = (e) => {
|
|
|
1427
1427
|
"get-on": e.getOn,
|
|
1428
1428
|
"get-disabled": e.getDisabled
|
|
1429
1429
|
}, J({ _: 2 }, [
|
|
1430
|
-
L(
|
|
1430
|
+
L(f.$slots, (H, N) => ({
|
|
1431
1431
|
name: N,
|
|
1432
1432
|
fn: b((S) => [
|
|
1433
|
-
|
|
1433
|
+
x(f.$slots, N, k({ ref_for: !0 }, S || {}))
|
|
1434
1434
|
])
|
|
1435
1435
|
}))
|
|
1436
1436
|
]), 1032, ["class", "item", "form", "type", "label-width", "get-bind", "get-on", "get-disabled"])) : v("", !0)
|
|
1437
1437
|
])
|
|
1438
1438
|
], 6))), 128))
|
|
1439
1439
|
], 6),
|
|
1440
|
-
|
|
1440
|
+
x(f.$slots, "form-end", { row: e.form })
|
|
1441
1441
|
], 64)) : v("", !0);
|
|
1442
1442
|
}
|
|
1443
1443
|
}), St = /* @__PURE__ */ G({
|
|
@@ -1472,23 +1472,23 @@ const fe = (e) => {
|
|
|
1472
1472
|
get form() {
|
|
1473
1473
|
return n.get();
|
|
1474
1474
|
},
|
|
1475
|
-
set form(
|
|
1476
|
-
n.set(
|
|
1475
|
+
set form(c) {
|
|
1476
|
+
n.set(c);
|
|
1477
1477
|
},
|
|
1478
|
-
getDisabled: (
|
|
1479
|
-
getBind: (
|
|
1480
|
-
getOn: (
|
|
1478
|
+
getDisabled: (c) => De(c, d.type, d.form),
|
|
1479
|
+
getBind: (c) => Oe(c, d.type),
|
|
1480
|
+
getOn: (c) => Me(c, d.type, [d.form, c]),
|
|
1481
1481
|
initColumnForm: () => {
|
|
1482
|
-
const
|
|
1483
|
-
d.formDefault =
|
|
1482
|
+
const c = n, u = xt(i.option.column, i.option.form, c.get());
|
|
1483
|
+
d.formDefault = u.formDefault, d.rules = u.rules, d.formGrid = u.formGrid, d.formMaxSpan = u.formMaxSpan, d.formColumn = u.formColumn, d.type === l.Add ? c.isExternal() ? c.merge(JSONUtil.cp(d.formDefault)) : c.set(JSONUtil.cp(d.formDefault)) : !c.isExternal() && i.form && c.set(JSONUtil.cp(i.form));
|
|
1484
1484
|
}
|
|
1485
1485
|
});
|
|
1486
1486
|
return i.option.form?.initStart?.(d), d.initColumnForm(), i.option.form?.initEnd?.(d), et(
|
|
1487
1487
|
() => i.form,
|
|
1488
|
-
(
|
|
1489
|
-
n = fe(
|
|
1488
|
+
(c) => {
|
|
1489
|
+
n = fe(c), d.initColumnForm();
|
|
1490
1490
|
}
|
|
1491
|
-
), a({ ref: t, conf: d }), (
|
|
1491
|
+
), a({ ref: t, conf: d }), (c, u) => (s(), h(r(Y), {
|
|
1492
1492
|
ref_key: "ruleFormRef",
|
|
1493
1493
|
ref: t,
|
|
1494
1494
|
model: d.form,
|
|
@@ -1508,10 +1508,10 @@ const fe = (e) => {
|
|
|
1508
1508
|
"get-on": d.getOn,
|
|
1509
1509
|
"get-disabled": d.getDisabled
|
|
1510
1510
|
}, J({ _: 2 }, [
|
|
1511
|
-
L(
|
|
1512
|
-
name:
|
|
1513
|
-
fn: b((
|
|
1514
|
-
|
|
1511
|
+
L(c.$slots, (m, p) => ({
|
|
1512
|
+
name: p,
|
|
1513
|
+
fn: b((f) => [
|
|
1514
|
+
x(c.$slots, p, pe(we(f || {})))
|
|
1515
1515
|
])
|
|
1516
1516
|
}))
|
|
1517
1517
|
]), 1032, ["form-grid", "max-span", "form", "type", "stripe", "label-width", "form-option", "get-bind", "get-on", "get-disabled"])) : v("", !0)
|
|
@@ -1556,7 +1556,7 @@ const fe = (e) => {
|
|
|
1556
1556
|
l.set(t);
|
|
1557
1557
|
},
|
|
1558
1558
|
formDefault: {},
|
|
1559
|
-
getPlaceholder: (t, i =
|
|
1559
|
+
getPlaceholder: (t, i = w.tCurd("placeholderInput")) => t.text?.search?.placeholder === void 0 ? `${i}${t.label}` : t.text?.search?.placeholder,
|
|
1560
1560
|
getFormData: () => {
|
|
1561
1561
|
const t = e();
|
|
1562
1562
|
let i = {};
|
|
@@ -1656,20 +1656,20 @@ const fe = (e) => {
|
|
|
1656
1656
|
await t.initApiData("init");
|
|
1657
1657
|
let o = {};
|
|
1658
1658
|
if (t.table.sort.prop) {
|
|
1659
|
-
const { props:
|
|
1659
|
+
const { props: C, order: H } = U.config.table.sort;
|
|
1660
1660
|
o = {
|
|
1661
|
-
[
|
|
1661
|
+
[C.field]: t.table.sort.prop,
|
|
1662
1662
|
[H.field]: t.table.sort.order
|
|
1663
1663
|
};
|
|
1664
1664
|
}
|
|
1665
1665
|
const d = await i({
|
|
1666
1666
|
...t.page.getQuery(),
|
|
1667
1667
|
...o
|
|
1668
|
-
}),
|
|
1669
|
-
const S =
|
|
1668
|
+
}), c = U.config.field.result, u = d.data || { [c.list]: d }, m = (Array.isArray(u[c.list]), u[c.list]), p = Be(t.update.formGrid?.length ? t.update.formGrid : t.update.formColumn), g = ObjectUtil.deepMerge({ data: m }, {}).data.map((C) => (Object.keys(C).forEach((N) => {
|
|
1669
|
+
const S = p.find((E) => E.item.key === N);
|
|
1670
1670
|
S && ["select", "radio"].includes(S.item.type) && (S.item.table.format || (S.item.table.format = (E) => S.item.options[S.item.type].data?.find((B) => B.value == E[N])?.label || E[N]));
|
|
1671
|
-
}),
|
|
1672
|
-
t.table.data = a.option.data ? await a.option.data(
|
|
1671
|
+
}), C));
|
|
1672
|
+
t.table.data = a.option.data ? await a.option.data(g, m) : g, t.page.total = u[c.total] || 0, setTimeout(() => {
|
|
1673
1673
|
t.table.selection.setList(n);
|
|
1674
1674
|
}, 20);
|
|
1675
1675
|
} catch (o) {
|
|
@@ -1688,29 +1688,29 @@ const fe = (e) => {
|
|
|
1688
1688
|
n.table.selection.list = [];
|
|
1689
1689
|
const o = l.tableRef.value;
|
|
1690
1690
|
if (o?.clearSelection(), !o || !t?.length) return;
|
|
1691
|
-
const d = a.option.table?.rowKey,
|
|
1692
|
-
const
|
|
1693
|
-
for (const
|
|
1691
|
+
const d = a.option.table?.rowKey, c = (u) => {
|
|
1692
|
+
const m = (p) => {
|
|
1693
|
+
for (const f of p) {
|
|
1694
1694
|
if (d != null && d !== "") {
|
|
1695
|
-
if (
|
|
1696
|
-
} else if (
|
|
1697
|
-
return
|
|
1698
|
-
if (Array.isArray(
|
|
1699
|
-
const
|
|
1700
|
-
if (
|
|
1695
|
+
if (f[d] === u[d]) return f;
|
|
1696
|
+
} else if (f === u)
|
|
1697
|
+
return f;
|
|
1698
|
+
if (Array.isArray(f.children) && f.children.length) {
|
|
1699
|
+
const g = m(f.children);
|
|
1700
|
+
if (g !== void 0) return g;
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
1703
|
};
|
|
1704
|
-
return
|
|
1704
|
+
return m(n.table.data);
|
|
1705
1705
|
};
|
|
1706
|
-
t.forEach((
|
|
1707
|
-
const
|
|
1708
|
-
if (
|
|
1706
|
+
t.forEach((u) => {
|
|
1707
|
+
const m = c(u);
|
|
1708
|
+
if (m)
|
|
1709
1709
|
if (i) {
|
|
1710
|
-
const
|
|
1711
|
-
i(
|
|
1710
|
+
const p = () => o.toggleRowSelection(m, !0, !1);
|
|
1711
|
+
i(u) !== !1 && p();
|
|
1712
1712
|
} else
|
|
1713
|
-
o.toggleRowSelection(
|
|
1713
|
+
o.toggleRowSelection(m, !0, !1);
|
|
1714
1714
|
});
|
|
1715
1715
|
}
|
|
1716
1716
|
},
|
|
@@ -1740,11 +1740,11 @@ class Ot {
|
|
|
1740
1740
|
*/
|
|
1741
1741
|
static exportToExcel = async (a, l, t) => {
|
|
1742
1742
|
if (!a || a.length === 0) return;
|
|
1743
|
-
const i = await z.loadModule("xlsx"), n = a.map((
|
|
1744
|
-
const
|
|
1745
|
-
return l.forEach((
|
|
1746
|
-
|
|
1747
|
-
}),
|
|
1743
|
+
const i = await z.loadModule("xlsx"), n = a.map((c) => {
|
|
1744
|
+
const u = {};
|
|
1745
|
+
return l.forEach((m) => {
|
|
1746
|
+
u[m.label] = c[m.key];
|
|
1747
|
+
}), u;
|
|
1748
1748
|
}), o = i.utils.json_to_sheet(n), d = i.utils.book_new();
|
|
1749
1749
|
i.utils.book_append_sheet(d, o, "Sheet1"), t ? typeof t == "function" && (t = t()) : t = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, i.writeFile(d, `${t}.xlsx`);
|
|
1750
1750
|
};
|
|
@@ -1769,7 +1769,7 @@ const Mt = (e, a) => ({
|
|
|
1769
1769
|
return;
|
|
1770
1770
|
}
|
|
1771
1771
|
if (l.table.selection.list.length === 0)
|
|
1772
|
-
throw z.fail(
|
|
1772
|
+
throw z.fail(w.tCurd("selectDataToExport")), new Error(w.tCurd("selectDataToExport"));
|
|
1773
1773
|
return l.table.selection.list;
|
|
1774
1774
|
} catch (t) {
|
|
1775
1775
|
console.error(t);
|
|
@@ -1788,7 +1788,7 @@ const Mt = (e, a) => ({
|
|
|
1788
1788
|
return;
|
|
1789
1789
|
}
|
|
1790
1790
|
if (l.table.data.length === 0)
|
|
1791
|
-
throw z.fail(
|
|
1791
|
+
throw z.fail(w.tCurd("noData")), new Error(w.tCurd("noData"));
|
|
1792
1792
|
return l.table.data;
|
|
1793
1793
|
} catch (t) {
|
|
1794
1794
|
console.error(t);
|
|
@@ -1825,7 +1825,7 @@ const Mt = (e, a) => ({
|
|
|
1825
1825
|
}
|
|
1826
1826
|
}), Ft = (e, a) => ({
|
|
1827
1827
|
remove: {
|
|
1828
|
-
title:
|
|
1828
|
+
title: w.tCurd("deleteTitle"),
|
|
1829
1829
|
show: !1,
|
|
1830
1830
|
items: [],
|
|
1831
1831
|
loading: !1,
|
|
@@ -1834,7 +1834,7 @@ const Mt = (e, a) => ({
|
|
|
1834
1834
|
},
|
|
1835
1835
|
open: (l) => {
|
|
1836
1836
|
if (l.length === 0) {
|
|
1837
|
-
z.fail(
|
|
1837
|
+
z.fail(w.tCurd("selectDataToDelete"));
|
|
1838
1838
|
return;
|
|
1839
1839
|
}
|
|
1840
1840
|
const t = e();
|
|
@@ -1850,7 +1850,7 @@ const Mt = (e, a) => ({
|
|
|
1850
1850
|
await t({
|
|
1851
1851
|
[a.option.table?.rowKey]: l.remove.items.map((i) => i[a.option.table?.rowKey]),
|
|
1852
1852
|
items: l.remove.items
|
|
1853
|
-
}), z.success(
|
|
1853
|
+
}), z.success(w.tCurd("operationSuccess")), l.table.data.length <= 1 && l.page.num > 1 && (l.page.num -= 1), l.remove.close(), await l.table.getList();
|
|
1854
1854
|
} catch (i) {
|
|
1855
1855
|
console.error(i);
|
|
1856
1856
|
} finally {
|
|
@@ -1875,30 +1875,30 @@ const Mt = (e, a) => ({
|
|
|
1875
1875
|
initApiData: async (t) => {
|
|
1876
1876
|
const i = e(), n = [], o = (d) => {
|
|
1877
1877
|
if (d.children?.length) {
|
|
1878
|
-
d.children.forEach((
|
|
1878
|
+
d.children.forEach((u) => o(u));
|
|
1879
1879
|
return;
|
|
1880
1880
|
}
|
|
1881
|
-
const
|
|
1882
|
-
if (d.options?.[
|
|
1883
|
-
if (i.apiDataMap[d.key] && d.options?.[
|
|
1884
|
-
const
|
|
1881
|
+
const c = te(d);
|
|
1882
|
+
if (d.options?.[c]?.dataApi && d.options?.[c]?.dataApiConfig?.[t]) {
|
|
1883
|
+
if (i.apiDataMap[d.key] && d.options?.[c]?.dataApiConfig?.once) return;
|
|
1884
|
+
const u = (async () => {
|
|
1885
1885
|
try {
|
|
1886
|
-
let
|
|
1887
|
-
if (
|
|
1888
|
-
const
|
|
1889
|
-
!Array.isArray(
|
|
1886
|
+
let m = await d.options?.[c]?.dataApi?.(i.update.form, i.update.type);
|
|
1887
|
+
if (m) {
|
|
1888
|
+
const p = d.options?.[c]?.dataPath;
|
|
1889
|
+
!Array.isArray(m) && p && (m = ObjectUtil.getPathValue(m, p)), d.options[c].data = m, d.options.search[c].data = m, d.options.search[d.options.search.type ?? c] || (d.options.search[d.options.search.type ?? c] = {}), d.options.search[d.options.search.type ?? c].data = m, d.options.formAdd[c].data = m, d.options.formUpdate[c].data = m, i.apiDataMap[d.key] = m;
|
|
1890
1890
|
}
|
|
1891
1891
|
} catch {
|
|
1892
1892
|
}
|
|
1893
1893
|
})();
|
|
1894
|
-
n.push(
|
|
1894
|
+
n.push(u);
|
|
1895
1895
|
}
|
|
1896
1896
|
};
|
|
1897
1897
|
return a.option.column.forEach((d) => o(d)), await Promise.all(n), !0;
|
|
1898
1898
|
},
|
|
1899
1899
|
initCurdConfig: () => {
|
|
1900
1900
|
const t = ObjectUtil.deepMerge(U.config, {});
|
|
1901
|
-
t.table.emptyText =
|
|
1901
|
+
t.table.emptyText = w.tCurd("noData"), a.option.size = a.option.size || {}, t.table.size = a.option.size.table || t.size.table, t.form.size = a.option.size.form || t.size.form, t.size.search = a.option.size.search || t.size.search;
|
|
1902
1902
|
const i = ObjectUtil.deepMerge(t, a.option || {});
|
|
1903
1903
|
Object.keys(i).forEach((n) => {
|
|
1904
1904
|
a.option[n] = i[n];
|
|
@@ -1910,8 +1910,8 @@ const Mt = (e, a) => ({
|
|
|
1910
1910
|
i.options = ObjectUtil.deepMerge(
|
|
1911
1911
|
{
|
|
1912
1912
|
switch: {
|
|
1913
|
-
activeText:
|
|
1914
|
-
inactiveText:
|
|
1913
|
+
activeText: w.tCurd("switchOn"),
|
|
1914
|
+
inactiveText: w.tCurd("switchOff")
|
|
1915
1915
|
}
|
|
1916
1916
|
},
|
|
1917
1917
|
i.options
|
|
@@ -1921,37 +1921,37 @@ const Mt = (e, a) => ({
|
|
|
1921
1921
|
for (const u in i) {
|
|
1922
1922
|
if (u === "table") {
|
|
1923
1923
|
if (o.table = ObjectUtil.deepMerge(i.table, o.table || {}), o.children) {
|
|
1924
|
-
o.children.forEach((
|
|
1924
|
+
o.children.forEach((m) => n(m));
|
|
1925
1925
|
return;
|
|
1926
1926
|
}
|
|
1927
1927
|
} else u === "type" ? o.type = o.type || i.type : o[u] = ObjectUtil.deepMerge(i[u], o[u] || {});
|
|
1928
|
-
o.options = o.options || {}, o.options[d] = o.options[d] || {}, o.options[d].size = a.option.size.form
|
|
1929
|
-
o.options[c] = o.options[c] || ObjectUtil.deepMerge(o.options, {}), o.options[c][d] = o.options[c][d] || {}, o.options[c][d].size = c === "search" ? a.option.size.search : a.option.size.form;
|
|
1930
|
-
}), o.table = ObjectUtil.deepMerge(o.table, o.options[d].table || {});
|
|
1928
|
+
o.options = o.options || {}, o.options[d] = o.options[d] || {}, o.options[d].size = a.option.size.form;
|
|
1931
1929
|
}
|
|
1932
|
-
|
|
1933
|
-
|
|
1930
|
+
["search", "formAdd", "formUpdate"].forEach((u) => {
|
|
1931
|
+
o.options[u] = ObjectUtil.deepMerge(o.options, o.options[u] || {}), u === "search" ? a.option.size.search && (o.options[u][d].size = a.option.size.search) : a.option.size.form && (o.options[u][d].size = a.option.size.form);
|
|
1932
|
+
}), o.table = ObjectUtil.deepMerge(o.table, o.options[d].table || {}), d === "switch" && (o.options.switch.tableBeforeChange = async (u, m) => {
|
|
1933
|
+
const p = o.options?.switch;
|
|
1934
1934
|
try {
|
|
1935
|
-
|
|
1936
|
-
title:
|
|
1937
|
-
content:
|
|
1935
|
+
p.tableConfig?.confirm && await l.switchConfirmRef.value?.open({
|
|
1936
|
+
title: w.tCurd("confirmModify"),
|
|
1937
|
+
content: w.tCurd("confirmSwitchMessage")
|
|
1938
1938
|
});
|
|
1939
1939
|
try {
|
|
1940
|
-
if (!a.option.api.update && !
|
|
1941
|
-
const
|
|
1942
|
-
|
|
1943
|
-
const g =
|
|
1944
|
-
if (!
|
|
1940
|
+
if (!a.option.api.update && !p.tableConfig?.api) return;
|
|
1941
|
+
const f = m[a.option.table?.rowKey];
|
|
1942
|
+
p.loadingMap || (p.loadingMap = {}), p.loadingMap[f] || (p.loadingMap[f] = { loading: !1 }), p.loadingMap[f].loading = !0;
|
|
1943
|
+
const g = m[u] === p.activeValue ? p.inactiveValue : p.activeValue, C = p.tableConfig?.api ? p.tableConfig.api : a.option.api.update;
|
|
1944
|
+
if (!C) return;
|
|
1945
1945
|
try {
|
|
1946
|
-
await
|
|
1946
|
+
await C({ ...m, [u]: g }, "switch");
|
|
1947
1947
|
} catch {
|
|
1948
1948
|
return !1;
|
|
1949
1949
|
} finally {
|
|
1950
|
-
|
|
1950
|
+
p.loadingMap[f].loading = !1;
|
|
1951
1951
|
}
|
|
1952
|
-
return z.success(
|
|
1953
|
-
} catch (
|
|
1954
|
-
return console.error(
|
|
1952
|
+
return z.success(w.tCurd("operationSuccess")), p.tableConfig?.loadList && (t.table.loading = !0, t.table.getList(), t.table.loading = !1), !0;
|
|
1953
|
+
} catch (f) {
|
|
1954
|
+
return console.error(f), !1;
|
|
1955
1955
|
} finally {
|
|
1956
1956
|
t.table.loading = !1;
|
|
1957
1957
|
}
|
|
@@ -1965,38 +1965,38 @@ const Mt = (e, a) => ({
|
|
|
1965
1965
|
initColumnForm: () => {
|
|
1966
1966
|
const t = e(), i = a.option;
|
|
1967
1967
|
t.update.formColumn = [], t.update.formGrid = [], t.update.formMaxSpan = 12, t.table.column.show = { list: [], listSource: [] };
|
|
1968
|
-
const n = a.option.form?.maxSpan || 12, o = a.option.form?.defaultSpan || n / 2, d = Re((
|
|
1969
|
-
const
|
|
1970
|
-
input:
|
|
1971
|
-
select:
|
|
1972
|
-
},
|
|
1973
|
-
return (a.option.form?.error || P.error.callback)?.(
|
|
1974
|
-
}),
|
|
1975
|
-
if (
|
|
1976
|
-
t.table.column.show.list.push(
|
|
1968
|
+
const n = a.option.form?.maxSpan || 12, o = a.option.form?.defaultSpan || n / 2, d = Re((f) => {
|
|
1969
|
+
const g = {
|
|
1970
|
+
input: w.tCurd("placeholderInput"),
|
|
1971
|
+
select: w.tCurd("placeholderSelect")
|
|
1972
|
+
}, C = (g[te(f) || "input"] || g.input) + f.label;
|
|
1973
|
+
return (a.option.form?.error || P.error.callback)?.(f.key, f) || C;
|
|
1974
|
+
}), c = (f) => {
|
|
1975
|
+
if (f.children) {
|
|
1976
|
+
t.table.column.show.list.push(f.key), f.children.forEach((g) => c(g));
|
|
1977
1977
|
return;
|
|
1978
1978
|
}
|
|
1979
|
-
t.update.formDefault[
|
|
1979
|
+
t.update.formDefault[f.key] = f.value, f.table?.table && (f.show?.table && t.table.column.show.list.push(f.key), t.table.column.show.listSource.push(f.key));
|
|
1980
1980
|
};
|
|
1981
|
-
i.column.forEach((
|
|
1982
|
-
me(
|
|
1983
|
-
}), a.option.table?.column?.forEach((
|
|
1984
|
-
me(
|
|
1985
|
-
}), t.search.column.list = i.column.concat(i.table?.column || []), t.table.column.list = t.search.column.list.filter((
|
|
1986
|
-
const
|
|
1981
|
+
i.column.forEach((f) => {
|
|
1982
|
+
me(f, !0), c(f);
|
|
1983
|
+
}), a.option.table?.column?.forEach((f) => {
|
|
1984
|
+
me(f, !1), c(f);
|
|
1985
|
+
}), t.search.column.list = i.column.concat(i.table?.column || []), t.table.column.list = t.search.column.list.filter((f) => f.table?.table), t.search.column.list.sort((f, g) => f.sort?.search - g.sort?.search), t.table.column.list.sort((f, g) => f.sort?.table - g.sort?.table), t.update.rules = {}, Te(i.column, t.update.formDefault, t.update.rules, (f) => d(f, t.update.form));
|
|
1986
|
+
const u = Ae(i.column, {
|
|
1987
1987
|
maxSpan: n,
|
|
1988
1988
|
defaultSpan: o,
|
|
1989
1989
|
layout: a.option.form?.layout
|
|
1990
1990
|
});
|
|
1991
|
-
t.update.formGrid =
|
|
1992
|
-
const
|
|
1993
|
-
|
|
1994
|
-
t.search.formDefault[
|
|
1995
|
-
}), i.column.forEach((
|
|
1996
|
-
|
|
1991
|
+
t.update.formGrid = u.cells, t.update.formMaxSpan = u.maxSpan, t.update.formColumn = Ue(u.cells);
|
|
1992
|
+
const m = a.option.search?.formDefault;
|
|
1993
|
+
m && Object.keys(m).forEach((f) => {
|
|
1994
|
+
t.search.formDefault[f] = m[f];
|
|
1995
|
+
}), i.column.forEach((f) => {
|
|
1996
|
+
f.show?.search || (t.search.formDefault[f.key] = void 0);
|
|
1997
1997
|
});
|
|
1998
|
-
const
|
|
1999
|
-
Q.setValue(t.search.form,
|
|
1998
|
+
const p = ObjectUtil.deepMerge(t.search.formDefault, {});
|
|
1999
|
+
Q.setValue(t.search.form, p, !0);
|
|
2000
2000
|
}
|
|
2001
2001
|
}), Bt = (e) => {
|
|
2002
2002
|
const a = q(), l = q(), t = q(), i = { switchConfirmRef: a, ruleFormRef: l, tableRef: t }, n = () => o;
|
|
@@ -2022,39 +2022,39 @@ const Mt = (e, a) => ({
|
|
|
2022
2022
|
setup(e, { expose: a }) {
|
|
2023
2023
|
const l = q(!1), t = q("确认修改"), i = q("确认要修改状态吗?");
|
|
2024
2024
|
let n = null, o = null;
|
|
2025
|
-
const d = (
|
|
2026
|
-
n =
|
|
2027
|
-
})),
|
|
2025
|
+
const d = (m) => (m?.title && (t.value = m.title), m?.content && (i.value = m.content), l.value = !0, new Promise((p, f) => {
|
|
2026
|
+
n = p, o = f;
|
|
2027
|
+
})), c = () => {
|
|
2028
2028
|
l.value = !1, n?.(!0), n = null, o = null;
|
|
2029
|
-
},
|
|
2029
|
+
}, u = () => {
|
|
2030
2030
|
l.value = !1, o?.(new Error("用户取消操作")), n = null, o = null;
|
|
2031
2031
|
};
|
|
2032
2032
|
return a({
|
|
2033
2033
|
open: d
|
|
2034
|
-
}), (
|
|
2035
|
-
const
|
|
2034
|
+
}), (m, p) => {
|
|
2035
|
+
const f = le("el-form");
|
|
2036
2036
|
return s(), h(r(ye), {
|
|
2037
2037
|
modelValue: l.value,
|
|
2038
|
-
"onUpdate:modelValue":
|
|
2038
|
+
"onUpdate:modelValue": p[0] || (p[0] = (g) => l.value = g),
|
|
2039
2039
|
title: t.value,
|
|
2040
2040
|
"close-on-click-modal": !1,
|
|
2041
2041
|
width: "400px"
|
|
2042
2042
|
}, {
|
|
2043
2043
|
footer: b(() => [
|
|
2044
|
-
D(
|
|
2044
|
+
D(f, { size: e.size }, {
|
|
2045
2045
|
default: b(() => [
|
|
2046
2046
|
M("span", At, [
|
|
2047
|
-
D(r(T), { onClick:
|
|
2048
|
-
default: b(() => [...
|
|
2047
|
+
D(r(T), { onClick: u }, {
|
|
2048
|
+
default: b(() => [...p[1] || (p[1] = [
|
|
2049
2049
|
$("取消", -1)
|
|
2050
2050
|
])]),
|
|
2051
2051
|
_: 1
|
|
2052
2052
|
}),
|
|
2053
2053
|
D(r(T), {
|
|
2054
2054
|
type: "primary",
|
|
2055
|
-
onClick:
|
|
2055
|
+
onClick: c
|
|
2056
2056
|
}, {
|
|
2057
|
-
default: b(() => [...
|
|
2057
|
+
default: b(() => [...p[2] || (p[2] = [
|
|
2058
2058
|
$("确认", -1)
|
|
2059
2059
|
])]),
|
|
2060
2060
|
_: 1
|
|
@@ -2098,25 +2098,25 @@ const Mt = (e, a) => ({
|
|
|
2098
2098
|
a.item?.key !== void 0 && (a.conf.search.form[a.item.key] = t);
|
|
2099
2099
|
}
|
|
2100
2100
|
});
|
|
2101
|
-
return (t, i) => r(P).customComponent[e.type ?? ""]?.search ? (s(), h(X(r(P).customComponent[e.type ?? ""]?.search),
|
|
2101
|
+
return (t, i) => r(P).customComponent[e.type ?? ""]?.search ? (s(), h(X(r(P).customComponent[e.type ?? ""]?.search), k({
|
|
2102
2102
|
key: 0,
|
|
2103
2103
|
modelValue: l.value,
|
|
2104
2104
|
"onUpdate:modelValue": i[0] || (i[0] = (n) => l.value = n)
|
|
2105
|
-
}, e.item.options?.search?.[e.type ?? ""],
|
|
2105
|
+
}, e.item.options?.search?.[e.type ?? ""], V(e.item.options?.search?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue"])) : e.type === "input" ? (s(), h(r(_), k({
|
|
2106
2106
|
key: 1,
|
|
2107
2107
|
modelValue: l.value,
|
|
2108
2108
|
"onUpdate:modelValue": i[1] || (i[1] = (n) => l.value = n),
|
|
2109
2109
|
placeholder: e.conf.search.getPlaceholder(e.item),
|
|
2110
2110
|
clearable: "",
|
|
2111
2111
|
disabled: e.item.disabled?.search
|
|
2112
|
-
}, e.item.options?.search?.input || e.item.options?.input,
|
|
2112
|
+
}, e.item.options?.search?.input || e.item.options?.input, V(e.item.options?.search?.input?.on || e.item.options?.input?.on || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "switch" ? (s(), h(r(ne), k({
|
|
2113
2113
|
key: 2,
|
|
2114
2114
|
modelValue: l.value,
|
|
2115
2115
|
"onUpdate:modelValue": i[2] || (i[2] = (n) => l.value = n),
|
|
2116
|
-
placeholder: e.conf.search.getPlaceholder(e.item, r(
|
|
2116
|
+
placeholder: e.conf.search.getPlaceholder(e.item, r(w).tCurd("placeholderSelect")),
|
|
2117
2117
|
clearable: "",
|
|
2118
2118
|
disabled: e.item.disabled?.search
|
|
2119
|
-
}, e.item.options?.search?.switch || e.item.options?.switch,
|
|
2119
|
+
}, e.item.options?.search?.switch || e.item.options?.switch, V(e.item.options?.search?.switch?.on || e.item.options?.switch?.on || {})), {
|
|
2120
2120
|
default: b(() => [
|
|
2121
2121
|
(s(), h(r(ee), {
|
|
2122
2122
|
key: e.item.options?.switch?.activeValue,
|
|
@@ -2130,14 +2130,14 @@ const Mt = (e, a) => ({
|
|
|
2130
2130
|
}, null, 8, ["label", "value"]))
|
|
2131
2131
|
]),
|
|
2132
2132
|
_: 1
|
|
2133
|
-
}, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "select" ? (s(), h(r(ne),
|
|
2133
|
+
}, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "select" ? (s(), h(r(ne), k({
|
|
2134
2134
|
key: 3,
|
|
2135
2135
|
modelValue: l.value,
|
|
2136
2136
|
"onUpdate:modelValue": i[3] || (i[3] = (n) => l.value = n),
|
|
2137
|
-
placeholder: e.conf.search.getPlaceholder(e.item, r(
|
|
2137
|
+
placeholder: e.conf.search.getPlaceholder(e.item, r(w).tCurd("placeholderSelect")),
|
|
2138
2138
|
clearable: "",
|
|
2139
2139
|
disabled: e.item.disabled?.search
|
|
2140
|
-
}, e.item.options?.search?.select || e.item.options?.select,
|
|
2140
|
+
}, e.item.options?.search?.select || e.item.options?.select, V(e.item.options?.search?.select?.on || e.item.options?.select?.on || {})), {
|
|
2141
2141
|
default: b(() => [
|
|
2142
2142
|
(s(!0), y(F, null, L(e.item.options?.search?.select?.data || e.item.options?.select?.data || [], (n) => (s(), h(r(ee), {
|
|
2143
2143
|
key: n.value,
|
|
@@ -2146,12 +2146,12 @@ const Mt = (e, a) => ({
|
|
|
2146
2146
|
}, null, 8, ["label", "value"]))), 128))
|
|
2147
2147
|
]),
|
|
2148
2148
|
_: 1
|
|
2149
|
-
}, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "radio" ? (s(), h(r(xe),
|
|
2149
|
+
}, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "radio" ? (s(), h(r(xe), k({
|
|
2150
2150
|
key: 4,
|
|
2151
2151
|
modelValue: l.value,
|
|
2152
2152
|
"onUpdate:modelValue": i[4] || (i[4] = (n) => l.value = n),
|
|
2153
2153
|
disabled: e.item.disabled?.search
|
|
2154
|
-
}, e.item.options?.search?.radio || e.item.options?.radio,
|
|
2154
|
+
}, e.item.options?.search?.radio || e.item.options?.radio, V(e.item.options?.search?.radio?.on || e.item.options?.radio?.on || {})), {
|
|
2155
2155
|
default: b(() => [
|
|
2156
2156
|
(s(!0), y(F, null, L(e.item.options?.radio?.data, (n) => (s(), h(r(Ve), {
|
|
2157
2157
|
key: n.value,
|
|
@@ -2160,16 +2160,16 @@ const Mt = (e, a) => ({
|
|
|
2160
2160
|
}, null, 8, ["label", "value"]))), 128))
|
|
2161
2161
|
]),
|
|
2162
2162
|
_: 1
|
|
2163
|
-
}, 16, ["modelValue", "disabled"])) : e.type === "datetime" ? (s(), h(r(Se),
|
|
2163
|
+
}, 16, ["modelValue", "disabled"])) : e.type === "datetime" ? (s(), h(r(Se), k({
|
|
2164
2164
|
key: 5,
|
|
2165
2165
|
modelValue: l.value,
|
|
2166
2166
|
"onUpdate:modelValue": i[5] || (i[5] = (n) => l.value = n),
|
|
2167
2167
|
disabled: e.item.disabled?.search
|
|
2168
|
-
}, e.item.options?.search?.datetime || e.item.options?.datetime,
|
|
2168
|
+
}, e.item.options?.search?.datetime || e.item.options?.datetime, V(e.item.options?.search?.datetime?.on || e.item.options?.datetime?.on || {})), null, 16, ["modelValue", "disabled"])) : e.type && r(P).customComponent[e.type] ? (s(), h(X(r(P).customComponent[e.type]), k({
|
|
2169
2169
|
key: 6,
|
|
2170
2170
|
modelValue: l.value,
|
|
2171
2171
|
"onUpdate:modelValue": i[6] || (i[6] = (n) => l.value = n)
|
|
2172
|
-
}, e.item.options?.search?.[e.type] || e.item.options?.[e.type],
|
|
2172
|
+
}, e.item.options?.search?.[e.type] || e.item.options?.[e.type], V(e.item.options?.search?.[e.type]?.on || e.item.options?.[e.type]?.on || {}), {
|
|
2173
2173
|
disabled: e.item.disabled?.search
|
|
2174
2174
|
}), null, 16, ["modelValue", "disabled"])) : v("", !0);
|
|
2175
2175
|
}
|
|
@@ -2268,13 +2268,13 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2268
2268
|
key: o.key
|
|
2269
2269
|
}, [
|
|
2270
2270
|
e.conf.table.column.show.list.includes(o.key) && (o.show?.table === void 0 || r(a)(o.show?.table, e.conf.table.data)) ? (s(), y(F, { key: 0 }, [
|
|
2271
|
-
o.table?.header?.groupKey === void 0 || o.table.header.show ? (s(), h(r(ue),
|
|
2271
|
+
o.table?.header?.groupKey === void 0 || o.table.header.show ? (s(), h(r(ue), k({
|
|
2272
2272
|
key: 0,
|
|
2273
2273
|
prop: o.key,
|
|
2274
2274
|
label: o.label
|
|
2275
2275
|
}, { ref_for: !0 }, o.table), {
|
|
2276
2276
|
header: b(() => [
|
|
2277
|
-
|
|
2277
|
+
x(t.$slots, "table-header-" + o.key, { item: o }, () => [
|
|
2278
2278
|
M("div", uo, [
|
|
2279
2279
|
o.table?.header?.tooltip ? (s(), h(n, {
|
|
2280
2280
|
key: 0,
|
|
@@ -2319,10 +2319,10 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2319
2319
|
columnList: o.children,
|
|
2320
2320
|
option: e.option
|
|
2321
2321
|
}, J({ _: 2 }, [
|
|
2322
|
-
L(t.$slots, (
|
|
2323
|
-
name:
|
|
2324
|
-
fn: b((
|
|
2325
|
-
|
|
2322
|
+
L(t.$slots, (c, u) => ({
|
|
2323
|
+
name: u,
|
|
2324
|
+
fn: b((m) => [
|
|
2325
|
+
x(t.$slots, u, k({ ref_for: !0 }, m || {}))
|
|
2326
2326
|
])
|
|
2327
2327
|
}))
|
|
2328
2328
|
]), 1032, ["conf", "columnList", "option"]))
|
|
@@ -2332,17 +2332,17 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2332
2332
|
class: I(["row", ["table-edit-" + o.key]]),
|
|
2333
2333
|
style: { width: "100%" }
|
|
2334
2334
|
}, [
|
|
2335
|
-
|
|
2335
|
+
x(t.$slots, "table-edit-left-" + o.key, {
|
|
2336
2336
|
row: d,
|
|
2337
2337
|
item: o
|
|
2338
2338
|
}),
|
|
2339
|
-
o.type === "input" ? (s(), h(r(_),
|
|
2339
|
+
o.type === "input" ? (s(), h(r(_), k({
|
|
2340
2340
|
key: 0,
|
|
2341
2341
|
modelValue: d[o.key],
|
|
2342
|
-
"onUpdate:modelValue": (
|
|
2342
|
+
"onUpdate:modelValue": (c) => d[o.key] = c,
|
|
2343
2343
|
disabled: e.conf.update.getDisabled(o, !0),
|
|
2344
2344
|
class: "col"
|
|
2345
|
-
}, { ref_for: !0 }, e.conf.update.getBind(o),
|
|
2345
|
+
}, { ref_for: !0 }, e.conf.update.getBind(o), V(e.conf.update.getOn(o, d))), J({ _: 2 }, [
|
|
2346
2346
|
o.options?.input?.prepend ? {
|
|
2347
2347
|
name: "prepend",
|
|
2348
2348
|
fn: b(() => [
|
|
@@ -2350,40 +2350,40 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2350
2350
|
]),
|
|
2351
2351
|
key: "0"
|
|
2352
2352
|
} : void 0
|
|
2353
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.type === "select" ? (s(), h(r(ne),
|
|
2353
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.type === "select" ? (s(), h(r(ne), k({
|
|
2354
2354
|
key: 1,
|
|
2355
2355
|
modelValue: d[o.key],
|
|
2356
|
-
"onUpdate:modelValue": (
|
|
2356
|
+
"onUpdate:modelValue": (c) => d[o.key] = c,
|
|
2357
2357
|
disabled: e.conf.update.getDisabled(o, !0),
|
|
2358
2358
|
class: "col"
|
|
2359
|
-
}, { ref_for: !0 }, e.conf.update.getBind(o),
|
|
2359
|
+
}, { ref_for: !0 }, e.conf.update.getBind(o), V(e.conf.update.getOn(o, d))), {
|
|
2360
2360
|
default: b(() => [
|
|
2361
|
-
(s(!0), y(F, null, L(o.options?.search?.select?.data || o.options?.select?.data, (
|
|
2362
|
-
key:
|
|
2363
|
-
label:
|
|
2364
|
-
value:
|
|
2361
|
+
(s(!0), y(F, null, L(o.options?.search?.select?.data || o.options?.select?.data, (c) => (s(), h(r(ee), {
|
|
2362
|
+
key: c.value,
|
|
2363
|
+
label: c.label,
|
|
2364
|
+
value: c.value
|
|
2365
2365
|
}, null, 8, ["label", "value"]))), 128))
|
|
2366
2366
|
]),
|
|
2367
2367
|
_: 2
|
|
2368
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.type === "switch" ? (s(), h(r(se),
|
|
2368
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.type === "switch" ? (s(), h(r(se), k({
|
|
2369
2369
|
key: 2,
|
|
2370
2370
|
modelValue: d[o.key],
|
|
2371
|
-
"onUpdate:modelValue": (
|
|
2371
|
+
"onUpdate:modelValue": (c) => d[o.key] = c,
|
|
2372
2372
|
disabled: e.conf.update.getDisabled(o, !0),
|
|
2373
2373
|
class: "col"
|
|
2374
|
-
}, { ref_for: !0 }, e.conf.update.getBind(o),
|
|
2375
|
-
|
|
2374
|
+
}, { ref_for: !0 }, e.conf.update.getBind(o), V(e.conf.update.getOn(o, d))), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0),
|
|
2375
|
+
x(t.$slots, "table-edit-right-" + o.key, {
|
|
2376
2376
|
row: d,
|
|
2377
2377
|
item: o
|
|
2378
2378
|
})
|
|
2379
2379
|
], 2)) : (s(), y(F, { key: 1 }, [
|
|
2380
2380
|
e.conf.update.type === r(z).EDialog.Update && r(a)(o.show?.form, e.conf.update.form, r(z).EDialog.Update) && e.option.table?.inlineEdit && e.conf.update.form[e.option.table?.rowKey] === d[e.option.table?.rowKey] && (o.type === "input" || o.type === "select") ? (s(), y(F, { key: 0 }, [
|
|
2381
|
-
o.type === "input" ? (s(), h(r(_),
|
|
2381
|
+
o.type === "input" ? (s(), h(r(_), k({
|
|
2382
2382
|
key: 0,
|
|
2383
2383
|
modelValue: e.conf.update.form[o.key],
|
|
2384
|
-
"onUpdate:modelValue": (
|
|
2384
|
+
"onUpdate:modelValue": (c) => e.conf.update.form[o.key] = c,
|
|
2385
2385
|
disabled: e.conf.update.getDisabled(o, !0)
|
|
2386
|
-
}, { ref_for: !0 }, e.conf.update.getBind(o),
|
|
2386
|
+
}, { ref_for: !0 }, e.conf.update.getBind(o), V(e.conf.update.getOn(o, d)), { style: { width: "100%" } }), J({ _: 2 }, [
|
|
2387
2387
|
o.options?.input?.prepend ? {
|
|
2388
2388
|
name: "prepend",
|
|
2389
2389
|
fn: b(() => [
|
|
@@ -2391,41 +2391,41 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2391
2391
|
]),
|
|
2392
2392
|
key: "0"
|
|
2393
2393
|
} : void 0
|
|
2394
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.type === "select" ? (s(), h(r(ne),
|
|
2394
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.type === "select" ? (s(), h(r(ne), k({
|
|
2395
2395
|
key: 1,
|
|
2396
2396
|
modelValue: e.conf.update.form[o.key],
|
|
2397
|
-
"onUpdate:modelValue": (
|
|
2397
|
+
"onUpdate:modelValue": (c) => e.conf.update.form[o.key] = c,
|
|
2398
2398
|
disabled: e.conf.update.getDisabled(o, !0)
|
|
2399
|
-
}, { ref_for: !0 }, e.conf.update.getBind(o),
|
|
2399
|
+
}, { ref_for: !0 }, e.conf.update.getBind(o), V(e.conf.update.getOn(o, d)), { style: { width: "100%" } }), {
|
|
2400
2400
|
default: b(() => [
|
|
2401
|
-
(s(!0), y(F, null, L(o.options?.search?.select?.data || o.options?.select?.data, (
|
|
2402
|
-
key:
|
|
2403
|
-
label:
|
|
2404
|
-
value:
|
|
2401
|
+
(s(!0), y(F, null, L(o.options?.search?.select?.data || o.options?.select?.data, (c) => (s(), h(r(ee), {
|
|
2402
|
+
key: c.value,
|
|
2403
|
+
label: c.label,
|
|
2404
|
+
value: c.value
|
|
2405
2405
|
}, null, 8, ["label", "value"]))), 128))
|
|
2406
2406
|
]),
|
|
2407
2407
|
_: 2
|
|
2408
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.type === "switch" ? (s(), h(r(se),
|
|
2408
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.type === "switch" ? (s(), h(r(se), k({
|
|
2409
2409
|
key: 2,
|
|
2410
2410
|
modelValue: e.conf.update.form[o.key],
|
|
2411
|
-
"onUpdate:modelValue": (
|
|
2412
|
-
}, { ref_for: !0 }, e.conf.update.getBind(o),
|
|
2411
|
+
"onUpdate:modelValue": (c) => e.conf.update.form[o.key] = c
|
|
2412
|
+
}, { ref_for: !0 }, e.conf.update.getBind(o), V(e.conf.update.getOn(o, d)), {
|
|
2413
2413
|
disabled: e.conf.update.getDisabled(o, !0)
|
|
2414
2414
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
|
|
2415
|
-
], 64)) :
|
|
2415
|
+
], 64)) : x(t.$slots, "table-" + o.key, {
|
|
2416
2416
|
key: 1,
|
|
2417
2417
|
row: d,
|
|
2418
2418
|
item: o
|
|
2419
2419
|
}, () => [
|
|
2420
|
-
r(P).customComponent[o.type ?? ""]?.table ? (s(), h(X(r(P).customComponent[o.type ?? ""]?.table),
|
|
2420
|
+
r(P).customComponent[o.type ?? ""]?.table ? (s(), h(X(r(P).customComponent[o.type ?? ""]?.table), k({
|
|
2421
2421
|
key: 0,
|
|
2422
2422
|
modelValue: d[o.key],
|
|
2423
|
-
"onUpdate:modelValue": (
|
|
2424
|
-
}, { ref_for: !0 }, o.options?.[o.type ?? ""],
|
|
2425
|
-
o.options?.switch?.tableConfig?.change ? (s(), h(r(se),
|
|
2423
|
+
"onUpdate:modelValue": (c) => d[o.key] = c
|
|
2424
|
+
}, { ref_for: !0 }, o.options?.[o.type ?? ""], V(o.options?.[o.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : o.type === "switch" ? (s(), y(F, { key: 1 }, [
|
|
2425
|
+
o.options?.switch?.tableConfig?.change ? (s(), h(r(se), k({
|
|
2426
2426
|
key: 0,
|
|
2427
2427
|
modelValue: d[o.key],
|
|
2428
|
-
"onUpdate:modelValue": (
|
|
2428
|
+
"onUpdate:modelValue": (c) => d[o.key] = c,
|
|
2429
2429
|
loading: o.options?.switch?.loadingMap?.[d[e.option.table?.rowKey]]?.loading,
|
|
2430
2430
|
"before-change": () => o.options?.switch?.tableBeforeChange?.(o.key, d)
|
|
2431
2431
|
}, { ref_for: !0 }, o.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (s(), y("span", go, O(d[o.key] === o.options?.switch?.activeValue ? o.options?.switch?.activeText : o.options?.switch?.inactiveText), 1))
|
|
@@ -2435,7 +2435,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2435
2435
|
"--table-text-click-color": o.table?.click?.color
|
|
2436
2436
|
}),
|
|
2437
2437
|
class: I({ "table-text-click": o.table?.click?.callback }),
|
|
2438
|
-
onClick: (
|
|
2438
|
+
onClick: (c) => o.table?.click?.callback?.(d),
|
|
2439
2439
|
innerHTML: o.table?.format ? o.table?.format(d) : d[o.key]
|
|
2440
2440
|
}, null, 14, ho))
|
|
2441
2441
|
])
|
|
@@ -2483,11 +2483,11 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2483
2483
|
}
|
|
2484
2484
|
},
|
|
2485
2485
|
setup(e, { expose: a }) {
|
|
2486
|
-
const l = z.EDialog, t = e, i = z.isFun, { conf: n, switchConfirmRef: o, ruleFormRef: d, tableRef:
|
|
2486
|
+
const l = z.EDialog, t = e, i = z.isFun, { conf: n, switchConfirmRef: o, ruleFormRef: d, tableRef: c } = Bt(t);
|
|
2487
2487
|
return a({
|
|
2488
2488
|
conf: n
|
|
2489
|
-
}), (
|
|
2490
|
-
const
|
|
2489
|
+
}), (u, m) => {
|
|
2490
|
+
const p = le("el-tooltip"), f = at("loading");
|
|
2491
2491
|
return s(), y("div", {
|
|
2492
2492
|
class: I(["relative cc1-form-box", [e.option.table?.fitHeight ? "col" : "no-min-height"]])
|
|
2493
2493
|
}, [
|
|
@@ -2495,7 +2495,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2495
2495
|
class: I(["row", [e.option.table?.fitHeight ? "absolute fit" : ""]]),
|
|
2496
2496
|
style: { overflow: "hidden" }
|
|
2497
2497
|
}, [
|
|
2498
|
-
|
|
2498
|
+
x(u.$slots, "box-left"),
|
|
2499
2499
|
M("div", {
|
|
2500
2500
|
class: I(["column fit-width no-wrap", [e.option.table?.fitHeight ? "col" : ""]])
|
|
2501
2501
|
}, [
|
|
@@ -2506,49 +2506,49 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2506
2506
|
size: e.option.size?.search
|
|
2507
2507
|
}, {
|
|
2508
2508
|
default: b(() => [
|
|
2509
|
-
|
|
2509
|
+
x(u.$slots, "search-start", {
|
|
2510
2510
|
row: r(n).search.form
|
|
2511
2511
|
}),
|
|
2512
|
-
(s(!0), y(F, null, L(r(n).search.column.list, (
|
|
2513
|
-
key:
|
|
2512
|
+
(s(!0), y(F, null, L(r(n).search.column.list, (g) => (s(), y(F, {
|
|
2513
|
+
key: g.key
|
|
2514
2514
|
}, [
|
|
2515
|
-
|
|
2515
|
+
x(u.$slots, "search-" + g.key + "-start", {
|
|
2516
2516
|
row: r(n).search.form
|
|
2517
2517
|
}),
|
|
2518
|
-
(typeof
|
|
2518
|
+
(typeof g.show?.search == "function" ? g.show?.search(r(n).search.form) : g.show?.search) ? (s(), h(r(be), {
|
|
2519
2519
|
key: 0,
|
|
2520
|
-
label:
|
|
2520
|
+
label: g.text?.search?.label ?? g.label
|
|
2521
2521
|
}, {
|
|
2522
2522
|
default: b(() => [
|
|
2523
|
-
|
|
2523
|
+
x(u.$slots, "search-" + g.key + "-left", {
|
|
2524
2524
|
row: r(n).search.form
|
|
2525
2525
|
}),
|
|
2526
|
-
|
|
2526
|
+
x(u.$slots, "search-" + g.key, {
|
|
2527
2527
|
row: r(n).search.form
|
|
2528
2528
|
}, () => [
|
|
2529
|
-
|
|
2529
|
+
g.options?.search?.type ? (s(), h(Ce, {
|
|
2530
2530
|
key: 0,
|
|
2531
|
-
item:
|
|
2531
|
+
item: g,
|
|
2532
2532
|
conf: r(n),
|
|
2533
|
-
type:
|
|
2533
|
+
type: g.options.search.type
|
|
2534
2534
|
}, null, 8, ["item", "conf", "type"])) : (s(), h(Ce, {
|
|
2535
2535
|
key: 1,
|
|
2536
|
-
item:
|
|
2536
|
+
item: g,
|
|
2537
2537
|
conf: r(n),
|
|
2538
|
-
type:
|
|
2538
|
+
type: g.type
|
|
2539
2539
|
}, null, 8, ["item", "conf", "type"]))
|
|
2540
2540
|
]),
|
|
2541
|
-
|
|
2541
|
+
x(u.$slots, "search-" + g.key + "-right", {
|
|
2542
2542
|
row: r(n).search.form
|
|
2543
2543
|
})
|
|
2544
2544
|
]),
|
|
2545
2545
|
_: 2
|
|
2546
2546
|
}, 1032, ["label"])) : v("", !0),
|
|
2547
|
-
|
|
2547
|
+
x(u.$slots, "search-" + g.key + "-end", {
|
|
2548
2548
|
row: r(n).search.form
|
|
2549
2549
|
})
|
|
2550
2550
|
], 64))), 128)),
|
|
2551
|
-
|
|
2551
|
+
x(u.$slots, "search-center", {
|
|
2552
2552
|
row: r(n).search.form
|
|
2553
2553
|
}),
|
|
2554
2554
|
e.option.tools?.search || e.option.tools?.reset ? (s(), h(r(be), { key: 0 }, {
|
|
@@ -2559,7 +2559,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2559
2559
|
onClick: r(n).search.submit
|
|
2560
2560
|
}, {
|
|
2561
2561
|
default: b(() => [
|
|
2562
|
-
$(O(r(
|
|
2562
|
+
$(O(r(w).tCurd("search")), 1)
|
|
2563
2563
|
]),
|
|
2564
2564
|
_: 1
|
|
2565
2565
|
}, 8, ["onClick"])) : v("", !0),
|
|
@@ -2568,14 +2568,14 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2568
2568
|
onClick: r(n).search.reset
|
|
2569
2569
|
}, {
|
|
2570
2570
|
default: b(() => [
|
|
2571
|
-
$(O(r(
|
|
2571
|
+
$(O(r(w).tCurd("reset")), 1)
|
|
2572
2572
|
]),
|
|
2573
2573
|
_: 1
|
|
2574
2574
|
}, 8, ["onClick"])) : v("", !0)
|
|
2575
2575
|
]),
|
|
2576
2576
|
_: 1
|
|
2577
2577
|
})) : v("", !0),
|
|
2578
|
-
|
|
2578
|
+
x(u.$slots, "search-end", {
|
|
2579
2579
|
row: r(n).search.form
|
|
2580
2580
|
})
|
|
2581
2581
|
]),
|
|
@@ -2587,11 +2587,11 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2587
2587
|
r(i)(e.option.tools?.add) ? (s(), y("div", ko, [
|
|
2588
2588
|
D(r(T), {
|
|
2589
2589
|
type: "primary",
|
|
2590
|
-
onClick:
|
|
2590
|
+
onClick: m[0] || (m[0] = (g) => r(n).update.open(r(l).Add)),
|
|
2591
2591
|
size: e.option.size?.search
|
|
2592
2592
|
}, {
|
|
2593
2593
|
default: b(() => [
|
|
2594
|
-
$(O(r(
|
|
2594
|
+
$(O(r(w).tCurd("add")), 1)
|
|
2595
2595
|
]),
|
|
2596
2596
|
_: 1
|
|
2597
2597
|
}, 8, ["size"])
|
|
@@ -2599,11 +2599,11 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2599
2599
|
e.option.table?.selectable && r(i)(e.option.tools?.delete) ? (s(), y("div", vo, [
|
|
2600
2600
|
D(r(T), {
|
|
2601
2601
|
type: "danger",
|
|
2602
|
-
onClick:
|
|
2602
|
+
onClick: m[1] || (m[1] = (g) => r(n).remove.open(r(n).table.selection.list)),
|
|
2603
2603
|
size: e.option.size?.search
|
|
2604
2604
|
}, {
|
|
2605
2605
|
default: b(() => [
|
|
2606
|
-
$(O(r(
|
|
2606
|
+
$(O(r(w).tCurd("delete")), 1)
|
|
2607
2607
|
]),
|
|
2608
2608
|
_: 1
|
|
2609
2609
|
}, 8, ["size"])
|
|
@@ -2611,11 +2611,11 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2611
2611
|
e.option.tools?.expand ? (s(), y("div", Co, [
|
|
2612
2612
|
D(r(T), {
|
|
2613
2613
|
type: "warning",
|
|
2614
|
-
onClick:
|
|
2614
|
+
onClick: m[2] || (m[2] = (g) => r(n).table.expand.all()),
|
|
2615
2615
|
size: e.option.size?.search
|
|
2616
2616
|
}, {
|
|
2617
2617
|
default: b(() => [
|
|
2618
|
-
$(O(r(
|
|
2618
|
+
$(O(r(w).tCurd("expandCollapse")), 1)
|
|
2619
2619
|
]),
|
|
2620
2620
|
_: 1
|
|
2621
2621
|
}, 8, ["size"])
|
|
@@ -2635,7 +2635,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2635
2635
|
command: "select"
|
|
2636
2636
|
}, {
|
|
2637
2637
|
default: b(() => [
|
|
2638
|
-
$(O(r(
|
|
2638
|
+
$(O(r(w).tCurd("exportSelect")), 1)
|
|
2639
2639
|
]),
|
|
2640
2640
|
_: 1
|
|
2641
2641
|
})) : v("", !0),
|
|
@@ -2644,7 +2644,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2644
2644
|
command: "page"
|
|
2645
2645
|
}, {
|
|
2646
2646
|
default: b(() => [
|
|
2647
|
-
$(O(r(
|
|
2647
|
+
$(O(r(w).tCurd("exportPage")), 1)
|
|
2648
2648
|
]),
|
|
2649
2649
|
_: 1
|
|
2650
2650
|
})) : v("", !0),
|
|
@@ -2653,7 +2653,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2653
2653
|
command: "all"
|
|
2654
2654
|
}, {
|
|
2655
2655
|
default: b(() => [
|
|
2656
|
-
$(O(r(
|
|
2656
|
+
$(O(r(w).tCurd("exportAll")), 1)
|
|
2657
2657
|
]),
|
|
2658
2658
|
_: 1
|
|
2659
2659
|
})) : v("", !0)
|
|
@@ -2669,7 +2669,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2669
2669
|
size: e.option.size?.search
|
|
2670
2670
|
}, {
|
|
2671
2671
|
default: b(() => [
|
|
2672
|
-
$(O(r(
|
|
2672
|
+
$(O(r(w).tCurd("export")), 1)
|
|
2673
2673
|
]),
|
|
2674
2674
|
_: 1
|
|
2675
2675
|
}, 8, ["loading", "size"])
|
|
@@ -2681,25 +2681,25 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2681
2681
|
type: "warning",
|
|
2682
2682
|
loading: r(n).export.loading,
|
|
2683
2683
|
size: e.option.size?.search,
|
|
2684
|
-
onClick:
|
|
2684
|
+
onClick: m[3] || (m[3] = (g) => r(n).export.run.start("all"))
|
|
2685
2685
|
}, {
|
|
2686
2686
|
default: b(() => [
|
|
2687
|
-
$(O(r(
|
|
2687
|
+
$(O(r(w).tCurd("export")), 1)
|
|
2688
2688
|
]),
|
|
2689
2689
|
_: 1
|
|
2690
2690
|
}, 8, ["loading", "size"])
|
|
2691
2691
|
]))
|
|
2692
2692
|
], 64)) : v("", !0),
|
|
2693
|
-
|
|
2693
|
+
x(u.$slots, "tools-left")
|
|
2694
2694
|
]),
|
|
2695
2695
|
M("div", So, [
|
|
2696
|
-
|
|
2697
|
-
r(n).page.showTools ? (s(), h(r(ke),
|
|
2696
|
+
x(u.$slots, "tools-right"),
|
|
2697
|
+
r(n).page.showTools ? (s(), h(r(ke), k({
|
|
2698
2698
|
key: 0,
|
|
2699
2699
|
"current-page": r(n).page.num,
|
|
2700
|
-
"onUpdate:currentPage":
|
|
2700
|
+
"onUpdate:currentPage": m[4] || (m[4] = (g) => r(n).page.num = g),
|
|
2701
2701
|
"page-size": r(n).page.size,
|
|
2702
|
-
"onUpdate:pageSize":
|
|
2702
|
+
"onUpdate:pageSize": m[5] || (m[5] = (g) => r(n).page.size = g),
|
|
2703
2703
|
background: "",
|
|
2704
2704
|
"page-sizes": r(n).page.sizeList,
|
|
2705
2705
|
"pager-count": r(n).page.pagerCount,
|
|
@@ -2708,18 +2708,18 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2708
2708
|
size: e.option.size?.table,
|
|
2709
2709
|
onSizeChange: r(n).table.getList,
|
|
2710
2710
|
onCurrentChange: r(n).table.getList
|
|
2711
|
-
}, e.option.page?.pagination || {},
|
|
2712
|
-
e.option.tools?.expandColumn === void 0 || e.option.tools?.expandColumn ? (s(), h(
|
|
2711
|
+
}, e.option.page?.pagination || {}, V(e.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0),
|
|
2712
|
+
e.option.tools?.expandColumn === void 0 || e.option.tools?.expandColumn ? (s(), h(p, {
|
|
2713
2713
|
key: 1,
|
|
2714
2714
|
effect: "dark",
|
|
2715
|
-
content: r(n).table.header.group.expand ? r(
|
|
2715
|
+
content: r(n).table.header.group.expand ? r(w).tCurd("mergeColumn") : r(w).tCurd("expandColumn"),
|
|
2716
2716
|
placement: "top"
|
|
2717
2717
|
}, {
|
|
2718
2718
|
default: b(() => [
|
|
2719
2719
|
M("div", {
|
|
2720
2720
|
class: I(["refresh-btn", [e.option.size?.search]]),
|
|
2721
|
-
onClick:
|
|
2722
|
-
(...
|
|
2721
|
+
onClick: m[6] || (m[6] = //@ts-ignore
|
|
2722
|
+
(...g) => r(n).table.header.group.toggleExpandAll && r(n).table.header.group.toggleExpandAll(...g))
|
|
2723
2723
|
}, [
|
|
2724
2724
|
r(n).table.header.group.expand ? (s(), h(Kt, { key: 0 })) : (s(), h(Wt, { key: 1 }))
|
|
2725
2725
|
], 2)
|
|
@@ -2729,8 +2729,8 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2729
2729
|
e.option.tools?.refresh === void 0 || e.option.tools?.refresh ? (s(), y("div", {
|
|
2730
2730
|
key: 2,
|
|
2731
2731
|
class: I(["refresh-btn", [e.option.size?.search]]),
|
|
2732
|
-
onClick:
|
|
2733
|
-
(...
|
|
2732
|
+
onClick: m[7] || (m[7] = //@ts-ignore
|
|
2733
|
+
(...g) => r(n).table.getList && r(n).table.getList(...g))
|
|
2734
2734
|
}, [
|
|
2735
2735
|
D(Xt)
|
|
2736
2736
|
], 2)) : v("", !0)
|
|
@@ -2742,18 +2742,18 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2742
2742
|
M("div", {
|
|
2743
2743
|
class: I(["column form-box-content", [e.option.table?.fitHeight ? "absolute fit" : ""]])
|
|
2744
2744
|
}, [
|
|
2745
|
-
nt((s(), h(r(_e),
|
|
2745
|
+
nt((s(), h(r(_e), k({
|
|
2746
2746
|
ref_key: "tableRef",
|
|
2747
|
-
ref:
|
|
2747
|
+
ref: c,
|
|
2748
2748
|
data: r(n).table.data,
|
|
2749
2749
|
border: e.option.table?.border === void 0 ? !0 : e.option.table?.border,
|
|
2750
2750
|
onSelectionChange: r(n).table.selection.change,
|
|
2751
2751
|
onSortChange: r(n).table.sort.change,
|
|
2752
2752
|
"expand-row-keys": r(n).table.expand.rowKeys,
|
|
2753
2753
|
onExpandChange: r(n).table.expand.change
|
|
2754
|
-
}, e.option.table,
|
|
2754
|
+
}, e.option.table, V(e.option.table?.on || {})), {
|
|
2755
2755
|
default: b(() => [
|
|
2756
|
-
(typeof e.option.table?.selectable == "object" ? e.option.table?.selectable?.show : e.option.table?.selectable) || r(i)(e.option.tools?.delete) || e.option.tools?.export?.show && e.option.tools?.export?.select ? (s(), h(r(ue),
|
|
2756
|
+
(typeof e.option.table?.selectable == "object" ? e.option.table?.selectable?.show : e.option.table?.selectable) || r(i)(e.option.tools?.delete) || e.option.tools?.export?.show && e.option.tools?.export?.select ? (s(), h(r(ue), k({
|
|
2757
2757
|
key: 0,
|
|
2758
2758
|
type: "selection",
|
|
2759
2759
|
width: "40",
|
|
@@ -2761,8 +2761,8 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2761
2761
|
fixed: "left",
|
|
2762
2762
|
"show-overflow-tooltip": !1,
|
|
2763
2763
|
className: "cc1-form-selectable-column"
|
|
2764
|
-
}, typeof e.option.table?.selectable == "object" ? e.option.table?.selectable : {},
|
|
2765
|
-
(typeof e.option.table?.index == "object" ? e.option.table?.index?.show : e.option.table?.index) ? (s(), h(r(ue),
|
|
2764
|
+
}, typeof e.option.table?.selectable == "object" ? e.option.table?.selectable : {}, V(typeof e.option.table?.selectable == "object" ? e.option.table?.selectable?.on || {} : {})), null, 16)) : v("", !0),
|
|
2765
|
+
(typeof e.option.table?.index == "object" ? e.option.table?.index?.show : e.option.table?.index) ? (s(), h(r(ue), k({
|
|
2766
2766
|
key: 1,
|
|
2767
2767
|
type: "index",
|
|
2768
2768
|
fixed: "left",
|
|
@@ -2771,20 +2771,20 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2771
2771
|
label: "#",
|
|
2772
2772
|
"show-overflow-tooltip": !1,
|
|
2773
2773
|
className: "cc1-form-index-column"
|
|
2774
|
-
}, typeof e.option.table?.index == "object" ? e.option.table?.index : {},
|
|
2774
|
+
}, typeof e.option.table?.index == "object" ? e.option.table?.index : {}, V(typeof e.option.table?.index == "object" ? e.option.table?.index?.on || {} : {})), null, 16)) : v("", !0),
|
|
2775
2775
|
D(bo, {
|
|
2776
2776
|
conf: r(n),
|
|
2777
2777
|
columnList: r(n).table.column.list,
|
|
2778
2778
|
option: e.option
|
|
2779
2779
|
}, J({ _: 2 }, [
|
|
2780
|
-
L(
|
|
2781
|
-
name:
|
|
2780
|
+
L(u.$slots, (g, C) => ({
|
|
2781
|
+
name: C,
|
|
2782
2782
|
fn: b((H) => [
|
|
2783
|
-
|
|
2783
|
+
x(u.$slots, C, pe(we(H || {})))
|
|
2784
2784
|
])
|
|
2785
2785
|
}))
|
|
2786
2786
|
]), 1032, ["conf", "columnList", "option"]),
|
|
2787
|
-
r(i)(e.option.table?.add) || r(i)(e.option.table?.update) || r(i)(e.option.table?.delete) || r(i)(e.option.table?.view) ||
|
|
2787
|
+
r(i)(e.option.table?.add) || r(i)(e.option.table?.update) || r(i)(e.option.table?.delete) || r(i)(e.option.table?.view) || u.$slots["table-op-left"] || u.$slots["table-op-right"] ? (s(), h(r(ue), k({
|
|
2788
2788
|
key: 2,
|
|
2789
2789
|
align: "center",
|
|
2790
2790
|
fixed: "right"
|
|
@@ -2793,24 +2793,24 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2793
2793
|
"show-overflow-tooltip": !1
|
|
2794
2794
|
}), {
|
|
2795
2795
|
header: b(() => [
|
|
2796
|
-
|
|
2797
|
-
$(O(r(
|
|
2796
|
+
x(u.$slots, "table-header-op", {}, () => [
|
|
2797
|
+
$(O(r(w).tCurd("operation")), 1)
|
|
2798
2798
|
])
|
|
2799
2799
|
]),
|
|
2800
|
-
default: b(({ row:
|
|
2800
|
+
default: b(({ row: g }) => [
|
|
2801
2801
|
D(r(Y), {
|
|
2802
2802
|
size: e.option.size?.table
|
|
2803
2803
|
}, {
|
|
2804
2804
|
default: b(() => [
|
|
2805
|
-
|
|
2806
|
-
r(n).update.type === r(l).Update && e.option.table?.inlineEdit && r(n).update.form[t.option.table?.rowKey] ===
|
|
2805
|
+
x(u.$slots, "table-op-left", { row: g }),
|
|
2806
|
+
r(n).update.type === r(l).Update && e.option.table?.inlineEdit && r(n).update.form[t.option.table?.rowKey] === g[t.option.table?.rowKey] ? (s(), y(F, { key: 0 }, [
|
|
2807
2807
|
D(r(T), {
|
|
2808
2808
|
link: "",
|
|
2809
2809
|
type: "info",
|
|
2810
2810
|
onClick: r(n).update.close
|
|
2811
2811
|
}, {
|
|
2812
2812
|
default: b(() => [
|
|
2813
|
-
$(O(r(
|
|
2813
|
+
$(O(r(w).tCurd("cancel")), 1)
|
|
2814
2814
|
]),
|
|
2815
2815
|
_: 1
|
|
2816
2816
|
}, 8, ["onClick"]),
|
|
@@ -2821,57 +2821,57 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2821
2821
|
loading: r(n).update.loading
|
|
2822
2822
|
}, {
|
|
2823
2823
|
default: b(() => [
|
|
2824
|
-
$(O(r(
|
|
2824
|
+
$(O(r(w).tCurd("confirm")), 1)
|
|
2825
2825
|
]),
|
|
2826
2826
|
_: 1
|
|
2827
2827
|
}, 8, ["onClick", "loading"]),
|
|
2828
|
-
|
|
2828
|
+
x(u.$slots, "table-op-edit-right", { row: g })
|
|
2829
2829
|
], 64)) : (s(), y(F, { key: 1 }, [
|
|
2830
|
-
r(i)(e.option.table?.add,
|
|
2830
|
+
r(i)(e.option.table?.add, g) ? (s(), h(r(T), {
|
|
2831
2831
|
key: 0,
|
|
2832
2832
|
link: "",
|
|
2833
2833
|
type: "primary",
|
|
2834
|
-
onClick: (
|
|
2834
|
+
onClick: (C) => r(n).update.open(r(l).Add, g)
|
|
2835
2835
|
}, {
|
|
2836
2836
|
default: b(() => [
|
|
2837
|
-
$(O(r(
|
|
2837
|
+
$(O(r(w).tCurd("add")), 1)
|
|
2838
2838
|
]),
|
|
2839
2839
|
_: 1
|
|
2840
2840
|
}, 8, ["onClick"])) : v("", !0),
|
|
2841
|
-
r(i)(e.option.table?.view,
|
|
2841
|
+
r(i)(e.option.table?.view, g) ? (s(), h(r(T), {
|
|
2842
2842
|
key: 1,
|
|
2843
2843
|
link: "",
|
|
2844
2844
|
type: "primary",
|
|
2845
|
-
onClick: (
|
|
2845
|
+
onClick: (C) => r(n).update.open(r(l).View, g)
|
|
2846
2846
|
}, {
|
|
2847
2847
|
default: b(() => [
|
|
2848
|
-
$(O(r(
|
|
2848
|
+
$(O(r(w).tCurd("view")), 1)
|
|
2849
2849
|
]),
|
|
2850
2850
|
_: 1
|
|
2851
2851
|
}, 8, ["onClick"])) : v("", !0),
|
|
2852
|
-
r(i)(e.option.table?.update,
|
|
2852
|
+
r(i)(e.option.table?.update, g) ? (s(), h(r(T), {
|
|
2853
2853
|
key: 2,
|
|
2854
2854
|
link: "",
|
|
2855
2855
|
type: "warning",
|
|
2856
|
-
onClick: (
|
|
2856
|
+
onClick: (C) => r(n).update.open(r(l).Update, g)
|
|
2857
2857
|
}, {
|
|
2858
2858
|
default: b(() => [
|
|
2859
|
-
$(O(r(
|
|
2859
|
+
$(O(r(w).tCurd("edit")), 1)
|
|
2860
2860
|
]),
|
|
2861
2861
|
_: 1
|
|
2862
2862
|
}, 8, ["onClick"])) : v("", !0),
|
|
2863
|
-
r(i)(e.option.table?.delete,
|
|
2863
|
+
r(i)(e.option.table?.delete, g) ? (s(), h(r(T), {
|
|
2864
2864
|
key: 3,
|
|
2865
2865
|
link: "",
|
|
2866
2866
|
type: "danger",
|
|
2867
|
-
onClick: (
|
|
2867
|
+
onClick: (C) => r(n).remove.open([g])
|
|
2868
2868
|
}, {
|
|
2869
2869
|
default: b(() => [
|
|
2870
|
-
$(O(r(
|
|
2870
|
+
$(O(r(w).tCurd("delete")), 1)
|
|
2871
2871
|
]),
|
|
2872
2872
|
_: 1
|
|
2873
2873
|
}, 8, ["onClick"])) : v("", !0),
|
|
2874
|
-
|
|
2874
|
+
x(u.$slots, "table-op-right", { row: g })
|
|
2875
2875
|
], 64))
|
|
2876
2876
|
]),
|
|
2877
2877
|
_: 2
|
|
@@ -2882,17 +2882,17 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2882
2882
|
]),
|
|
2883
2883
|
_: 3
|
|
2884
2884
|
}, 16, ["data", "border", "onSelectionChange", "onSortChange", "expand-row-keys", "onExpandChange"])), [
|
|
2885
|
-
[
|
|
2885
|
+
[f, r(n).table.loading]
|
|
2886
2886
|
])
|
|
2887
2887
|
], 2)
|
|
2888
2888
|
], 2),
|
|
2889
2889
|
M("div", zo, [
|
|
2890
|
-
(e.option.page?.show === void 0 || e.option.page?.show) && !r(n).page.showTools ? (s(), h(r(ke),
|
|
2890
|
+
(e.option.page?.show === void 0 || e.option.page?.show) && !r(n).page.showTools ? (s(), h(r(ke), k({
|
|
2891
2891
|
key: 0,
|
|
2892
2892
|
"current-page": r(n).page.num,
|
|
2893
|
-
"onUpdate:currentPage":
|
|
2893
|
+
"onUpdate:currentPage": m[8] || (m[8] = (g) => r(n).page.num = g),
|
|
2894
2894
|
"page-size": r(n).page.size,
|
|
2895
|
-
"onUpdate:pageSize":
|
|
2895
|
+
"onUpdate:pageSize": m[9] || (m[9] = (g) => r(n).page.size = g),
|
|
2896
2896
|
background: "",
|
|
2897
2897
|
"page-sizes": r(n).page.sizeList,
|
|
2898
2898
|
"pager-count": r(n).page.pagerCount,
|
|
@@ -2901,14 +2901,14 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2901
2901
|
size: e.option.size?.table,
|
|
2902
2902
|
onSizeChange: r(n).table.getList,
|
|
2903
2903
|
onCurrentChange: r(n).table.getList
|
|
2904
|
-
}, e.option.page?.pagination || {},
|
|
2904
|
+
}, e.option.page?.pagination || {}, V(e.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0)
|
|
2905
2905
|
])
|
|
2906
2906
|
], 2),
|
|
2907
|
-
|
|
2907
|
+
x(u.$slots, "box-right")
|
|
2908
2908
|
], 2),
|
|
2909
|
-
D(r(ye),
|
|
2909
|
+
D(r(ye), k({
|
|
2910
2910
|
modelValue: r(n).update.show,
|
|
2911
|
-
"onUpdate:modelValue":
|
|
2911
|
+
"onUpdate:modelValue": m[10] || (m[10] = (g) => r(n).update.show = g),
|
|
2912
2912
|
title: r(n).update.title,
|
|
2913
2913
|
"before-close": r(n).update.close
|
|
2914
2914
|
}, e.option.dialog), {
|
|
@@ -2918,14 +2918,14 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2918
2918
|
size: e.option.size?.form
|
|
2919
2919
|
}, {
|
|
2920
2920
|
default: b(() => [
|
|
2921
|
-
|
|
2921
|
+
x(u.$slots, "dialog-footer", {
|
|
2922
2922
|
row: r(n).update
|
|
2923
2923
|
}, () => [
|
|
2924
2924
|
D(r(T), {
|
|
2925
2925
|
onClick: r(n).update.close
|
|
2926
2926
|
}, {
|
|
2927
2927
|
default: b(() => [
|
|
2928
|
-
$(O(r(
|
|
2928
|
+
$(O(r(w).tCurd("close")), 1)
|
|
2929
2929
|
]),
|
|
2930
2930
|
_: 1
|
|
2931
2931
|
}, 8, ["onClick"]),
|
|
@@ -2936,7 +2936,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2936
2936
|
loading: r(n).update.loading
|
|
2937
2937
|
}, {
|
|
2938
2938
|
default: b(() => [
|
|
2939
|
-
$(O(r(
|
|
2939
|
+
$(O(r(w).tCurd("submit")), 1)
|
|
2940
2940
|
]),
|
|
2941
2941
|
_: 1
|
|
2942
2942
|
}, 8, ["onClick", "loading"])) : v("", !0)
|
|
@@ -2947,7 +2947,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2947
2947
|
])
|
|
2948
2948
|
]),
|
|
2949
2949
|
default: b(() => [
|
|
2950
|
-
|
|
2950
|
+
x(u.$slots, "dialog-start", {
|
|
2951
2951
|
row: r(n).update
|
|
2952
2952
|
}),
|
|
2953
2953
|
D(r(Y), {
|
|
@@ -2972,17 +2972,17 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2972
2972
|
"get-on": r(n).update.getOn,
|
|
2973
2973
|
"get-disabled": r(n).update.getDisabled
|
|
2974
2974
|
}, J({ _: 2 }, [
|
|
2975
|
-
L(
|
|
2976
|
-
name:
|
|
2975
|
+
L(u.$slots, (g, C) => ({
|
|
2976
|
+
name: C,
|
|
2977
2977
|
fn: b((H) => [
|
|
2978
|
-
|
|
2978
|
+
x(u.$slots, C, pe(we(H || {})))
|
|
2979
2979
|
])
|
|
2980
2980
|
}))
|
|
2981
2981
|
]), 1032, ["form-grid", "max-span", "form", "type", "stripe", "label-width", "form-option", "get-bind", "get-on", "get-disabled"])) : v("", !0)
|
|
2982
2982
|
]),
|
|
2983
2983
|
_: 3
|
|
2984
2984
|
}, 8, ["model", "rules", "size"]),
|
|
2985
|
-
|
|
2985
|
+
x(u.$slots, "dialog-end", {
|
|
2986
2986
|
row: r(n).update
|
|
2987
2987
|
})
|
|
2988
2988
|
]),
|
|
@@ -2990,7 +2990,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
2990
2990
|
}, 16, ["modelValue", "title", "before-close"]),
|
|
2991
2991
|
D(r(ye), {
|
|
2992
2992
|
modelValue: r(n).remove.show,
|
|
2993
|
-
"onUpdate:modelValue":
|
|
2993
|
+
"onUpdate:modelValue": m[11] || (m[11] = (g) => r(n).remove.show = g),
|
|
2994
2994
|
title: r(n).remove.title,
|
|
2995
2995
|
"close-on-click-modal": !1
|
|
2996
2996
|
}, {
|
|
@@ -3004,7 +3004,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
3004
3004
|
onClick: r(n).remove.close
|
|
3005
3005
|
}, {
|
|
3006
3006
|
default: b(() => [
|
|
3007
|
-
$(O(r(
|
|
3007
|
+
$(O(r(w).tCurd("close")), 1)
|
|
3008
3008
|
]),
|
|
3009
3009
|
_: 1
|
|
3010
3010
|
}, 8, ["onClick"]),
|
|
@@ -3014,7 +3014,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
3014
3014
|
loading: r(n).remove.loading
|
|
3015
3015
|
}, {
|
|
3016
3016
|
default: b(() => [
|
|
3017
|
-
$(O(r(
|
|
3017
|
+
$(O(r(w).tCurd("confirmDelete")), 1)
|
|
3018
3018
|
]),
|
|
3019
3019
|
_: 1
|
|
3020
3020
|
}, 8, ["onClick", "loading"])
|
|
@@ -3029,7 +3029,7 @@ const so = /* @__PURE__ */ oe(lo, [["render", ro]]), uo = { class: "row flex-cen
|
|
|
3029
3029
|
content: e.option.dialog?.delete?.content,
|
|
3030
3030
|
value: r(n).remove.items
|
|
3031
3031
|
}, null, 8, ["content", "value"])
|
|
3032
|
-
])) : (s(), y("div", Do, O(r(
|
|
3032
|
+
])) : (s(), y("div", Do, O(r(w).tCurd("confirmDeleteMessage", r(n).remove.items.length)), 1))
|
|
3033
3033
|
]),
|
|
3034
3034
|
_: 1
|
|
3035
3035
|
}, 8, ["modelValue", "title"]),
|
|
@@ -3077,13 +3077,13 @@ class To {
|
|
|
3077
3077
|
z.fail("未选择文件"), t("未选择文件");
|
|
3078
3078
|
return;
|
|
3079
3079
|
}
|
|
3080
|
-
const
|
|
3081
|
-
|
|
3082
|
-
const
|
|
3083
|
-
l(
|
|
3084
|
-
},
|
|
3080
|
+
const c = new FileReader();
|
|
3081
|
+
c.onload = async (u) => {
|
|
3082
|
+
const m = n == ".json" ? JSON.parse(u.target.result) : u.target.result;
|
|
3083
|
+
l(m);
|
|
3084
|
+
}, c.onerror = () => {
|
|
3085
3085
|
z.fail("文件读取失败"), t("文件读取失败");
|
|
3086
|
-
},
|
|
3086
|
+
}, c.readAsText(d), document.body.removeChild(i);
|
|
3087
3087
|
}, document.body.appendChild(i), i.click();
|
|
3088
3088
|
});
|
|
3089
3089
|
}
|
|
@@ -3104,9 +3104,8 @@ export {
|
|
|
3104
3104
|
To as TFile,
|
|
3105
3105
|
P as TForm,
|
|
3106
3106
|
U as TFormConfig,
|
|
3107
|
-
|
|
3107
|
+
w as TFormI18n,
|
|
3108
3108
|
Ee as TFormList,
|
|
3109
|
-
Q as TObj,
|
|
3110
3109
|
z as TSys,
|
|
3111
3110
|
Lo as default,
|
|
3112
3111
|
Fo as install
|