cc1-form 1.1.42 → 1.1.43
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 +447 -367
- package/dist/cc1-form.umd.cjs +1 -1
- package/dist/components/TCurd/com/form/list.vue.d.ts +16 -2
- package/dist/components/TCurd/index.d.ts +23 -19
- package/dist/components/TCurd/index.vue.d.ts +45 -21
- package/dist/components/TCurd/indexType.d.ts +19 -0
- package/dist/utils/TFormConfig.d.ts +11 -0
- package/package.json +1 -1
package/dist/cc1-form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ElMessage as ce, ElLoading as me, ElForm as N, ElFormItem as
|
|
1
|
+
import { ElMessage as ce, ElLoading as me, ElForm as N, ElFormItem as G, ElInput as Y, ElSwitch as oe, ElSelect as W, ElOption as K, ElRadioGroup as re, ElRadio as se, ElTreeSelect as de, ElDatePicker as ae, ElDialog as _, ElButton as T, ElTableColumn as ee, ElDropdown as he, ElDropdownMenu as ye, ElDropdownItem as x, ElPagination as ie, ElTable as ge } from "element-plus";
|
|
2
2
|
import "vue-router";
|
|
3
|
-
import { defineComponent as J, reactive as le, onMounted as ue, resolveComponent as
|
|
4
|
-
class
|
|
3
|
+
import { defineComponent as J, reactive as le, onMounted as ue, resolveComponent as X, createElementBlock as g, createCommentVNode as k, openBlock as f, renderSlot as C, createVNode as z, withCtx as m, createTextVNode as $, Fragment as D, renderList as L, createBlock as h, normalizeClass as j, normalizeStyle as fe, ref as H, unref as a, createElementVNode as F, mergeProps as v, toHandlers as S, resolveDynamicComponent as q, toDisplayString as U, getCurrentInstance as be, createSlots as te, resolveDirective as we, withDirectives as ke, normalizeProps as Ce, guardReactiveProps as ve } from "vue";
|
|
4
|
+
class E {
|
|
5
5
|
/**
|
|
6
6
|
* Vue Router 实例,需在应用初始化时赋值
|
|
7
7
|
*/
|
|
@@ -43,9 +43,9 @@ class O {
|
|
|
43
43
|
* @param module
|
|
44
44
|
*/
|
|
45
45
|
static loadModule = async (o) => {
|
|
46
|
-
if (!
|
|
46
|
+
if (!E.moduleObj[o])
|
|
47
47
|
throw new Error(`模块${o}未加载,请赋值如:TSys.moduleObj = { ${o}: ()=>import('${o}') }`);
|
|
48
|
-
const u = await
|
|
48
|
+
const u = await E.moduleObj[o]();
|
|
49
49
|
return u.default ?? u;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
@@ -133,7 +133,7 @@ class O {
|
|
|
133
133
|
*/
|
|
134
134
|
static getImgPic = (o) => new Promise(async (u, t) => {
|
|
135
135
|
let i = document.getElementById(o.id);
|
|
136
|
-
const l = await
|
|
136
|
+
const l = await E.loadModule("html2canvas");
|
|
137
137
|
try {
|
|
138
138
|
l(i, {
|
|
139
139
|
logging: !1,
|
|
@@ -154,7 +154,7 @@ class O {
|
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
class
|
|
157
|
+
class O {
|
|
158
158
|
/**
|
|
159
159
|
* 全局配置对象
|
|
160
160
|
*/
|
|
@@ -235,6 +235,17 @@ class D {
|
|
|
235
235
|
* 是否显示导出
|
|
236
236
|
*/
|
|
237
237
|
show: !0,
|
|
238
|
+
/** 下拉菜单配置 */
|
|
239
|
+
dropdown: {
|
|
240
|
+
/** 是否显示导出下拉菜单 默认显示 如果不显示,点击后导出全部数据 */
|
|
241
|
+
show: !0,
|
|
242
|
+
/** 是否显示导出选中按钮 默认显示 */
|
|
243
|
+
select: !0,
|
|
244
|
+
/** 是否显示导出当前页按钮 默认显示 */
|
|
245
|
+
page: !0,
|
|
246
|
+
/** 是否显示导出全部按钮 默认显示 */
|
|
247
|
+
all: !0
|
|
248
|
+
},
|
|
238
249
|
/**
|
|
239
250
|
* 导出文件名前缀
|
|
240
251
|
*/
|
|
@@ -492,7 +503,7 @@ class D {
|
|
|
492
503
|
* @param config - 需要覆盖的配置项(深度 Partial)
|
|
493
504
|
*/
|
|
494
505
|
static setConfig = (o) => {
|
|
495
|
-
|
|
506
|
+
O.config = ObjectUtil.deepMerge(O.config, o);
|
|
496
507
|
};
|
|
497
508
|
}
|
|
498
509
|
class M {
|
|
@@ -548,8 +559,8 @@ class M {
|
|
|
548
559
|
* @param option 组件配置
|
|
549
560
|
*/
|
|
550
561
|
parentId: (o, u, t, i) => {
|
|
551
|
-
const l =
|
|
552
|
-
o ? u.type ===
|
|
562
|
+
const l = O.config.table.rowKey;
|
|
563
|
+
o ? u.type === E.EDialog.Add ? (u.form.parentId = o[l], u.form.sort = o.children.length + 1) : u.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (u.form.parentId = "0", u.form.sort = t.length + 1), M.setOptionsData(i, "parentId", [{ [l]: "0", title: "根", children: t }]);
|
|
553
564
|
}
|
|
554
565
|
}
|
|
555
566
|
};
|
|
@@ -587,7 +598,7 @@ const Ve = {
|
|
|
587
598
|
confirmModify: "确认修改",
|
|
588
599
|
confirmSwitchMessage: "确认要修改吗?"
|
|
589
600
|
};
|
|
590
|
-
class
|
|
601
|
+
class y {
|
|
591
602
|
/** 解析国际化值:函数则执行并返回字符串,字符串则替换 `{key}` 占位符 */
|
|
592
603
|
static t(o, ...u) {
|
|
593
604
|
if (typeof o == "function")
|
|
@@ -597,7 +608,7 @@ class b {
|
|
|
597
608
|
return o.replace(/{([^}]+)}/g, (i, l) => t < u.length ? String(u[t++]) : `{${l}}`);
|
|
598
609
|
}
|
|
599
610
|
static setI18n = (o) => {
|
|
600
|
-
|
|
611
|
+
y.curd = ObjectUtil.deepMerge(y.curd, o);
|
|
601
612
|
};
|
|
602
613
|
/** 解析curd国际化值 */
|
|
603
614
|
static tCurd(o, ...u) {
|
|
@@ -618,7 +629,7 @@ class P {
|
|
|
618
629
|
*/
|
|
619
630
|
static setId = (o, u, t) => {
|
|
620
631
|
u[o] || (u[o] = []);
|
|
621
|
-
const i =
|
|
632
|
+
const i = O.config.table.rowKey;
|
|
622
633
|
u[o].forEach((l) => {
|
|
623
634
|
t.forEach((e) => {
|
|
624
635
|
let s = e.default ?? "";
|
|
@@ -636,7 +647,7 @@ class P {
|
|
|
636
647
|
static add = (o, u, t, i) => {
|
|
637
648
|
const l = JSONUtil.cp(t);
|
|
638
649
|
P.setId(o, u, t);
|
|
639
|
-
const e =
|
|
650
|
+
const e = O.config.table.rowKey;
|
|
640
651
|
u[o].push(
|
|
641
652
|
l.reduce(
|
|
642
653
|
(s, p) => {
|
|
@@ -655,7 +666,7 @@ class P {
|
|
|
655
666
|
* @param callback 回调函数
|
|
656
667
|
*/
|
|
657
668
|
static remove = (o, u, t, i) => {
|
|
658
|
-
const l =
|
|
669
|
+
const l = O.config.table.rowKey;
|
|
659
670
|
u[o] = u[o].filter((e) => e[l] !== t[l]), i?.(u);
|
|
660
671
|
};
|
|
661
672
|
/**
|
|
@@ -665,7 +676,7 @@ class P {
|
|
|
665
676
|
* @returns 没有id的数据
|
|
666
677
|
*/
|
|
667
678
|
static getNoIdData = (o, u) => {
|
|
668
|
-
const t = JSONUtil.cp(o), i =
|
|
679
|
+
const t = JSONUtil.cp(o), i = O.config.table.rowKey;
|
|
669
680
|
return t.forEach((l) => {
|
|
670
681
|
l[i] && delete l[i], u && l[u] && P.getNoIdData(l[u], u);
|
|
671
682
|
}), t;
|
|
@@ -673,12 +684,12 @@ class P {
|
|
|
673
684
|
}
|
|
674
685
|
const ze = {
|
|
675
686
|
key: 0,
|
|
676
|
-
class: "column",
|
|
687
|
+
class: "column curd-form-com-list",
|
|
677
688
|
style: { width: "100%", gap: "10px" }
|
|
678
|
-
}, De = {
|
|
689
|
+
}, $e = { key: 0 }, De = {
|
|
679
690
|
class: "row items-center",
|
|
680
691
|
style: { gap: "10px", width: "100%" }
|
|
681
|
-
}, ne = /* @__PURE__ */ J({
|
|
692
|
+
}, Se = { key: 1 }, ne = /* @__PURE__ */ J({
|
|
682
693
|
__name: "list",
|
|
683
694
|
props: {
|
|
684
695
|
row: {
|
|
@@ -710,6 +721,9 @@ const ze = {
|
|
|
710
721
|
},
|
|
711
722
|
inputClass: {
|
|
712
723
|
default: ""
|
|
724
|
+
},
|
|
725
|
+
addBottom: {
|
|
726
|
+
default: !1
|
|
713
727
|
}
|
|
714
728
|
},
|
|
715
729
|
emits: ["change"],
|
|
@@ -732,57 +746,69 @@ const ze = {
|
|
|
732
746
|
});
|
|
733
747
|
const i = o;
|
|
734
748
|
return (l, e) => {
|
|
735
|
-
const s =
|
|
736
|
-
return t.show ? (f(),
|
|
737
|
-
|
|
738
|
-
|
|
749
|
+
const s = X("el-button"), p = X("el-input");
|
|
750
|
+
return t.show ? (f(), g("div", ze, [
|
|
751
|
+
C(l.$slots, "list-start", { row: r.row }),
|
|
752
|
+
r.addBottom ? k("", !0) : (f(), g("div", $e, [
|
|
739
753
|
z(s, {
|
|
740
754
|
link: "",
|
|
741
755
|
type: "primary",
|
|
742
756
|
onClick: e[0] || (e[0] = (c) => t.add(r.field, r.row, r.itemFields))
|
|
743
757
|
}, {
|
|
744
|
-
default: m(() => e[
|
|
745
|
-
|
|
758
|
+
default: m(() => e[3] || (e[3] = [
|
|
759
|
+
$("添加")
|
|
746
760
|
])),
|
|
747
761
|
_: 1
|
|
748
762
|
})
|
|
749
|
-
]),
|
|
750
|
-
(f(!0),
|
|
751
|
-
|
|
763
|
+
])),
|
|
764
|
+
(f(!0), g(D, null, L(r.row[r.field], (c) => (f(), g("div", De, [
|
|
765
|
+
C(l.$slots, "item-start", {
|
|
752
766
|
item: c,
|
|
753
767
|
row: r.row
|
|
754
768
|
}),
|
|
755
|
-
(f(!0),
|
|
756
|
-
modelValue: c[
|
|
757
|
-
"onUpdate:modelValue": (n) => c[
|
|
769
|
+
(f(!0), g(D, null, L(r.itemFields, (b) => (f(), h(p, {
|
|
770
|
+
modelValue: c[b.value],
|
|
771
|
+
"onUpdate:modelValue": (n) => c[b.value] = n,
|
|
758
772
|
style: fe({ width: r.inputWidth }),
|
|
759
773
|
class: j(r.inputClass),
|
|
760
|
-
placeholder:
|
|
774
|
+
placeholder: b[r.label] || b[r.value],
|
|
761
775
|
onChange: e[1] || (e[1] = (n) => i("change"))
|
|
762
776
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
|
|
763
|
-
|
|
777
|
+
C(l.$slots, "item-end", {
|
|
764
778
|
item: c,
|
|
765
779
|
row: r.row
|
|
766
780
|
}),
|
|
767
781
|
z(s, {
|
|
768
782
|
link: "",
|
|
769
783
|
type: "danger",
|
|
770
|
-
onClick: (
|
|
784
|
+
onClick: (b) => t.remove(r.field, r.row, c)
|
|
771
785
|
}, {
|
|
772
|
-
default: m(() => e[
|
|
773
|
-
|
|
786
|
+
default: m(() => e[4] || (e[4] = [
|
|
787
|
+
$("删除")
|
|
774
788
|
])),
|
|
775
789
|
_: 2
|
|
776
790
|
}, 1032, ["onClick"])
|
|
777
791
|
]))), 256)),
|
|
778
|
-
|
|
779
|
-
|
|
792
|
+
r.addBottom ? (f(), g("div", Se, [
|
|
793
|
+
z(s, {
|
|
794
|
+
link: "",
|
|
795
|
+
type: "primary",
|
|
796
|
+
onClick: e[2] || (e[2] = (c) => t.add(r.field, r.row, r.itemFields))
|
|
797
|
+
}, {
|
|
798
|
+
default: m(() => e[5] || (e[5] = [
|
|
799
|
+
$("添加")
|
|
800
|
+
])),
|
|
801
|
+
_: 1
|
|
802
|
+
})
|
|
803
|
+
])) : k("", !0),
|
|
804
|
+
C(l.$slots, "list-end", { row: r.row })
|
|
805
|
+
])) : k("", !0);
|
|
780
806
|
};
|
|
781
807
|
}
|
|
782
|
-
}),
|
|
808
|
+
}), Ee = {
|
|
783
809
|
class: "row form-item-content",
|
|
784
810
|
style: { width: "100%" }
|
|
785
|
-
},
|
|
811
|
+
}, Ue = { class: "col" }, Oe = { class: "col" }, Fe = ["innerHTML"], Ae = /* @__PURE__ */ J({
|
|
786
812
|
__name: "column",
|
|
787
813
|
props: {
|
|
788
814
|
/**
|
|
@@ -799,7 +825,7 @@ const ze = {
|
|
|
799
825
|
}
|
|
800
826
|
},
|
|
801
827
|
setup(r, { expose: o }) {
|
|
802
|
-
const u =
|
|
828
|
+
const u = E.isFun, t = E.EDialog, i = H(), l = r, e = le({
|
|
803
829
|
rules: {},
|
|
804
830
|
show: !0,
|
|
805
831
|
form: {},
|
|
@@ -811,31 +837,31 @@ const ze = {
|
|
|
811
837
|
getOn: (s) => s.options?.[e.type === t.Add ? "formAdd" : "formUpdate"]?.[s.type]?.on || s.options?.[s.type]?.on || {},
|
|
812
838
|
getColumnSpan: (s, p) => {
|
|
813
839
|
if (s.item.form?.spanCol) {
|
|
814
|
-
const c = l.option.form?.maxSpan || 12,
|
|
815
|
-
return (s.item.form?.span ||
|
|
840
|
+
const c = l.option.form?.maxSpan || 12, b = l.option.form?.defaultSpan || c / 2, d = p.filter((V) => !E.isFun(V.item.show?.form, e.form, e.type)).reduce((V, w) => V + (w.item.form?.span || b), 0);
|
|
841
|
+
return (s.item.form?.span || b) + d;
|
|
816
842
|
}
|
|
817
843
|
return s.item.form?.span;
|
|
818
844
|
},
|
|
819
845
|
initColumnForm: () => {
|
|
820
846
|
const s = l.option;
|
|
821
847
|
e.formColumn = [], e.rules = {}, e.formDefault = {};
|
|
822
|
-
const p = [], c = l.option.form?.maxSpan || 12,
|
|
848
|
+
const p = [], c = l.option.form?.maxSpan || 12, b = l.option.form?.defaultSpan || c / 2;
|
|
823
849
|
let n = [];
|
|
824
850
|
const d = (w) => {
|
|
825
851
|
if (w.children) {
|
|
826
|
-
w.children.forEach((
|
|
827
|
-
d(
|
|
852
|
+
w.children.forEach((A) => {
|
|
853
|
+
d(A);
|
|
828
854
|
});
|
|
829
855
|
return;
|
|
830
856
|
}
|
|
831
857
|
if (e.formDefault[w.key] = w.value, w.isForm && (typeof w.show?.form != "boolean" || w.show?.form)) {
|
|
832
|
-
w.form = w.form || { span:
|
|
833
|
-
const
|
|
834
|
-
if (n.push({ item: w, span:
|
|
835
|
-
const
|
|
836
|
-
input:
|
|
837
|
-
select:
|
|
838
|
-
}, Z = (
|
|
858
|
+
w.form = w.form || { span: b }, w.form.span = w.form.span ?? b;
|
|
859
|
+
const A = w.form.span, B = n.reduce((Q, Z) => Q + Z.span, A), R = n.length;
|
|
860
|
+
if (n.push({ item: w, span: A }), (R === 1 && n[0].span === 0 || B >= c || A === 0 && R > 1) && (p.push(n), n = []), w.rules) {
|
|
861
|
+
const Q = {
|
|
862
|
+
input: y.tCurd("placeholderInput"),
|
|
863
|
+
select: y.tCurd("placeholderSelect")
|
|
864
|
+
}, Z = (Q[w.type] || Q.input) + w.label;
|
|
839
865
|
e.rules[w.key] = typeof w.rules == "boolean" ? [
|
|
840
866
|
{
|
|
841
867
|
required: !0,
|
|
@@ -845,8 +871,8 @@ const ze = {
|
|
|
845
871
|
] : w.rules;
|
|
846
872
|
}
|
|
847
873
|
}
|
|
848
|
-
}, V = (w,
|
|
849
|
-
w.isForm =
|
|
874
|
+
}, V = (w, A) => {
|
|
875
|
+
w.isForm = A, Array.isArray(w.children) && w.children.forEach((B) => V(B, A));
|
|
850
876
|
};
|
|
851
877
|
s.column.forEach((w) => {
|
|
852
878
|
V(w, !0), d(w);
|
|
@@ -863,28 +889,28 @@ const ze = {
|
|
|
863
889
|
rules: e.rules
|
|
864
890
|
}, {
|
|
865
891
|
default: m(() => [
|
|
866
|
-
e.show ? (f(!0),
|
|
892
|
+
e.show ? (f(!0), g(D, { key: 0 }, L(e.formColumn, (c, b) => (f(), g(D, { key: b }, [
|
|
867
893
|
a(u)(
|
|
868
894
|
c.map((n) => n.item?.show?.form),
|
|
869
895
|
e.form,
|
|
870
896
|
e.type
|
|
871
|
-
) ? (f(),
|
|
897
|
+
) ? (f(), g("div", {
|
|
872
898
|
key: 0,
|
|
873
899
|
class: j(["row curd-row", {
|
|
874
900
|
stripe: r.option.form?.stripe === void 0 ? !0 : r.option.form?.stripe
|
|
875
901
|
}])
|
|
876
902
|
}, [
|
|
877
|
-
|
|
903
|
+
C(s.$slots, "form-start", {
|
|
878
904
|
row: e.form
|
|
879
905
|
}),
|
|
880
|
-
(f(!0),
|
|
906
|
+
(f(!0), g(D, null, L(c, (n) => (f(), g(D, {
|
|
881
907
|
key: n.item.key
|
|
882
908
|
}, [
|
|
883
|
-
a(u)(n.item.show?.form, e.form, e.type) ? (f(),
|
|
909
|
+
a(u)(n.item.show?.form, e.form, e.type) ? (f(), g("div", {
|
|
884
910
|
key: 0,
|
|
885
911
|
class: j([n.item.form.span > 0 ? `col-${e.getColumnSpan(n, c)}` : "col", `form-item-col-${n.item.key}`])
|
|
886
912
|
}, [
|
|
887
|
-
z(a(
|
|
913
|
+
z(a(G), {
|
|
888
914
|
class: j({
|
|
889
915
|
"hide-label": typeof n.item.text?.form?.label == "boolean" ? !n.item.text?.form?.label : !1
|
|
890
916
|
}),
|
|
@@ -893,14 +919,14 @@ const ze = {
|
|
|
893
919
|
"label-width": n.item.form?.labelWidth || r.option.form?.labelWidth || "100px"
|
|
894
920
|
}, {
|
|
895
921
|
default: m(() => [
|
|
896
|
-
|
|
897
|
-
|
|
922
|
+
F("div", Ee, [
|
|
923
|
+
C(s.$slots, "form-" + n.item.key + "-start", {
|
|
898
924
|
row: e.form,
|
|
899
925
|
item: n.item
|
|
900
926
|
}),
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
927
|
+
F("div", Ue, [
|
|
928
|
+
F("div", Oe, [
|
|
929
|
+
C(s.$slots, "form-" + n.item.key, {
|
|
904
930
|
row: e.form,
|
|
905
931
|
item: n.item
|
|
906
932
|
}, () => [
|
|
@@ -928,7 +954,7 @@ const ze = {
|
|
|
928
954
|
style: { width: "100%" }
|
|
929
955
|
}), {
|
|
930
956
|
default: m(() => [
|
|
931
|
-
(f(!0),
|
|
957
|
+
(f(!0), g(D, null, L(n.item.options?.select?.data, (d) => (f(), h(a(K), {
|
|
932
958
|
key: d.value,
|
|
933
959
|
label: d.label,
|
|
934
960
|
value: d.value
|
|
@@ -945,7 +971,7 @@ const ze = {
|
|
|
945
971
|
style: { width: "100%" }
|
|
946
972
|
}), {
|
|
947
973
|
default: m(() => [
|
|
948
|
-
(f(!0),
|
|
974
|
+
(f(!0), g(D, null, L(n.item.options?.radio?.data, (d) => (f(), h(a(se), {
|
|
949
975
|
key: d.value,
|
|
950
976
|
label: d.label,
|
|
951
977
|
value: d.value
|
|
@@ -982,25 +1008,25 @@ const ze = {
|
|
|
982
1008
|
ref_for: !0
|
|
983
1009
|
}, e.getBind(n.item), S(e.getOn(n.item)), {
|
|
984
1010
|
disabled: e.getDisabled(n.item)
|
|
985
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
1011
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : k("", !0)
|
|
986
1012
|
]),
|
|
987
|
-
|
|
1013
|
+
C(s.$slots, "form-" + n.item.key + "-right", {
|
|
988
1014
|
row: e.form,
|
|
989
1015
|
item: n.item
|
|
990
1016
|
})
|
|
991
1017
|
]),
|
|
992
|
-
|
|
1018
|
+
C(s.$slots, "form-" + n.item.key + "-tip", {
|
|
993
1019
|
row: e.form,
|
|
994
1020
|
item: n.item
|
|
995
1021
|
}, () => [
|
|
996
|
-
n.item.form?.tipText ? (f(),
|
|
1022
|
+
n.item.form?.tipText ? (f(), g("div", {
|
|
997
1023
|
key: 0,
|
|
998
1024
|
class: "form-tip-text",
|
|
999
1025
|
innerHTML: typeof n.item.form?.tipText == "function" ? n.item.form?.tipText(e.form, e.type) : n.item.form?.tipText
|
|
1000
|
-
}, null, 8,
|
|
1026
|
+
}, null, 8, Fe)) : k("", !0)
|
|
1001
1027
|
])
|
|
1002
1028
|
]),
|
|
1003
|
-
|
|
1029
|
+
C(s.$slots, "form-" + n.item.key + "-end", {
|
|
1004
1030
|
row: e.form,
|
|
1005
1031
|
item: n.item
|
|
1006
1032
|
})
|
|
@@ -1008,19 +1034,19 @@ const ze = {
|
|
|
1008
1034
|
]),
|
|
1009
1035
|
_: 2
|
|
1010
1036
|
}, 1032, ["class", "label", "prop", "label-width"])
|
|
1011
|
-
], 2)) :
|
|
1037
|
+
], 2)) : k("", !0)
|
|
1012
1038
|
], 64))), 128)),
|
|
1013
|
-
|
|
1039
|
+
C(s.$slots, "form-end", {
|
|
1014
1040
|
row: e.form
|
|
1015
1041
|
})
|
|
1016
|
-
], 2)) :
|
|
1017
|
-
], 64))), 128)) :
|
|
1042
|
+
], 2)) : k("", !0)
|
|
1043
|
+
], 64))), 128)) : k("", !0)
|
|
1018
1044
|
]),
|
|
1019
1045
|
_: 3
|
|
1020
1046
|
}, 8, ["model", "rules"]));
|
|
1021
1047
|
}
|
|
1022
1048
|
});
|
|
1023
|
-
class
|
|
1049
|
+
class Te {
|
|
1024
1050
|
/**
|
|
1025
1051
|
* 导出数据为 Excel 文件(.xlsx),自动触发浏览器下载
|
|
1026
1052
|
*
|
|
@@ -1030,16 +1056,16 @@ class Fe {
|
|
|
1030
1056
|
*/
|
|
1031
1057
|
static exportToExcel = async (o, u, t) => {
|
|
1032
1058
|
if (!o || o.length === 0) return;
|
|
1033
|
-
const i = await
|
|
1059
|
+
const i = await E.loadModule("xlsx"), l = o.map((p) => {
|
|
1034
1060
|
const c = {};
|
|
1035
|
-
return u.forEach((
|
|
1036
|
-
c[
|
|
1061
|
+
return u.forEach((b) => {
|
|
1062
|
+
c[b.label] = p[b.key];
|
|
1037
1063
|
}), c;
|
|
1038
1064
|
}), e = i.utils.json_to_sheet(l), s = i.utils.book_new();
|
|
1039
1065
|
i.utils.book_append_sheet(s, e, "Sheet1"), t ? typeof t == "function" && (t = t()) : t = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, i.writeFile(s, `${t}.xlsx`);
|
|
1040
1066
|
};
|
|
1041
1067
|
}
|
|
1042
|
-
const I =
|
|
1068
|
+
const I = E.EDialog, Le = (r) => {
|
|
1043
1069
|
const o = H(), u = H(), t = le({
|
|
1044
1070
|
option: r.option,
|
|
1045
1071
|
/** 查询区域相关配置对象 */
|
|
@@ -1054,7 +1080,7 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1054
1080
|
/** 搜索表单默认值 */
|
|
1055
1081
|
formDefault: {},
|
|
1056
1082
|
/** 获取占位符 */
|
|
1057
|
-
getPlaceholder: (i, l =
|
|
1083
|
+
getPlaceholder: (i, l = y.tCurd("placeholderInput")) => i.text?.search?.placeholder === void 0 ? `${l}${i.label}` : i.text?.search?.placeholder,
|
|
1058
1084
|
/** 组装实际要搜索的数据对象 */
|
|
1059
1085
|
getFormData: () => {
|
|
1060
1086
|
let i = {};
|
|
@@ -1083,15 +1109,21 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1083
1109
|
/** 总条数 */
|
|
1084
1110
|
total: 0,
|
|
1085
1111
|
/** 分页控件的布局方式 */
|
|
1086
|
-
layout: r.option.page?.layout ||
|
|
1112
|
+
layout: r.option.page?.layout || O.config.pagination.layout,
|
|
1087
1113
|
/** 是否显示到工具栏 默认不显示 配置后show属性无效 */
|
|
1088
|
-
showTools: r.option.page?.showTools ||
|
|
1114
|
+
showTools: r.option.page?.showTools || O.config.pagination.showTools,
|
|
1089
1115
|
/** 当前每页条数 */
|
|
1090
|
-
size: r.option.page?.size ||
|
|
1116
|
+
size: r.option.page?.size || O.config.pagination.size,
|
|
1091
1117
|
/** 支持切换的每页条数选项 */
|
|
1092
|
-
sizeList: r.option.page?.sizeList ||
|
|
1118
|
+
sizeList: r.option.page?.sizeList || O.config.pagination.pageSizes,
|
|
1093
1119
|
/** 分页器计数 */
|
|
1094
|
-
pagerCount: r.option.page?.pagerCount ||
|
|
1120
|
+
pagerCount: r.option.page?.pagerCount || O.config.pagination.pagerCount,
|
|
1121
|
+
/** 获取分页查询参数 */
|
|
1122
|
+
getQuery: (i = {}) => ({
|
|
1123
|
+
[O.config.field.page.size]: i.size || t.page.size,
|
|
1124
|
+
[O.config.field.page.num]: i.num || t.page.num,
|
|
1125
|
+
...t.search.getFormData()
|
|
1126
|
+
})
|
|
1095
1127
|
},
|
|
1096
1128
|
/** 表格区域相关配置对象 */
|
|
1097
1129
|
table: {
|
|
@@ -1149,22 +1181,20 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1149
1181
|
await t.initApiData("init");
|
|
1150
1182
|
let l = {};
|
|
1151
1183
|
if (t.table.sort.prop) {
|
|
1152
|
-
const { props: d, order: V } =
|
|
1184
|
+
const { props: d, order: V } = O.config.table.sort;
|
|
1153
1185
|
l = {
|
|
1154
1186
|
[d.field]: t.table.sort.prop,
|
|
1155
1187
|
[V.field]: t.table.sort.order
|
|
1156
1188
|
};
|
|
1157
1189
|
}
|
|
1158
1190
|
const e = await i({
|
|
1159
|
-
|
|
1160
|
-
[D.config.field.page.num]: t.page.num,
|
|
1161
|
-
...t.search.getFormData(),
|
|
1191
|
+
...t.page.getQuery(),
|
|
1162
1192
|
...l
|
|
1163
|
-
}), s =
|
|
1193
|
+
}), s = O.config.field.result, p = e.data || { [s.list]: e };
|
|
1164
1194
|
let c = (Array.isArray(p[s.list]), p[s.list]);
|
|
1165
|
-
const
|
|
1166
|
-
const
|
|
1167
|
-
|
|
1195
|
+
const b = t.update.formColumn.flat(), n = JSONUtil.cp(c).map((d) => (Object.keys(d).forEach((w) => {
|
|
1196
|
+
const A = b.find((B) => B.item.key === w);
|
|
1197
|
+
A && ["select", "radio"].includes(A.item.type) && (A.item.table.format || (A.item.table.format = (B) => A.item.options[A.item.type].data?.find((R) => R.value == B[w])?.label || B[w]));
|
|
1168
1198
|
}), d));
|
|
1169
1199
|
t.table.data = r.option.data ? await r.option.data(n, c) : n, t.page.total = p[s.total] || 0;
|
|
1170
1200
|
} catch (l) {
|
|
@@ -1190,8 +1220,8 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1190
1220
|
order: "",
|
|
1191
1221
|
/** 排序变更回调 */
|
|
1192
1222
|
change: (i) => {
|
|
1193
|
-
|
|
1194
|
-
const l =
|
|
1223
|
+
O.config.table.sort.resetPage && (t.page.num = 1);
|
|
1224
|
+
const l = O.config.table.sort;
|
|
1195
1225
|
if (l.change) {
|
|
1196
1226
|
l.change(i, t);
|
|
1197
1227
|
return;
|
|
@@ -1211,19 +1241,46 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1211
1241
|
data: l,
|
|
1212
1242
|
columns: e
|
|
1213
1243
|
}), p = r.option.tools?.export || {};
|
|
1214
|
-
p.before && p.before(s),
|
|
1244
|
+
p.before && p.before(s), Te.exportToExcel(s.data, s.columns, p.fileName);
|
|
1215
1245
|
},
|
|
1216
1246
|
/** 获取当前选中项进行导出 */
|
|
1217
|
-
select: () => {
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1247
|
+
select: async () => {
|
|
1248
|
+
t.export.loading = !0;
|
|
1249
|
+
try {
|
|
1250
|
+
if (r.option.tools?.export?.select) {
|
|
1251
|
+
await r.option.tools?.export?.select({
|
|
1252
|
+
...t.page.getQuery(),
|
|
1253
|
+
items: t.table.selection.list
|
|
1254
|
+
});
|
|
1255
|
+
return;
|
|
1256
|
+
}
|
|
1257
|
+
if (t.table.selection.list.length === 0)
|
|
1258
|
+
throw E.fail(y.tCurd("selectDataToExport")), new Error(y.tCurd("selectDataToExport"));
|
|
1259
|
+
return t.table.selection.list;
|
|
1260
|
+
} catch (i) {
|
|
1261
|
+
console.error(i);
|
|
1262
|
+
} finally {
|
|
1263
|
+
t.export.loading = !1;
|
|
1264
|
+
}
|
|
1221
1265
|
},
|
|
1222
1266
|
/** 导出当前页的数据 */
|
|
1223
|
-
page: () => {
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1267
|
+
page: async () => {
|
|
1268
|
+
t.export.loading = !0;
|
|
1269
|
+
try {
|
|
1270
|
+
if (r.option.tools?.export?.page) {
|
|
1271
|
+
await r.option.tools?.export?.page({
|
|
1272
|
+
...t.page.getQuery()
|
|
1273
|
+
});
|
|
1274
|
+
return;
|
|
1275
|
+
}
|
|
1276
|
+
if (t.table.data.length === 0)
|
|
1277
|
+
throw E.fail(y.tCurd("noData")), new Error(y.tCurd("noData"));
|
|
1278
|
+
return t.table.data;
|
|
1279
|
+
} catch (i) {
|
|
1280
|
+
console.error(i);
|
|
1281
|
+
} finally {
|
|
1282
|
+
t.export.loading = !1;
|
|
1283
|
+
}
|
|
1227
1284
|
},
|
|
1228
1285
|
/** 导出所有数据 */
|
|
1229
1286
|
all: async () => {
|
|
@@ -1231,17 +1288,17 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1231
1288
|
try {
|
|
1232
1289
|
if (r.option.tools?.export?.all) {
|
|
1233
1290
|
await r.option.tools?.export?.all({
|
|
1234
|
-
|
|
1235
|
-
[D.config.field.page.num]: t.page.num,
|
|
1236
|
-
...t.search.getFormData()
|
|
1291
|
+
...t.page.getQuery()
|
|
1237
1292
|
});
|
|
1238
1293
|
return;
|
|
1239
1294
|
}
|
|
1240
1295
|
const i = r.option.api.list, l = await i({
|
|
1241
|
-
|
|
1242
|
-
|
|
1296
|
+
...t.page.getQuery({
|
|
1297
|
+
size: 999999,
|
|
1298
|
+
num: 1
|
|
1299
|
+
})
|
|
1243
1300
|
});
|
|
1244
|
-
return (l.data || { [
|
|
1301
|
+
return (l.data || { [O.config.field.result.list]: l })[O.config.field.result.list];
|
|
1245
1302
|
} catch (i) {
|
|
1246
1303
|
console.error(i);
|
|
1247
1304
|
} finally {
|
|
@@ -1315,7 +1372,7 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1315
1372
|
/** 打开增改弹窗 */
|
|
1316
1373
|
open: (i, l) => {
|
|
1317
1374
|
t.update.showContent || FunUtil.throttle(async () => {
|
|
1318
|
-
|
|
1375
|
+
E.loading(!0);
|
|
1319
1376
|
try {
|
|
1320
1377
|
t.update.type = i, await t.initApiData("update");
|
|
1321
1378
|
const e = i === I.Add;
|
|
@@ -1323,19 +1380,19 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1323
1380
|
t.inlineEdit.open(l);
|
|
1324
1381
|
return;
|
|
1325
1382
|
}
|
|
1326
|
-
t.update.edit.data = l, t.update.title =
|
|
1383
|
+
t.update.edit.data = l, t.update.title = y.tCurd(e ? "add" : i === I.View ? "view" : "edit"), t.update.form = JSONUtil.cp(e ? t.update.formDefault : l), await r.option.form?.openBefore?.(t.update.form, t.update), t.inlineEdit.data || (t.update.show = !0), t.update.showContent = !0, r.option.form?.openAfter?.(t.update.form, t.update);
|
|
1327
1384
|
} catch (e) {
|
|
1328
1385
|
console.error(e);
|
|
1329
1386
|
} finally {
|
|
1330
|
-
|
|
1387
|
+
E.loading(!1);
|
|
1331
1388
|
}
|
|
1332
1389
|
});
|
|
1333
1390
|
},
|
|
1334
1391
|
/** 提交增改表单操作 */
|
|
1335
1392
|
submit: () => {
|
|
1336
1393
|
FunUtil.throttle(async () => {
|
|
1337
|
-
await u.value?.validate(async (s, p) => new Promise((c,
|
|
1338
|
-
s || (
|
|
1394
|
+
await u.value?.validate(async (s, p) => new Promise((c, b) => {
|
|
1395
|
+
s || (E.fail(y.tCurd("checkFormData")), b(!1)), c();
|
|
1339
1396
|
})), t.update.loading = !0;
|
|
1340
1397
|
const i = t.update.type === I.Add ? r.option.api.create : r.option.api.update;
|
|
1341
1398
|
try {
|
|
@@ -1388,7 +1445,7 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1388
1445
|
/** 删除操作弹窗与数据对象 */
|
|
1389
1446
|
remove: {
|
|
1390
1447
|
/** 删除弹窗标题 */
|
|
1391
|
-
title:
|
|
1448
|
+
title: y.tCurd("confirmDelete"),
|
|
1392
1449
|
/** 删除弹窗显示控制 */
|
|
1393
1450
|
show: !1,
|
|
1394
1451
|
/** 待删除数据项集合 */
|
|
@@ -1402,7 +1459,7 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1402
1459
|
/** 打开删除弹窗并设置待删除项 */
|
|
1403
1460
|
open: (i) => {
|
|
1404
1461
|
if (i.length === 0) {
|
|
1405
|
-
|
|
1462
|
+
E.fail(y.tCurd("selectDataToDelete"));
|
|
1406
1463
|
return;
|
|
1407
1464
|
}
|
|
1408
1465
|
t.remove.items = i, t.remove.show = !0;
|
|
@@ -1417,7 +1474,7 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1417
1474
|
await i({
|
|
1418
1475
|
[r.option.table?.rowKey]: t.remove.items.map((l) => l[r.option.table?.rowKey]),
|
|
1419
1476
|
items: t.remove.items
|
|
1420
|
-
}),
|
|
1477
|
+
}), E.success(y.tCurd("operationSuccess")), t.table.data.length <= 1 && t.page.num > 1 && (t.page.num -= 1), t.remove.close(), await t.table.getList();
|
|
1421
1478
|
} catch (l) {
|
|
1422
1479
|
console.error(l);
|
|
1423
1480
|
} finally {
|
|
@@ -1445,8 +1502,8 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1445
1502
|
try {
|
|
1446
1503
|
let c = await s.options?.[s.type]?.dataApi?.(t.update.form, i);
|
|
1447
1504
|
if (c) {
|
|
1448
|
-
const
|
|
1449
|
-
|
|
1505
|
+
const b = s.options?.[s.type]?.dataPath;
|
|
1506
|
+
b && (c = ObjectUtil.getPathValue(c, b)), s.options[s.type].data = c, s.options.search[s.type].data = c, s.options.formAdd[s.type].data = c, s.options.formUpdate[s.type].data = c, t.apiDataMap[s.key] = c;
|
|
1450
1507
|
}
|
|
1451
1508
|
} catch {
|
|
1452
1509
|
}
|
|
@@ -1460,8 +1517,8 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1460
1517
|
},
|
|
1461
1518
|
/** 初始化curd配置(option默认值合并等) */
|
|
1462
1519
|
initCurdConfig: () => {
|
|
1463
|
-
const i = JSONUtil.cp(
|
|
1464
|
-
i.table.emptyText =
|
|
1520
|
+
const i = JSONUtil.cp(O.config);
|
|
1521
|
+
i.table.emptyText = y.tCurd("noData"), r.option.size = r.option.size || {}, i.table.size = r.option.size.table || i.size.table, i.form.size = r.option.size.form || i.size.form, i.size.search = r.option.size.search || i.size.search;
|
|
1465
1522
|
const l = ObjectUtil.deepMerge(i, r.option || {});
|
|
1466
1523
|
Object.keys(l).forEach((e) => {
|
|
1467
1524
|
r.option[e] = l[e];
|
|
@@ -1473,11 +1530,11 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1473
1530
|
* @returns
|
|
1474
1531
|
*/
|
|
1475
1532
|
initColumnOptions: () => {
|
|
1476
|
-
let i = JSONUtil.cp(
|
|
1533
|
+
let i = JSONUtil.cp(O.config.columnConfig);
|
|
1477
1534
|
i.options = ObjectUtil.deepMerge(i.options, {
|
|
1478
1535
|
switch: {
|
|
1479
|
-
activeLabel:
|
|
1480
|
-
inactiveLabel:
|
|
1536
|
+
activeLabel: y.tCurd("switchOn"),
|
|
1537
|
+
inactiveLabel: y.tCurd("switchOff")
|
|
1481
1538
|
}
|
|
1482
1539
|
});
|
|
1483
1540
|
const l = (e) => {
|
|
@@ -1498,19 +1555,19 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1498
1555
|
const c = e.options?.switch;
|
|
1499
1556
|
try {
|
|
1500
1557
|
await o.value?.open({
|
|
1501
|
-
title:
|
|
1502
|
-
content:
|
|
1558
|
+
title: y.tCurd("confirmModify"),
|
|
1559
|
+
content: y.tCurd("confirmSwitchMessage")
|
|
1503
1560
|
}), t.table.loading = !0;
|
|
1504
1561
|
try {
|
|
1505
1562
|
return r.option.api.update ? (await r.option.api.update({
|
|
1506
1563
|
[r.option.table?.rowKey]: p[r.option.table?.rowKey],
|
|
1507
1564
|
[s]: p[s] === c.activeValue ? c.inactiveValue : c.activeValue,
|
|
1508
|
-
final(
|
|
1565
|
+
final(b, n, d) {
|
|
1509
1566
|
t.table.loading = !1;
|
|
1510
1567
|
}
|
|
1511
|
-
}), t.table.loading = !1,
|
|
1512
|
-
} catch (
|
|
1513
|
-
return console.error(
|
|
1568
|
+
}), t.table.loading = !1, E.success(y.tCurd("operationSuccess")), t.table.getList(), !0) : void 0;
|
|
1569
|
+
} catch (b) {
|
|
1570
|
+
return console.error(b), !1;
|
|
1514
1571
|
} finally {
|
|
1515
1572
|
t.table.loading = !1;
|
|
1516
1573
|
}
|
|
@@ -1523,7 +1580,7 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1523
1580
|
},
|
|
1524
1581
|
getColumnSpan: (i, l) => {
|
|
1525
1582
|
if (i.item.form?.spanCol) {
|
|
1526
|
-
const e =
|
|
1583
|
+
const e = O.config.form.defaultSpan, p = l.filter((c) => !E.isFun(c.item.show?.form, t.update.form, t.update.type)).reduce((c, b) => c + (b.item.form?.span || e), 0);
|
|
1527
1584
|
return (i.item?.form.span || e) + p;
|
|
1528
1585
|
}
|
|
1529
1586
|
return i.item.form.span;
|
|
@@ -1547,11 +1604,11 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1547
1604
|
if (t.update.formDefault[d.key] = d.value, d.table.table && (d.show.table && t.table.column.show.list.push(d.key), d.table.table && t.table.column.show.listSource.push(d.key)), !(d.isForm && typeof d.show?.form == "boolean") || d.show?.form) {
|
|
1548
1605
|
d.form = d.form || { span: s }, d.form.span = d.form.span ?? s;
|
|
1549
1606
|
let V = d.form.span, w = p.reduce((B, R) => B + R.span, V);
|
|
1550
|
-
const
|
|
1551
|
-
if (p.push({ item: d, span: V }), (
|
|
1607
|
+
const A = p.length;
|
|
1608
|
+
if (p.push({ item: d, span: V }), (A === 1 && p[0].span === 0 || w >= e || V === 0 && A > 1) && (l.push(p), p = []), d.rules) {
|
|
1552
1609
|
const B = {
|
|
1553
|
-
input:
|
|
1554
|
-
select:
|
|
1610
|
+
input: y.tCurd("placeholderInput"),
|
|
1611
|
+
select: y.tCurd("placeholderSelect")
|
|
1555
1612
|
}, R = (B[d.type] || B.input) + d.label;
|
|
1556
1613
|
t.update.rules[d.key] = typeof d.rules == "boolean" ? [
|
|
1557
1614
|
{
|
|
@@ -1562,13 +1619,13 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1562
1619
|
] : d.rules;
|
|
1563
1620
|
}
|
|
1564
1621
|
}
|
|
1565
|
-
},
|
|
1566
|
-
d.isForm = V, Array.isArray(d.children) && d.children.forEach((w) =>
|
|
1622
|
+
}, b = (d, V) => {
|
|
1623
|
+
d.isForm = V, Array.isArray(d.children) && d.children.forEach((w) => b(w, V));
|
|
1567
1624
|
};
|
|
1568
1625
|
i.column.forEach((d) => {
|
|
1569
|
-
d.isForm = !0,
|
|
1626
|
+
d.isForm = !0, b(d, !0), c(d);
|
|
1570
1627
|
}), r.option.table?.column?.forEach((d) => {
|
|
1571
|
-
|
|
1628
|
+
b(d, !1), c(d);
|
|
1572
1629
|
}), t.search.column.list = i.column.concat(i.table?.column || []), t.table.column.list = t.search.column.list.filter((d) => d.table?.table), t.search.column.list.sort((d, V) => d.sort?.search - V.sort?.search), t.table.column.list.sort((d, V) => d.sort?.table - V.sort?.table), p.length > 0 && l.push(p), t.update.formColumn = l;
|
|
1573
1630
|
const n = r.option.search?.formDefault;
|
|
1574
1631
|
n && Object.keys(n).forEach((d) => {
|
|
@@ -1581,7 +1638,7 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1581
1638
|
return t.init(), ue(() => {
|
|
1582
1639
|
r.option.init !== !1 && t.table.getList();
|
|
1583
1640
|
}), { conf: t, switchConfirmRef: o, ruleFormRef: u };
|
|
1584
|
-
},
|
|
1641
|
+
}, Me = { class: "dialog-footer" }, Be = /* @__PURE__ */ J({
|
|
1585
1642
|
__name: "switchConfirm",
|
|
1586
1643
|
props: {
|
|
1587
1644
|
size: {}
|
|
@@ -1589,7 +1646,7 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1589
1646
|
setup(r, { expose: o }) {
|
|
1590
1647
|
const u = H(!1), t = H("确认修改"), i = H("确认要修改状态吗?");
|
|
1591
1648
|
let l = null, e = null;
|
|
1592
|
-
const s = (
|
|
1649
|
+
const s = (b) => (b?.title && (t.value = b.title), b?.content && (i.value = b.content), u.value = !0, new Promise((n, d) => {
|
|
1593
1650
|
l = n, e = d;
|
|
1594
1651
|
})), p = () => {
|
|
1595
1652
|
u.value = !1, l?.(!0), l = null, e = null;
|
|
@@ -1598,8 +1655,8 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1598
1655
|
};
|
|
1599
1656
|
return o({
|
|
1600
1657
|
open: s
|
|
1601
|
-
}), (
|
|
1602
|
-
const d =
|
|
1658
|
+
}), (b, n) => {
|
|
1659
|
+
const d = X("el-form");
|
|
1603
1660
|
return f(), h(a(_), {
|
|
1604
1661
|
modelValue: u.value,
|
|
1605
1662
|
"onUpdate:modelValue": n[0] || (n[0] = (V) => u.value = V),
|
|
@@ -1608,12 +1665,12 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1608
1665
|
width: "400px"
|
|
1609
1666
|
}, {
|
|
1610
1667
|
footer: m(() => [
|
|
1611
|
-
z(d, { size:
|
|
1668
|
+
z(d, { size: b.size }, {
|
|
1612
1669
|
default: m(() => [
|
|
1613
|
-
|
|
1670
|
+
F("span", Me, [
|
|
1614
1671
|
z(a(T), { onClick: c }, {
|
|
1615
1672
|
default: m(() => n[1] || (n[1] = [
|
|
1616
|
-
|
|
1673
|
+
$("取消")
|
|
1617
1674
|
])),
|
|
1618
1675
|
_: 1
|
|
1619
1676
|
}),
|
|
@@ -1622,7 +1679,7 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1622
1679
|
onClick: p
|
|
1623
1680
|
}, {
|
|
1624
1681
|
default: m(() => n[2] || (n[2] = [
|
|
1625
|
-
|
|
1682
|
+
$("确认")
|
|
1626
1683
|
])),
|
|
1627
1684
|
_: 1
|
|
1628
1685
|
})
|
|
@@ -1632,7 +1689,7 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1632
1689
|
}, 8, ["size"])
|
|
1633
1690
|
]),
|
|
1634
1691
|
default: m(() => [
|
|
1635
|
-
|
|
1692
|
+
F("div", null, U(i.value), 1)
|
|
1636
1693
|
]),
|
|
1637
1694
|
_: 1
|
|
1638
1695
|
}, 8, ["modelValue", "title"]);
|
|
@@ -1643,32 +1700,32 @@ const I = O.EDialog, Ae = (r) => {
|
|
|
1643
1700
|
for (const [t, i] of o)
|
|
1644
1701
|
u[t] = i;
|
|
1645
1702
|
return u;
|
|
1646
|
-
},
|
|
1703
|
+
}, je = {}, Ie = {
|
|
1647
1704
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1648
1705
|
viewBox: "0 0 1024 1024"
|
|
1649
1706
|
};
|
|
1650
|
-
function
|
|
1651
|
-
return f(),
|
|
1652
|
-
|
|
1707
|
+
function Re(r, o) {
|
|
1708
|
+
return f(), g("svg", Ie, o[0] || (o[0] = [
|
|
1709
|
+
F("path", {
|
|
1653
1710
|
fill: "currentColor",
|
|
1654
1711
|
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"
|
|
1655
1712
|
}, null, -1)
|
|
1656
1713
|
]));
|
|
1657
1714
|
}
|
|
1658
|
-
const
|
|
1715
|
+
const Pe = /* @__PURE__ */ pe(je, [["render", Re]]), Ne = {}, Ke = {
|
|
1659
1716
|
"data-v-58697b5c": "",
|
|
1660
1717
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1661
1718
|
viewBox: "0 0 1024 1024"
|
|
1662
1719
|
};
|
|
1663
|
-
function
|
|
1664
|
-
return f(),
|
|
1665
|
-
|
|
1720
|
+
function He(r, o) {
|
|
1721
|
+
return f(), g("svg", Ke, o[0] || (o[0] = [
|
|
1722
|
+
F("path", {
|
|
1666
1723
|
fill: "currentColor",
|
|
1667
1724
|
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"
|
|
1668
1725
|
}, null, -1)
|
|
1669
1726
|
]));
|
|
1670
1727
|
}
|
|
1671
|
-
const
|
|
1728
|
+
const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-center table-header-label inline" }, qe = { class: "table-header-tooltip" }, Qe = ["onClick", "innerHTML"], Ge = /* @__PURE__ */ J({
|
|
1672
1729
|
__name: "tableColumn",
|
|
1673
1730
|
props: {
|
|
1674
1731
|
conf: {},
|
|
@@ -1676,10 +1733,10 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1676
1733
|
option: {}
|
|
1677
1734
|
},
|
|
1678
1735
|
setup(r) {
|
|
1679
|
-
const o =
|
|
1736
|
+
const o = E.isFun, u = be().type;
|
|
1680
1737
|
return (t, i) => {
|
|
1681
|
-
const l =
|
|
1682
|
-
return f(!0),
|
|
1738
|
+
const l = X("el-tooltip");
|
|
1739
|
+
return f(!0), g(D, null, L(t.columnList, (e) => (f(), g(D, {
|
|
1683
1740
|
key: e.key
|
|
1684
1741
|
}, [
|
|
1685
1742
|
t.conf.table.column.show.list.includes(e.key) ? (f(), h(a(ee), v({
|
|
@@ -1689,8 +1746,8 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1689
1746
|
ref_for: !0
|
|
1690
1747
|
}, e.table), {
|
|
1691
1748
|
header: m(() => [
|
|
1692
|
-
|
|
1693
|
-
|
|
1749
|
+
C(t.$slots, "table-header-" + e.key, { item: e }, () => [
|
|
1750
|
+
F("div", We, [
|
|
1694
1751
|
e.table?.tooltip ? (f(), h(l, {
|
|
1695
1752
|
key: 0,
|
|
1696
1753
|
effect: "dark",
|
|
@@ -1698,19 +1755,19 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1698
1755
|
placement: "top"
|
|
1699
1756
|
}, {
|
|
1700
1757
|
default: m(() => [
|
|
1701
|
-
|
|
1702
|
-
z(
|
|
1758
|
+
F("span", qe, [
|
|
1759
|
+
z(Je)
|
|
1703
1760
|
])
|
|
1704
1761
|
]),
|
|
1705
1762
|
_: 2
|
|
1706
|
-
}, 1032, ["content"])) :
|
|
1707
|
-
|
|
1763
|
+
}, 1032, ["content"])) : k("", !0),
|
|
1764
|
+
$(" " + U(e.label), 1)
|
|
1708
1765
|
])
|
|
1709
1766
|
])
|
|
1710
1767
|
]),
|
|
1711
1768
|
default: m(({ row: s }) => [
|
|
1712
|
-
e.children ? (f(),
|
|
1713
|
-
i[0] || (i[0] =
|
|
1769
|
+
e.children ? (f(), g(D, { key: 0 }, [
|
|
1770
|
+
i[0] || (i[0] = $(" ")),
|
|
1714
1771
|
(f(), h(q(a(u)), {
|
|
1715
1772
|
conf: t.conf,
|
|
1716
1773
|
columnList: e.children,
|
|
@@ -1718,13 +1775,13 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1718
1775
|
}, te({ _: 2 }, [
|
|
1719
1776
|
L(t.$slots, (p, c) => ({
|
|
1720
1777
|
name: c,
|
|
1721
|
-
fn: m((
|
|
1722
|
-
|
|
1778
|
+
fn: m((b) => [
|
|
1779
|
+
C(t.$slots, c, v({ ref_for: !0 }, b || {}))
|
|
1723
1780
|
])
|
|
1724
1781
|
}))
|
|
1725
1782
|
]), 1032, ["conf", "columnList", "option"]))
|
|
1726
|
-
], 64)) : (f(),
|
|
1727
|
-
a(o)(e.show?.form, t.conf.update.form, a(
|
|
1783
|
+
], 64)) : (f(), g(D, { key: 1 }, [
|
|
1784
|
+
a(o)(e.show?.form, t.conf.update.form, a(E).EDialog.Update) && t.option.table?.inlineEdit && t.conf.inlineEdit.data === s && (e.type === "input" || e.type === "select") ? (f(), g(D, { key: 0 }, [
|
|
1728
1785
|
e.type === "input" ? (f(), h(a(Y), v({
|
|
1729
1786
|
key: 0,
|
|
1730
1787
|
modelValue: t.conf.update.form[e.key],
|
|
@@ -1737,15 +1794,15 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1737
1794
|
ref_for: !0
|
|
1738
1795
|
}, t.conf.update.getBind(e), S(t.conf.update.getOn(e)), { style: { width: "100%" } }), {
|
|
1739
1796
|
default: m(() => [
|
|
1740
|
-
(f(!0),
|
|
1797
|
+
(f(!0), g(D, null, L(e.options?.search?.select?.data || e.options?.select?.data, (p) => (f(), h(a(K), {
|
|
1741
1798
|
key: p.value,
|
|
1742
1799
|
label: p.label,
|
|
1743
1800
|
value: p.value
|
|
1744
1801
|
}, null, 8, ["label", "value"]))), 128))
|
|
1745
1802
|
]),
|
|
1746
1803
|
_: 2
|
|
1747
|
-
}, 1040, ["modelValue", "onUpdate:modelValue"])) :
|
|
1748
|
-
], 64)) :
|
|
1804
|
+
}, 1040, ["modelValue", "onUpdate:modelValue"])) : k("", !0)
|
|
1805
|
+
], 64)) : C(t.$slots, "table-" + e.key, {
|
|
1749
1806
|
key: 1,
|
|
1750
1807
|
row: s,
|
|
1751
1808
|
item: e
|
|
@@ -1761,7 +1818,7 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1761
1818
|
"onUpdate:modelValue": (p) => s[e.key] = p,
|
|
1762
1819
|
"before-change": () => e.options?.switch?.tableBeforeChange?.(e.key, s),
|
|
1763
1820
|
ref_for: !0
|
|
1764
|
-
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (f(),
|
|
1821
|
+
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (f(), g("span", {
|
|
1765
1822
|
key: 2,
|
|
1766
1823
|
style: fe({
|
|
1767
1824
|
"--table-text-click-color": e.table?.click?.color
|
|
@@ -1769,26 +1826,26 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1769
1826
|
class: j({ "table-text-click": e.table?.click?.callback }),
|
|
1770
1827
|
onClick: (p) => e.table?.click?.callback?.(s),
|
|
1771
1828
|
innerHTML: e.table?.format ? e.table?.format(s) : s[e.key]
|
|
1772
|
-
}, null, 14,
|
|
1829
|
+
}, null, 14, Qe))
|
|
1773
1830
|
])
|
|
1774
1831
|
], 64))
|
|
1775
1832
|
]),
|
|
1776
1833
|
_: 2
|
|
1777
|
-
}, 1040, ["prop", "label"])) :
|
|
1834
|
+
}, 1040, ["prop", "label"])) : k("", !0)
|
|
1778
1835
|
], 64))), 128);
|
|
1779
1836
|
};
|
|
1780
1837
|
}
|
|
1781
|
-
}),
|
|
1838
|
+
}), Xe = {
|
|
1782
1839
|
class: "row form-item-content",
|
|
1783
1840
|
style: { width: "100%" }
|
|
1784
|
-
},
|
|
1841
|
+
}, Ye = { class: "col column form-item-content-item" }, Ze = { class: "col" }, xe = ["innerHTML"], _e = /* @__PURE__ */ J({
|
|
1785
1842
|
__name: "formColumn",
|
|
1786
1843
|
props: {
|
|
1787
1844
|
conf: {},
|
|
1788
1845
|
item: {}
|
|
1789
1846
|
},
|
|
1790
1847
|
setup(r) {
|
|
1791
|
-
return (o, u) => (f(), h(a(
|
|
1848
|
+
return (o, u) => (f(), h(a(G), {
|
|
1792
1849
|
class: j({
|
|
1793
1850
|
"hide-label": typeof o.item.item.text?.form?.label == "boolean" ? !o.item.item.text?.form?.label : !1
|
|
1794
1851
|
}),
|
|
@@ -1797,14 +1854,14 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1797
1854
|
"label-width": o.item.item.form?.labelWidth || o.conf.option.form?.labelWidth
|
|
1798
1855
|
}, {
|
|
1799
1856
|
default: m(() => [
|
|
1800
|
-
|
|
1801
|
-
|
|
1857
|
+
F("div", Xe, [
|
|
1858
|
+
C(o.$slots, "form-" + o.item.item.key + "-start", {
|
|
1802
1859
|
row: o.conf.update.form,
|
|
1803
1860
|
item: o.item.item
|
|
1804
1861
|
}),
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1862
|
+
F("div", Ye, [
|
|
1863
|
+
F("div", Ze, [
|
|
1864
|
+
C(o.$slots, "form-" + o.item.item.key, {
|
|
1808
1865
|
row: o.conf.update.form,
|
|
1809
1866
|
item: o.item.item
|
|
1810
1867
|
}, () => [
|
|
@@ -1829,7 +1886,7 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1829
1886
|
style: { width: "100%" }
|
|
1830
1887
|
}), {
|
|
1831
1888
|
default: m(() => [
|
|
1832
|
-
(f(!0),
|
|
1889
|
+
(f(!0), g(D, null, L(o.conf.update.getBind(o.item.item).data, (t) => (f(), h(a(K), {
|
|
1833
1890
|
key: t.value,
|
|
1834
1891
|
label: t.label,
|
|
1835
1892
|
value: t.value
|
|
@@ -1845,7 +1902,7 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1845
1902
|
style: { width: "100%" }
|
|
1846
1903
|
}), {
|
|
1847
1904
|
default: m(() => [
|
|
1848
|
-
(f(!0),
|
|
1905
|
+
(f(!0), g(D, null, L(o.conf.update.getBind(o.item.item).data, (t) => (f(), h(a(se), {
|
|
1849
1906
|
key: t.value,
|
|
1850
1907
|
label: t.label,
|
|
1851
1908
|
value: t.value
|
|
@@ -1878,25 +1935,25 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1878
1935
|
"onUpdate:modelValue": u[6] || (u[6] = (t) => o.conf.update.form[o.item.item.key] = t)
|
|
1879
1936
|
}, o.conf.update.getBind(o.item.item), S(o.conf.update.getOn(o.item.item)), {
|
|
1880
1937
|
disabled: o.conf.update.getDisabled(o.item.item)
|
|
1881
|
-
}), null, 16, ["modelValue", "disabled"])) :
|
|
1938
|
+
}), null, 16, ["modelValue", "disabled"])) : k("", !0)
|
|
1882
1939
|
]),
|
|
1883
|
-
|
|
1940
|
+
C(o.$slots, "form-" + o.item.item.key + "-right", {
|
|
1884
1941
|
row: o.conf.update.form,
|
|
1885
1942
|
item: o.item.item
|
|
1886
1943
|
})
|
|
1887
1944
|
]),
|
|
1888
|
-
|
|
1945
|
+
C(o.$slots, "form-" + o.item.item.key + "-tip", {
|
|
1889
1946
|
row: o.conf.update.form,
|
|
1890
1947
|
item: o.item.item
|
|
1891
1948
|
}, () => [
|
|
1892
|
-
o.item.item.form?.tipText ? (f(),
|
|
1949
|
+
o.item.item.form?.tipText ? (f(), g("div", {
|
|
1893
1950
|
key: 0,
|
|
1894
1951
|
class: "form-tip-text",
|
|
1895
1952
|
innerHTML: typeof o.item.item.form?.tipText == "function" ? o.item.item.form?.tipText(o.conf.update.form, o.conf.update.type) : o.item.item.form?.tipText
|
|
1896
|
-
}, null, 8,
|
|
1953
|
+
}, null, 8, xe)) : k("", !0)
|
|
1897
1954
|
])
|
|
1898
1955
|
]),
|
|
1899
|
-
|
|
1956
|
+
C(o.$slots, "form-" + o.item.item.key + "-end", {
|
|
1900
1957
|
row: o.conf.update.form,
|
|
1901
1958
|
item: o.item.item
|
|
1902
1959
|
})
|
|
@@ -1905,16 +1962,19 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1905
1962
|
_: 3
|
|
1906
1963
|
}, 8, ["class", "label", "prop", "label-width"]));
|
|
1907
1964
|
}
|
|
1908
|
-
}),
|
|
1965
|
+
}), et = {
|
|
1909
1966
|
key: 0,
|
|
1910
1967
|
class: "relative curd-search fit-width"
|
|
1911
|
-
},
|
|
1968
|
+
}, tt = { class: "mb-10 flex justify-between items-center fit-width" }, ot = {
|
|
1912
1969
|
class: "flex items-center",
|
|
1913
1970
|
style: { gap: "10px" }
|
|
1914
|
-
},
|
|
1971
|
+
}, at = { key: 0 }, lt = { key: 1 }, nt = { key: 2 }, it = { class: "export-btn" }, rt = {
|
|
1972
|
+
key: 1,
|
|
1973
|
+
class: "export-btn"
|
|
1974
|
+
}, st = {
|
|
1915
1975
|
class: "flex items-center table-tools-right",
|
|
1916
1976
|
style: { gap: "10px" }
|
|
1917
|
-
},
|
|
1977
|
+
}, dt = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, ut = { class: "dialog-footer" }, ft = { class: "dialog-footer" }, pt = /* @__PURE__ */ J({
|
|
1918
1978
|
__name: "index",
|
|
1919
1979
|
props: {
|
|
1920
1980
|
/**
|
|
@@ -1925,36 +1985,36 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1925
1985
|
}
|
|
1926
1986
|
},
|
|
1927
1987
|
setup(r, { expose: o }) {
|
|
1928
|
-
const u =
|
|
1988
|
+
const u = E.EDialog, t = r, i = E.isFun, { conf: l, switchConfirmRef: e, ruleFormRef: s } = Le(t);
|
|
1929
1989
|
return o({
|
|
1930
1990
|
conf: l
|
|
1931
1991
|
}), (p, c) => {
|
|
1932
|
-
const
|
|
1933
|
-
return f(),
|
|
1992
|
+
const b = we("loading");
|
|
1993
|
+
return f(), g("div", {
|
|
1934
1994
|
class: j(["relative cc1-form-box", [r.option.table?.fitHeight ? "col" : "no-min-height"]])
|
|
1935
1995
|
}, [
|
|
1936
|
-
|
|
1996
|
+
F("div", {
|
|
1937
1997
|
class: j(["row", [r.option.table?.fitHeight ? "absolute fit" : ""]]),
|
|
1938
1998
|
style: { overflow: "hidden" }
|
|
1939
1999
|
}, [
|
|
1940
|
-
|
|
1941
|
-
|
|
2000
|
+
C(p.$slots, "box-left"),
|
|
2001
|
+
F("div", {
|
|
1942
2002
|
class: j(["column fit-width no-wrap", [r.option.table?.fitHeight ? "col" : ""]])
|
|
1943
2003
|
}, [
|
|
1944
|
-
r.option.search?.show !== !1 ? (f(),
|
|
2004
|
+
r.option.search?.show !== !1 ? (f(), g("div", et, [
|
|
1945
2005
|
z(a(N), {
|
|
1946
2006
|
model: a(l).search.form,
|
|
1947
2007
|
inline: "",
|
|
1948
2008
|
size: r.option.size?.search
|
|
1949
2009
|
}, {
|
|
1950
2010
|
default: m(() => [
|
|
1951
|
-
|
|
2011
|
+
C(p.$slots, "search-start", {
|
|
1952
2012
|
row: a(l).search.form
|
|
1953
2013
|
}),
|
|
1954
|
-
(f(!0),
|
|
2014
|
+
(f(!0), g(D, null, L(a(l).search.column.list, (n) => (f(), g(D, {
|
|
1955
2015
|
key: n.key
|
|
1956
2016
|
}, [
|
|
1957
|
-
(typeof n.show?.search == "function" ? n.show?.search(a(l).search.form) : n.show?.search) ? (f(), h(a(
|
|
2017
|
+
(typeof n.show?.search == "function" ? n.show?.search(a(l).search.form) : n.show?.search) ? (f(), h(a(G), {
|
|
1958
2018
|
key: 0,
|
|
1959
2019
|
label: typeof n.text?.search?.label == "string" ? n.text?.search?.label : n.label,
|
|
1960
2020
|
class: j({
|
|
@@ -1962,7 +2022,7 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1962
2022
|
})
|
|
1963
2023
|
}, {
|
|
1964
2024
|
default: m(() => [
|
|
1965
|
-
|
|
2025
|
+
C(p.$slots, "search-" + n.key, {
|
|
1966
2026
|
row: a(l).search.form
|
|
1967
2027
|
}, () => [
|
|
1968
2028
|
n.type === "input" ? (f(), h(a(Y), v({
|
|
@@ -1977,7 +2037,7 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1977
2037
|
key: 1,
|
|
1978
2038
|
modelValue: a(l).search.form[n.key],
|
|
1979
2039
|
"onUpdate:modelValue": (d) => a(l).search.form[n.key] = d,
|
|
1980
|
-
placeholder: a(l).search.getPlaceholder(n, a(
|
|
2040
|
+
placeholder: a(l).search.getPlaceholder(n, a(y).tCurd("placeholderSelect")),
|
|
1981
2041
|
clearable: "",
|
|
1982
2042
|
disabled: n.disabled?.search,
|
|
1983
2043
|
ref_for: !0
|
|
@@ -1999,13 +2059,13 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
1999
2059
|
key: 2,
|
|
2000
2060
|
modelValue: a(l).search.form[n.key],
|
|
2001
2061
|
"onUpdate:modelValue": (d) => a(l).search.form[n.key] = d,
|
|
2002
|
-
placeholder: a(l).search.getPlaceholder(n, a(
|
|
2062
|
+
placeholder: a(l).search.getPlaceholder(n, a(y).tCurd("placeholderSelect")),
|
|
2003
2063
|
clearable: "",
|
|
2004
2064
|
disabled: n.disabled?.search,
|
|
2005
2065
|
ref_for: !0
|
|
2006
2066
|
}, n.options?.search?.select || n.options?.select, S(n.options?.search?.select?.on || n.options?.select?.on || {})), {
|
|
2007
2067
|
default: m(() => [
|
|
2008
|
-
(f(!0),
|
|
2068
|
+
(f(!0), g(D, null, L(n.options?.select?.data, (d) => (f(), h(a(K), {
|
|
2009
2069
|
key: d.value,
|
|
2010
2070
|
label: d.label,
|
|
2011
2071
|
value: d.value
|
|
@@ -2025,19 +2085,19 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2025
2085
|
ref_for: !0
|
|
2026
2086
|
}, n.options?.search?.[n.type] || n.options?.[n.type], S(n.options?.search?.[n.type]?.on || n.options?.[n.type]?.on || {}), {
|
|
2027
2087
|
disabled: n.disabled?.search
|
|
2028
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
2088
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : k("", !0)
|
|
2029
2089
|
]),
|
|
2030
|
-
|
|
2090
|
+
C(p.$slots, "search-" + n.key + "-right", {
|
|
2031
2091
|
row: a(l).search.form
|
|
2032
2092
|
})
|
|
2033
2093
|
]),
|
|
2034
2094
|
_: 2
|
|
2035
|
-
}, 1032, ["label", "class"])) :
|
|
2095
|
+
}, 1032, ["label", "class"])) : k("", !0)
|
|
2036
2096
|
], 64))), 128)),
|
|
2037
|
-
|
|
2097
|
+
C(p.$slots, "search-center", {
|
|
2038
2098
|
row: a(l).search.form
|
|
2039
2099
|
}),
|
|
2040
|
-
r.option.tools?.search || r.option.tools?.reset ? (f(), h(a(
|
|
2100
|
+
r.option.tools?.search || r.option.tools?.reset ? (f(), h(a(G), { key: 0 }, {
|
|
2041
2101
|
default: m(() => [
|
|
2042
2102
|
r.option.tools?.search ? (f(), h(a(T), {
|
|
2043
2103
|
key: 0,
|
|
@@ -2045,127 +2105,147 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2045
2105
|
onClick: a(l).search.submit
|
|
2046
2106
|
}, {
|
|
2047
2107
|
default: m(() => [
|
|
2048
|
-
|
|
2108
|
+
$(U(a(y).tCurd("search")), 1)
|
|
2049
2109
|
]),
|
|
2050
2110
|
_: 1
|
|
2051
|
-
}, 8, ["onClick"])) :
|
|
2111
|
+
}, 8, ["onClick"])) : k("", !0),
|
|
2052
2112
|
r.option.tools?.reset ? (f(), h(a(T), {
|
|
2053
2113
|
key: 1,
|
|
2054
2114
|
onClick: a(l).search.reset
|
|
2055
2115
|
}, {
|
|
2056
2116
|
default: m(() => [
|
|
2057
|
-
|
|
2117
|
+
$(U(a(y).tCurd("reset")), 1)
|
|
2058
2118
|
]),
|
|
2059
2119
|
_: 1
|
|
2060
|
-
}, 8, ["onClick"])) :
|
|
2120
|
+
}, 8, ["onClick"])) : k("", !0)
|
|
2061
2121
|
]),
|
|
2062
2122
|
_: 1
|
|
2063
|
-
})) :
|
|
2064
|
-
|
|
2123
|
+
})) : k("", !0),
|
|
2124
|
+
C(p.$slots, "search-end", {
|
|
2065
2125
|
row: a(l).search.form
|
|
2066
2126
|
})
|
|
2067
2127
|
]),
|
|
2068
2128
|
_: 3
|
|
2069
2129
|
}, 8, ["model", "size"])
|
|
2070
|
-
])) :
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
a(i)(r.option.tools?.add) ? (f(),
|
|
2130
|
+
])) : k("", !0),
|
|
2131
|
+
F("div", tt, [
|
|
2132
|
+
F("div", ot, [
|
|
2133
|
+
a(i)(r.option.tools?.add) ? (f(), g("div", at, [
|
|
2074
2134
|
z(a(T), {
|
|
2075
2135
|
type: "primary",
|
|
2076
2136
|
onClick: c[0] || (c[0] = (n) => a(l).update.open(a(u).Add)),
|
|
2077
2137
|
size: r.option.size?.search
|
|
2078
2138
|
}, {
|
|
2079
2139
|
default: m(() => [
|
|
2080
|
-
|
|
2140
|
+
$(U(a(y).tCurd("add")), 1)
|
|
2081
2141
|
]),
|
|
2082
2142
|
_: 1
|
|
2083
2143
|
}, 8, ["size"])
|
|
2084
|
-
])) :
|
|
2085
|
-
r.option.table?.selectable && a(i)(r.option.tools?.delete) ? (f(),
|
|
2144
|
+
])) : k("", !0),
|
|
2145
|
+
r.option.table?.selectable && a(i)(r.option.tools?.delete) ? (f(), g("div", lt, [
|
|
2086
2146
|
z(a(T), {
|
|
2087
2147
|
type: "danger",
|
|
2088
2148
|
onClick: c[1] || (c[1] = (n) => a(l).remove.open(a(l).table.selection.list)),
|
|
2089
2149
|
size: r.option.size?.search
|
|
2090
2150
|
}, {
|
|
2091
2151
|
default: m(() => [
|
|
2092
|
-
|
|
2152
|
+
$(U(a(y).tCurd("delete")), 1)
|
|
2093
2153
|
]),
|
|
2094
2154
|
_: 1
|
|
2095
2155
|
}, 8, ["size"])
|
|
2096
|
-
])) :
|
|
2097
|
-
r.option.tools?.expand ? (f(),
|
|
2156
|
+
])) : k("", !0),
|
|
2157
|
+
r.option.tools?.expand ? (f(), g("div", nt, [
|
|
2098
2158
|
z(a(T), {
|
|
2099
2159
|
type: "warning",
|
|
2100
2160
|
onClick: c[2] || (c[2] = (n) => a(l).table.expand.all()),
|
|
2101
2161
|
size: r.option.size?.search
|
|
2102
2162
|
}, {
|
|
2103
2163
|
default: m(() => [
|
|
2104
|
-
|
|
2164
|
+
$(U(a(y).tCurd("expandCollapse")), 1)
|
|
2105
2165
|
]),
|
|
2106
2166
|
_: 1
|
|
2107
2167
|
}, 8, ["size"])
|
|
2108
|
-
])) :
|
|
2109
|
-
r.option.tools?.export?.show ? (f(),
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2168
|
+
])) : k("", !0),
|
|
2169
|
+
r.option.tools?.export?.show ? (f(), g(D, { key: 3 }, [
|
|
2170
|
+
r.option.tools?.export?.dropdown?.show ? (f(), h(a(he), {
|
|
2171
|
+
key: 0,
|
|
2172
|
+
onCommand: a(l).export.click
|
|
2173
|
+
}, {
|
|
2174
|
+
dropdown: m(() => [
|
|
2175
|
+
z(a(ye), {
|
|
2176
|
+
size: r.option.size?.search
|
|
2177
|
+
}, {
|
|
2178
|
+
default: m(() => [
|
|
2179
|
+
r.option.tools?.export?.dropdown?.select && (r.option.table?.selectable || a(i)(r.option.tools?.delete)) ? (f(), h(a(x), {
|
|
2180
|
+
key: 0,
|
|
2181
|
+
command: "select"
|
|
2182
|
+
}, {
|
|
2183
|
+
default: m(() => [
|
|
2184
|
+
$(U(a(y).tCurd("exportSelect")), 1)
|
|
2185
|
+
]),
|
|
2186
|
+
_: 1
|
|
2187
|
+
})) : k("", !0),
|
|
2188
|
+
r.option.tools?.export?.dropdown?.page ? (f(), h(a(x), {
|
|
2189
|
+
key: 1,
|
|
2190
|
+
command: "page"
|
|
2191
|
+
}, {
|
|
2192
|
+
default: m(() => [
|
|
2193
|
+
$(U(a(y).tCurd("exportPage")), 1)
|
|
2194
|
+
]),
|
|
2195
|
+
_: 1
|
|
2196
|
+
})) : k("", !0),
|
|
2197
|
+
r.option.tools?.export?.dropdown?.all ? (f(), h(a(x), {
|
|
2198
|
+
key: 2,
|
|
2199
|
+
command: "all"
|
|
2200
|
+
}, {
|
|
2201
|
+
default: m(() => [
|
|
2202
|
+
$(U(a(y).tCurd("exportAll")), 1)
|
|
2203
|
+
]),
|
|
2204
|
+
_: 1
|
|
2205
|
+
})) : k("", !0)
|
|
2206
|
+
]),
|
|
2207
|
+
_: 1
|
|
2208
|
+
}, 8, ["size"])
|
|
2209
|
+
]),
|
|
2210
|
+
default: m(() => [
|
|
2211
|
+
F("div", it, [
|
|
2212
|
+
z(a(T), {
|
|
2213
|
+
type: "warning",
|
|
2214
|
+
loading: a(l).export.loading,
|
|
2215
|
+
size: r.option.size?.search
|
|
2121
2216
|
}, {
|
|
2122
2217
|
default: m(() => [
|
|
2123
|
-
|
|
2218
|
+
$(U(a(y).tCurd("export")), 1)
|
|
2124
2219
|
]),
|
|
2125
2220
|
_: 1
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2221
|
+
}, 8, ["loading", "size"])
|
|
2222
|
+
])
|
|
2223
|
+
]),
|
|
2224
|
+
_: 1
|
|
2225
|
+
}, 8, ["onCommand"])) : (f(), g("div", rt, [
|
|
2226
|
+
z(a(T), {
|
|
2227
|
+
type: "warning",
|
|
2228
|
+
loading: a(l).export.loading,
|
|
2229
|
+
size: r.option.size?.search,
|
|
2230
|
+
onClick: c[3] || (c[3] = (n) => a(l).export.run.start("all"))
|
|
2231
|
+
}, {
|
|
2232
|
+
default: m(() => [
|
|
2233
|
+
$(U(a(y).tCurd("export")), 1)
|
|
2139
2234
|
]),
|
|
2140
2235
|
_: 1
|
|
2141
|
-
}, 8, ["size"])
|
|
2142
|
-
])
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
z(a(T), {
|
|
2146
|
-
type: "warning",
|
|
2147
|
-
loading: a(l).export.loading,
|
|
2148
|
-
size: r.option.size?.search
|
|
2149
|
-
}, {
|
|
2150
|
-
default: m(() => [
|
|
2151
|
-
E(A(a(b).tCurd("export")), 1)
|
|
2152
|
-
]),
|
|
2153
|
-
_: 1
|
|
2154
|
-
}, 8, ["loading", "size"])
|
|
2155
|
-
])
|
|
2156
|
-
]),
|
|
2157
|
-
_: 1
|
|
2158
|
-
}, 8, ["onCommand"])) : C("", !0),
|
|
2159
|
-
k(p.$slots, "tools-left")
|
|
2236
|
+
}, 8, ["loading", "size"])
|
|
2237
|
+
]))
|
|
2238
|
+
], 64)) : k("", !0),
|
|
2239
|
+
C(p.$slots, "tools-left")
|
|
2160
2240
|
]),
|
|
2161
|
-
|
|
2162
|
-
|
|
2241
|
+
F("div", st, [
|
|
2242
|
+
C(p.$slots, "tools-right"),
|
|
2163
2243
|
a(l).page.showTools ? (f(), h(a(ie), v({
|
|
2164
2244
|
key: 0,
|
|
2165
2245
|
"current-page": a(l).page.num,
|
|
2166
|
-
"onUpdate:currentPage": c[
|
|
2246
|
+
"onUpdate:currentPage": c[4] || (c[4] = (n) => a(l).page.num = n),
|
|
2167
2247
|
"page-size": a(l).page.size,
|
|
2168
|
-
"onUpdate:pageSize": c[
|
|
2248
|
+
"onUpdate:pageSize": c[5] || (c[5] = (n) => a(l).page.size = n),
|
|
2169
2249
|
background: "",
|
|
2170
2250
|
"page-sizes": a(l).page.sizeList,
|
|
2171
2251
|
"pager-count": a(l).page.pagerCount,
|
|
@@ -2174,24 +2254,24 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2174
2254
|
size: r.option.size?.table,
|
|
2175
2255
|
onSizeChange: a(l).table.getList,
|
|
2176
2256
|
onCurrentChange: a(l).table.getList
|
|
2177
|
-
}, r.option.page?.pagination || {}, S(r.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) :
|
|
2178
|
-
r.option.tools?.refresh === void 0 || r.option.tools?.refresh ? (f(),
|
|
2257
|
+
}, r.option.page?.pagination || {}, S(r.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : k("", !0),
|
|
2258
|
+
r.option.tools?.refresh === void 0 || r.option.tools?.refresh ? (f(), g("div", {
|
|
2179
2259
|
key: 1,
|
|
2180
2260
|
class: j(["refresh-btn", [r.option.size?.search]]),
|
|
2181
|
-
onClick: c[
|
|
2261
|
+
onClick: c[6] || (c[6] = //@ts-ignore
|
|
2182
2262
|
(...n) => a(l).table.getList && a(l).table.getList(...n))
|
|
2183
2263
|
}, [
|
|
2184
|
-
z(
|
|
2185
|
-
], 2)) :
|
|
2264
|
+
z(Pe)
|
|
2265
|
+
], 2)) : k("", !0)
|
|
2186
2266
|
])
|
|
2187
2267
|
]),
|
|
2188
|
-
|
|
2268
|
+
F("div", {
|
|
2189
2269
|
class: j(["fit-width relative form-box", [r.option.table?.fitHeight ? "col " : ""]])
|
|
2190
2270
|
}, [
|
|
2191
|
-
|
|
2271
|
+
F("div", {
|
|
2192
2272
|
class: j(["column form-box-content", [r.option.table?.fitHeight ? "absolute fit" : ""]])
|
|
2193
2273
|
}, [
|
|
2194
|
-
ke((f(), h(a(
|
|
2274
|
+
ke((f(), h(a(ge), v({
|
|
2195
2275
|
data: a(l).table.data,
|
|
2196
2276
|
border: r.option.table?.border === void 0 ? !0 : r.option.table?.border,
|
|
2197
2277
|
onSelectionChange: a(l).table.selection.change,
|
|
@@ -2208,8 +2288,8 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2208
2288
|
align: "center",
|
|
2209
2289
|
fixed: "left",
|
|
2210
2290
|
"show-overflow-tooltip": !1
|
|
2211
|
-
}, null, 8, ["selectable"])) :
|
|
2212
|
-
z(
|
|
2291
|
+
}, null, 8, ["selectable"])) : k("", !0),
|
|
2292
|
+
z(Ge, {
|
|
2213
2293
|
conf: a(l),
|
|
2214
2294
|
columnList: a(l).table.column.list,
|
|
2215
2295
|
option: r.option
|
|
@@ -2217,7 +2297,7 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2217
2297
|
L(p.$slots, (n, d) => ({
|
|
2218
2298
|
name: d,
|
|
2219
2299
|
fn: m((V) => [
|
|
2220
|
-
|
|
2300
|
+
C(p.$slots, d, Ce(ve(V || {})))
|
|
2221
2301
|
])
|
|
2222
2302
|
}))
|
|
2223
2303
|
]), 1032, ["conf", "columnList", "option"]),
|
|
@@ -2228,8 +2308,8 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2228
2308
|
fixed: "right"
|
|
2229
2309
|
}, r.option.table?.operate), {
|
|
2230
2310
|
header: m(() => [
|
|
2231
|
-
|
|
2232
|
-
|
|
2311
|
+
C(p.$slots, "table-header-op", {}, () => [
|
|
2312
|
+
$(U(a(y).tCurd("operation")), 1)
|
|
2233
2313
|
])
|
|
2234
2314
|
]),
|
|
2235
2315
|
default: m(({ row: n }) => [
|
|
@@ -2237,15 +2317,15 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2237
2317
|
size: r.option.size?.table
|
|
2238
2318
|
}, {
|
|
2239
2319
|
default: m(() => [
|
|
2240
|
-
|
|
2241
|
-
r.option.table?.inlineEdit && a(l).inlineEdit.data === n ? (f(),
|
|
2320
|
+
C(p.$slots, "table-op-left", { row: n }),
|
|
2321
|
+
r.option.table?.inlineEdit && a(l).inlineEdit.data === n ? (f(), g(D, { key: 0 }, [
|
|
2242
2322
|
z(a(T), {
|
|
2243
2323
|
link: "",
|
|
2244
2324
|
type: "info",
|
|
2245
2325
|
onClick: a(l).inlineEdit.close
|
|
2246
2326
|
}, {
|
|
2247
2327
|
default: m(() => [
|
|
2248
|
-
|
|
2328
|
+
$(U(a(y).tCurd("cancel")), 1)
|
|
2249
2329
|
]),
|
|
2250
2330
|
_: 1
|
|
2251
2331
|
}, 8, ["onClick"]),
|
|
@@ -2256,12 +2336,12 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2256
2336
|
loading: a(l).update.loading
|
|
2257
2337
|
}, {
|
|
2258
2338
|
default: m(() => [
|
|
2259
|
-
|
|
2339
|
+
$(U(a(y).tCurd("confirm")), 1)
|
|
2260
2340
|
]),
|
|
2261
2341
|
_: 1
|
|
2262
2342
|
}, 8, ["onClick", "loading"]),
|
|
2263
|
-
|
|
2264
|
-
], 64)) : (f(),
|
|
2343
|
+
C(p.$slots, "table-op-edit-right", { row: n })
|
|
2344
|
+
], 64)) : (f(), g(D, { key: 1 }, [
|
|
2265
2345
|
a(i)(r.option.table?.add, n) ? (f(), h(a(T), {
|
|
2266
2346
|
key: 0,
|
|
2267
2347
|
link: "",
|
|
@@ -2269,10 +2349,10 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2269
2349
|
onClick: (d) => a(l).update.open(a(u).Add, n)
|
|
2270
2350
|
}, {
|
|
2271
2351
|
default: m(() => [
|
|
2272
|
-
|
|
2352
|
+
$(U(a(y).tCurd("add")), 1)
|
|
2273
2353
|
]),
|
|
2274
2354
|
_: 2
|
|
2275
|
-
}, 1032, ["onClick"])) :
|
|
2355
|
+
}, 1032, ["onClick"])) : k("", !0),
|
|
2276
2356
|
a(i)(r.option.table?.view, n) ? (f(), h(a(T), {
|
|
2277
2357
|
key: 1,
|
|
2278
2358
|
link: "",
|
|
@@ -2280,10 +2360,10 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2280
2360
|
onClick: (d) => a(l).update.open(a(u).View, n)
|
|
2281
2361
|
}, {
|
|
2282
2362
|
default: m(() => [
|
|
2283
|
-
|
|
2363
|
+
$(U(a(y).tCurd("view")), 1)
|
|
2284
2364
|
]),
|
|
2285
2365
|
_: 2
|
|
2286
|
-
}, 1032, ["onClick"])) :
|
|
2366
|
+
}, 1032, ["onClick"])) : k("", !0),
|
|
2287
2367
|
a(i)(r.option.table?.update, n) ? (f(), h(a(T), {
|
|
2288
2368
|
key: 2,
|
|
2289
2369
|
link: "",
|
|
@@ -2291,10 +2371,10 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2291
2371
|
onClick: (d) => a(l).update.open(a(u).Update, n)
|
|
2292
2372
|
}, {
|
|
2293
2373
|
default: m(() => [
|
|
2294
|
-
|
|
2374
|
+
$(U(a(y).tCurd("edit")), 1)
|
|
2295
2375
|
]),
|
|
2296
2376
|
_: 2
|
|
2297
|
-
}, 1032, ["onClick"])) :
|
|
2377
|
+
}, 1032, ["onClick"])) : k("", !0),
|
|
2298
2378
|
a(i)(r.option.table?.delete, n) ? (f(), h(a(T), {
|
|
2299
2379
|
key: 3,
|
|
2300
2380
|
link: "",
|
|
@@ -2302,32 +2382,32 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2302
2382
|
onClick: (d) => a(l).remove.open([n])
|
|
2303
2383
|
}, {
|
|
2304
2384
|
default: m(() => [
|
|
2305
|
-
|
|
2385
|
+
$(U(a(y).tCurd("delete")), 1)
|
|
2306
2386
|
]),
|
|
2307
2387
|
_: 2
|
|
2308
|
-
}, 1032, ["onClick"])) :
|
|
2309
|
-
|
|
2388
|
+
}, 1032, ["onClick"])) : k("", !0),
|
|
2389
|
+
C(p.$slots, "table-op-right", { row: n })
|
|
2310
2390
|
], 64))
|
|
2311
2391
|
]),
|
|
2312
2392
|
_: 2
|
|
2313
2393
|
}, 1032, ["size"])
|
|
2314
2394
|
]),
|
|
2315
2395
|
_: 3
|
|
2316
|
-
}, 16, ["width"])) :
|
|
2396
|
+
}, 16, ["width"])) : k("", !0)
|
|
2317
2397
|
]),
|
|
2318
2398
|
_: 3
|
|
2319
2399
|
}, 16, ["data", "border", "onSelectionChange", "onSortChange", "expand-row-keys", "onExpandChange"])), [
|
|
2320
|
-
[
|
|
2400
|
+
[b, a(l).table.loading]
|
|
2321
2401
|
])
|
|
2322
2402
|
], 2)
|
|
2323
2403
|
], 2),
|
|
2324
|
-
|
|
2404
|
+
F("div", dt, [
|
|
2325
2405
|
(r.option.page?.show === void 0 || r.option.page?.show) && !a(l).page.showTools ? (f(), h(a(ie), v({
|
|
2326
2406
|
key: 0,
|
|
2327
2407
|
"current-page": a(l).page.num,
|
|
2328
|
-
"onUpdate:currentPage": c[
|
|
2408
|
+
"onUpdate:currentPage": c[7] || (c[7] = (n) => a(l).page.num = n),
|
|
2329
2409
|
"page-size": a(l).page.size,
|
|
2330
|
-
"onUpdate:pageSize": c[
|
|
2410
|
+
"onUpdate:pageSize": c[8] || (c[8] = (n) => a(l).page.size = n),
|
|
2331
2411
|
background: "",
|
|
2332
2412
|
"page-sizes": a(l).page.sizeList,
|
|
2333
2413
|
"pager-count": a(l).page.pagerCount,
|
|
@@ -2336,19 +2416,19 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2336
2416
|
size: r.option.size?.table,
|
|
2337
2417
|
onSizeChange: a(l).table.getList,
|
|
2338
2418
|
onCurrentChange: a(l).table.getList
|
|
2339
|
-
}, r.option.page?.pagination || {}, S(r.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) :
|
|
2419
|
+
}, r.option.page?.pagination || {}, S(r.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : k("", !0)
|
|
2340
2420
|
])
|
|
2341
2421
|
], 2),
|
|
2342
|
-
|
|
2422
|
+
C(p.$slots, "box-right")
|
|
2343
2423
|
], 2),
|
|
2344
2424
|
z(a(_), v({
|
|
2345
2425
|
modelValue: a(l).update.show,
|
|
2346
|
-
"onUpdate:modelValue": c[
|
|
2426
|
+
"onUpdate:modelValue": c[9] || (c[9] = (n) => a(l).update.show = n),
|
|
2347
2427
|
title: a(l).update.title,
|
|
2348
2428
|
"before-close": a(l).update.close
|
|
2349
2429
|
}, r.option.dialog), {
|
|
2350
2430
|
footer: m(() => [
|
|
2351
|
-
|
|
2431
|
+
F("span", ut, [
|
|
2352
2432
|
z(a(N), {
|
|
2353
2433
|
size: r.option.size?.form
|
|
2354
2434
|
}, {
|
|
@@ -2357,7 +2437,7 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2357
2437
|
onClick: a(l).update.close
|
|
2358
2438
|
}, {
|
|
2359
2439
|
default: m(() => [
|
|
2360
|
-
|
|
2440
|
+
$(U(a(y).tCurd("close")), 1)
|
|
2361
2441
|
]),
|
|
2362
2442
|
_: 1
|
|
2363
2443
|
}, 8, ["onClick"]),
|
|
@@ -2368,10 +2448,10 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2368
2448
|
loading: a(l).update.loading
|
|
2369
2449
|
}, {
|
|
2370
2450
|
default: m(() => [
|
|
2371
|
-
|
|
2451
|
+
$(U(a(y).tCurd("submit")), 1)
|
|
2372
2452
|
]),
|
|
2373
2453
|
_: 1
|
|
2374
|
-
}, 8, ["onClick", "loading"])) :
|
|
2454
|
+
}, 8, ["onClick", "loading"])) : k("", !0)
|
|
2375
2455
|
]),
|
|
2376
2456
|
_: 1
|
|
2377
2457
|
}, 8, ["size"])
|
|
@@ -2386,49 +2466,49 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2386
2466
|
size: r.option.size?.form
|
|
2387
2467
|
}, {
|
|
2388
2468
|
default: m(() => [
|
|
2389
|
-
a(l).update.showContent ? (f(!0),
|
|
2469
|
+
a(l).update.showContent ? (f(!0), g(D, { key: 0 }, L(a(l).update.formColumn, (n) => (f(), g(D, null, [
|
|
2390
2470
|
a(i)(
|
|
2391
2471
|
(() => {
|
|
2392
2472
|
const d = [], V = (w) => {
|
|
2393
|
-
w?.item?.children ? V(w.item.children) : d.push(...w.map((
|
|
2473
|
+
w?.item?.children ? V(w.item.children) : d.push(...w.map((A) => A.item?.show?.form));
|
|
2394
2474
|
};
|
|
2395
2475
|
return V(n), d;
|
|
2396
2476
|
})(),
|
|
2397
2477
|
a(l).update.form,
|
|
2398
2478
|
a(l).update.type
|
|
2399
|
-
) ? (f(),
|
|
2479
|
+
) ? (f(), g("div", {
|
|
2400
2480
|
key: 0,
|
|
2401
2481
|
class: j(["row curd-row", {
|
|
2402
2482
|
stripe: r.option.form?.stripe === void 0 ? !0 : r.option.form?.stripe
|
|
2403
2483
|
}])
|
|
2404
2484
|
}, [
|
|
2405
|
-
|
|
2485
|
+
C(p.$slots, "form-start", {
|
|
2406
2486
|
row: a(l).update.form
|
|
2407
2487
|
}),
|
|
2408
|
-
(f(!0),
|
|
2409
|
-
a(i)(d.item.show?.form, a(l).update.form, a(l).update.type) ? (f(),
|
|
2488
|
+
(f(!0), g(D, null, L(n, (d) => (f(), g(D, null, [
|
|
2489
|
+
a(i)(d.item.show?.form, a(l).update.form, a(l).update.type) ? (f(), g("div", {
|
|
2410
2490
|
key: 0,
|
|
2411
2491
|
class: j([d.item.form.span > 0 ? `col-${a(l).getColumnSpan(d, n)}` : "col", `form-item-col-${d.item.key}`])
|
|
2412
2492
|
}, [
|
|
2413
|
-
(f(!0),
|
|
2493
|
+
(f(!0), g(D, null, L(d.item.children ? d.children : [d], (V) => (f(), h(_e, {
|
|
2414
2494
|
key: V.item.key,
|
|
2415
2495
|
conf: a(l),
|
|
2416
2496
|
item: V
|
|
2417
2497
|
}, te({ _: 2 }, [
|
|
2418
|
-
L(p.$slots, (w,
|
|
2419
|
-
name:
|
|
2498
|
+
L(p.$slots, (w, A) => ({
|
|
2499
|
+
name: A,
|
|
2420
2500
|
fn: m((B) => [
|
|
2421
|
-
|
|
2501
|
+
C(p.$slots, A, v({ ref_for: !0 }, B || {}))
|
|
2422
2502
|
])
|
|
2423
2503
|
}))
|
|
2424
2504
|
]), 1032, ["conf", "item"]))), 128))
|
|
2425
|
-
], 2)) :
|
|
2505
|
+
], 2)) : k("", !0)
|
|
2426
2506
|
], 64))), 256)),
|
|
2427
|
-
|
|
2507
|
+
C(p.$slots, "form-end", {
|
|
2428
2508
|
row: a(l).update.form
|
|
2429
2509
|
})
|
|
2430
|
-
], 2)) :
|
|
2431
|
-
], 64))), 256)) :
|
|
2510
|
+
], 2)) : k("", !0)
|
|
2511
|
+
], 64))), 256)) : k("", !0)
|
|
2432
2512
|
]),
|
|
2433
2513
|
_: 3
|
|
2434
2514
|
}, 8, ["model", "rules", "size"])
|
|
@@ -2437,12 +2517,12 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2437
2517
|
}, 16, ["modelValue", "title", "before-close"]),
|
|
2438
2518
|
z(a(_), {
|
|
2439
2519
|
modelValue: a(l).remove.show,
|
|
2440
|
-
"onUpdate:modelValue": c[
|
|
2520
|
+
"onUpdate:modelValue": c[10] || (c[10] = (n) => a(l).remove.show = n),
|
|
2441
2521
|
title: a(l).remove.title,
|
|
2442
2522
|
"close-on-click-modal": !1
|
|
2443
2523
|
}, {
|
|
2444
2524
|
footer: m(() => [
|
|
2445
|
-
|
|
2525
|
+
F("span", ft, [
|
|
2446
2526
|
z(a(N), {
|
|
2447
2527
|
size: r.option.size?.form
|
|
2448
2528
|
}, {
|
|
@@ -2451,7 +2531,7 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2451
2531
|
onClick: a(l).remove.close
|
|
2452
2532
|
}, {
|
|
2453
2533
|
default: m(() => [
|
|
2454
|
-
|
|
2534
|
+
$(U(a(y).tCurd("close")), 1)
|
|
2455
2535
|
]),
|
|
2456
2536
|
_: 1
|
|
2457
2537
|
}, 8, ["onClick"]),
|
|
@@ -2461,7 +2541,7 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2461
2541
|
loading: a(l).remove.loading
|
|
2462
2542
|
}, {
|
|
2463
2543
|
default: m(() => [
|
|
2464
|
-
|
|
2544
|
+
$(U(a(y).tCurd("confirmDelete")), 1)
|
|
2465
2545
|
]),
|
|
2466
2546
|
_: 1
|
|
2467
2547
|
}, 8, ["onClick", "loading"])
|
|
@@ -2471,11 +2551,11 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2471
2551
|
])
|
|
2472
2552
|
]),
|
|
2473
2553
|
default: m(() => [
|
|
2474
|
-
|
|
2554
|
+
F("div", null, U(a(y).tCurd("confirmDeleteMessage", a(l).remove.items.length)), 1)
|
|
2475
2555
|
]),
|
|
2476
2556
|
_: 1
|
|
2477
2557
|
}, 8, ["modelValue", "title"]),
|
|
2478
|
-
z(
|
|
2558
|
+
z(Be, {
|
|
2479
2559
|
ref_key: "switchConfirmRef",
|
|
2480
2560
|
ref: e,
|
|
2481
2561
|
size: r.option.size?.form
|
|
@@ -2484,7 +2564,7 @@ const Ke = /* @__PURE__ */ pe(Re, [["render", Ne]]), He = { class: "row flex-cen
|
|
|
2484
2564
|
};
|
|
2485
2565
|
}
|
|
2486
2566
|
});
|
|
2487
|
-
class
|
|
2567
|
+
class gt {
|
|
2488
2568
|
/**
|
|
2489
2569
|
* 通过远程 URL 下载文件,自动创建临时 `<a>` 标签触发浏览器下载
|
|
2490
2570
|
*
|
|
@@ -2516,39 +2596,39 @@ class mt {
|
|
|
2516
2596
|
i.accept = l, i.style.display = "none", i.onchange = (e) => {
|
|
2517
2597
|
const s = e.target.files[0];
|
|
2518
2598
|
if (!s) {
|
|
2519
|
-
|
|
2599
|
+
E.fail("未选择文件"), t("未选择文件");
|
|
2520
2600
|
return;
|
|
2521
2601
|
}
|
|
2522
2602
|
const p = new FileReader();
|
|
2523
2603
|
p.onload = async (c) => {
|
|
2524
|
-
const
|
|
2525
|
-
u(
|
|
2604
|
+
const b = l == ".json" ? JSON.parse(c.target.result) : c.target.result;
|
|
2605
|
+
u(b);
|
|
2526
2606
|
}, p.onerror = () => {
|
|
2527
|
-
|
|
2607
|
+
E.fail("文件读取失败"), t("文件读取失败");
|
|
2528
2608
|
}, p.readAsText(s), document.body.removeChild(i);
|
|
2529
2609
|
}, document.body.appendChild(i), i.click();
|
|
2530
2610
|
});
|
|
2531
2611
|
}
|
|
2532
|
-
const
|
|
2533
|
-
if (r.component("TCurd",
|
|
2612
|
+
const ct = (r, o) => {
|
|
2613
|
+
if (r.component("TCurd", pt), r.component("TFormList", ne), r.component("TColumn", Ae), o?.customComponent) {
|
|
2534
2614
|
M.customComponent = o.customComponent;
|
|
2535
2615
|
for (const u in o.customComponent)
|
|
2536
2616
|
r.component(u, o.customComponent[u]);
|
|
2537
2617
|
}
|
|
2538
|
-
},
|
|
2539
|
-
install:
|
|
2618
|
+
}, bt = {
|
|
2619
|
+
install: ct
|
|
2540
2620
|
};
|
|
2541
2621
|
export {
|
|
2542
2622
|
P as ArrUtil,
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2623
|
+
Te as ExcelUtil,
|
|
2624
|
+
Ae as TColumn,
|
|
2625
|
+
pt as TCurd,
|
|
2626
|
+
gt as TFile,
|
|
2547
2627
|
M as TForm,
|
|
2548
|
-
|
|
2549
|
-
|
|
2628
|
+
O as TFormConfig,
|
|
2629
|
+
y as TFormI18n,
|
|
2550
2630
|
ne as TFormList,
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2631
|
+
E as TSys,
|
|
2632
|
+
bt as default,
|
|
2633
|
+
ct as install
|
|
2554
2634
|
};
|