cc1-form 1.4.1 → 1.4.2
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 +430 -429
- package/dist/cc1-form.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/cc1-form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ElMessage as
|
|
1
|
+
import { ElMessage as rt, ElLoading as it, ElFormItem as he, ElInput as fe, ElInputNumber as st, ElSwitch as ge, ElSelect as ce, ElOption as ne, ElRadioGroup as je, ElRadioButton as dt, ElRadio as Pe, ElCheckboxGroup as ut, ElCheckboxButton as ft, ElCheckbox as ct, ElColorPicker as pt, ElSlider as mt, ElTreeSelect as bt, ElDatePicker as Ke, ElForm as oe, ElDialog as $e, ElButton as P, ElTableColumn as ue, ElDropdown as Ue, ElDropdownMenu as Ae, ElDropdownItem as de, ElPagination as Be, ElTable as gt } from "element-plus";
|
|
2
2
|
import "vue-router";
|
|
3
|
-
import { defineComponent as Q, reactive as ie, onMounted as He, resolveComponent as pe, openBlock as
|
|
3
|
+
import { defineComponent as Q, reactive as ie, onMounted as He, resolveComponent as pe, openBlock as b, createElementBlock as C, renderSlot as z, createVNode as M, withCtx as h, createTextVNode as O, createCommentVNode as V, Fragment as A, renderList as G, createBlock as y, normalizeClass as J, normalizeStyle as ye, ref as Y, watch as Ne, nextTick as Ce, unref as i, createElementVNode as R, mergeProps as S, toHandlers as $, createSlots as Z, toDisplayString as F, resolveDynamicComponent as ee, computed as ae, onUnmounted as Ie, normalizeProps as Me, guardReactiveProps as Oe, getCurrentInstance as Ge, onBeforeUnmount as ht, withModifiers as yt, resolveDirective as wt, withDirectives as vt } from "vue";
|
|
4
4
|
import { Scope as Fe } from "cc1-vue3";
|
|
5
5
|
class E {
|
|
6
6
|
/**
|
|
@@ -83,7 +83,7 @@ class E {
|
|
|
83
83
|
},
|
|
84
84
|
t
|
|
85
85
|
);
|
|
86
|
-
|
|
86
|
+
rt(e), setTimeout(() => {
|
|
87
87
|
delete this.tipMessages[o];
|
|
88
88
|
}, this.tipMessagesGap);
|
|
89
89
|
}
|
|
@@ -113,7 +113,7 @@ class E {
|
|
|
113
113
|
*/
|
|
114
114
|
static loading = (o = !0, s = "Loading...") => {
|
|
115
115
|
Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
|
|
116
|
-
o ? this.loadingObj =
|
|
116
|
+
o ? this.loadingObj = it.service({
|
|
117
117
|
lock: !0,
|
|
118
118
|
text: s,
|
|
119
119
|
background: "rgba(0, 0, 0, 0.3)"
|
|
@@ -164,7 +164,7 @@ class E {
|
|
|
164
164
|
}
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
|
-
class
|
|
167
|
+
class B {
|
|
168
168
|
/**
|
|
169
169
|
* 全局配置对象
|
|
170
170
|
*/
|
|
@@ -539,7 +539,7 @@ class T {
|
|
|
539
539
|
* @param config - 需要覆盖的配置项(深度 Partial)
|
|
540
540
|
*/
|
|
541
541
|
static setConfig = (o) => {
|
|
542
|
-
|
|
542
|
+
B.config = ObjectUtil.deepMerge(B.config, o);
|
|
543
543
|
};
|
|
544
544
|
}
|
|
545
545
|
class q {
|
|
@@ -599,7 +599,7 @@ class q {
|
|
|
599
599
|
* @param option 组件配置
|
|
600
600
|
*/
|
|
601
601
|
parentId: (o, s, t, l) => {
|
|
602
|
-
const e =
|
|
602
|
+
const e = B.config.table.rowKey;
|
|
603
603
|
o ? s.type === E.EDialog.Add ? (s.form.parentId = o[e], s.form.sort = o.children.length + 1) : s.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (s.form.parentId = "0", s.form.sort = t.length + 1), q.setOptionsData(l, "parentId", [{ [e]: "0", title: "根", children: t }]);
|
|
604
604
|
}
|
|
605
605
|
}
|
|
@@ -617,7 +617,7 @@ class X {
|
|
|
617
617
|
*/
|
|
618
618
|
static setId = (o, s, t) => {
|
|
619
619
|
s[o] || (s[o] = []);
|
|
620
|
-
const l =
|
|
620
|
+
const l = B.config.table.rowKey;
|
|
621
621
|
s[o].forEach((e) => {
|
|
622
622
|
t.forEach((r) => {
|
|
623
623
|
let n = r.default ?? "";
|
|
@@ -635,7 +635,7 @@ class X {
|
|
|
635
635
|
static add = (o, s, t, l) => {
|
|
636
636
|
const e = JSONUtil.cp(t);
|
|
637
637
|
X.setId(o, s, t);
|
|
638
|
-
const r =
|
|
638
|
+
const r = B.config.table.rowKey;
|
|
639
639
|
s[o].push(
|
|
640
640
|
e.reduce(
|
|
641
641
|
(n, u) => {
|
|
@@ -654,7 +654,7 @@ class X {
|
|
|
654
654
|
* @param callback 回调函数
|
|
655
655
|
*/
|
|
656
656
|
static remove = (o, s, t, l) => {
|
|
657
|
-
const e =
|
|
657
|
+
const e = B.config.table.rowKey;
|
|
658
658
|
s[o] = s[o].filter((r) => r[e] !== t[e]), l?.(s);
|
|
659
659
|
};
|
|
660
660
|
/**
|
|
@@ -664,20 +664,20 @@ class X {
|
|
|
664
664
|
* @returns 没有id的数据
|
|
665
665
|
*/
|
|
666
666
|
static getNoIdData = (o, s) => {
|
|
667
|
-
const t = JSONUtil.cp(o), l =
|
|
667
|
+
const t = JSONUtil.cp(o), l = B.config.table.rowKey;
|
|
668
668
|
return t.forEach((e) => {
|
|
669
669
|
e[l] && delete e[l], s && e[s] && X.getNoIdData(e[s], s);
|
|
670
670
|
}), t;
|
|
671
671
|
};
|
|
672
672
|
}
|
|
673
|
-
const
|
|
673
|
+
const kt = {
|
|
674
674
|
key: 0,
|
|
675
675
|
class: "column curd-form-com-list",
|
|
676
676
|
style: { width: "100%", gap: "10px" }
|
|
677
|
-
},
|
|
677
|
+
}, Ct = { key: 0 }, Vt = {
|
|
678
678
|
class: "row items-center",
|
|
679
679
|
style: { gap: "10px", width: "100%" }
|
|
680
|
-
},
|
|
680
|
+
}, St = { key: 1 }, We = /* @__PURE__ */ Q({
|
|
681
681
|
__name: "list",
|
|
682
682
|
props: {
|
|
683
683
|
row: {
|
|
@@ -735,9 +735,9 @@ const Ct = {
|
|
|
735
735
|
const l = o;
|
|
736
736
|
return (e, r) => {
|
|
737
737
|
const n = pe("el-button"), u = pe("el-input");
|
|
738
|
-
return t.show ? (
|
|
738
|
+
return t.show ? (b(), C("div", kt, [
|
|
739
739
|
z(e.$slots, "list-start", { row: a.row }),
|
|
740
|
-
a.addBottom ? V("", !0) : (
|
|
740
|
+
a.addBottom ? V("", !0) : (b(), C("div", Ct, [
|
|
741
741
|
M(n, {
|
|
742
742
|
link: "",
|
|
743
743
|
type: "primary",
|
|
@@ -749,18 +749,18 @@ const Ct = {
|
|
|
749
749
|
_: 1
|
|
750
750
|
})
|
|
751
751
|
])),
|
|
752
|
-
(
|
|
752
|
+
(b(!0), C(A, null, G(a.row[a.field], (f) => (b(), C("div", Vt, [
|
|
753
753
|
z(e.$slots, "item-start", {
|
|
754
754
|
item: f,
|
|
755
755
|
row: a.row
|
|
756
756
|
}),
|
|
757
|
-
(
|
|
757
|
+
(b(!0), C(A, null, G(a.itemFields, (d) => (b(), y(u, {
|
|
758
758
|
modelValue: f[d.value],
|
|
759
|
-
"onUpdate:modelValue": (
|
|
759
|
+
"onUpdate:modelValue": (m) => f[d.value] = m,
|
|
760
760
|
style: ye({ width: a.inputWidth }),
|
|
761
761
|
class: J(a.inputClass),
|
|
762
762
|
placeholder: d[a.label] || d[a.value],
|
|
763
|
-
onChange: r[1] || (r[1] = (
|
|
763
|
+
onChange: r[1] || (r[1] = (m) => l("change"))
|
|
764
764
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
|
|
765
765
|
z(e.$slots, "item-end", {
|
|
766
766
|
item: f,
|
|
@@ -777,7 +777,7 @@ const Ct = {
|
|
|
777
777
|
_: 2
|
|
778
778
|
}, 1032, ["onClick"])
|
|
779
779
|
]))), 256)),
|
|
780
|
-
a.addBottom ? (
|
|
780
|
+
a.addBottom ? (b(), C("div", St, [
|
|
781
781
|
M(n, {
|
|
782
782
|
link: "",
|
|
783
783
|
type: "primary",
|
|
@@ -793,10 +793,10 @@ const Ct = {
|
|
|
793
793
|
])) : V("", !0);
|
|
794
794
|
};
|
|
795
795
|
}
|
|
796
|
-
}),
|
|
796
|
+
}), Et = {
|
|
797
797
|
class: "row form-item-content",
|
|
798
798
|
style: { width: "100%" }
|
|
799
|
-
},
|
|
799
|
+
}, zt = { class: "col column form-item-content-item" }, $t = { class: "col" }, Mt = ["innerHTML"], Ot = /* @__PURE__ */ Q({
|
|
800
800
|
__name: "field",
|
|
801
801
|
props: {
|
|
802
802
|
item: {},
|
|
@@ -820,7 +820,7 @@ const Ct = {
|
|
|
820
820
|
l(), Ce(() => l());
|
|
821
821
|
},
|
|
822
822
|
{ deep: !0, flush: "post" }
|
|
823
|
-
), (e, r) => (
|
|
823
|
+
), (e, r) => (b(), y(i(he), {
|
|
824
824
|
ref_key: "formItemRef",
|
|
825
825
|
ref: s,
|
|
826
826
|
label: e.item.text?.form?.label ?? e.item.label,
|
|
@@ -828,18 +828,18 @@ const Ct = {
|
|
|
828
828
|
"label-width": e.item.text?.form?.label == "" ? 0 : e.item.form?.labelWidth || e.labelWidth
|
|
829
829
|
}, {
|
|
830
830
|
default: h(() => [
|
|
831
|
-
|
|
831
|
+
R("div", Et, [
|
|
832
832
|
z(e.$slots, "form-" + e.item.key + "-start", {
|
|
833
833
|
row: e.form,
|
|
834
834
|
item: e.item
|
|
835
835
|
}),
|
|
836
|
-
|
|
837
|
-
|
|
836
|
+
R("div", zt, [
|
|
837
|
+
R("div", $t, [
|
|
838
838
|
z(e.$slots, "form-" + e.item.key, {
|
|
839
839
|
row: e.form,
|
|
840
840
|
item: e.item
|
|
841
841
|
}, () => [
|
|
842
|
-
e.item.type === "input" ? (
|
|
842
|
+
e.item.type === "input" ? (b(), y(i(fe), S({
|
|
843
843
|
key: 0,
|
|
844
844
|
modelValue: e.form[e.item.key],
|
|
845
845
|
"onUpdate:modelValue": r[0] || (r[0] = (n) => e.form[e.item.key] = n)
|
|
@@ -849,30 +849,30 @@ const Ct = {
|
|
|
849
849
|
e.getBind(e.item).prepend ? {
|
|
850
850
|
name: "prepend",
|
|
851
851
|
fn: h(() => [
|
|
852
|
-
O(
|
|
852
|
+
O(F(typeof e.getBind(e.item).prepend == "function" ? e.getBind(e.item).prepend(e.form) : e.getBind(e.item).prepend), 1)
|
|
853
853
|
]),
|
|
854
854
|
key: "0"
|
|
855
855
|
} : void 0
|
|
856
|
-
]), 1040, ["modelValue", "disabled"])) : e.item.type === "number" ? (
|
|
856
|
+
]), 1040, ["modelValue", "disabled"])) : e.item.type === "number" ? (b(), y(i(st), S({
|
|
857
857
|
key: 1,
|
|
858
858
|
modelValue: e.form[e.item.key],
|
|
859
859
|
"onUpdate:modelValue": r[1] || (r[1] = (n) => e.form[e.item.key] = n)
|
|
860
860
|
}, e.getBind(e.item), $(e.getOn(e.item)), {
|
|
861
861
|
disabled: e.getDisabled(e.item)
|
|
862
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "textarea" ? (
|
|
862
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "textarea" ? (b(), y(i(fe), S({
|
|
863
863
|
key: 2,
|
|
864
864
|
type: "textarea",
|
|
865
865
|
modelValue: e.form[e.item.key],
|
|
866
866
|
"onUpdate:modelValue": r[2] || (r[2] = (n) => e.form[e.item.key] = n)
|
|
867
867
|
}, e.getBind(e.item), $(e.getOn(e.item)), {
|
|
868
868
|
disabled: e.getDisabled(e.item)
|
|
869
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "switch" ? (
|
|
869
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "switch" ? (b(), y(i(ge), S({
|
|
870
870
|
key: 3,
|
|
871
871
|
modelValue: e.form[e.item.key],
|
|
872
872
|
"onUpdate:modelValue": r[3] || (r[3] = (n) => e.form[e.item.key] = n)
|
|
873
873
|
}, e.getBind(e.item), $(e.getOn(e.item)), {
|
|
874
874
|
disabled: e.getDisabled(e.item)
|
|
875
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "select" ? (
|
|
875
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "select" ? (b(), y(i(ce), S({
|
|
876
876
|
key: 4,
|
|
877
877
|
modelValue: e.form[e.item.key],
|
|
878
878
|
"onUpdate:modelValue": r[4] || (r[4] = (n) => e.form[e.item.key] = n)
|
|
@@ -881,13 +881,13 @@ const Ct = {
|
|
|
881
881
|
style: { width: "100%" }
|
|
882
882
|
}), {
|
|
883
883
|
default: h(() => [
|
|
884
|
-
(
|
|
884
|
+
(b(!0), C(A, null, G(e.getBind(e.item).data || [], (n) => (b(), y(i(ne), S({
|
|
885
885
|
key: n.value,
|
|
886
886
|
ref_for: !0
|
|
887
887
|
}, n, $(n.on || {})), null, 16))), 128))
|
|
888
888
|
]),
|
|
889
889
|
_: 1
|
|
890
|
-
}, 16, ["modelValue", "disabled"])) : e.item.type === "radio" ? (
|
|
890
|
+
}, 16, ["modelValue", "disabled"])) : e.item.type === "radio" ? (b(), y(i(je), S({
|
|
891
891
|
key: 5,
|
|
892
892
|
modelValue: e.form[e.item.key],
|
|
893
893
|
"onUpdate:modelValue": r[5] || (r[5] = (n) => e.form[e.item.key] = n)
|
|
@@ -896,16 +896,16 @@ const Ct = {
|
|
|
896
896
|
style: { width: "100%" }
|
|
897
897
|
}), {
|
|
898
898
|
default: h(() => [
|
|
899
|
-
e.getBind(e.item).type === "group" ? (
|
|
899
|
+
e.getBind(e.item).type === "group" ? (b(!0), C(A, { key: 0 }, G(e.getBind(e.item).data || [], (n) => (b(), y(i(dt), S({
|
|
900
900
|
key: n.value,
|
|
901
901
|
ref_for: !0
|
|
902
|
-
}, n, $(n.on || {})), null, 16))), 128)) : (
|
|
902
|
+
}, n, $(n.on || {})), null, 16))), 128)) : (b(!0), C(A, { key: 1 }, G(e.getBind(e.item).data || [], (n) => (b(), y(i(Pe), S({
|
|
903
903
|
key: n.value,
|
|
904
904
|
ref_for: !0
|
|
905
905
|
}, n, $(n.on || {})), null, 16))), 128))
|
|
906
906
|
]),
|
|
907
907
|
_: 1
|
|
908
|
-
}, 16, ["modelValue", "disabled"])) : e.item.type === "checkbox" ? (
|
|
908
|
+
}, 16, ["modelValue", "disabled"])) : e.item.type === "checkbox" ? (b(), y(i(ut), S({
|
|
909
909
|
key: 6,
|
|
910
910
|
modelValue: e.form[e.item.key],
|
|
911
911
|
"onUpdate:modelValue": r[6] || (r[6] = (n) => e.form[e.item.key] = n)
|
|
@@ -914,54 +914,54 @@ const Ct = {
|
|
|
914
914
|
style: { width: "100%" }
|
|
915
915
|
}), {
|
|
916
916
|
default: h(() => [
|
|
917
|
-
e.getBind(e.item).type === "group" ? (
|
|
917
|
+
e.getBind(e.item).type === "group" ? (b(!0), C(A, { key: 0 }, G(e.getBind(e.item).data || [], (n) => (b(), y(i(ft), S({
|
|
918
918
|
key: n.value,
|
|
919
919
|
ref_for: !0
|
|
920
|
-
}, n, $(n.on || {})), null, 16))), 128)) : (
|
|
920
|
+
}, n, $(n.on || {})), null, 16))), 128)) : (b(!0), C(A, { key: 1 }, G(e.getBind(e.item).data || [], (n) => (b(), y(i(ct), S({
|
|
921
921
|
key: n.value,
|
|
922
922
|
ref_for: !0
|
|
923
923
|
}, n, $(n.on || {})), null, 16))), 128))
|
|
924
924
|
]),
|
|
925
925
|
_: 1
|
|
926
|
-
}, 16, ["modelValue", "disabled"])) : e.item.type === "color" ? (
|
|
926
|
+
}, 16, ["modelValue", "disabled"])) : e.item.type === "color" ? (b(), y(i(pt), S({
|
|
927
927
|
key: 7,
|
|
928
928
|
modelValue: e.form[e.item.key],
|
|
929
929
|
"onUpdate:modelValue": r[7] || (r[7] = (n) => e.form[e.item.key] = n)
|
|
930
930
|
}, e.getBind(e.item), $(e.getOn(e.item)), {
|
|
931
931
|
disabled: e.getDisabled(e.item)
|
|
932
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "slider" ? (
|
|
932
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "slider" ? (b(), y(i(mt), S({
|
|
933
933
|
key: 8,
|
|
934
934
|
modelValue: e.form[e.item.key],
|
|
935
935
|
"onUpdate:modelValue": r[8] || (r[8] = (n) => e.form[e.item.key] = n)
|
|
936
936
|
}, e.getBind(e.item), $(e.getOn(e.item)), {
|
|
937
937
|
disabled: e.getDisabled(e.item)
|
|
938
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "list" ? (
|
|
938
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "list" ? (b(), y(We, S({
|
|
939
939
|
key: 9,
|
|
940
940
|
row: e.form,
|
|
941
941
|
field: e.item.key
|
|
942
942
|
}, e.getBind(e.item), $(e.getOn(e.item)), {
|
|
943
943
|
disabled: e.getDisabled(e.item),
|
|
944
944
|
style: { width: "100%" }
|
|
945
|
-
}), null, 16, ["row", "field", "disabled"])) : e.item.type === "treeSelect" ? (
|
|
945
|
+
}), null, 16, ["row", "field", "disabled"])) : e.item.type === "treeSelect" ? (b(), y(i(bt), S({
|
|
946
946
|
key: 10,
|
|
947
947
|
modelValue: e.form[e.item.key],
|
|
948
948
|
"onUpdate:modelValue": r[9] || (r[9] = (n) => e.form[e.item.key] = n)
|
|
949
949
|
}, e.getBind(e.item), $(e.getOn(e.item)), {
|
|
950
950
|
disabled: e.getDisabled(e.item),
|
|
951
951
|
style: { width: "100%" }
|
|
952
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "datetime" ? (
|
|
952
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type === "datetime" ? (b(), y(i(Ke), S({
|
|
953
953
|
key: 11,
|
|
954
954
|
modelValue: e.form[e.item.key],
|
|
955
955
|
"onUpdate:modelValue": r[10] || (r[10] = (n) => e.form[e.item.key] = n)
|
|
956
956
|
}, e.getBind(e.item), $(e.getOn(e.item)), {
|
|
957
957
|
disabled: e.getDisabled(e.item)
|
|
958
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type && typeof e.item.type == "object" ? (
|
|
958
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type && typeof e.item.type == "object" ? (b(), y(ee(e.item.type), S({
|
|
959
959
|
key: 12,
|
|
960
960
|
modelValue: e.form[e.item.key],
|
|
961
961
|
"onUpdate:modelValue": r[11] || (r[11] = (n) => e.form[e.item.key] = n)
|
|
962
962
|
}, e.getBind(e.item), $(e.getOn(e.item)), {
|
|
963
963
|
disabled: e.getDisabled(e.item)
|
|
964
|
-
}), null, 16, ["modelValue", "disabled"])) : e.item.type && (i(q).customComponent[e.item.type] || i(q).customComponent[e.item.type]?.form) ? (
|
|
964
|
+
}), null, 16, ["modelValue", "disabled"])) : e.item.type && (i(q).customComponent[e.item.type] || i(q).customComponent[e.item.type]?.form) ? (b(), y(ee(i(q).customComponent[e.item.type]?.form || i(q).customComponent[e.item.type]), S({
|
|
965
965
|
key: 13,
|
|
966
966
|
modelValue: e.form[e.item.key],
|
|
967
967
|
"onUpdate:modelValue": r[12] || (r[12] = (n) => e.form[e.item.key] = n)
|
|
@@ -978,11 +978,11 @@ const Ct = {
|
|
|
978
978
|
row: e.form,
|
|
979
979
|
item: e.item
|
|
980
980
|
}, () => [
|
|
981
|
-
e.item.form?.tipText ? (
|
|
981
|
+
e.item.form?.tipText ? (b(), C("div", {
|
|
982
982
|
key: 0,
|
|
983
983
|
class: "form-tip-text",
|
|
984
984
|
innerHTML: typeof e.item.form?.tipText == "function" ? e.item.form?.tipText(e.form, e.type) : e.item.form?.tipText
|
|
985
|
-
}, null, 8,
|
|
985
|
+
}, null, 8, Mt)) : V("", !0)
|
|
986
986
|
])
|
|
987
987
|
]),
|
|
988
988
|
z(e.$slots, "form-" + e.item.key + "-end", {
|
|
@@ -995,7 +995,7 @@ const Ct = {
|
|
|
995
995
|
}, 8, ["label", "prop", "label-width"]));
|
|
996
996
|
}
|
|
997
997
|
});
|
|
998
|
-
const
|
|
998
|
+
const Ft = {
|
|
999
999
|
search: "搜索",
|
|
1000
1000
|
add: "新增",
|
|
1001
1001
|
edit: "编辑",
|
|
@@ -1054,7 +1054,7 @@ class k {
|
|
|
1054
1054
|
return this.t(this.curd[o], ...s);
|
|
1055
1055
|
}
|
|
1056
1056
|
/** curd表单 */
|
|
1057
|
-
static curd =
|
|
1057
|
+
static curd = Ft;
|
|
1058
1058
|
}
|
|
1059
1059
|
class x {
|
|
1060
1060
|
/**
|
|
@@ -1108,18 +1108,18 @@ const we = (a) => {
|
|
|
1108
1108
|
error: o.error || ""
|
|
1109
1109
|
});
|
|
1110
1110
|
});
|
|
1111
|
-
},
|
|
1111
|
+
}, Rt = (a) => a ? typeof a == "string" ? a : a instanceof Error ? a.message : a.message || String(a) : "", ve = (a) => !a || typeof a != "object" ? [] : Object.keys(a).flatMap((o) => (Array.isArray(a[o]) ? a[o] : [a[o]]).map((t) => ({
|
|
1112
1112
|
field: t?.field || o,
|
|
1113
|
-
error:
|
|
1114
|
-
}))), be = E.EDialog, le = (a) => typeof a.type == "object" ? "component" : a.type || "input",
|
|
1113
|
+
error: Rt(t)
|
|
1114
|
+
}))), be = E.EDialog, le = (a) => typeof a.type == "object" ? "component" : a.type || "input", Dt = (a, o, s) => {
|
|
1115
1115
|
const t = we(() => o.form), l = (r) => De(r.update.formGrid || [], r.update.form, r.update.type, r.update.formMaxSpan).map((u) => u.item.key).filter(Boolean), e = async (r) => {
|
|
1116
1116
|
const n = s.ruleFormRef.value;
|
|
1117
1117
|
if (!n) return !0;
|
|
1118
1118
|
await Ce();
|
|
1119
|
-
const u = l(r), f = Object.keys(r.update.rules || {}).filter((
|
|
1119
|
+
const u = l(r), f = Object.keys(r.update.rules || {}).filter((m) => !u.includes(m));
|
|
1120
1120
|
if (f.length && n.clearValidate(f), !u.length) return !0;
|
|
1121
|
-
if (!await n.validateField(u, async (
|
|
1122
|
-
|
|
1121
|
+
if (!await n.validateField(u, async (m, c) => {
|
|
1122
|
+
m || me(ve(c));
|
|
1123
1123
|
})) throw !1;
|
|
1124
1124
|
return !0;
|
|
1125
1125
|
};
|
|
@@ -1156,7 +1156,7 @@ const we = (a) => {
|
|
|
1156
1156
|
getOptions: (r) => {
|
|
1157
1157
|
const n = a();
|
|
1158
1158
|
try {
|
|
1159
|
-
const f =
|
|
1159
|
+
const f = Lt(n.update.formGrid?.length ? n.update.formGrid : n.update.formColumn).find((d) => d.item.key === r)?.item;
|
|
1160
1160
|
return f ? {
|
|
1161
1161
|
options: f.options,
|
|
1162
1162
|
//@ts-ignore
|
|
@@ -1227,18 +1227,18 @@ const we = (a) => {
|
|
|
1227
1227
|
}
|
|
1228
1228
|
let f = ObjectUtil.deepMerge(r.update.form, {});
|
|
1229
1229
|
delete f.children;
|
|
1230
|
-
const d = new Set(o.option.column.filter((
|
|
1231
|
-
Object.keys(f).forEach((
|
|
1232
|
-
if (d.has(
|
|
1233
|
-
const c = new Date(f[
|
|
1234
|
-
isNaN(c) || (f[
|
|
1230
|
+
const d = new Set(o.option.column.filter((m) => m.type === "datetime").map((m) => m.key));
|
|
1231
|
+
Object.keys(f).forEach((m) => {
|
|
1232
|
+
if (d.has(m) && f[m] != null) {
|
|
1233
|
+
const c = new Date(f[m]).getTime();
|
|
1234
|
+
isNaN(c) || (f[m] = c);
|
|
1235
1235
|
}
|
|
1236
1236
|
});
|
|
1237
1237
|
try {
|
|
1238
1238
|
if (!u) return;
|
|
1239
1239
|
await u({ ...f }), r.update.close(), await r.table.getList(), o.option.form?.submitAfter?.(f, r.update);
|
|
1240
|
-
} catch (
|
|
1241
|
-
console.error(
|
|
1240
|
+
} catch (m) {
|
|
1241
|
+
console.error(m);
|
|
1242
1242
|
} finally {
|
|
1243
1243
|
r.update.loading = !1;
|
|
1244
1244
|
}
|
|
@@ -1253,7 +1253,7 @@ const we = (a) => {
|
|
|
1253
1253
|
};
|
|
1254
1254
|
}, W = 12, ke = (a, o) => {
|
|
1255
1255
|
a.isForm = o, Array.isArray(a.children) && a.children.forEach((s) => ke(s, o));
|
|
1256
|
-
},
|
|
1256
|
+
}, Ut = (a) => a.isForm === !1 ? !1 : typeof a.show?.form == "boolean" ? a.show.form : !0, qe = (a) => a > W ? Math.floor(a / 2) : a, At = (a, o, s) => (a.form = a.form || { span: o }, s === "column" ? a.form.span = a.form.span ?? 12 : a.form.span = a.form.span ?? o, a.form.span = qe(a.form.span), a.form.span), Je = (a) => {
|
|
1257
1257
|
const o = a.form;
|
|
1258
1258
|
return o?.row != null && o.row > 0 ? qe(o.row) : W;
|
|
1259
1259
|
}, re = (a) => Math.floor((a.gridRow - 1) / W), Qe = (a, o, s) => {
|
|
@@ -1276,9 +1276,9 @@ const we = (a) => {
|
|
|
1276
1276
|
const e = a, r = e.colSpan ?? a.span;
|
|
1277
1277
|
if (!a.item.form?.spanCol)
|
|
1278
1278
|
return r;
|
|
1279
|
-
const n = l?.maxSpan || 12, u = l?.defaultSpan || n / 2, f = e.gridBand,
|
|
1280
|
-
return r +
|
|
1281
|
-
},
|
|
1279
|
+
const n = l?.maxSpan || 12, u = l?.defaultSpan || n / 2, f = e.gridBand, m = o.filter((c) => f != null ? c.gridBand === f && !E.isFun(c.item.show?.form, s, t) : c.gridRow === e.gridRow && !E.isFun(c.item.show?.form, s, t)).reduce((c, p) => c + (p.colSpan ?? p.span ?? u), 0);
|
|
1280
|
+
return r + m;
|
|
1281
|
+
}, Bt = (a, o) => {
|
|
1282
1282
|
const s = (t, l) => {
|
|
1283
1283
|
const e = t.gridRow, r = t.gridRow + t.rowSpan - 1, n = l.gridRow, u = l.gridRow + l.rowSpan - 1;
|
|
1284
1284
|
return e <= u && n <= r;
|
|
@@ -1292,55 +1292,55 @@ const we = (a) => {
|
|
|
1292
1292
|
}, xe = (a, o, s = {}) => {
|
|
1293
1293
|
const t = /* @__PURE__ */ new Set(), l = [];
|
|
1294
1294
|
let e = 0, r = 0;
|
|
1295
|
-
const n = (p) => Math.floor(p / W) * W, u = (p, w) => `${p},${w}`, f = (p, w,
|
|
1296
|
-
if (w +
|
|
1297
|
-
for (let L = 0; L <
|
|
1298
|
-
for (let
|
|
1299
|
-
if (t.has(u(p + L, w +
|
|
1295
|
+
const n = (p) => Math.floor(p / W) * W, u = (p, w) => `${p},${w}`, f = (p, w, U, K) => {
|
|
1296
|
+
if (w + U > o) return !1;
|
|
1297
|
+
for (let L = 0; L < K; L++)
|
|
1298
|
+
for (let T = 0; T < U; T++)
|
|
1299
|
+
if (t.has(u(p + L, w + T))) return !1;
|
|
1300
1300
|
return !0;
|
|
1301
|
-
}, d = (p, w,
|
|
1302
|
-
for (let L = 0; L <
|
|
1303
|
-
for (let
|
|
1304
|
-
t.add(u(p + L, w +
|
|
1305
|
-
},
|
|
1306
|
-
for (let
|
|
1307
|
-
const Ve =
|
|
1301
|
+
}, d = (p, w, U, K) => {
|
|
1302
|
+
for (let L = 0; L < K; L++)
|
|
1303
|
+
for (let T = 0; T < U; T++)
|
|
1304
|
+
t.add(u(p + L, w + T));
|
|
1305
|
+
}, m = (p, w, U, K) => {
|
|
1306
|
+
for (let T = n(p); T < 500 * W; T += W) {
|
|
1307
|
+
const Ve = T + W, Se = T === n(p) ? Math.max(T, p) : T;
|
|
1308
1308
|
for (let _ = Se; _ < Ve; _++) {
|
|
1309
1309
|
const Ee = _ === p ? w : 0;
|
|
1310
|
-
for (let te = Ee; te <= o -
|
|
1311
|
-
if (f(_, te,
|
|
1310
|
+
for (let te = Ee; te <= o - U; te++)
|
|
1311
|
+
if (f(_, te, U, K)) return { tr: _, tc: te };
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
1314
|
return { tr: p, tc: w };
|
|
1315
|
-
}, c = (p, w,
|
|
1315
|
+
}, c = (p, w, U, K) => {
|
|
1316
1316
|
const L = n(p);
|
|
1317
|
-
if (
|
|
1318
|
-
e = p +
|
|
1317
|
+
if (K < W && p + K < L + W) {
|
|
1318
|
+
e = p + K, r = w;
|
|
1319
1319
|
return;
|
|
1320
1320
|
}
|
|
1321
|
-
const
|
|
1322
|
-
if (
|
|
1323
|
-
r =
|
|
1321
|
+
const T = w + U;
|
|
1322
|
+
if (T < o) {
|
|
1323
|
+
r = T, e = L;
|
|
1324
1324
|
return;
|
|
1325
1325
|
}
|
|
1326
1326
|
r = 0, e = L + W;
|
|
1327
1327
|
};
|
|
1328
1328
|
return a.forEach((p) => {
|
|
1329
|
-
const w = p.colSpan ?? (p.span === 0 ? o : p.span),
|
|
1329
|
+
const w = p.colSpan ?? (p.span === 0 ? o : p.span), U = p.rowSpan ?? Je(p.item);
|
|
1330
1330
|
p.item.form?.rowBreak && l.length && (r = 0, e = n(e) + W);
|
|
1331
|
-
let { tr:
|
|
1332
|
-
f(
|
|
1333
|
-
const
|
|
1331
|
+
let { tr: K, tc: L } = f(e, r, w, U) ? { tr: e, tc: r } : m(e, r, w, U);
|
|
1332
|
+
f(K, L, w, U) || ({ tr: K, tc: L } = m(0, 0, w, U)), d(K, L, w, U);
|
|
1333
|
+
const T = K + 1;
|
|
1334
1334
|
l.push({
|
|
1335
1335
|
...p,
|
|
1336
1336
|
span: w,
|
|
1337
1337
|
colSpan: w,
|
|
1338
|
-
rowSpan:
|
|
1339
|
-
gridRow:
|
|
1338
|
+
rowSpan: U,
|
|
1339
|
+
gridRow: T,
|
|
1340
1340
|
gridColumn: L + 1,
|
|
1341
|
-
gridBand: re({ gridRow:
|
|
1342
|
-
}), c(
|
|
1343
|
-
}), s.fillSingleRows ?
|
|
1341
|
+
gridBand: re({ gridRow: T })
|
|
1342
|
+
}), c(K, L, w, U);
|
|
1343
|
+
}), s.fillSingleRows ? Bt(l, o) : l;
|
|
1344
1344
|
}, De = (a, o, s, t = W) => {
|
|
1345
1345
|
const l = a.filter((n) => E.isFun(n.item.show?.form, o, s)), e = /* @__PURE__ */ new Map();
|
|
1346
1346
|
a.forEach((n) => {
|
|
@@ -1353,9 +1353,9 @@ const we = (a) => {
|
|
|
1353
1353
|
if (!(n.length > 1 && u === W && n.every((c) => c.rowSpan < W))) return;
|
|
1354
1354
|
const d = n.filter((c) => E.isFun(c.item.show?.form, o, s));
|
|
1355
1355
|
if (d.length !== 1) return;
|
|
1356
|
-
const
|
|
1357
|
-
r.set(
|
|
1358
|
-
...
|
|
1356
|
+
const m = d[0];
|
|
1357
|
+
r.set(m.item.key, {
|
|
1358
|
+
...m,
|
|
1359
1359
|
rowSpan: W
|
|
1360
1360
|
});
|
|
1361
1361
|
}), xe(l.map((n) => r.get(n.item.key) || n), t, {
|
|
@@ -1367,9 +1367,9 @@ const we = (a) => {
|
|
|
1367
1367
|
const t = s.gridBand ?? re(s);
|
|
1368
1368
|
o.has(t) || o.set(t, []), o.get(t).push(s);
|
|
1369
1369
|
}), Array.from(o.keys()).sort((s, t) => s - t).map((s) => o.get(s));
|
|
1370
|
-
},
|
|
1371
|
-
if (!
|
|
1372
|
-
const s = o.defaultSpan ?? (o.maxSpan || 12) / 2, t =
|
|
1370
|
+
}, Lt = (a) => a?.length ? Array.isArray(a[0]) ? a.flat() : a : [], Tt = (a, o) => {
|
|
1371
|
+
if (!Ut(a) || !a.key) return null;
|
|
1372
|
+
const s = o.defaultSpan ?? (o.maxSpan || 12) / 2, t = At(a, s, o.layout);
|
|
1373
1373
|
return { item: a, span: t };
|
|
1374
1374
|
}, jt = (a, o = {}) => {
|
|
1375
1375
|
const s = [], t = (l) => {
|
|
@@ -1381,17 +1381,17 @@ const we = (a) => {
|
|
|
1381
1381
|
e && s.push(e);
|
|
1382
1382
|
};
|
|
1383
1383
|
return a.forEach((l) => t(l)), s;
|
|
1384
|
-
},
|
|
1384
|
+
}, et = (a, o = {}) => {
|
|
1385
1385
|
const s = o.maxSpan ?? 12, t = o.defaultSpan ?? s / 2, l = o.layout ?? "row", r = jt(a, { maxSpan: s, defaultSpan: t, layout: l });
|
|
1386
1386
|
if (l === "column") {
|
|
1387
1387
|
const n = [];
|
|
1388
1388
|
let u = 1;
|
|
1389
1389
|
return r.forEach((f) => {
|
|
1390
|
-
const d = Je(f.item),
|
|
1390
|
+
const d = Je(f.item), m = s;
|
|
1391
1391
|
n.push({
|
|
1392
1392
|
...f,
|
|
1393
|
-
span:
|
|
1394
|
-
colSpan:
|
|
1393
|
+
span: m,
|
|
1394
|
+
colSpan: m,
|
|
1395
1395
|
rowSpan: d,
|
|
1396
1396
|
gridRow: u,
|
|
1397
1397
|
gridColumn: 1,
|
|
@@ -1410,7 +1410,7 @@ const we = (a) => {
|
|
|
1410
1410
|
(r || l === "checkbox" || n) && (t.type = "array", t.min = r ? 2 : 1);
|
|
1411
1411
|
const u = typeof a.rules == "boolean" ? [t] : a.rules;
|
|
1412
1412
|
return s ? u.map((f) => s(f)) : u;
|
|
1413
|
-
}, Le = (a) => typeof a == "function" ? a() : a,
|
|
1413
|
+
}, Le = (a) => typeof a == "function" ? a() : a, tt = (a) => (o, s) => Kt(o, a, (t) => {
|
|
1414
1414
|
const l = (e, r) => {
|
|
1415
1415
|
if (r && Object.prototype.hasOwnProperty.call(r, o.key) && r[o.key] !== void 0) return r[o.key];
|
|
1416
1416
|
const n = Le(s);
|
|
@@ -1427,16 +1427,16 @@ const we = (a) => {
|
|
|
1427
1427
|
};
|
|
1428
1428
|
}
|
|
1429
1429
|
return t;
|
|
1430
|
-
}),
|
|
1430
|
+
}), ot = (a, o) => {
|
|
1431
1431
|
const s = {
|
|
1432
1432
|
input: k.tCurd("placeholderInput"),
|
|
1433
1433
|
select: k.tCurd("placeholderSelect")
|
|
1434
1434
|
}, t = (s[le(a) || "input"] || s.input) + a.label;
|
|
1435
1435
|
return (o || q.error.callback)?.(a.key, a) || t;
|
|
1436
|
-
},
|
|
1437
|
-
const t = {}, l = {}, e = o?.maxSpan || 12, r = o?.defaultSpan || e / 2, n =
|
|
1436
|
+
}, at = (a) => tt((o) => ot(o, a?.error)), Ht = (a, o, s) => {
|
|
1437
|
+
const t = {}, l = {}, e = o?.maxSpan || 12, r = o?.defaultSpan || e / 2, n = at(o);
|
|
1438
1438
|
a.forEach((d) => ke(d, !0)), Re(a, t, l, (d) => n(d, s));
|
|
1439
|
-
const { cells: u, maxSpan: f } =
|
|
1439
|
+
const { cells: u, maxSpan: f } = et(a, {
|
|
1440
1440
|
maxSpan: e,
|
|
1441
1441
|
defaultSpan: r,
|
|
1442
1442
|
layout: o?.layout
|
|
@@ -1461,7 +1461,7 @@ const we = (a) => {
|
|
|
1461
1461
|
}
|
|
1462
1462
|
};
|
|
1463
1463
|
a.forEach(l);
|
|
1464
|
-
}, Nt = { class: "curd-form-cell-inner" },
|
|
1464
|
+
}, Nt = { class: "curd-form-cell-inner" }, nt = /* @__PURE__ */ Q({
|
|
1465
1465
|
__name: "layout",
|
|
1466
1466
|
props: {
|
|
1467
1467
|
formGrid: {},
|
|
@@ -1497,20 +1497,20 @@ const we = (a) => {
|
|
|
1497
1497
|
}, d = (c) => Ze(c, t.value, s.form, s.type, {
|
|
1498
1498
|
maxSpan: s.maxSpan,
|
|
1499
1499
|
defaultSpan: s.formOption?.defaultSpan
|
|
1500
|
-
}),
|
|
1500
|
+
}), m = (c) => {
|
|
1501
1501
|
const p = d(c) || c.colSpan;
|
|
1502
1502
|
return {
|
|
1503
1503
|
gridRow: `${c.gridRow} / span ${c.rowSpan}`,
|
|
1504
1504
|
gridColumn: `${c.gridColumn} / span ${p}`
|
|
1505
1505
|
};
|
|
1506
1506
|
};
|
|
1507
|
-
return (c, p) => i(o)(i(Pt)(c.formGrid), c.form, c.type) ? (
|
|
1507
|
+
return (c, p) => i(o)(i(Pt)(c.formGrid), c.form, c.type) ? (b(), C(A, { key: 0 }, [
|
|
1508
1508
|
z(c.$slots, "form-start", { row: c.form }),
|
|
1509
|
-
|
|
1509
|
+
R("div", {
|
|
1510
1510
|
class: J(["curd-form-grid", { stripe: c.stripe !== !1 }]),
|
|
1511
1511
|
style: ye(e.value)
|
|
1512
1512
|
}, [
|
|
1513
|
-
(
|
|
1513
|
+
(b(!0), C(A, null, G(t.value, (w) => (b(), C("div", {
|
|
1514
1514
|
key: w.item.key,
|
|
1515
1515
|
class: J(["curd-form-grid-cell", [
|
|
1516
1516
|
c.stripe !== !1 && f(w) % 2 === 0 ? "stripe-band-odd" : "",
|
|
@@ -1519,10 +1519,10 @@ const we = (a) => {
|
|
|
1519
1519
|
u(w) ? "is-row-span" : "",
|
|
1520
1520
|
`form-item-col-${w.item.key}`
|
|
1521
1521
|
]]),
|
|
1522
|
-
style: ye(
|
|
1522
|
+
style: ye(m(w))
|
|
1523
1523
|
}, [
|
|
1524
|
-
|
|
1525
|
-
i(o)(w.item.show?.form, c.form, c.type) ? (
|
|
1524
|
+
R("div", Nt, [
|
|
1525
|
+
i(o)(w.item.show?.form, c.form, c.type) ? (b(), y(Ot, {
|
|
1526
1526
|
key: 0,
|
|
1527
1527
|
class: J({ "is-row-span-field": u(w) }),
|
|
1528
1528
|
item: w.item,
|
|
@@ -1533,10 +1533,10 @@ const we = (a) => {
|
|
|
1533
1533
|
"get-on": c.getOn,
|
|
1534
1534
|
"get-disabled": c.getDisabled
|
|
1535
1535
|
}, Z({ _: 2 }, [
|
|
1536
|
-
G(c.$slots, (
|
|
1537
|
-
name:
|
|
1536
|
+
G(c.$slots, (U, K) => ({
|
|
1537
|
+
name: K,
|
|
1538
1538
|
fn: h((L) => [
|
|
1539
|
-
z(c.$slots,
|
|
1539
|
+
z(c.$slots, K, S({ ref_for: !0 }, L || {}))
|
|
1540
1540
|
])
|
|
1541
1541
|
}))
|
|
1542
1542
|
]), 1032, ["class", "item", "form", "type", "label-width", "get-bind", "get-on", "get-disabled"])) : V("", !0)
|
|
@@ -1597,11 +1597,11 @@ const we = (a) => {
|
|
|
1597
1597
|
if (!d)
|
|
1598
1598
|
return f?.(!0), !0;
|
|
1599
1599
|
await Ce();
|
|
1600
|
-
const
|
|
1601
|
-
if (c.length && d.clearValidate(c), !
|
|
1600
|
+
const m = De(u.formGrid || [], u.form, u.type, u.formMaxSpan).map((w) => w.item.key).filter(Boolean), c = Object.keys(u.rules || {}).filter((w) => !m.includes(w));
|
|
1601
|
+
if (c.length && d.clearValidate(c), !m.length)
|
|
1602
1602
|
return f?.(!0), !0;
|
|
1603
|
-
const p = await d.validateField(
|
|
1604
|
-
w || me(ve(
|
|
1603
|
+
const p = await d.validateField(m, async (w, U) => {
|
|
1604
|
+
w || me(ve(U));
|
|
1605
1605
|
});
|
|
1606
1606
|
if (f?.(!!p), !p) throw !1;
|
|
1607
1607
|
return !0;
|
|
@@ -1611,14 +1611,14 @@ const we = (a) => {
|
|
|
1611
1611
|
(f) => {
|
|
1612
1612
|
e = we(f), u.initColumnForm();
|
|
1613
1613
|
}
|
|
1614
|
-
), o({ ref: t, conf: u }), (f, d) => (
|
|
1614
|
+
), o({ ref: t, conf: u }), (f, d) => (b(), y(i(oe), {
|
|
1615
1615
|
ref_key: "ruleFormRef",
|
|
1616
1616
|
ref: t,
|
|
1617
1617
|
model: u.form,
|
|
1618
1618
|
rules: u.rules
|
|
1619
1619
|
}, {
|
|
1620
1620
|
default: h(() => [
|
|
1621
|
-
u.show ? (
|
|
1621
|
+
u.show ? (b(), y(nt, {
|
|
1622
1622
|
key: 0,
|
|
1623
1623
|
"form-grid": u.formGrid,
|
|
1624
1624
|
"max-span": u.formMaxSpan,
|
|
@@ -1631,7 +1631,7 @@ const we = (a) => {
|
|
|
1631
1631
|
"get-on": u.getOn,
|
|
1632
1632
|
"get-disabled": u.getDisabled
|
|
1633
1633
|
}, Z({ _: 2 }, [
|
|
1634
|
-
G(f.$slots, (
|
|
1634
|
+
G(f.$slots, (m, c) => ({
|
|
1635
1635
|
name: c,
|
|
1636
1636
|
fn: h((p) => [
|
|
1637
1637
|
z(f.$slots, c, Me(Oe(p || {})))
|
|
@@ -1744,16 +1744,16 @@ const we = (a) => {
|
|
|
1744
1744
|
page: {
|
|
1745
1745
|
num: 1,
|
|
1746
1746
|
total: 0,
|
|
1747
|
-
layout: o.option.page?.layout ||
|
|
1748
|
-
showTools: o.option.page?.showTools ||
|
|
1749
|
-
size: o.option.page?.size ||
|
|
1750
|
-
sizeList: o.option.page?.sizeList ||
|
|
1751
|
-
pagerCount: o.option.page?.pagerCount ||
|
|
1747
|
+
layout: o.option.page?.layout || B.config.pagination.layout,
|
|
1748
|
+
showTools: o.option.page?.showTools || B.config.pagination.showTools,
|
|
1749
|
+
size: o.option.page?.size || B.config.pagination.size,
|
|
1750
|
+
sizeList: o.option.page?.sizeList || B.config.pagination.pageSizes,
|
|
1751
|
+
pagerCount: o.option.page?.pagerCount || B.config.pagination.pagerCount,
|
|
1752
1752
|
getQuery: (s = {}) => {
|
|
1753
1753
|
const t = a();
|
|
1754
1754
|
return {
|
|
1755
|
-
[
|
|
1756
|
-
[
|
|
1755
|
+
[B.config.field.page.size]: s.size || t.page.size,
|
|
1756
|
+
[B.config.field.page.num]: s.num || t.page.num,
|
|
1757
1757
|
...t.search.getFormData()
|
|
1758
1758
|
};
|
|
1759
1759
|
}
|
|
@@ -1833,7 +1833,7 @@ const we = (a) => {
|
|
|
1833
1833
|
};
|
|
1834
1834
|
},
|
|
1835
1835
|
getColumnBind: () => {
|
|
1836
|
-
const { show: l, button: e, page: r, scroll: n, field: u, rule: f, api: d, onEnd:
|
|
1836
|
+
const { show: l, button: e, page: r, scroll: n, field: u, rule: f, api: d, onEnd: m, ...c } = t().table.sortable.getOption();
|
|
1837
1837
|
return c;
|
|
1838
1838
|
},
|
|
1839
1839
|
destroy: () => {
|
|
@@ -1872,10 +1872,10 @@ const we = (a) => {
|
|
|
1872
1872
|
onEnd: ({ oldIndex: u, newIndex: f }) => {
|
|
1873
1873
|
const d = (c, p, w) => {
|
|
1874
1874
|
if (!Number.isInteger(p) || !Number.isInteger(w) || p === w || p < 0 || w < 0 || p >= c.length || w >= c.length) return;
|
|
1875
|
-
const
|
|
1876
|
-
c.splice(w, 0,
|
|
1877
|
-
},
|
|
1878
|
-
d(l.table.data, u, f), n.onEnd ? n.onEnd(l.table.data) : l.table.sortable.applyRule(l.table.data, n.field, n.rule,
|
|
1875
|
+
const U = c.splice(p, 1)[0];
|
|
1876
|
+
c.splice(w, 0, U);
|
|
1877
|
+
}, m = l.table.data.map((c) => c?.[n.field]);
|
|
1878
|
+
d(l.table.data, u, f), n.onEnd ? n.onEnd(l.table.data) : l.table.sortable.applyRule(l.table.data, n.field, n.rule, m);
|
|
1879
1879
|
}
|
|
1880
1880
|
});
|
|
1881
1881
|
},
|
|
@@ -1933,13 +1933,10 @@ const we = (a) => {
|
|
|
1933
1933
|
}
|
|
1934
1934
|
},
|
|
1935
1935
|
parseListResult: async (l) => {
|
|
1936
|
-
const e =
|
|
1937
|
-
const F = f.find((B) => B.item.key === w);
|
|
1938
|
-
F && ["select", "radio"].includes(F.item.type) && (F.item.table.format || (F.item.table.format = (B) => F.item.options[F.item.type].data?.find((L) => L.value == B[w])?.label || B[w]));
|
|
1939
|
-
}), c));
|
|
1936
|
+
const e = B.config.field.result, r = l?.data || { [e.list]: l }, n = Array.isArray(r) ? r : (Array.isArray(r[e.list]), r[e.list]), f = ObjectUtil.deepMerge({ data: n }, {}).data;
|
|
1940
1937
|
return {
|
|
1941
|
-
data: o.option.data ? await o.option.data(
|
|
1942
|
-
total:
|
|
1938
|
+
data: o.option.data ? await o.option.data(f, n) : f,
|
|
1939
|
+
total: r[e.total] || 0
|
|
1943
1940
|
};
|
|
1944
1941
|
},
|
|
1945
1942
|
applyListResult: async (l, e) => {
|
|
@@ -1954,7 +1951,7 @@ const we = (a) => {
|
|
|
1954
1951
|
await e.initApiData("init");
|
|
1955
1952
|
let f = {};
|
|
1956
1953
|
if (e.table.sort.prop) {
|
|
1957
|
-
const { props: c, order: p } =
|
|
1954
|
+
const { props: c, order: p } = B.config.table.sort;
|
|
1958
1955
|
f = {
|
|
1959
1956
|
[c.field]: e.table.sort.prop,
|
|
1960
1957
|
[p.field]: e.table.sort.order
|
|
@@ -1963,14 +1960,14 @@ const we = (a) => {
|
|
|
1963
1960
|
const d = l === "sortable" && r?.page === !1 ? e.page.getQuery({
|
|
1964
1961
|
num: 1,
|
|
1965
1962
|
size: e.page.total || 999999
|
|
1966
|
-
}) : e.page.getQuery(),
|
|
1963
|
+
}) : e.page.getQuery(), m = await n(
|
|
1967
1964
|
{
|
|
1968
1965
|
...d,
|
|
1969
1966
|
...f
|
|
1970
1967
|
},
|
|
1971
1968
|
l
|
|
1972
1969
|
);
|
|
1973
|
-
await e.table.applyListResult(
|
|
1970
|
+
await e.table.applyListResult(m, l === "sortable" && r?.page === !1 ? e.page.total : void 0), setTimeout(() => {
|
|
1974
1971
|
e.table.selection.setList(u), o.option.table?.sortable?.show && !o.option.table?.sortable?.button && e.table.sortable.sync();
|
|
1975
1972
|
}, 20);
|
|
1976
1973
|
} catch (f) {
|
|
@@ -1990,28 +1987,28 @@ const we = (a) => {
|
|
|
1990
1987
|
const n = s.tableRef.value;
|
|
1991
1988
|
if (n?.clearSelection(), !n || !l?.length) return;
|
|
1992
1989
|
const u = o.option.table?.rowKey, f = (d) => {
|
|
1993
|
-
const
|
|
1990
|
+
const m = (c) => {
|
|
1994
1991
|
for (const p of c) {
|
|
1995
1992
|
if (u != null && u !== "") {
|
|
1996
1993
|
if (p[u] === d[u]) return p;
|
|
1997
1994
|
} else if (p === d)
|
|
1998
1995
|
return p;
|
|
1999
1996
|
if (Array.isArray(p.children) && p.children.length) {
|
|
2000
|
-
const w =
|
|
1997
|
+
const w = m(p.children);
|
|
2001
1998
|
if (w !== void 0) return w;
|
|
2002
1999
|
}
|
|
2003
2000
|
}
|
|
2004
2001
|
};
|
|
2005
|
-
return
|
|
2002
|
+
return m(r.table.data);
|
|
2006
2003
|
};
|
|
2007
2004
|
l.forEach((d) => {
|
|
2008
|
-
const
|
|
2009
|
-
if (
|
|
2005
|
+
const m = f(d);
|
|
2006
|
+
if (m)
|
|
2010
2007
|
if (e) {
|
|
2011
|
-
const c = () => n.toggleRowSelection(
|
|
2008
|
+
const c = () => n.toggleRowSelection(m, !0, !1);
|
|
2012
2009
|
e(d) !== !1 && c();
|
|
2013
2010
|
} else
|
|
2014
|
-
n.toggleRowSelection(
|
|
2011
|
+
n.toggleRowSelection(m, !0, !1);
|
|
2015
2012
|
});
|
|
2016
2013
|
}
|
|
2017
2014
|
},
|
|
@@ -2020,8 +2017,8 @@ const we = (a) => {
|
|
|
2020
2017
|
order: "",
|
|
2021
2018
|
change: (l) => {
|
|
2022
2019
|
const e = t();
|
|
2023
|
-
|
|
2024
|
-
const r =
|
|
2020
|
+
B.config.table.sort.resetPage && (e.page.num = 1);
|
|
2021
|
+
const r = B.config.table.sort;
|
|
2025
2022
|
if (r.change) {
|
|
2026
2023
|
r.change(l, e);
|
|
2027
2024
|
return;
|
|
@@ -2038,18 +2035,18 @@ const we = (a) => {
|
|
|
2038
2035
|
let v = t.get(g);
|
|
2039
2036
|
return v || (l += 1, v = `fallback-${l}`, t.set(g, v)), v;
|
|
2040
2037
|
}, r = (g) => {
|
|
2041
|
-
const v = o.option.table?.rowKey,
|
|
2042
|
-
return
|
|
2043
|
-
}, n = (g, v) => `${r(g)}-${v.key}`, u = (g) =>
|
|
2038
|
+
const v = o.option.table?.rowKey, D = v ? g[v] : void 0;
|
|
2039
|
+
return D != null && D !== "" ? String(D) : e(g);
|
|
2040
|
+
}, n = (g, v) => `${r(g)}-${v.key}`, u = (g) => ot(g, o.option.form?.error), f = tt(u), d = () => {
|
|
2044
2041
|
Object.keys(s).forEach((g) => {
|
|
2045
2042
|
delete s[g];
|
|
2046
2043
|
});
|
|
2047
|
-
},
|
|
2044
|
+
}, m = (g, v) => {
|
|
2048
2045
|
delete s[n(g, v)];
|
|
2049
|
-
}, c = (g, v) => s[n(g, v)] || "", p = (g, v) => g.message || u(v), w = (g) => g == null || g === "" || Array.isArray(g) && g.length === 0,
|
|
2046
|
+
}, c = (g, v) => s[n(g, v)] || "", p = (g, v) => g.message || u(v), w = (g) => g == null || g === "" || Array.isArray(g) && g.length === 0, U = (g) => {
|
|
2050
2047
|
if (typeof g == "number") return g;
|
|
2051
2048
|
if (typeof g == "string" || Array.isArray(g)) return g.length;
|
|
2052
|
-
},
|
|
2049
|
+
}, K = (g, v) => {
|
|
2053
2050
|
if (g === "array") return Array.isArray(v);
|
|
2054
2051
|
if (g === "integer") return typeof v == "number" && Number.isInteger(v);
|
|
2055
2052
|
if (g === "float") return typeof v == "number" && !Number.isInteger(v);
|
|
@@ -2065,88 +2062,88 @@ const we = (a) => {
|
|
|
2065
2062
|
return !1;
|
|
2066
2063
|
}
|
|
2067
2064
|
return g === "string" ? typeof v == "string" : !0;
|
|
2068
|
-
}, L = (g, v,
|
|
2065
|
+
}, L = (g, v, D) => typeof g.validator != "function" ? Promise.resolve(!0) : new Promise((H) => {
|
|
2069
2066
|
let N = !1;
|
|
2070
|
-
const
|
|
2067
|
+
const j = (I) => {
|
|
2071
2068
|
if (!N) {
|
|
2072
2069
|
if (N = !0, I == null) {
|
|
2073
2070
|
H(!0);
|
|
2074
2071
|
return;
|
|
2075
2072
|
}
|
|
2076
2073
|
if (I instanceof Error) {
|
|
2077
|
-
H(I.message || p(g,
|
|
2074
|
+
H(I.message || p(g, D));
|
|
2078
2075
|
return;
|
|
2079
2076
|
}
|
|
2080
2077
|
if (Array.isArray(I)) {
|
|
2081
2078
|
const ze = I[0];
|
|
2082
|
-
H(ze instanceof Error ? ze.message : String(ze || p(g,
|
|
2079
|
+
H(ze instanceof Error ? ze.message : String(ze || p(g, D)));
|
|
2083
2080
|
return;
|
|
2084
2081
|
}
|
|
2085
2082
|
H(String(I));
|
|
2086
2083
|
}
|
|
2087
2084
|
};
|
|
2088
2085
|
try {
|
|
2089
|
-
const I = g.validator(g, v,
|
|
2090
|
-
I && typeof I.then == "function" ? I.then(() =>
|
|
2086
|
+
const I = g.validator(g, v, j);
|
|
2087
|
+
I && typeof I.then == "function" ? I.then(() => j()).catch(j) : I === !1 ? j(p(g, D)) : typeof I == "string" || I instanceof Error ? j(I) : g.validator.length < 3 && j();
|
|
2091
2088
|
} catch (I) {
|
|
2092
|
-
|
|
2089
|
+
j(I);
|
|
2093
2090
|
}
|
|
2094
|
-
}),
|
|
2091
|
+
}), T = async (g, v, D) => {
|
|
2095
2092
|
const H = typeof g.transform == "function" ? g.transform(v) : v, N = w(H);
|
|
2096
|
-
if (g.required && N) return p(g,
|
|
2093
|
+
if (g.required && N) return p(g, D);
|
|
2097
2094
|
if (N && !g.required) return !0;
|
|
2098
|
-
if (g.whitespace && typeof H == "string" && H.trim() === "" || g.type && !
|
|
2099
|
-
const
|
|
2100
|
-
return g.len !== void 0 &&
|
|
2095
|
+
if (g.whitespace && typeof H == "string" && H.trim() === "" || g.type && !K(g.type, H) || Array.isArray(g.enum) && !g.enum.includes(H) || g.pattern && !new RegExp(g.pattern).test(String(H))) return p(g, D);
|
|
2096
|
+
const j = U(H);
|
|
2097
|
+
return g.len !== void 0 && j !== void 0 && j !== g.len || g.min !== void 0 && j !== void 0 && j < g.min || g.max !== void 0 && j !== void 0 && j > g.max ? p(g, D) : L(g, H, D);
|
|
2101
2098
|
}, Ve = (g) => {
|
|
2102
2099
|
const v = a();
|
|
2103
2100
|
return !g.key || !v.table.column.show.list.includes(g.key) || g.table?.header?.groupKey !== void 0 && !g.table.header.show ? !1 : g.show?.table !== void 0 ? E.isFun(g.show?.table, v.table.data) : !0;
|
|
2104
2101
|
}, Se = (g, v) => g.show?.form !== void 0 ? E.isFun(g.show.form, v, E.EDialog.Update) : !0, _ = () => {
|
|
2105
|
-
const g = a(), v = [],
|
|
2102
|
+
const g = a(), v = [], D = (H) => {
|
|
2106
2103
|
H.forEach((N) => {
|
|
2107
2104
|
if (Ve(N)) {
|
|
2108
2105
|
if (N.children?.length) {
|
|
2109
|
-
|
|
2106
|
+
D(N.children);
|
|
2110
2107
|
return;
|
|
2111
2108
|
}
|
|
2112
2109
|
v.push(N);
|
|
2113
2110
|
}
|
|
2114
2111
|
});
|
|
2115
2112
|
};
|
|
2116
|
-
return
|
|
2113
|
+
return D(g.table.column.list), v;
|
|
2117
2114
|
}, Ee = async (g, v) => {
|
|
2118
2115
|
if (!Se(v, g))
|
|
2119
|
-
return
|
|
2120
|
-
const
|
|
2121
|
-
if (!
|
|
2122
|
-
|
|
2123
|
-
const H = Array.isArray(
|
|
2116
|
+
return m(g, v), !0;
|
|
2117
|
+
const D = f(v, g);
|
|
2118
|
+
if (!D) return !0;
|
|
2119
|
+
m(g, v);
|
|
2120
|
+
const H = Array.isArray(D) ? D : [D];
|
|
2124
2121
|
for (const N of H) {
|
|
2125
|
-
const
|
|
2126
|
-
if (
|
|
2127
|
-
return s[n(g, v)] =
|
|
2122
|
+
const j = await T(N, g[v.key], v);
|
|
2123
|
+
if (j !== !0)
|
|
2124
|
+
return s[n(g, v)] = j, {
|
|
2128
2125
|
field: v.key,
|
|
2129
|
-
error:
|
|
2126
|
+
error: j
|
|
2130
2127
|
};
|
|
2131
2128
|
}
|
|
2132
2129
|
return !0;
|
|
2133
2130
|
}, te = (g) => {
|
|
2134
|
-
const v = [],
|
|
2131
|
+
const v = [], D = (H) => {
|
|
2135
2132
|
H.forEach((N) => {
|
|
2136
|
-
v.push(N), Array.isArray(N.children) && N.children.length &&
|
|
2133
|
+
v.push(N), Array.isArray(N.children) && N.children.length && D(N.children);
|
|
2137
2134
|
});
|
|
2138
2135
|
};
|
|
2139
|
-
return
|
|
2136
|
+
return D(g), v;
|
|
2140
2137
|
};
|
|
2141
2138
|
return {
|
|
2142
2139
|
tableEditValidate: {
|
|
2143
2140
|
errors: s,
|
|
2144
2141
|
clear: d,
|
|
2145
|
-
clearField:
|
|
2142
|
+
clearField: m,
|
|
2146
2143
|
getFieldError: c,
|
|
2147
2144
|
validate: async () => {
|
|
2148
2145
|
if (d(), !o.option.table?.editMode) return !0;
|
|
2149
|
-
const g = a(), v = _(),
|
|
2146
|
+
const g = a(), v = _(), D = te(g.table.data || []), N = (await Promise.all(D.flatMap((j) => v.map((I) => Ee(j, I))))).filter((j) => j !== !0);
|
|
2150
2147
|
if (N.length)
|
|
2151
2148
|
throw me(N), !1;
|
|
2152
2149
|
return !0;
|
|
@@ -2233,7 +2230,7 @@ const xt = (a, o) => ({
|
|
|
2233
2230
|
const t = o.option.api.list, l = await t({
|
|
2234
2231
|
...s.page.getQuery({ size: 999999, num: 1 })
|
|
2235
2232
|
});
|
|
2236
|
-
return (l.data || { [
|
|
2233
|
+
return (l.data || { [B.config.field.result.list]: l })[B.config.field.result.list];
|
|
2237
2234
|
} catch (t) {
|
|
2238
2235
|
console.error(t);
|
|
2239
2236
|
} finally {
|
|
@@ -2289,7 +2286,7 @@ const xt = (a, o) => ({
|
|
|
2289
2286
|
const e = a(), r = e.update.formGrid?.length ? e.update.formGrid : l || [];
|
|
2290
2287
|
return Ze(t, r, e.update.form, e.update.type, {
|
|
2291
2288
|
maxSpan: e.update.formMaxSpan || o.option.form?.maxSpan,
|
|
2292
|
-
defaultSpan: o.option.form?.defaultSpan ||
|
|
2289
|
+
defaultSpan: o.option.form?.defaultSpan || B.config.form.defaultSpan
|
|
2293
2290
|
});
|
|
2294
2291
|
},
|
|
2295
2292
|
init: () => {
|
|
@@ -2299,29 +2296,33 @@ const xt = (a, o) => ({
|
|
|
2299
2296
|
initApiData: async (t) => {
|
|
2300
2297
|
const l = a(), e = [], r = (n) => {
|
|
2301
2298
|
if (n.children?.length) {
|
|
2302
|
-
n.children.forEach((
|
|
2299
|
+
n.children.forEach((d) => r(d));
|
|
2303
2300
|
return;
|
|
2304
2301
|
}
|
|
2305
|
-
const u = le(n)
|
|
2302
|
+
const u = le(n), f = () => {
|
|
2303
|
+
n.table?.format || (n.table ??= {}, n.table.format = (d) => n.options[u].data.find((c) => c.value === d[n.key])?.label ?? d[n.key]);
|
|
2304
|
+
};
|
|
2306
2305
|
if (n.options?.[u]?.dataApi && n.options?.[u]?.dataApiConfig?.[t]) {
|
|
2307
2306
|
if (l.apiDataMap[n.key] && n.options?.[u]?.dataApiConfig?.once) return;
|
|
2308
|
-
const
|
|
2307
|
+
const d = (async () => {
|
|
2309
2308
|
try {
|
|
2310
|
-
let
|
|
2311
|
-
if (
|
|
2312
|
-
const
|
|
2313
|
-
!Array.isArray(
|
|
2309
|
+
let m = await n.options?.[u]?.dataApi?.(l.update.form, l.update.type);
|
|
2310
|
+
if (m) {
|
|
2311
|
+
const c = n.options?.[u]?.dataPath;
|
|
2312
|
+
!Array.isArray(m) && c && (m = ObjectUtil.getPathValue(m, c)), n.options[u].data = m, n.options.search[u].data = m;
|
|
2313
|
+
const p = n.options.search.type ?? u;
|
|
2314
|
+
n.options.search[p] ??= {}, n.options.search[p].data = m, n.options.formAdd[u].data = m, n.options.formUpdate[u].data = m, f(), l.apiDataMap[n.key] = m;
|
|
2314
2315
|
}
|
|
2315
2316
|
} catch {
|
|
2316
2317
|
}
|
|
2317
2318
|
})();
|
|
2318
|
-
e.push(
|
|
2319
|
-
}
|
|
2319
|
+
e.push(d);
|
|
2320
|
+
} else Array.isArray(n.options?.[u]?.data) && f();
|
|
2320
2321
|
};
|
|
2321
2322
|
return o.option.column.forEach((n) => r(n)), await Promise.all(e), !0;
|
|
2322
2323
|
},
|
|
2323
2324
|
initCurdConfig: () => {
|
|
2324
|
-
const t = ObjectUtil.deepMerge(
|
|
2325
|
+
const t = ObjectUtil.deepMerge(B.config, {});
|
|
2325
2326
|
t.table.emptyText = k.tCurd("noData"), o.option.size = o.option.size || {}, t.table.size = o.option.size.table || t.size.table, t.form.size = o.option.size.form || t.size.form, t.size.search = o.option.size.search || t.size.search;
|
|
2326
2327
|
const l = ObjectUtil.deepMerge(t, o.option || {});
|
|
2327
2328
|
Object.keys(l).forEach((e) => {
|
|
@@ -2330,7 +2331,7 @@ const xt = (a, o) => ({
|
|
|
2330
2331
|
},
|
|
2331
2332
|
initColumnOptions: () => {
|
|
2332
2333
|
const t = a();
|
|
2333
|
-
let l = JSONUtil.cp(
|
|
2334
|
+
let l = JSONUtil.cp(B.config.columnConfig);
|
|
2334
2335
|
l.options = ObjectUtil.deepMerge(
|
|
2335
2336
|
{
|
|
2336
2337
|
switch: {
|
|
@@ -2354,26 +2355,26 @@ const xt = (a, o) => ({
|
|
|
2354
2355
|
["search", "formAdd", "formUpdate"].forEach((f) => {
|
|
2355
2356
|
r.options[f] = ObjectUtil.deepMerge(r.options, r.options[f] || {}), f === "search" ? o.option.size.search && (r.options[f][n].size = o.option.size.search) : o.option.size.form && (r.options[f][n].size = o.option.size.form);
|
|
2356
2357
|
}), r.table = ObjectUtil.deepMerge(r.table, r.options[n].table || {}), n === "switch" && (r.options.switch.tableBeforeChange = async (f, d) => {
|
|
2357
|
-
const
|
|
2358
|
+
const m = r.options?.switch;
|
|
2358
2359
|
try {
|
|
2359
|
-
|
|
2360
|
+
m.tableConfig?.confirm && await s.switchConfirmRef.value?.open({
|
|
2360
2361
|
title: k.tCurd("confirmModify"),
|
|
2361
2362
|
content: k.tCurd("confirmSwitchMessage")
|
|
2362
2363
|
});
|
|
2363
2364
|
try {
|
|
2364
|
-
if (!o.option.api.update && !
|
|
2365
|
+
if (!o.option.api.update && !m.tableConfig?.api) return;
|
|
2365
2366
|
const c = d[o.option.table?.rowKey];
|
|
2366
|
-
|
|
2367
|
-
const p = d[f] ===
|
|
2367
|
+
m.loadingMap || (m.loadingMap = {}), m.loadingMap[c] || (m.loadingMap[c] = { loading: !1 }), m.loadingMap[c].loading = !0;
|
|
2368
|
+
const p = d[f] === m.activeValue ? m.inactiveValue : m.activeValue, w = m.tableConfig?.api ? m.tableConfig.api : o.option.api.update;
|
|
2368
2369
|
if (!w) return;
|
|
2369
2370
|
try {
|
|
2370
2371
|
await w({ ...d, [f]: p }, "switch");
|
|
2371
2372
|
} catch {
|
|
2372
2373
|
return !1;
|
|
2373
2374
|
} finally {
|
|
2374
|
-
|
|
2375
|
+
m.loadingMap[c].loading = !1;
|
|
2375
2376
|
}
|
|
2376
|
-
return E.success(k.tCurd("operationSuccess")),
|
|
2377
|
+
return E.success(k.tCurd("operationSuccess")), m.tableConfig?.loadList && (t.table.loading = !0, t.table.getList(), t.table.loading = !1), !0;
|
|
2377
2378
|
} catch (c) {
|
|
2378
2379
|
return console.error(c), !1;
|
|
2379
2380
|
} finally {
|
|
@@ -2389,7 +2390,7 @@ const xt = (a, o) => ({
|
|
|
2389
2390
|
initColumnForm: () => {
|
|
2390
2391
|
const t = a(), l = o.option;
|
|
2391
2392
|
t.update.formColumn = [], t.update.formGrid = [], t.update.formMaxSpan = 12, t.table.column.show = { list: [], listSource: [] };
|
|
2392
|
-
const e = o.option.form?.maxSpan || 12, r = o.option.form?.defaultSpan || e / 2, n =
|
|
2393
|
+
const e = o.option.form?.maxSpan || 12, r = o.option.form?.defaultSpan || e / 2, n = at(o.option.form), u = (c) => {
|
|
2393
2394
|
if (c.children) {
|
|
2394
2395
|
t.table.column.show.list.push(c.key), c.children.forEach((p) => u(p));
|
|
2395
2396
|
return;
|
|
@@ -2401,7 +2402,7 @@ const xt = (a, o) => ({
|
|
|
2401
2402
|
}), o.option.table?.column?.forEach((c) => {
|
|
2402
2403
|
ke(c, !1), u(c);
|
|
2403
2404
|
}), t.search.column.list = l.column.concat(l.table?.column || []), t.table.column.list = t.search.column.list.filter((c) => c.table?.table), t.search.column.list.sort((c, p) => c.sort?.search - p.sort?.search), t.table.column.list.sort((c, p) => c.sort?.table - p.sort?.table), t.update.rules = {}, Re(l.column, t.update.formDefault, t.update.rules, (c) => n(c, () => t.update.form)), l.table?.editMode && Re(l.table?.column || [], t.update.formDefault, t.update.rules, (c) => n(c, () => t.update.form));
|
|
2404
|
-
const f =
|
|
2405
|
+
const f = et(l.column, {
|
|
2405
2406
|
maxSpan: e,
|
|
2406
2407
|
defaultSpan: r,
|
|
2407
2408
|
layout: o.option.form?.layout
|
|
@@ -2413,13 +2414,13 @@ const xt = (a, o) => ({
|
|
|
2413
2414
|
}), l.column.forEach((c) => {
|
|
2414
2415
|
c.show?.search || (t.search.formDefault[c.key] = void 0);
|
|
2415
2416
|
});
|
|
2416
|
-
const
|
|
2417
|
-
x.setValue(t.search.form,
|
|
2417
|
+
const m = ObjectUtil.deepMerge(t.search.formDefault, {});
|
|
2418
|
+
x.setValue(t.search.form, m, !0);
|
|
2418
2419
|
}
|
|
2419
2420
|
}), to = (a) => {
|
|
2420
|
-
const o = Y(), s = Y(), t = Y(), l = { switchConfirmRef: o, ruleFormRef: s, tableRef: t }, e = Ge(), r = Fe.getConf("curdConf"), n = (
|
|
2421
|
-
|
|
2422
|
-
let c =
|
|
2421
|
+
const o = Y(), s = Y(), t = Y(), l = { switchConfirmRef: o, ruleFormRef: s, tableRef: t }, e = Ge(), r = Fe.getConf("curdConf"), n = (m) => {
|
|
2422
|
+
m = m || f;
|
|
2423
|
+
let c = m, p = m;
|
|
2423
2424
|
for (; c?.parentCurdConf; )
|
|
2424
2425
|
p = c.parentCurdConf, c = c.parentCurdConf;
|
|
2425
2426
|
return p;
|
|
@@ -2435,16 +2436,16 @@ const xt = (a, o) => ({
|
|
|
2435
2436
|
...Xt(u, a, l),
|
|
2436
2437
|
...Yt(u, a),
|
|
2437
2438
|
...xt(u, a),
|
|
2438
|
-
...
|
|
2439
|
+
...Dt(u, a, l),
|
|
2439
2440
|
..._t(u, a),
|
|
2440
2441
|
...eo(u, a, l)
|
|
2441
2442
|
});
|
|
2442
2443
|
f.init();
|
|
2443
2444
|
const d = e ? `curdRef-${e.uid}` : "";
|
|
2444
2445
|
return r?.formRef && d && (r.formRef.set(d, {
|
|
2445
|
-
validate: async (
|
|
2446
|
+
validate: async (m) => {
|
|
2446
2447
|
const c = await f.update.validate(!1);
|
|
2447
|
-
if (
|
|
2448
|
+
if (m?.(!!c), !c) throw !1;
|
|
2448
2449
|
return !0;
|
|
2449
2450
|
}
|
|
2450
2451
|
}), Ie(() => {
|
|
@@ -2457,7 +2458,7 @@ const xt = (a, o) => ({
|
|
|
2457
2458
|
}
|
|
2458
2459
|
f.table.getList();
|
|
2459
2460
|
}
|
|
2460
|
-
}),
|
|
2461
|
+
}), ht(() => {
|
|
2461
2462
|
f.table.sortable.destroy();
|
|
2462
2463
|
}), Fe.setConf("curdConf", f), { conf: f, switchConfirmRef: o, ruleFormRef: s, tableRef: t };
|
|
2463
2464
|
}, oo = { class: "dialog-footer" }, ao = /* @__PURE__ */ Q({
|
|
@@ -2468,8 +2469,8 @@ const xt = (a, o) => ({
|
|
|
2468
2469
|
setup(a, { expose: o }) {
|
|
2469
2470
|
const s = Y(!1), t = Y("确认修改"), l = Y("确认要修改状态吗?");
|
|
2470
2471
|
let e = null, r = null;
|
|
2471
|
-
const n = (d) => (d?.title && (t.value = d.title), d?.content && (l.value = d.content), s.value = !0, new Promise((
|
|
2472
|
-
e =
|
|
2472
|
+
const n = (d) => (d?.title && (t.value = d.title), d?.content && (l.value = d.content), s.value = !0, new Promise((m, c) => {
|
|
2473
|
+
e = m, r = c;
|
|
2473
2474
|
})), u = () => {
|
|
2474
2475
|
s.value = !1, e?.(!0), e = null, r = null;
|
|
2475
2476
|
}, f = () => {
|
|
@@ -2477,11 +2478,11 @@ const xt = (a, o) => ({
|
|
|
2477
2478
|
};
|
|
2478
2479
|
return o({
|
|
2479
2480
|
open: n
|
|
2480
|
-
}), (d,
|
|
2481
|
+
}), (d, m) => {
|
|
2481
2482
|
const c = pe("el-form");
|
|
2482
|
-
return
|
|
2483
|
+
return b(), y(i($e), {
|
|
2483
2484
|
modelValue: s.value,
|
|
2484
|
-
"onUpdate:modelValue":
|
|
2485
|
+
"onUpdate:modelValue": m[0] || (m[0] = (p) => s.value = p),
|
|
2485
2486
|
title: t.value,
|
|
2486
2487
|
"close-on-click-modal": !1,
|
|
2487
2488
|
width: "400px"
|
|
@@ -2489,18 +2490,18 @@ const xt = (a, o) => ({
|
|
|
2489
2490
|
footer: h(() => [
|
|
2490
2491
|
M(c, { size: d.size }, {
|
|
2491
2492
|
default: h(() => [
|
|
2492
|
-
|
|
2493
|
-
M(i(
|
|
2494
|
-
default: h(() =>
|
|
2493
|
+
R("span", oo, [
|
|
2494
|
+
M(i(P), { onClick: f }, {
|
|
2495
|
+
default: h(() => m[1] || (m[1] = [
|
|
2495
2496
|
O("取消")
|
|
2496
2497
|
])),
|
|
2497
2498
|
_: 1
|
|
2498
2499
|
}),
|
|
2499
|
-
M(i(
|
|
2500
|
+
M(i(P), {
|
|
2500
2501
|
type: "primary",
|
|
2501
2502
|
onClick: u
|
|
2502
2503
|
}, {
|
|
2503
|
-
default: h(() =>
|
|
2504
|
+
default: h(() => m[2] || (m[2] = [
|
|
2504
2505
|
O("确认")
|
|
2505
2506
|
])),
|
|
2506
2507
|
_: 1
|
|
@@ -2511,7 +2512,7 @@ const xt = (a, o) => ({
|
|
|
2511
2512
|
}, 8, ["size"])
|
|
2512
2513
|
]),
|
|
2513
2514
|
default: h(() => [
|
|
2514
|
-
|
|
2515
|
+
R("div", null, F(l.value), 1)
|
|
2515
2516
|
]),
|
|
2516
2517
|
_: 1
|
|
2517
2518
|
}, 8, ["modelValue", "title"]);
|
|
@@ -2525,7 +2526,7 @@ const xt = (a, o) => ({
|
|
|
2525
2526
|
},
|
|
2526
2527
|
setup(a) {
|
|
2527
2528
|
const o = a, s = ae(() => typeof o.content == "function" ? o.content(o.value) : o.content);
|
|
2528
|
-
return (t, l) => typeof s.value == "object" ? (
|
|
2529
|
+
return (t, l) => typeof s.value == "object" ? (b(), y(ee(s.value), { key: 0 })) : (b(), C("div", {
|
|
2529
2530
|
key: 1,
|
|
2530
2531
|
innerHTML: s.value
|
|
2531
2532
|
}, null, 8, no));
|
|
@@ -2544,18 +2545,18 @@ const xt = (a, o) => ({
|
|
|
2544
2545
|
o.item?.key !== void 0 && (o.conf.search.form[o.item.key] = t);
|
|
2545
2546
|
}
|
|
2546
2547
|
});
|
|
2547
|
-
return (t, l) => i(q).customComponent[t.type ?? ""]?.search ? (
|
|
2548
|
+
return (t, l) => i(q).customComponent[t.type ?? ""]?.search ? (b(), y(ee(i(q).customComponent[t.type ?? ""]?.search), S({
|
|
2548
2549
|
key: 0,
|
|
2549
2550
|
modelValue: s.value,
|
|
2550
2551
|
"onUpdate:modelValue": l[0] || (l[0] = (e) => s.value = e)
|
|
2551
|
-
}, t.item.options?.search?.[t.type ?? ""], $(t.item.options?.search?.[t.type ?? ""]?.on || {})), null, 16, ["modelValue"])) : t.type === "input" ? (
|
|
2552
|
+
}, t.item.options?.search?.[t.type ?? ""], $(t.item.options?.search?.[t.type ?? ""]?.on || {})), null, 16, ["modelValue"])) : t.type === "input" ? (b(), y(i(fe), S({
|
|
2552
2553
|
key: 1,
|
|
2553
2554
|
modelValue: s.value,
|
|
2554
2555
|
"onUpdate:modelValue": l[1] || (l[1] = (e) => s.value = e),
|
|
2555
2556
|
placeholder: t.conf.search.getPlaceholder(t.item),
|
|
2556
2557
|
clearable: "",
|
|
2557
2558
|
disabled: t.item.disabled?.search
|
|
2558
|
-
}, t.item.options?.search?.input || t.item.options?.input, $(t.item.options?.search?.input?.on || t.item.options?.input?.on || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : t.type === "switch" ? (
|
|
2559
|
+
}, t.item.options?.search?.input || t.item.options?.input, $(t.item.options?.search?.input?.on || t.item.options?.input?.on || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : t.type === "switch" ? (b(), y(i(ce), S({
|
|
2559
2560
|
key: 2,
|
|
2560
2561
|
modelValue: s.value,
|
|
2561
2562
|
"onUpdate:modelValue": l[2] || (l[2] = (e) => s.value = e),
|
|
@@ -2564,19 +2565,19 @@ const xt = (a, o) => ({
|
|
|
2564
2565
|
disabled: t.item.disabled?.search
|
|
2565
2566
|
}, t.item.options?.search?.switch || t.item.options?.switch, $(t.item.options?.search?.switch?.on || t.item.options?.switch?.on || {})), {
|
|
2566
2567
|
default: h(() => [
|
|
2567
|
-
(
|
|
2568
|
+
(b(), y(i(ne), {
|
|
2568
2569
|
key: t.item.options?.switch?.activeValue,
|
|
2569
2570
|
label: t.item.options?.switch?.activeText,
|
|
2570
2571
|
value: t.item.options?.switch?.activeValue
|
|
2571
2572
|
}, null, 8, ["label", "value"])),
|
|
2572
|
-
(
|
|
2573
|
+
(b(), y(i(ne), {
|
|
2573
2574
|
key: t.item.options?.switch?.inactiveValue,
|
|
2574
2575
|
label: t.item.options?.switch?.inactiveText,
|
|
2575
2576
|
value: t.item.options?.switch?.inactiveValue
|
|
2576
2577
|
}, null, 8, ["label", "value"]))
|
|
2577
2578
|
]),
|
|
2578
2579
|
_: 1
|
|
2579
|
-
}, 16, ["modelValue", "placeholder", "disabled"])) : t.type === "select" ? (
|
|
2580
|
+
}, 16, ["modelValue", "placeholder", "disabled"])) : t.type === "select" ? (b(), y(i(ce), S({
|
|
2580
2581
|
key: 3,
|
|
2581
2582
|
modelValue: s.value,
|
|
2582
2583
|
"onUpdate:modelValue": l[3] || (l[3] = (e) => s.value = e),
|
|
@@ -2585,33 +2586,33 @@ const xt = (a, o) => ({
|
|
|
2585
2586
|
disabled: t.item.disabled?.search
|
|
2586
2587
|
}, t.item.options?.search?.select || t.item.options?.select, $(t.item.options?.search?.select?.on || t.item.options?.select?.on || {})), {
|
|
2587
2588
|
default: h(() => [
|
|
2588
|
-
(
|
|
2589
|
+
(b(!0), C(A, null, G(t.item.options?.search?.select?.data || t.item.options?.select?.data || [], (e) => (b(), y(i(ne), {
|
|
2589
2590
|
key: e.value,
|
|
2590
2591
|
label: e.label,
|
|
2591
2592
|
value: e.value
|
|
2592
2593
|
}, null, 8, ["label", "value"]))), 128))
|
|
2593
2594
|
]),
|
|
2594
2595
|
_: 1
|
|
2595
|
-
}, 16, ["modelValue", "placeholder", "disabled"])) : t.type === "radio" ? (
|
|
2596
|
+
}, 16, ["modelValue", "placeholder", "disabled"])) : t.type === "radio" ? (b(), y(i(je), S({
|
|
2596
2597
|
key: 4,
|
|
2597
2598
|
modelValue: s.value,
|
|
2598
2599
|
"onUpdate:modelValue": l[4] || (l[4] = (e) => s.value = e),
|
|
2599
2600
|
disabled: t.item.disabled?.search
|
|
2600
2601
|
}, t.item.options?.search?.radio || t.item.options?.radio, $(t.item.options?.search?.radio?.on || t.item.options?.radio?.on || {})), {
|
|
2601
2602
|
default: h(() => [
|
|
2602
|
-
(
|
|
2603
|
+
(b(!0), C(A, null, G(t.item.options?.radio?.data, (e) => (b(), y(i(Pe), {
|
|
2603
2604
|
key: e.value,
|
|
2604
2605
|
label: e.label,
|
|
2605
2606
|
value: e.value
|
|
2606
2607
|
}, null, 8, ["label", "value"]))), 128))
|
|
2607
2608
|
]),
|
|
2608
2609
|
_: 1
|
|
2609
|
-
}, 16, ["modelValue", "disabled"])) : t.type === "datetime" ? (
|
|
2610
|
+
}, 16, ["modelValue", "disabled"])) : t.type === "datetime" ? (b(), y(i(Ke), S({
|
|
2610
2611
|
key: 5,
|
|
2611
2612
|
modelValue: s.value,
|
|
2612
2613
|
"onUpdate:modelValue": l[5] || (l[5] = (e) => s.value = e),
|
|
2613
2614
|
disabled: t.item.disabled?.search
|
|
2614
|
-
}, t.item.options?.search?.datetime || t.item.options?.datetime, $(t.item.options?.search?.datetime?.on || t.item.options?.datetime?.on || {})), null, 16, ["modelValue", "disabled"])) : t.type && i(q).customComponent[t.type] ? (
|
|
2615
|
+
}, t.item.options?.search?.datetime || t.item.options?.datetime, $(t.item.options?.search?.datetime?.on || t.item.options?.datetime?.on || {})), null, 16, ["modelValue", "disabled"])) : t.type && i(q).customComponent[t.type] ? (b(), y(ee(i(q).customComponent[t.type]), S({
|
|
2615
2616
|
key: 6,
|
|
2616
2617
|
modelValue: s.value,
|
|
2617
2618
|
"onUpdate:modelValue": l[6] || (l[6] = (e) => s.value = e)
|
|
@@ -2629,8 +2630,8 @@ const xt = (a, o) => ({
|
|
|
2629
2630
|
viewBox: "64 64 896 896"
|
|
2630
2631
|
};
|
|
2631
2632
|
function so(a, o) {
|
|
2632
|
-
return
|
|
2633
|
-
|
|
2633
|
+
return b(), C("svg", io, o[0] || (o[0] = [
|
|
2634
|
+
R("path", {
|
|
2634
2635
|
fill: "currentColor",
|
|
2635
2636
|
d: "M482.2 508.4L331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"
|
|
2636
2637
|
}, null, -1)
|
|
@@ -2641,8 +2642,8 @@ const uo = /* @__PURE__ */ se(ro, [["render", so]]), fo = {}, co = {
|
|
|
2641
2642
|
viewBox: "64 64 896 896"
|
|
2642
2643
|
};
|
|
2643
2644
|
function po(a, o) {
|
|
2644
|
-
return
|
|
2645
|
-
|
|
2645
|
+
return b(), C("svg", co, o[0] || (o[0] = [
|
|
2646
|
+
R("path", {
|
|
2646
2647
|
fill: "currentColor",
|
|
2647
2648
|
d: "M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 00-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z"
|
|
2648
2649
|
}, null, -1)
|
|
@@ -2653,8 +2654,8 @@ const mo = /* @__PURE__ */ se(fo, [["render", po]]), bo = {}, go = {
|
|
|
2653
2654
|
viewBox: "0 0 1024 1024"
|
|
2654
2655
|
};
|
|
2655
2656
|
function ho(a, o) {
|
|
2656
|
-
return
|
|
2657
|
-
|
|
2657
|
+
return b(), C("svg", go, o[0] || (o[0] = [
|
|
2658
|
+
R("path", {
|
|
2658
2659
|
fill: "currentColor",
|
|
2659
2660
|
d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
|
|
2660
2661
|
}, null, -1)
|
|
@@ -2666,21 +2667,21 @@ const yo = /* @__PURE__ */ se(bo, [["render", ho]]), wo = {}, vo = {
|
|
|
2666
2667
|
viewBox: "0 0 1024 1024"
|
|
2667
2668
|
};
|
|
2668
2669
|
function ko(a, o) {
|
|
2669
|
-
return
|
|
2670
|
-
|
|
2670
|
+
return b(), C("svg", vo, o[0] || (o[0] = [
|
|
2671
|
+
R("path", {
|
|
2671
2672
|
fill: "currentColor",
|
|
2672
2673
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"
|
|
2673
2674
|
}, null, -1)
|
|
2674
2675
|
]));
|
|
2675
2676
|
}
|
|
2676
|
-
const
|
|
2677
|
+
const lt = /* @__PURE__ */ se(wo, [["render", ko]]), Co = {}, Vo = {
|
|
2677
2678
|
"data-v-58697b5c": "",
|
|
2678
2679
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2679
2680
|
viewBox: "0 0 1024 1024"
|
|
2680
2681
|
};
|
|
2681
2682
|
function So(a, o) {
|
|
2682
|
-
return
|
|
2683
|
-
|
|
2683
|
+
return b(), C("svg", Vo, o[0] || (o[0] = [
|
|
2684
|
+
R("path", {
|
|
2684
2685
|
fill: "currentColor",
|
|
2685
2686
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0z"
|
|
2686
2687
|
}, null, -1)
|
|
@@ -2692,8 +2693,8 @@ const Eo = /* @__PURE__ */ se(Co, [["render", So]]), zo = {}, $o = {
|
|
|
2692
2693
|
viewBox: "0 0 1024 1024"
|
|
2693
2694
|
};
|
|
2694
2695
|
function Mo(a, o) {
|
|
2695
|
-
return
|
|
2696
|
-
|
|
2696
|
+
return b(), C("svg", $o, o[0] || (o[0] = [
|
|
2697
|
+
R("path", {
|
|
2697
2698
|
fill: "currentColor",
|
|
2698
2699
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"
|
|
2699
2700
|
}, null, -1)
|
|
@@ -2716,11 +2717,11 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
2716
2717
|
const o = E.isFun, s = a, l = Ge().type, e = (n) => n === !0 ? !0 : (Array.isArray(n) ? n : n ? [n] : []).some((f) => f?.required === !0), r = (n) => s.option.table?.editMode ? e(n.rules) || e(s.conf.update.rules?.[n.key]) : !1;
|
|
2717
2718
|
return (n, u) => {
|
|
2718
2719
|
const f = pe("el-tooltip");
|
|
2719
|
-
return
|
|
2720
|
+
return b(!0), C(A, null, G(n.columnList, (d) => (b(), C(A, {
|
|
2720
2721
|
key: d.key
|
|
2721
2722
|
}, [
|
|
2722
|
-
n.conf.table.column.show.list.includes(d.key) && (d.show?.table === void 0 || i(o)(d.show?.table, n.conf.table.data)) ? (
|
|
2723
|
-
d.table?.header?.groupKey === void 0 || d.table.header.show ? (
|
|
2723
|
+
n.conf.table.column.show.list.includes(d.key) && (d.show?.table === void 0 || i(o)(d.show?.table, n.conf.table.data)) ? (b(), C(A, { key: 0 }, [
|
|
2724
|
+
d.table?.header?.groupKey === void 0 || d.table.header.show ? (b(), y(i(ue), S({
|
|
2724
2725
|
key: 0,
|
|
2725
2726
|
prop: d.key,
|
|
2726
2727
|
label: d.label,
|
|
@@ -2728,47 +2729,47 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
2728
2729
|
}, d.table), {
|
|
2729
2730
|
header: h(() => [
|
|
2730
2731
|
z(n.$slots, "table-header-" + d.key, { item: d }, () => [
|
|
2731
|
-
|
|
2732
|
-
d.table?.header?.tooltip ? (
|
|
2732
|
+
R("div", Fo, [
|
|
2733
|
+
d.table?.header?.tooltip ? (b(), y(f, {
|
|
2733
2734
|
key: 0,
|
|
2734
2735
|
effect: "dark",
|
|
2735
2736
|
placement: "top"
|
|
2736
2737
|
}, {
|
|
2737
2738
|
content: h(() => [
|
|
2738
|
-
|
|
2739
|
+
R("div", {
|
|
2739
2740
|
innerHTML: d.table?.header?.tooltip
|
|
2740
2741
|
}, null, 8, Do)
|
|
2741
2742
|
]),
|
|
2742
2743
|
default: h(() => [
|
|
2743
|
-
|
|
2744
|
-
M(
|
|
2744
|
+
R("span", Ro, [
|
|
2745
|
+
M(lt)
|
|
2745
2746
|
])
|
|
2746
2747
|
]),
|
|
2747
2748
|
_: 2
|
|
2748
2749
|
}, 1024)) : V("", !0),
|
|
2749
|
-
r(d) ? (
|
|
2750
|
-
O(" " +
|
|
2751
|
-
d.table?.header?.group !== void 0 ? (
|
|
2750
|
+
r(d) ? (b(), C("span", Uo, "*")) : V("", !0),
|
|
2751
|
+
O(" " + F(d.label) + " ", 1),
|
|
2752
|
+
d.table?.header?.group !== void 0 ? (b(), C("span", {
|
|
2752
2753
|
key: 2,
|
|
2753
2754
|
class: "table-header-plus",
|
|
2754
|
-
onClick:
|
|
2755
|
+
onClick: yt(
|
|
2755
2756
|
() => {
|
|
2756
|
-
d.table.header.group = !d.table.header.group, n.columnList.forEach((
|
|
2757
|
-
|
|
2757
|
+
d.table.header.group = !d.table.header.group, n.columnList.forEach((m) => {
|
|
2758
|
+
m.table?.header?.groupKey === d.key && (m.table.header.show = !d.table.header.group);
|
|
2758
2759
|
});
|
|
2759
2760
|
},
|
|
2760
2761
|
["stop"]
|
|
2761
2762
|
)
|
|
2762
2763
|
}, [
|
|
2763
|
-
d.table.header.group ? (
|
|
2764
|
+
d.table.header.group ? (b(), y(Eo, { key: 0 })) : (b(), y(Oo, { key: 1 }))
|
|
2764
2765
|
], 8, Ao)) : V("", !0)
|
|
2765
2766
|
])
|
|
2766
2767
|
])
|
|
2767
2768
|
]),
|
|
2768
|
-
default: h(({ row:
|
|
2769
|
-
d.children ? (
|
|
2769
|
+
default: h(({ row: m }) => [
|
|
2770
|
+
d.children ? (b(), C(A, { key: 0 }, [
|
|
2770
2771
|
u[0] || (u[0] = O(" ")),
|
|
2771
|
-
(
|
|
2772
|
+
(b(), y(ee(i(l)), {
|
|
2772
2773
|
conf: n.conf,
|
|
2773
2774
|
columnList: d.children,
|
|
2774
2775
|
option: n.option
|
|
@@ -2780,141 +2781,141 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
2780
2781
|
])
|
|
2781
2782
|
}))
|
|
2782
2783
|
]), 1032, ["conf", "columnList", "option"]))
|
|
2783
|
-
], 64)) : (
|
|
2784
|
-
n.option.table?.editMode ? (
|
|
2784
|
+
], 64)) : (b(), C(A, { key: 1 }, [
|
|
2785
|
+
n.option.table?.editMode ? (b(), C("div", Bo, [
|
|
2785
2786
|
M(i(he), {
|
|
2786
2787
|
size: n.option.size?.table,
|
|
2787
|
-
error: n.conf.tableEditValidate.getFieldError(
|
|
2788
|
+
error: n.conf.tableEditValidate.getFieldError(m, d),
|
|
2788
2789
|
class: "table-edit-form-item"
|
|
2789
2790
|
}, {
|
|
2790
2791
|
default: h(() => [
|
|
2791
|
-
|
|
2792
|
+
R("div", {
|
|
2792
2793
|
class: J(["row", ["table-edit-" + d.key]]),
|
|
2793
2794
|
style: { width: "100%" }
|
|
2794
2795
|
}, [
|
|
2795
2796
|
z(n.$slots, "table-edit-left-" + d.key, {
|
|
2796
|
-
row:
|
|
2797
|
+
row: m,
|
|
2797
2798
|
item: d
|
|
2798
2799
|
}),
|
|
2799
|
-
d.type === "input" ? (
|
|
2800
|
+
d.type === "input" ? (b(), y(i(fe), S({
|
|
2800
2801
|
key: 0,
|
|
2801
|
-
modelValue:
|
|
2802
|
-
"onUpdate:modelValue": (c) =>
|
|
2802
|
+
modelValue: m[d.key],
|
|
2803
|
+
"onUpdate:modelValue": (c) => m[d.key] = c,
|
|
2803
2804
|
disabled: n.conf.update.getDisabled(d, !0),
|
|
2804
2805
|
class: "col",
|
|
2805
2806
|
ref_for: !0
|
|
2806
|
-
}, n.conf.update.getBind(d), $(n.conf.update.getOn(d,
|
|
2807
|
-
"onUpdate:modelValue": (c) => n.conf.tableEditValidate.clearField(
|
|
2807
|
+
}, n.conf.update.getBind(d), $(n.conf.update.getOn(d, m)), {
|
|
2808
|
+
"onUpdate:modelValue": (c) => n.conf.tableEditValidate.clearField(m, d)
|
|
2808
2809
|
}), Z({ _: 2 }, [
|
|
2809
2810
|
d.options?.input?.prepend ? {
|
|
2810
2811
|
name: "prepend",
|
|
2811
2812
|
fn: h(() => [
|
|
2812
|
-
O(
|
|
2813
|
+
O(F(typeof d.options?.input?.prepend == "function" ? d.options?.input?.prepend(m) : d.options?.input?.prepend), 1)
|
|
2813
2814
|
]),
|
|
2814
2815
|
key: "0"
|
|
2815
2816
|
} : void 0
|
|
2816
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "select" ? (
|
|
2817
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "select" ? (b(), y(i(ce), S({
|
|
2817
2818
|
key: 1,
|
|
2818
|
-
modelValue:
|
|
2819
|
-
"onUpdate:modelValue": (c) =>
|
|
2819
|
+
modelValue: m[d.key],
|
|
2820
|
+
"onUpdate:modelValue": (c) => m[d.key] = c,
|
|
2820
2821
|
disabled: n.conf.update.getDisabled(d, !0),
|
|
2821
2822
|
class: "col",
|
|
2822
2823
|
ref_for: !0
|
|
2823
|
-
}, n.conf.update.getBind(d), $(n.conf.update.getOn(d,
|
|
2824
|
-
"onUpdate:modelValue": (c) => n.conf.tableEditValidate.clearField(
|
|
2824
|
+
}, n.conf.update.getBind(d), $(n.conf.update.getOn(d, m)), {
|
|
2825
|
+
"onUpdate:modelValue": (c) => n.conf.tableEditValidate.clearField(m, d)
|
|
2825
2826
|
}), {
|
|
2826
2827
|
default: h(() => [
|
|
2827
|
-
(
|
|
2828
|
+
(b(!0), C(A, null, G(d.options?.search?.select?.data || d.options?.select?.data, (c) => (b(), y(i(ne), {
|
|
2828
2829
|
key: c.value,
|
|
2829
2830
|
label: c.label,
|
|
2830
2831
|
value: c.value
|
|
2831
2832
|
}, null, 8, ["label", "value"]))), 128))
|
|
2832
2833
|
]),
|
|
2833
2834
|
_: 2
|
|
2834
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "switch" ? (
|
|
2835
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "switch" ? (b(), y(i(ge), S({
|
|
2835
2836
|
key: 2,
|
|
2836
|
-
modelValue:
|
|
2837
|
-
"onUpdate:modelValue": (c) =>
|
|
2837
|
+
modelValue: m[d.key],
|
|
2838
|
+
"onUpdate:modelValue": (c) => m[d.key] = c,
|
|
2838
2839
|
disabled: n.conf.update.getDisabled(d, !0),
|
|
2839
2840
|
class: "col",
|
|
2840
2841
|
ref_for: !0
|
|
2841
|
-
}, n.conf.update.getBind(d), $(n.conf.update.getOn(d,
|
|
2842
|
-
"onUpdate:modelValue": (c) => n.conf.tableEditValidate.clearField(
|
|
2842
|
+
}, n.conf.update.getBind(d), $(n.conf.update.getOn(d, m)), {
|
|
2843
|
+
"onUpdate:modelValue": (c) => n.conf.tableEditValidate.clearField(m, d)
|
|
2843
2844
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : V("", !0),
|
|
2844
2845
|
z(n.$slots, "table-edit-right-" + d.key, {
|
|
2845
|
-
row:
|
|
2846
|
+
row: m,
|
|
2846
2847
|
item: d
|
|
2847
2848
|
})
|
|
2848
2849
|
], 2)
|
|
2849
2850
|
]),
|
|
2850
2851
|
_: 2
|
|
2851
2852
|
}, 1032, ["size", "error"])
|
|
2852
|
-
])) : (
|
|
2853
|
-
n.conf.update.type === i(E).EDialog.Update && i(o)(d.show?.form, n.conf.update.form, i(E).EDialog.Update) && n.option.table?.inlineEdit && n.conf.update.form[n.option.table?.rowKey] ===
|
|
2854
|
-
d.type === "input" ? (
|
|
2853
|
+
])) : (b(), C(A, { key: 1 }, [
|
|
2854
|
+
n.conf.update.type === i(E).EDialog.Update && i(o)(d.show?.form, n.conf.update.form, i(E).EDialog.Update) && n.option.table?.inlineEdit && n.conf.update.form[n.option.table?.rowKey] === m[n.option.table?.rowKey] && (d.type === "input" || d.type === "select") ? (b(), C(A, { key: 0 }, [
|
|
2855
|
+
d.type === "input" ? (b(), y(i(fe), S({
|
|
2855
2856
|
key: 0,
|
|
2856
2857
|
modelValue: n.conf.update.form[d.key],
|
|
2857
2858
|
"onUpdate:modelValue": (c) => n.conf.update.form[d.key] = c,
|
|
2858
2859
|
disabled: n.conf.update.getDisabled(d, !0),
|
|
2859
2860
|
ref_for: !0
|
|
2860
|
-
}, n.conf.update.getBind(d), $(n.conf.update.getOn(d,
|
|
2861
|
+
}, n.conf.update.getBind(d), $(n.conf.update.getOn(d, m)), { style: { width: "100%" } }), Z({ _: 2 }, [
|
|
2861
2862
|
d.options?.input?.prepend ? {
|
|
2862
2863
|
name: "prepend",
|
|
2863
2864
|
fn: h(() => [
|
|
2864
|
-
O(
|
|
2865
|
+
O(F(typeof d.options?.input?.prepend == "function" ? d.options?.input?.prepend(m) : d.options?.input?.prepend), 1)
|
|
2865
2866
|
]),
|
|
2866
2867
|
key: "0"
|
|
2867
2868
|
} : void 0
|
|
2868
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "select" ? (
|
|
2869
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "select" ? (b(), y(i(ce), S({
|
|
2869
2870
|
key: 1,
|
|
2870
2871
|
modelValue: n.conf.update.form[d.key],
|
|
2871
2872
|
"onUpdate:modelValue": (c) => n.conf.update.form[d.key] = c,
|
|
2872
2873
|
disabled: n.conf.update.getDisabled(d, !0),
|
|
2873
2874
|
ref_for: !0
|
|
2874
|
-
}, n.conf.update.getBind(d), $(n.conf.update.getOn(d,
|
|
2875
|
+
}, n.conf.update.getBind(d), $(n.conf.update.getOn(d, m)), { style: { width: "100%" } }), {
|
|
2875
2876
|
default: h(() => [
|
|
2876
|
-
(
|
|
2877
|
+
(b(!0), C(A, null, G(d.options?.search?.select?.data || d.options?.select?.data, (c) => (b(), y(i(ne), {
|
|
2877
2878
|
key: c.value,
|
|
2878
2879
|
label: c.label,
|
|
2879
2880
|
value: c.value
|
|
2880
2881
|
}, null, 8, ["label", "value"]))), 128))
|
|
2881
2882
|
]),
|
|
2882
2883
|
_: 2
|
|
2883
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "switch" ? (
|
|
2884
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "switch" ? (b(), y(i(ge), S({
|
|
2884
2885
|
key: 2,
|
|
2885
2886
|
modelValue: n.conf.update.form[d.key],
|
|
2886
2887
|
"onUpdate:modelValue": (c) => n.conf.update.form[d.key] = c,
|
|
2887
2888
|
ref_for: !0
|
|
2888
|
-
}, n.conf.update.getBind(d), $(n.conf.update.getOn(d,
|
|
2889
|
+
}, n.conf.update.getBind(d), $(n.conf.update.getOn(d, m)), {
|
|
2889
2890
|
disabled: n.conf.update.getDisabled(d, !0)
|
|
2890
2891
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : V("", !0)
|
|
2891
2892
|
], 64)) : z(n.$slots, "table-" + d.key, {
|
|
2892
2893
|
key: 1,
|
|
2893
|
-
row:
|
|
2894
|
+
row: m,
|
|
2894
2895
|
item: d
|
|
2895
2896
|
}, () => [
|
|
2896
|
-
i(q).customComponent[d.type ?? ""]?.table ? (
|
|
2897
|
+
i(q).customComponent[d.type ?? ""]?.table ? (b(), y(ee(i(q).customComponent[d.type ?? ""]?.table), S({
|
|
2897
2898
|
key: 0,
|
|
2898
|
-
modelValue:
|
|
2899
|
-
"onUpdate:modelValue": (c) =>
|
|
2899
|
+
modelValue: m[d.key],
|
|
2900
|
+
"onUpdate:modelValue": (c) => m[d.key] = c,
|
|
2900
2901
|
ref_for: !0
|
|
2901
|
-
}, d.options?.[d.type ?? ""], $(d.options?.[d.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : d.type === "switch" ? (
|
|
2902
|
-
d.options?.switch?.tableConfig?.change ? (
|
|
2902
|
+
}, d.options?.[d.type ?? ""], $(d.options?.[d.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : d.type === "switch" ? (b(), C(A, { key: 1 }, [
|
|
2903
|
+
d.options?.switch?.tableConfig?.change ? (b(), y(i(ge), S({
|
|
2903
2904
|
key: 0,
|
|
2904
|
-
modelValue:
|
|
2905
|
-
"onUpdate:modelValue": (c) =>
|
|
2906
|
-
loading: d.options?.switch?.loadingMap?.[
|
|
2907
|
-
"before-change": () => d.options?.switch?.tableBeforeChange?.(d.key,
|
|
2905
|
+
modelValue: m[d.key],
|
|
2906
|
+
"onUpdate:modelValue": (c) => m[d.key] = c,
|
|
2907
|
+
loading: d.options?.switch?.loadingMap?.[m[n.option.table?.rowKey]]?.loading,
|
|
2908
|
+
"before-change": () => d.options?.switch?.tableBeforeChange?.(d.key, m),
|
|
2908
2909
|
ref_for: !0
|
|
2909
|
-
}, d.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (
|
|
2910
|
-
], 64)) : (
|
|
2910
|
+
}, d.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (b(), C("span", Lo, F(m[d.key] === d.options?.switch?.activeValue ? d.options?.switch?.activeText : d.options?.switch?.inactiveText), 1))
|
|
2911
|
+
], 64)) : (b(), C("span", {
|
|
2911
2912
|
key: 2,
|
|
2912
2913
|
style: ye({
|
|
2913
2914
|
"--table-text-click-color": d.table?.click?.color
|
|
2914
2915
|
}),
|
|
2915
2916
|
class: J({ "table-text-click": d.table?.click?.callback }),
|
|
2916
|
-
onClick: (c) => d.table?.click?.callback?.(
|
|
2917
|
-
innerHTML: d.table?.format ? d.table?.format(
|
|
2917
|
+
onClick: (c) => d.table?.click?.callback?.(m),
|
|
2918
|
+
innerHTML: d.table?.format ? d.table?.format(m) : m[d.key]
|
|
2918
2919
|
}, null, 14, To))
|
|
2919
2920
|
])
|
|
2920
2921
|
], 64))
|
|
@@ -2965,19 +2966,19 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
2965
2966
|
return o({
|
|
2966
2967
|
conf: e
|
|
2967
2968
|
}), (f, d) => {
|
|
2968
|
-
const
|
|
2969
|
-
return
|
|
2969
|
+
const m = pe("el-tooltip"), c = wt("loading");
|
|
2970
|
+
return b(), C("div", {
|
|
2970
2971
|
class: J(["relative cc1-form-box", [a.option.table?.fitHeight ? "col" : "no-min-height"]])
|
|
2971
2972
|
}, [
|
|
2972
|
-
|
|
2973
|
+
R("div", {
|
|
2973
2974
|
class: J(["row", [a.option.table?.fitHeight ? "absolute fit" : ""]]),
|
|
2974
2975
|
style: { overflow: "hidden" }
|
|
2975
2976
|
}, [
|
|
2976
2977
|
z(f.$slots, "box-left"),
|
|
2977
|
-
|
|
2978
|
+
R("div", {
|
|
2978
2979
|
class: J(["column fit-width no-wrap", [a.option.table?.fitHeight ? "col" : ""]])
|
|
2979
2980
|
}, [
|
|
2980
|
-
a.option.search?.show !== !1 ? (
|
|
2981
|
+
a.option.search?.show !== !1 ? (b(), C("div", Po, [
|
|
2981
2982
|
M(i(oe), {
|
|
2982
2983
|
model: i(e).search.form,
|
|
2983
2984
|
inline: "",
|
|
@@ -2987,13 +2988,13 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
2987
2988
|
z(f.$slots, "search-start", {
|
|
2988
2989
|
row: i(e).search.form
|
|
2989
2990
|
}),
|
|
2990
|
-
(
|
|
2991
|
+
(b(!0), C(A, null, G(i(e).search.column.list, (p) => (b(), C(A, {
|
|
2991
2992
|
key: p.key
|
|
2992
2993
|
}, [
|
|
2993
2994
|
z(f.$slots, "search-" + p.key + "-start", {
|
|
2994
2995
|
row: i(e).search.form
|
|
2995
2996
|
}),
|
|
2996
|
-
(typeof p.show?.search == "function" ? p.show?.search(i(e).search.form) : p.show?.search) ? (
|
|
2997
|
+
(typeof p.show?.search == "function" ? p.show?.search(i(e).search.form) : p.show?.search) ? (b(), y(i(he), {
|
|
2997
2998
|
key: 0,
|
|
2998
2999
|
label: p.text?.search?.label ?? p.label
|
|
2999
3000
|
}, {
|
|
@@ -3004,12 +3005,12 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3004
3005
|
z(f.$slots, "search-" + p.key, {
|
|
3005
3006
|
row: i(e).search.form
|
|
3006
3007
|
}, () => [
|
|
3007
|
-
p.options?.search?.type ? (
|
|
3008
|
+
p.options?.search?.type ? (b(), y(Te, {
|
|
3008
3009
|
key: 0,
|
|
3009
3010
|
item: p,
|
|
3010
3011
|
conf: i(e),
|
|
3011
3012
|
type: p.options.search.type
|
|
3012
|
-
}, null, 8, ["item", "conf", "type"])) : (
|
|
3013
|
+
}, null, 8, ["item", "conf", "type"])) : (b(), y(Te, {
|
|
3013
3014
|
key: 1,
|
|
3014
3015
|
item: p,
|
|
3015
3016
|
conf: i(e),
|
|
@@ -3029,24 +3030,24 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3029
3030
|
z(f.$slots, "search-center", {
|
|
3030
3031
|
row: i(e).search.form
|
|
3031
3032
|
}),
|
|
3032
|
-
a.option.tools?.search || a.option.tools?.reset ? (
|
|
3033
|
+
a.option.tools?.search || a.option.tools?.reset ? (b(), y(i(he), { key: 0 }, {
|
|
3033
3034
|
default: h(() => [
|
|
3034
|
-
a.option.tools?.search ? (
|
|
3035
|
+
a.option.tools?.search ? (b(), y(i(P), {
|
|
3035
3036
|
key: 0,
|
|
3036
3037
|
type: "primary",
|
|
3037
3038
|
onClick: i(e).search.submit
|
|
3038
3039
|
}, {
|
|
3039
3040
|
default: h(() => [
|
|
3040
|
-
O(
|
|
3041
|
+
O(F(i(k).tCurd("search")), 1)
|
|
3041
3042
|
]),
|
|
3042
3043
|
_: 1
|
|
3043
3044
|
}, 8, ["onClick"])) : V("", !0),
|
|
3044
|
-
a.option.tools?.reset ? (
|
|
3045
|
+
a.option.tools?.reset ? (b(), y(i(P), {
|
|
3045
3046
|
key: 1,
|
|
3046
3047
|
onClick: i(e).search.reset
|
|
3047
3048
|
}, {
|
|
3048
3049
|
default: h(() => [
|
|
3049
|
-
O(
|
|
3050
|
+
O(F(i(k).tCurd("reset")), 1)
|
|
3050
3051
|
]),
|
|
3051
3052
|
_: 1
|
|
3052
3053
|
}, 8, ["onClick"])) : V("", !0)
|
|
@@ -3060,46 +3061,46 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3060
3061
|
_: 3
|
|
3061
3062
|
}, 8, ["model", "size"])
|
|
3062
3063
|
])) : V("", !0),
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
i(l)(a.option.tools?.add) ? (
|
|
3066
|
-
M(i(
|
|
3064
|
+
R("div", Ko, [
|
|
3065
|
+
R("div", Ho, [
|
|
3066
|
+
i(l)(a.option.tools?.add) ? (b(), C("div", No, [
|
|
3067
|
+
M(i(P), {
|
|
3067
3068
|
type: "primary",
|
|
3068
3069
|
onClick: d[0] || (d[0] = (p) => i(e).update.open(i(s).Add)),
|
|
3069
3070
|
size: a.option.size?.search
|
|
3070
3071
|
}, {
|
|
3071
3072
|
default: h(() => [
|
|
3072
|
-
O(
|
|
3073
|
+
O(F(i(k).tCurd("add")), 1)
|
|
3073
3074
|
]),
|
|
3074
3075
|
_: 1
|
|
3075
3076
|
}, 8, ["size"])
|
|
3076
3077
|
])) : V("", !0),
|
|
3077
|
-
i(l)(a.option.tools?.delete) ? (
|
|
3078
|
-
M(i(
|
|
3078
|
+
i(l)(a.option.tools?.delete) ? (b(), C("div", Io, [
|
|
3079
|
+
M(i(P), {
|
|
3079
3080
|
type: "danger",
|
|
3080
3081
|
onClick: d[1] || (d[1] = (p) => i(e).remove.open(i(e).table.selection.list)),
|
|
3081
3082
|
size: a.option.size?.search
|
|
3082
3083
|
}, {
|
|
3083
3084
|
default: h(() => [
|
|
3084
|
-
O(
|
|
3085
|
+
O(F(i(k).tCurd("delete")), 1)
|
|
3085
3086
|
]),
|
|
3086
3087
|
_: 1
|
|
3087
3088
|
}, 8, ["size"])
|
|
3088
3089
|
])) : V("", !0),
|
|
3089
|
-
a.option.tools?.expand ? (
|
|
3090
|
-
M(i(
|
|
3090
|
+
a.option.tools?.expand ? (b(), C("div", Go, [
|
|
3091
|
+
M(i(P), {
|
|
3091
3092
|
type: "warning",
|
|
3092
3093
|
onClick: d[2] || (d[2] = (p) => i(e).table.expand.all()),
|
|
3093
3094
|
size: a.option.size?.search
|
|
3094
3095
|
}, {
|
|
3095
3096
|
default: h(() => [
|
|
3096
|
-
O(
|
|
3097
|
+
O(F(i(k).tCurd("expandCollapse")), 1)
|
|
3097
3098
|
]),
|
|
3098
3099
|
_: 1
|
|
3099
3100
|
}, 8, ["size"])
|
|
3100
3101
|
])) : V("", !0),
|
|
3101
|
-
a.option.tools?.export?.show ? (
|
|
3102
|
-
a.option.tools?.export?.dropdown?.show ? (
|
|
3102
|
+
a.option.tools?.export?.show ? (b(), C(A, { key: 3 }, [
|
|
3103
|
+
a.option.tools?.export?.dropdown?.show ? (b(), y(i(Ue), {
|
|
3103
3104
|
key: 0,
|
|
3104
3105
|
onCommand: i(e).export.click
|
|
3105
3106
|
}, {
|
|
@@ -3108,30 +3109,30 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3108
3109
|
size: a.option.size?.search
|
|
3109
3110
|
}, {
|
|
3110
3111
|
default: h(() => [
|
|
3111
|
-
a.option.tools?.export?.dropdown?.select && (a.option.table?.selectable || i(l)(a.option.tools?.delete)) ? (
|
|
3112
|
+
a.option.tools?.export?.dropdown?.select && (a.option.table?.selectable || i(l)(a.option.tools?.delete)) ? (b(), y(i(de), {
|
|
3112
3113
|
key: 0,
|
|
3113
3114
|
command: "select"
|
|
3114
3115
|
}, {
|
|
3115
3116
|
default: h(() => [
|
|
3116
|
-
O(
|
|
3117
|
+
O(F(i(k).tCurd("exportSelect")), 1)
|
|
3117
3118
|
]),
|
|
3118
3119
|
_: 1
|
|
3119
3120
|
})) : V("", !0),
|
|
3120
|
-
a.option.tools?.export?.dropdown?.page ? (
|
|
3121
|
+
a.option.tools?.export?.dropdown?.page ? (b(), y(i(de), {
|
|
3121
3122
|
key: 1,
|
|
3122
3123
|
command: "page"
|
|
3123
3124
|
}, {
|
|
3124
3125
|
default: h(() => [
|
|
3125
|
-
O(
|
|
3126
|
+
O(F(i(k).tCurd("exportPage")), 1)
|
|
3126
3127
|
]),
|
|
3127
3128
|
_: 1
|
|
3128
3129
|
})) : V("", !0),
|
|
3129
|
-
a.option.tools?.export?.dropdown?.all ? (
|
|
3130
|
+
a.option.tools?.export?.dropdown?.all ? (b(), y(i(de), {
|
|
3130
3131
|
key: 2,
|
|
3131
3132
|
command: "all"
|
|
3132
3133
|
}, {
|
|
3133
3134
|
default: h(() => [
|
|
3134
|
-
O(
|
|
3135
|
+
O(F(i(k).tCurd("exportAll")), 1)
|
|
3135
3136
|
]),
|
|
3136
3137
|
_: 1
|
|
3137
3138
|
})) : V("", !0)
|
|
@@ -3140,29 +3141,29 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3140
3141
|
}, 8, ["size"])
|
|
3141
3142
|
]),
|
|
3142
3143
|
default: h(() => [
|
|
3143
|
-
|
|
3144
|
-
M(i(
|
|
3144
|
+
R("div", Wo, [
|
|
3145
|
+
M(i(P), {
|
|
3145
3146
|
type: "warning",
|
|
3146
3147
|
loading: i(e).export.loading,
|
|
3147
3148
|
size: a.option.size?.search
|
|
3148
3149
|
}, {
|
|
3149
3150
|
default: h(() => [
|
|
3150
|
-
O(
|
|
3151
|
+
O(F(i(k).tCurd("export")), 1)
|
|
3151
3152
|
]),
|
|
3152
3153
|
_: 1
|
|
3153
3154
|
}, 8, ["loading", "size"])
|
|
3154
3155
|
])
|
|
3155
3156
|
]),
|
|
3156
3157
|
_: 1
|
|
3157
|
-
}, 8, ["onCommand"])) : (
|
|
3158
|
-
M(i(
|
|
3158
|
+
}, 8, ["onCommand"])) : (b(), C("div", qo, [
|
|
3159
|
+
M(i(P), {
|
|
3159
3160
|
type: "warning",
|
|
3160
3161
|
loading: i(e).export.loading,
|
|
3161
3162
|
size: a.option.size?.search,
|
|
3162
3163
|
onClick: d[3] || (d[3] = (p) => i(e).export.run.start("all"))
|
|
3163
3164
|
}, {
|
|
3164
3165
|
default: h(() => [
|
|
3165
|
-
O(
|
|
3166
|
+
O(F(i(k).tCurd("export")), 1)
|
|
3166
3167
|
]),
|
|
3167
3168
|
_: 1
|
|
3168
3169
|
}, 8, ["loading", "size"])
|
|
@@ -3170,9 +3171,9 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3170
3171
|
], 64)) : V("", !0),
|
|
3171
3172
|
z(f.$slots, "tools-left")
|
|
3172
3173
|
]),
|
|
3173
|
-
|
|
3174
|
+
R("div", Jo, [
|
|
3174
3175
|
z(f.$slots, "tools-right"),
|
|
3175
|
-
i(e).page.showTools && i(e).table.sortable.showPagination() ? (
|
|
3176
|
+
i(e).page.showTools && i(e).table.sortable.showPagination() ? (b(), y(i(Be), S({
|
|
3176
3177
|
key: 0,
|
|
3177
3178
|
"current-page": i(e).page.num,
|
|
3178
3179
|
"onUpdate:currentPage": d[4] || (d[4] = (p) => i(e).page.num = p),
|
|
@@ -3187,7 +3188,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3187
3188
|
onSizeChange: i(e).table.sortable.refreshList,
|
|
3188
3189
|
onCurrentChange: i(e).table.sortable.refreshList
|
|
3189
3190
|
}, a.option.page?.pagination || {}, $(a.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : V("", !0),
|
|
3190
|
-
i(e).table.sortable.showTriggerButton() ? (
|
|
3191
|
+
i(e).table.sortable.showTriggerButton() ? (b(), y(i(P), {
|
|
3191
3192
|
key: 1,
|
|
3192
3193
|
type: "warning",
|
|
3193
3194
|
onClick: i(e).table.sortable.start,
|
|
@@ -3195,11 +3196,11 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3195
3196
|
loading: i(e).table.sortable.actionLoading
|
|
3196
3197
|
}, {
|
|
3197
3198
|
default: h(() => [
|
|
3198
|
-
O(
|
|
3199
|
+
O(F(i(k).tCurd("sortableStart")), 1)
|
|
3199
3200
|
]),
|
|
3200
3201
|
_: 1
|
|
3201
3202
|
}, 8, ["onClick", "size", "loading"])) : V("", !0),
|
|
3202
|
-
i(e).table.sortable.showActionButton() ? (
|
|
3203
|
+
i(e).table.sortable.showActionButton() ? (b(), y(i(Ue), {
|
|
3203
3204
|
key: 2,
|
|
3204
3205
|
onCommand: i(e).table.sortable.command
|
|
3205
3206
|
}, {
|
|
@@ -3210,13 +3211,13 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3210
3211
|
default: h(() => [
|
|
3211
3212
|
M(i(de), { command: "save" }, {
|
|
3212
3213
|
default: h(() => [
|
|
3213
|
-
O(
|
|
3214
|
+
O(F(i(k).tCurd("sortableSave")), 1)
|
|
3214
3215
|
]),
|
|
3215
3216
|
_: 1
|
|
3216
3217
|
}),
|
|
3217
3218
|
M(i(de), { command: "exit" }, {
|
|
3218
3219
|
default: h(() => [
|
|
3219
|
-
O(
|
|
3220
|
+
O(F(i(k).tCurd("sortableExit")), 1)
|
|
3220
3221
|
]),
|
|
3221
3222
|
_: 1
|
|
3222
3223
|
})
|
|
@@ -3225,20 +3226,20 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3225
3226
|
}, 8, ["size"])
|
|
3226
3227
|
]),
|
|
3227
3228
|
default: h(() => [
|
|
3228
|
-
M(i(
|
|
3229
|
+
M(i(P), {
|
|
3229
3230
|
type: "warning",
|
|
3230
3231
|
size: a.option.size?.search,
|
|
3231
3232
|
loading: i(e).table.sortable.actionLoading
|
|
3232
3233
|
}, {
|
|
3233
3234
|
default: h(() => [
|
|
3234
|
-
O(
|
|
3235
|
+
O(F(i(k).tCurd("sortableAction")), 1)
|
|
3235
3236
|
]),
|
|
3236
3237
|
_: 1
|
|
3237
3238
|
}, 8, ["size", "loading"])
|
|
3238
3239
|
]),
|
|
3239
3240
|
_: 1
|
|
3240
3241
|
}, 8, ["onCommand"])) : V("", !0),
|
|
3241
|
-
i(e).table.sortable.showSaveButton() ? (
|
|
3242
|
+
i(e).table.sortable.showSaveButton() ? (b(), y(i(P), {
|
|
3242
3243
|
key: 3,
|
|
3243
3244
|
type: "warning",
|
|
3244
3245
|
onClick: i(e).table.sortable.save,
|
|
@@ -3246,28 +3247,28 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3246
3247
|
loading: i(e).table.sortable.actionLoading
|
|
3247
3248
|
}, {
|
|
3248
3249
|
default: h(() => [
|
|
3249
|
-
O(
|
|
3250
|
+
O(F(i(k).tCurd("sortableSave")), 1)
|
|
3250
3251
|
]),
|
|
3251
3252
|
_: 1
|
|
3252
3253
|
}, 8, ["onClick", "size", "loading"])) : V("", !0),
|
|
3253
|
-
a.option.tools?.expandColumn === void 0 || a.option.tools?.expandColumn ? (
|
|
3254
|
+
a.option.tools?.expandColumn === void 0 || a.option.tools?.expandColumn ? (b(), y(m, {
|
|
3254
3255
|
key: 4,
|
|
3255
3256
|
effect: "dark",
|
|
3256
3257
|
content: i(e).table.header.group.expand ? i(k).tCurd("mergeColumn") : i(k).tCurd("expandColumn"),
|
|
3257
3258
|
placement: "top"
|
|
3258
3259
|
}, {
|
|
3259
3260
|
default: h(() => [
|
|
3260
|
-
|
|
3261
|
+
R("div", {
|
|
3261
3262
|
class: J(["refresh-btn", [a.option.size?.search]]),
|
|
3262
3263
|
onClick: d[6] || (d[6] = //@ts-ignore
|
|
3263
3264
|
(...p) => i(e).table.header.group.toggleExpandAll && i(e).table.header.group.toggleExpandAll(...p))
|
|
3264
3265
|
}, [
|
|
3265
|
-
i(e).table.header.group.expand ? (
|
|
3266
|
+
i(e).table.header.group.expand ? (b(), y(uo, { key: 0 })) : (b(), y(mo, { key: 1 }))
|
|
3266
3267
|
], 2)
|
|
3267
3268
|
]),
|
|
3268
3269
|
_: 1
|
|
3269
3270
|
}, 8, ["content"])) : V("", !0),
|
|
3270
|
-
a.option.tools?.refresh === void 0 || a.option.tools?.refresh ? (
|
|
3271
|
+
a.option.tools?.refresh === void 0 || a.option.tools?.refresh ? (b(), C("div", {
|
|
3271
3272
|
key: 5,
|
|
3272
3273
|
class: J(["refresh-btn", [a.option.size?.search]]),
|
|
3273
3274
|
onClick: d[7] || (d[7] = //@ts-ignore
|
|
@@ -3277,13 +3278,13 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3277
3278
|
], 2)) : V("", !0)
|
|
3278
3279
|
])
|
|
3279
3280
|
]),
|
|
3280
|
-
|
|
3281
|
+
R("div", {
|
|
3281
3282
|
class: J(["fit-width relative form-box", [a.option.table?.fitHeight ? "col " : "", a.option.table?.editMode ? "edit-mode" : ""]])
|
|
3282
3283
|
}, [
|
|
3283
|
-
|
|
3284
|
+
R("div", {
|
|
3284
3285
|
class: J(["column form-box-content", [a.option.table?.fitHeight ? "absolute fit" : ""]])
|
|
3285
3286
|
}, [
|
|
3286
|
-
|
|
3287
|
+
vt((b(), y(i(gt), S({
|
|
3287
3288
|
ref_key: "tableRef",
|
|
3288
3289
|
ref: u,
|
|
3289
3290
|
data: i(e).table.data,
|
|
@@ -3295,7 +3296,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3295
3296
|
onExpandChange: i(e).table.expand.change
|
|
3296
3297
|
}, i(e).table.sortable.getTableBindOption(), $(a.option.table?.on || {})), {
|
|
3297
3298
|
default: h(() => [
|
|
3298
|
-
(typeof a.option.table?.selectable == "object" ? a.option.table?.selectable?.show : a.option.table?.selectable) || i(l)(a.option.tools?.delete) || a.option.tools?.export?.show && a.option.tools?.export?.select ? (
|
|
3299
|
+
(typeof a.option.table?.selectable == "object" ? a.option.table?.selectable?.show : a.option.table?.selectable) || i(l)(a.option.tools?.delete) || a.option.tools?.export?.show && a.option.tools?.export?.select ? (b(), y(i(ue), S({
|
|
3299
3300
|
key: 0,
|
|
3300
3301
|
type: "selection",
|
|
3301
3302
|
width: "40",
|
|
@@ -3304,7 +3305,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3304
3305
|
"show-overflow-tooltip": !1,
|
|
3305
3306
|
className: "cc1-form-selectable-column"
|
|
3306
3307
|
}, typeof a.option.table?.selectable == "object" ? a.option.table?.selectable : {}, $(typeof a.option.table?.selectable == "object" ? a.option.table?.selectable?.on || {} : {})), null, 16)) : V("", !0),
|
|
3307
|
-
(typeof a.option.table?.index == "object" ? a.option.table?.index?.show : a.option.table?.index) ? (
|
|
3308
|
+
(typeof a.option.table?.index == "object" ? a.option.table?.index?.show : a.option.table?.index) ? (b(), y(i(ue), S({
|
|
3308
3309
|
key: 1,
|
|
3309
3310
|
type: "index",
|
|
3310
3311
|
fixed: "left",
|
|
@@ -3314,7 +3315,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3314
3315
|
"show-overflow-tooltip": !1,
|
|
3315
3316
|
className: "cc1-form-index-column"
|
|
3316
3317
|
}, typeof a.option.table?.index == "object" ? a.option.table?.index : {}, $(typeof a.option.table?.index == "object" ? a.option.table?.index?.on || {} : {})), null, 16)) : V("", !0),
|
|
3317
|
-
i(e).table.sortable.isActive() ? (
|
|
3318
|
+
i(e).table.sortable.isActive() ? (b(), y(i(ue), S({
|
|
3318
3319
|
key: 2,
|
|
3319
3320
|
align: "center",
|
|
3320
3321
|
"show-overflow-tooltip": !1,
|
|
@@ -3322,18 +3323,18 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3322
3323
|
}, i(e).table.sortable.getColumnBind(), $(i(e).table.sortable.getColumnBind().on || {})), {
|
|
3323
3324
|
header: h(() => [
|
|
3324
3325
|
z(f.$slots, "table-header-sortable", {}, () => [
|
|
3325
|
-
M(
|
|
3326
|
+
M(m, {
|
|
3326
3327
|
effect: "dark",
|
|
3327
3328
|
placement: "top"
|
|
3328
3329
|
}, {
|
|
3329
3330
|
content: h(() => [
|
|
3330
|
-
|
|
3331
|
+
R("div", {
|
|
3331
3332
|
innerHTML: a.option.table?.sortable?.tipText ?? i(k).tCurd("sortable")
|
|
3332
3333
|
}, null, 8, Xo)
|
|
3333
3334
|
]),
|
|
3334
3335
|
default: h(() => [
|
|
3335
|
-
|
|
3336
|
-
M(
|
|
3336
|
+
R("span", Qo, [
|
|
3337
|
+
M(lt)
|
|
3337
3338
|
])
|
|
3338
3339
|
]),
|
|
3339
3340
|
_: 1
|
|
@@ -3341,7 +3342,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3341
3342
|
])
|
|
3342
3343
|
]),
|
|
3343
3344
|
default: h(() => d[12] || (d[12] = [
|
|
3344
|
-
|
|
3345
|
+
R("span", { class: "cc1-form-drag-handle" }, "::", -1)
|
|
3345
3346
|
])),
|
|
3346
3347
|
_: 3
|
|
3347
3348
|
}, 16)) : V("", !0),
|
|
@@ -3352,12 +3353,12 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3352
3353
|
}, Z({ _: 2 }, [
|
|
3353
3354
|
G(f.$slots, (p, w) => ({
|
|
3354
3355
|
name: w,
|
|
3355
|
-
fn: h((
|
|
3356
|
-
z(f.$slots, w, Me(Oe(
|
|
3356
|
+
fn: h((U) => [
|
|
3357
|
+
z(f.$slots, w, Me(Oe(U || {})))
|
|
3357
3358
|
])
|
|
3358
3359
|
}))
|
|
3359
3360
|
]), 1032, ["conf", "columnList", "option"]),
|
|
3360
|
-
i(l)(a.option.table?.add) || i(l)(a.option.table?.update) || i(l)(a.option.table?.delete) || i(l)(a.option.table?.view) || f.$slots["table-op-left"] || f.$slots["table-op-right"] ? (
|
|
3361
|
+
i(l)(a.option.table?.add) || i(l)(a.option.table?.update) || i(l)(a.option.table?.delete) || i(l)(a.option.table?.view) || f.$slots["table-op-left"] || f.$slots["table-op-right"] ? (b(), y(i(ue), S({
|
|
3361
3362
|
key: 3,
|
|
3362
3363
|
align: "center",
|
|
3363
3364
|
fixed: "right"
|
|
@@ -3367,7 +3368,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3367
3368
|
}), {
|
|
3368
3369
|
header: h(() => [
|
|
3369
3370
|
z(f.$slots, "table-header-op", {}, () => [
|
|
3370
|
-
O(
|
|
3371
|
+
O(F(i(k).tCurd("operation")), 1)
|
|
3371
3372
|
])
|
|
3372
3373
|
]),
|
|
3373
3374
|
default: h(({ row: p }) => [
|
|
@@ -3376,71 +3377,71 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3376
3377
|
}, {
|
|
3377
3378
|
default: h(() => [
|
|
3378
3379
|
z(f.$slots, "table-op-left", { row: p }),
|
|
3379
|
-
i(e).update.type === i(s).Update && a.option.table?.inlineEdit && i(e).update.form[t.option.table?.rowKey] === p[t.option.table?.rowKey] ? (
|
|
3380
|
-
M(i(
|
|
3380
|
+
i(e).update.type === i(s).Update && a.option.table?.inlineEdit && i(e).update.form[t.option.table?.rowKey] === p[t.option.table?.rowKey] ? (b(), C(A, { key: 0 }, [
|
|
3381
|
+
M(i(P), {
|
|
3381
3382
|
link: "",
|
|
3382
3383
|
type: "info",
|
|
3383
3384
|
onClick: i(e).update.close
|
|
3384
3385
|
}, {
|
|
3385
3386
|
default: h(() => [
|
|
3386
|
-
O(
|
|
3387
|
+
O(F(i(k).tCurd("cancel")), 1)
|
|
3387
3388
|
]),
|
|
3388
3389
|
_: 1
|
|
3389
3390
|
}, 8, ["onClick"]),
|
|
3390
|
-
M(i(
|
|
3391
|
+
M(i(P), {
|
|
3391
3392
|
link: "",
|
|
3392
3393
|
type: "primary",
|
|
3393
3394
|
onClick: i(e).update.submit,
|
|
3394
3395
|
loading: i(e).update.loading
|
|
3395
3396
|
}, {
|
|
3396
3397
|
default: h(() => [
|
|
3397
|
-
O(
|
|
3398
|
+
O(F(i(k).tCurd("confirm")), 1)
|
|
3398
3399
|
]),
|
|
3399
3400
|
_: 1
|
|
3400
3401
|
}, 8, ["onClick", "loading"]),
|
|
3401
3402
|
z(f.$slots, "table-op-edit-right", { row: p })
|
|
3402
|
-
], 64)) : (
|
|
3403
|
-
i(l)(a.option.table?.add, p) ? (
|
|
3403
|
+
], 64)) : (b(), C(A, { key: 1 }, [
|
|
3404
|
+
i(l)(a.option.table?.add, p) ? (b(), y(i(P), {
|
|
3404
3405
|
key: 0,
|
|
3405
3406
|
link: "",
|
|
3406
3407
|
type: "primary",
|
|
3407
3408
|
onClick: (w) => i(e).update.open(i(s).Add, p)
|
|
3408
3409
|
}, {
|
|
3409
3410
|
default: h(() => [
|
|
3410
|
-
O(
|
|
3411
|
+
O(F(i(k).tCurd("add")), 1)
|
|
3411
3412
|
]),
|
|
3412
3413
|
_: 2
|
|
3413
3414
|
}, 1032, ["onClick"])) : V("", !0),
|
|
3414
|
-
i(l)(a.option.table?.view, p) ? (
|
|
3415
|
+
i(l)(a.option.table?.view, p) ? (b(), y(i(P), {
|
|
3415
3416
|
key: 1,
|
|
3416
3417
|
link: "",
|
|
3417
3418
|
type: "primary",
|
|
3418
3419
|
onClick: (w) => i(e).update.open(i(s).View, p)
|
|
3419
3420
|
}, {
|
|
3420
3421
|
default: h(() => [
|
|
3421
|
-
O(
|
|
3422
|
+
O(F(i(k).tCurd("view")), 1)
|
|
3422
3423
|
]),
|
|
3423
3424
|
_: 2
|
|
3424
3425
|
}, 1032, ["onClick"])) : V("", !0),
|
|
3425
|
-
i(l)(a.option.table?.update, p) ? (
|
|
3426
|
+
i(l)(a.option.table?.update, p) ? (b(), y(i(P), {
|
|
3426
3427
|
key: 2,
|
|
3427
3428
|
link: "",
|
|
3428
3429
|
type: "warning",
|
|
3429
3430
|
onClick: (w) => i(e).update.open(i(s).Update, p)
|
|
3430
3431
|
}, {
|
|
3431
3432
|
default: h(() => [
|
|
3432
|
-
O(
|
|
3433
|
+
O(F(i(k).tCurd("edit")), 1)
|
|
3433
3434
|
]),
|
|
3434
3435
|
_: 2
|
|
3435
3436
|
}, 1032, ["onClick"])) : V("", !0),
|
|
3436
|
-
i(l)(a.option.table?.delete, p) ? (
|
|
3437
|
+
i(l)(a.option.table?.delete, p) ? (b(), y(i(P), {
|
|
3437
3438
|
key: 3,
|
|
3438
3439
|
link: "",
|
|
3439
3440
|
type: "danger",
|
|
3440
3441
|
onClick: (w) => i(e).remove.open([p])
|
|
3441
3442
|
}, {
|
|
3442
3443
|
default: h(() => [
|
|
3443
|
-
O(
|
|
3444
|
+
O(F(i(k).tCurd("delete")), 1)
|
|
3444
3445
|
]),
|
|
3445
3446
|
_: 2
|
|
3446
3447
|
}, 1032, ["onClick"])) : V("", !0),
|
|
@@ -3459,8 +3460,8 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3459
3460
|
])
|
|
3460
3461
|
], 2)
|
|
3461
3462
|
], 2),
|
|
3462
|
-
|
|
3463
|
-
(a.option.page?.show === void 0 || a.option.page?.show) && !i(e).page.showTools && i(e).table.sortable.showPagination() ? (
|
|
3463
|
+
R("div", Yo, [
|
|
3464
|
+
(a.option.page?.show === void 0 || a.option.page?.show) && !i(e).page.showTools && i(e).table.sortable.showPagination() ? (b(), y(i(Be), S({
|
|
3464
3465
|
key: 0,
|
|
3465
3466
|
"current-page": i(e).page.num,
|
|
3466
3467
|
"onUpdate:currentPage": d[8] || (d[8] = (p) => i(e).page.num = p),
|
|
@@ -3486,7 +3487,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3486
3487
|
"before-close": i(e).update.close
|
|
3487
3488
|
}, a.option.dialog), {
|
|
3488
3489
|
footer: h(() => [
|
|
3489
|
-
|
|
3490
|
+
R("span", Zo, [
|
|
3490
3491
|
M(i(oe), {
|
|
3491
3492
|
size: a.option.size?.form
|
|
3492
3493
|
}, {
|
|
@@ -3494,22 +3495,22 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3494
3495
|
z(f.$slots, "dialog-footer", {
|
|
3495
3496
|
row: i(e).update
|
|
3496
3497
|
}, () => [
|
|
3497
|
-
M(i(
|
|
3498
|
+
M(i(P), {
|
|
3498
3499
|
onClick: i(e).update.close
|
|
3499
3500
|
}, {
|
|
3500
3501
|
default: h(() => [
|
|
3501
|
-
O(
|
|
3502
|
+
O(F(i(k).tCurd("close")), 1)
|
|
3502
3503
|
]),
|
|
3503
3504
|
_: 1
|
|
3504
3505
|
}, 8, ["onClick"]),
|
|
3505
|
-
i(e).update.type !== i(s).View ? (
|
|
3506
|
+
i(e).update.type !== i(s).View ? (b(), y(i(P), {
|
|
3506
3507
|
key: 0,
|
|
3507
3508
|
type: "primary",
|
|
3508
3509
|
onClick: i(e).update.submit,
|
|
3509
3510
|
loading: i(e).update.loading
|
|
3510
3511
|
}, {
|
|
3511
3512
|
default: h(() => [
|
|
3512
|
-
O(
|
|
3513
|
+
O(F(i(k).tCurd("submit")), 1)
|
|
3513
3514
|
]),
|
|
3514
3515
|
_: 1
|
|
3515
3516
|
}, 8, ["onClick", "loading"])) : V("", !0)
|
|
@@ -3532,7 +3533,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3532
3533
|
class: "update-dialog-form"
|
|
3533
3534
|
}, {
|
|
3534
3535
|
default: h(() => [
|
|
3535
|
-
i(e).update.showContent ? (
|
|
3536
|
+
i(e).update.showContent ? (b(), y(nt, {
|
|
3536
3537
|
key: 0,
|
|
3537
3538
|
"form-grid": i(e).update.formGrid,
|
|
3538
3539
|
"max-span": i(e).update.formMaxSpan,
|
|
@@ -3547,8 +3548,8 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3547
3548
|
}, Z({ _: 2 }, [
|
|
3548
3549
|
G(f.$slots, (p, w) => ({
|
|
3549
3550
|
name: w,
|
|
3550
|
-
fn: h((
|
|
3551
|
-
z(f.$slots, w, Me(Oe(
|
|
3551
|
+
fn: h((U) => [
|
|
3552
|
+
z(f.$slots, w, Me(Oe(U || {})))
|
|
3552
3553
|
])
|
|
3553
3554
|
}))
|
|
3554
3555
|
]), 1032, ["form-grid", "max-span", "form", "type", "stripe", "label-width", "form-option", "get-bind", "get-on", "get-disabled"])) : V("", !0)
|
|
@@ -3568,26 +3569,26 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3568
3569
|
"close-on-click-modal": !1
|
|
3569
3570
|
}, {
|
|
3570
3571
|
footer: h(() => [
|
|
3571
|
-
|
|
3572
|
+
R("span", ea, [
|
|
3572
3573
|
M(i(oe), {
|
|
3573
3574
|
size: a.option.size?.form
|
|
3574
3575
|
}, {
|
|
3575
3576
|
default: h(() => [
|
|
3576
|
-
M(i(
|
|
3577
|
+
M(i(P), {
|
|
3577
3578
|
onClick: i(e).remove.close
|
|
3578
3579
|
}, {
|
|
3579
3580
|
default: h(() => [
|
|
3580
|
-
O(
|
|
3581
|
+
O(F(i(k).tCurd("close")), 1)
|
|
3581
3582
|
]),
|
|
3582
3583
|
_: 1
|
|
3583
3584
|
}, 8, ["onClick"]),
|
|
3584
|
-
M(i(
|
|
3585
|
+
M(i(P), {
|
|
3585
3586
|
type: "danger",
|
|
3586
3587
|
onClick: i(e).remove.submit,
|
|
3587
3588
|
loading: i(e).remove.loading
|
|
3588
3589
|
}, {
|
|
3589
3590
|
default: h(() => [
|
|
3590
|
-
O(
|
|
3591
|
+
O(F(i(k).tCurd("confirmDelete")), 1)
|
|
3591
3592
|
]),
|
|
3592
3593
|
_: 1
|
|
3593
3594
|
}, 8, ["onClick", "loading"])
|
|
@@ -3597,12 +3598,12 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
|
|
|
3597
3598
|
])
|
|
3598
3599
|
]),
|
|
3599
3600
|
default: h(() => [
|
|
3600
|
-
a.option.dialog?.delete?.content ? (
|
|
3601
|
+
a.option.dialog?.delete?.content ? (b(), C("div", xo, [
|
|
3601
3602
|
M(lo, {
|
|
3602
3603
|
content: a.option.dialog?.delete?.content,
|
|
3603
3604
|
value: i(e).remove.items
|
|
3604
3605
|
}, null, 8, ["content", "value"])
|
|
3605
|
-
])) : (
|
|
3606
|
+
])) : (b(), C("div", _o, F(i(k).tCurd("confirmDeleteMessage", i(e).remove.items.length)), 1))
|
|
3606
3607
|
]),
|
|
3607
3608
|
_: 1
|
|
3608
3609
|
}, 8, ["modelValue", "title"]),
|
|
@@ -3676,7 +3677,7 @@ export {
|
|
|
3676
3677
|
ta as TCurd,
|
|
3677
3678
|
ia as TFile,
|
|
3678
3679
|
q as TForm,
|
|
3679
|
-
|
|
3680
|
+
B as TFormConfig,
|
|
3680
3681
|
k as TFormI18n,
|
|
3681
3682
|
We as TFormList,
|
|
3682
3683
|
E as TSys,
|