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