cc1-form 1.1.30 → 1.1.32
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 +172 -167
- package/dist/cc1-form.umd.cjs +1 -1
- package/dist/components/TCurd/index.d.ts +468 -2
- package/dist/components/TCurd/index.vue.d.ts +1022 -90
- package/dist/components/TCurd/indexType.d.ts +36 -0
- package/dist/utils/TFormConfig.d.ts +19 -16
- package/package.json +1 -1
package/dist/cc1-form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ElMessage as de, ElLoading as ue, ElForm as Q, ElFormItem as
|
|
1
|
+
import { ElMessage as de, ElLoading as ue, ElForm as Q, ElFormItem as H, ElInput as q, ElSwitch as ee, ElSelect as W, ElOption as N, ElTreeSelect as ae, ElDatePicker as te, ElDialog as Y, ElButton as M, ElTableColumn as Z, ElRadioGroup as ce, ElRadio as fe, ElDropdown as pe, ElDropdownMenu as me, ElDropdownItem as X, ElTable as he, ElPagination as be } from "element-plus";
|
|
2
2
|
import "vue-router";
|
|
3
|
-
import { defineComponent as J, reactive as oe, onMounted as ne, resolveComponent as x, createElementBlock as g, createCommentVNode as C, openBlock as c, renderSlot as k, createElementVNode as O, createVNode as
|
|
4
|
-
class
|
|
3
|
+
import { defineComponent as J, reactive as oe, onMounted as ne, resolveComponent as x, createElementBlock as g, createCommentVNode as C, openBlock as c, renderSlot as k, createElementVNode as O, createVNode as D, withCtx as h, createTextVNode as E, Fragment as S, renderList as I, createBlock as b, normalizeClass as A, normalizeStyle as ie, ref as B, nextTick as ye, unref as l, mergeProps as v, toHandlers as F, resolveDynamicComponent as G, toDisplayString as U, getCurrentInstance as ge, createSlots as _, withKeys as we, resolveDirective as ke, withDirectives as Ce, normalizeProps as ve, guardReactiveProps as Ve } from "vue";
|
|
4
|
+
class $ {
|
|
5
5
|
/**
|
|
6
6
|
* Vue Router 实例,需在应用初始化时赋值
|
|
7
7
|
*/
|
|
@@ -43,9 +43,9 @@ class D {
|
|
|
43
43
|
* @param module
|
|
44
44
|
*/
|
|
45
45
|
static loadModule = async (o) => {
|
|
46
|
-
if (
|
|
46
|
+
if (!$.moduleObj[o])
|
|
47
47
|
throw new Error(`模块${o}未加载,请赋值如:TSys.moduleObj = { ${o}: ()=>import('${o}') }`);
|
|
48
|
-
const s = await
|
|
48
|
+
const s = await $.moduleObj[o]();
|
|
49
49
|
return s.default ?? s;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
@@ -133,7 +133,7 @@ class D {
|
|
|
133
133
|
*/
|
|
134
134
|
static getImgPic = (o) => new Promise(async (s, e) => {
|
|
135
135
|
let n = document.getElementById(o.id);
|
|
136
|
-
const t = await
|
|
136
|
+
const t = await $.loadModule("html2canvas");
|
|
137
137
|
try {
|
|
138
138
|
t(n, {
|
|
139
139
|
logging: !1,
|
|
@@ -154,16 +154,9 @@ class D {
|
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
class
|
|
157
|
+
class V {
|
|
158
158
|
/**
|
|
159
159
|
* 全局配置对象
|
|
160
|
-
*
|
|
161
|
-
* - `tableRowKey` — 数据行的主键字段名,默认 `'_id'`,影响删除、编辑时的主键识别
|
|
162
|
-
* - `page.num` — 分页请求中「页码」的参数名,默认 `'num'`
|
|
163
|
-
* - `page.size` — 分页请求中「每页条数」的参数名,默认 `'size'`
|
|
164
|
-
* - `result.list` — API 返回数据中「列表」的字段名,默认 `'list'`
|
|
165
|
-
* - `result.total` — API 返回数据中「总条数」的字段名,默认 `'total'`
|
|
166
|
-
* - `table.click.color` — 表格中可点击文本的颜色,默认 `'#409EFF'`
|
|
167
160
|
*/
|
|
168
161
|
static config = {
|
|
169
162
|
/** 全局分页字段 */
|
|
@@ -184,6 +177,17 @@ class U {
|
|
|
184
177
|
width: "980px",
|
|
185
178
|
closeOnClickModal: !1
|
|
186
179
|
},
|
|
180
|
+
/** 全局分页配置 */
|
|
181
|
+
pagination: {
|
|
182
|
+
/** 分页布局 默认'total, sizes, prev, pager, next, jumper' */
|
|
183
|
+
layout: "total, sizes, prev, pager, next, jumper",
|
|
184
|
+
/** 每页条数列表 默认[10, 20, 50, 100] */
|
|
185
|
+
pageSizes: [10, 20, 50, 100],
|
|
186
|
+
/** 每页条数 默认10 */
|
|
187
|
+
size: 10,
|
|
188
|
+
/** 分页器计数 默认7 */
|
|
189
|
+
pagerCount: 7
|
|
190
|
+
},
|
|
187
191
|
/** 工具栏配置 */
|
|
188
192
|
tools: {
|
|
189
193
|
/**
|
|
@@ -267,6 +271,8 @@ class U {
|
|
|
267
271
|
},
|
|
268
272
|
/** 表格配置 */
|
|
269
273
|
table: {
|
|
274
|
+
/** 表头标签宽度 默认100px */
|
|
275
|
+
labelWidth: "100px",
|
|
270
276
|
/** 空文本 - 取自TFormI18n.tCurd('noData') */
|
|
271
277
|
emptyText: "",
|
|
272
278
|
/** 表头单元格类名 */
|
|
@@ -342,10 +348,6 @@ class U {
|
|
|
342
348
|
* 新增编辑表单配置 默认值
|
|
343
349
|
*/
|
|
344
350
|
form: {
|
|
345
|
-
/**
|
|
346
|
-
* 标签宽度
|
|
347
|
-
*/
|
|
348
|
-
labelWidth: "100px",
|
|
349
351
|
/**
|
|
350
352
|
* 宽度
|
|
351
353
|
*/
|
|
@@ -462,10 +464,10 @@ class U {
|
|
|
462
464
|
* @param config - 需要覆盖的配置项(深度 Partial)
|
|
463
465
|
*/
|
|
464
466
|
static setConfig = (o) => {
|
|
465
|
-
|
|
467
|
+
V.config = ObjectUtil.deepMerge(V.config, o);
|
|
466
468
|
};
|
|
467
469
|
}
|
|
468
|
-
class
|
|
470
|
+
class T {
|
|
469
471
|
/**
|
|
470
472
|
* 自定义组件映射表,key 为组件名(同时作为 column.type 值),value 为 Vue 组件定义
|
|
471
473
|
*
|
|
@@ -504,7 +506,7 @@ class z {
|
|
|
504
506
|
)
|
|
505
507
|
*/
|
|
506
508
|
static setOptionsData = (o, s, e) => {
|
|
507
|
-
const n =
|
|
509
|
+
const n = T.findOptions(o, s);
|
|
508
510
|
n && (n.data = e);
|
|
509
511
|
};
|
|
510
512
|
static form = {
|
|
@@ -517,8 +519,8 @@ class z {
|
|
|
517
519
|
* @param option 组件配置
|
|
518
520
|
*/
|
|
519
521
|
parentId: (o, s, e, n) => {
|
|
520
|
-
const t =
|
|
521
|
-
o ? s.type ===
|
|
522
|
+
const t = V.config.table.rowKey;
|
|
523
|
+
o ? s.type === $.EDialog.Insert ? (s.form.parentId = o[t], s.form.sort = o.children.length + 1) : s.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (s.form.parentId = "0", s.form.sort = e.length + 1), T.setOptionsData(n, "parentId", [{ [t]: "0", title: "根", children: e }]);
|
|
522
524
|
}
|
|
523
525
|
}
|
|
524
526
|
};
|
|
@@ -535,7 +537,7 @@ class R {
|
|
|
535
537
|
*/
|
|
536
538
|
static setId = (o, s, e) => {
|
|
537
539
|
s[o] || (s[o] = []);
|
|
538
|
-
const n =
|
|
540
|
+
const n = V.config.table.rowKey;
|
|
539
541
|
s[o].forEach((t) => {
|
|
540
542
|
e.forEach((a) => {
|
|
541
543
|
let d = a.default ?? "";
|
|
@@ -553,7 +555,7 @@ class R {
|
|
|
553
555
|
static add = (o, s, e, n) => {
|
|
554
556
|
const t = JSONUtil.cp(e);
|
|
555
557
|
R.setId(o, s, e);
|
|
556
|
-
const a =
|
|
558
|
+
const a = V.config.table.rowKey;
|
|
557
559
|
s[o].push(
|
|
558
560
|
t.reduce(
|
|
559
561
|
(d, p) => {
|
|
@@ -572,7 +574,7 @@ class R {
|
|
|
572
574
|
* @param callback 回调函数
|
|
573
575
|
*/
|
|
574
576
|
static remove = (o, s, e, n) => {
|
|
575
|
-
const t =
|
|
577
|
+
const t = V.config.table.rowKey;
|
|
576
578
|
s[o] = s[o].filter((a) => a[t] !== e[t]), n?.(s);
|
|
577
579
|
};
|
|
578
580
|
/**
|
|
@@ -582,7 +584,7 @@ class R {
|
|
|
582
584
|
* @returns 没有id的数据
|
|
583
585
|
*/
|
|
584
586
|
static getNoIdData = (o, s) => {
|
|
585
|
-
const e = JSONUtil.cp(o), n =
|
|
587
|
+
const e = JSONUtil.cp(o), n = V.config.table.rowKey;
|
|
586
588
|
return e.forEach((t) => {
|
|
587
589
|
t[n] && delete t[n], s && t[s] && R.getNoIdData(t[s], s);
|
|
588
590
|
}), e;
|
|
@@ -653,23 +655,23 @@ const Ee = {
|
|
|
653
655
|
return e.show ? (c(), g("div", Ee, [
|
|
654
656
|
k(t.$slots, "list-start", { row: r.row }),
|
|
655
657
|
O("div", null, [
|
|
656
|
-
|
|
658
|
+
D(d, {
|
|
657
659
|
link: "",
|
|
658
660
|
type: "primary",
|
|
659
661
|
onClick: a[0] || (a[0] = (m) => e.add(r.field, r.row, r.itemFields))
|
|
660
662
|
}, {
|
|
661
663
|
default: h(() => a[2] || (a[2] = [
|
|
662
|
-
|
|
664
|
+
E("添加")
|
|
663
665
|
])),
|
|
664
666
|
_: 1
|
|
665
667
|
})
|
|
666
668
|
]),
|
|
667
|
-
(c(!0), g(
|
|
669
|
+
(c(!0), g(S, null, I(r.row[r.field], (m) => (c(), g("div", De, [
|
|
668
670
|
k(t.$slots, "item-start", {
|
|
669
671
|
item: m,
|
|
670
672
|
row: r.row
|
|
671
673
|
}),
|
|
672
|
-
(c(!0), g(
|
|
674
|
+
(c(!0), g(S, null, I(r.itemFields, (u) => (c(), b(p, {
|
|
673
675
|
modelValue: m[u.value],
|
|
674
676
|
"onUpdate:modelValue": (i) => m[u.value] = i,
|
|
675
677
|
style: ie({ width: r.inputWidth }),
|
|
@@ -681,13 +683,13 @@ const Ee = {
|
|
|
681
683
|
item: m,
|
|
682
684
|
row: r.row
|
|
683
685
|
}),
|
|
684
|
-
|
|
686
|
+
D(d, {
|
|
685
687
|
link: "",
|
|
686
688
|
type: "danger",
|
|
687
689
|
onClick: (u) => e.remove(r.field, r.row, m)
|
|
688
690
|
}, {
|
|
689
691
|
default: h(() => a[3] || (a[3] = [
|
|
690
|
-
|
|
692
|
+
E("删除")
|
|
691
693
|
])),
|
|
692
694
|
_: 2
|
|
693
695
|
}, 1032, ["onClick"])
|
|
@@ -713,7 +715,7 @@ const Ee = {
|
|
|
713
715
|
}
|
|
714
716
|
},
|
|
715
717
|
setup(r, { expose: o }) {
|
|
716
|
-
const s =
|
|
718
|
+
const s = $.isFun, e = $.EDialog, n = B(), t = r, a = oe({
|
|
717
719
|
rules: {},
|
|
718
720
|
show: !0,
|
|
719
721
|
form: {},
|
|
@@ -729,8 +731,8 @@ const Ee = {
|
|
|
729
731
|
if (a.formDefault[w.key] = w.value, w.isForm) {
|
|
730
732
|
w.form = w.form || { span: u }, w.form.span = w.form.span ?? u;
|
|
731
733
|
let L = w.form.span, j = i.reduce((P, se) => P + se.span, L);
|
|
732
|
-
const
|
|
733
|
-
i.push({ item: w, span: L }), (
|
|
734
|
+
const z = i.length;
|
|
735
|
+
i.push({ item: w, span: L }), (z === 1 && i[0].span === 0 || j >= m || L === 0 && z > 1) && (p.push(i), i = []), w.rules && (a.rules[w.key] = w.rules);
|
|
734
736
|
}
|
|
735
737
|
};
|
|
736
738
|
d.column.forEach((w) => {
|
|
@@ -751,16 +753,16 @@ const Ee = {
|
|
|
751
753
|
rules: a.rules
|
|
752
754
|
}, {
|
|
753
755
|
default: h(() => [
|
|
754
|
-
a.show ? (c(!0), g(
|
|
756
|
+
a.show ? (c(!0), g(S, { key: 0 }, I(a.formColumn, (m) => (c(), g("div", $e, [
|
|
755
757
|
k(d.$slots, "form-start", {
|
|
756
758
|
row: a.form
|
|
757
759
|
}),
|
|
758
|
-
(c(!0), g(
|
|
760
|
+
(c(!0), g(S, null, I(m, (u) => (c(), g(S, null, [
|
|
759
761
|
l(s)(u.item.show?.form, a.form) ?? !0 ? (c(), g("div", {
|
|
760
762
|
key: 0,
|
|
761
763
|
class: A(u.item.form.span > 0 ? `col-${u.item.form.span}` : "col")
|
|
762
764
|
}, [
|
|
763
|
-
|
|
765
|
+
D(l(H), {
|
|
764
766
|
label: u.item.label,
|
|
765
767
|
prop: u.item.key,
|
|
766
768
|
"label-width": u.item.form?.labelWidth || "100px"
|
|
@@ -788,7 +790,7 @@ const Ee = {
|
|
|
788
790
|
ref_for: !0
|
|
789
791
|
}, u.item.options?.switch, F(u.item.options?.switch?.on || {}), {
|
|
790
792
|
disabled: a.getDisabled(u.item)
|
|
791
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "select" ? (c(), b(l(
|
|
793
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "select" ? (c(), b(l(W), v({
|
|
792
794
|
key: 2,
|
|
793
795
|
modelValue: a.form[u.item.key],
|
|
794
796
|
"onUpdate:modelValue": (i) => a.form[u.item.key] = i,
|
|
@@ -798,7 +800,7 @@ const Ee = {
|
|
|
798
800
|
style: { width: "100%" }
|
|
799
801
|
}), {
|
|
800
802
|
default: h(() => [
|
|
801
|
-
(c(!0), g(
|
|
803
|
+
(c(!0), g(S, null, I(u.item.options?.select?.data, (i) => (c(), b(l(N), {
|
|
802
804
|
key: i.value,
|
|
803
805
|
label: i.label,
|
|
804
806
|
value: i.value
|
|
@@ -828,7 +830,7 @@ const Ee = {
|
|
|
828
830
|
ref_for: !0
|
|
829
831
|
}, u.item.options?.datetime, F(u.item.options?.datetime?.on || {}), {
|
|
830
832
|
disabled: a.getDisabled(u.item)
|
|
831
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && l(
|
|
833
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && l(T).customComponent[u.item.type] ? (c(), b(G(l(T).customComponent[u.item.type]), v({
|
|
832
834
|
key: 6,
|
|
833
835
|
modelValue: a.form[u.item.key],
|
|
834
836
|
"onUpdate:modelValue": (i) => a.form[u.item.key] = i,
|
|
@@ -917,7 +919,7 @@ class Oe {
|
|
|
917
919
|
*/
|
|
918
920
|
static exportToExcel = async (o, s, e) => {
|
|
919
921
|
if (!o || o.length === 0) return;
|
|
920
|
-
const n = await
|
|
922
|
+
const n = await $.loadModule("xlsx"), t = o.map((p) => {
|
|
921
923
|
const m = {};
|
|
922
924
|
return s.forEach((u) => {
|
|
923
925
|
m[u.label] = p[u.key];
|
|
@@ -926,8 +928,9 @@ class Oe {
|
|
|
926
928
|
n.utils.book_append_sheet(d, a, "Sheet1"), e ? typeof e == "function" && (e = e()) : e = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, n.writeFile(d, `${e}.xlsx`);
|
|
927
929
|
};
|
|
928
930
|
}
|
|
929
|
-
const K =
|
|
931
|
+
const K = $.EDialog, Fe = (r) => {
|
|
930
932
|
const o = B(), s = B(), e = oe({
|
|
933
|
+
option: r.option,
|
|
931
934
|
/** 查询区域相关配置对象 */
|
|
932
935
|
search: {
|
|
933
936
|
/** 查询表单列集合 */
|
|
@@ -964,16 +967,18 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
964
967
|
},
|
|
965
968
|
/** 分页区域相关配置对象 */
|
|
966
969
|
page: {
|
|
967
|
-
/** 当前每页条数 */
|
|
968
|
-
size: r.option.page?.size || 10,
|
|
969
|
-
/** 支持切换的每页条数选项 */
|
|
970
|
-
sizeList: r.option.page?.sizeList || [10, 20, 50, 100],
|
|
971
970
|
/** 当前页码 */
|
|
972
971
|
num: 1,
|
|
973
972
|
/** 总条数 */
|
|
974
973
|
total: 0,
|
|
975
974
|
/** 分页控件的布局方式 */
|
|
976
|
-
layout: r.option.page?.layout ||
|
|
975
|
+
layout: r.option.page?.layout || V.config.pagination.layout,
|
|
976
|
+
/** 当前每页条数 */
|
|
977
|
+
size: r.option.page?.size || V.config.pagination.size,
|
|
978
|
+
/** 支持切换的每页条数选项 */
|
|
979
|
+
sizeList: r.option.page?.sizeList || V.config.pagination.pageSizes,
|
|
980
|
+
/** 分页器计数 */
|
|
981
|
+
pagerCount: r.option.page?.pagerCount || V.config.pagination.pagerCount
|
|
977
982
|
},
|
|
978
983
|
/** 表格区域相关配置对象 */
|
|
979
984
|
table: {
|
|
@@ -1031,22 +1036,22 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1031
1036
|
await e.initApiData("init");
|
|
1032
1037
|
let t = {};
|
|
1033
1038
|
if (e.table.sort.prop) {
|
|
1034
|
-
const { props: f, order: w } =
|
|
1039
|
+
const { props: f, order: w } = V.config.table.sort;
|
|
1035
1040
|
t = {
|
|
1036
1041
|
[f.field]: e.table.sort.prop,
|
|
1037
1042
|
[w.field]: e.table.sort.order
|
|
1038
1043
|
};
|
|
1039
1044
|
}
|
|
1040
1045
|
const a = await n({
|
|
1041
|
-
[
|
|
1042
|
-
[
|
|
1046
|
+
[V.config.page.size]: e.page.size,
|
|
1047
|
+
[V.config.page.num]: e.page.num,
|
|
1043
1048
|
...e.search.getFormData(),
|
|
1044
1049
|
...t
|
|
1045
|
-
}), d =
|
|
1050
|
+
}), d = V.config.result, p = a.data || { [d.list]: a };
|
|
1046
1051
|
let m = (Array.isArray(p[d.list]), p[d.list]);
|
|
1047
1052
|
const u = e.update.formColumn.flat(), i = JSONUtil.cp(m).map((f) => (Object.keys(f).forEach((L) => {
|
|
1048
|
-
const j = u.find((
|
|
1049
|
-
j && ["select", "radio"].includes(j.item.type) && (j.item.table.format || (j.item.table.format = (
|
|
1053
|
+
const j = u.find((z) => z.item.key === L);
|
|
1054
|
+
j && ["select", "radio"].includes(j.item.type) && (j.item.table.format || (j.item.table.format = (z) => j.item.options[j.item.type].data?.find((P) => P.value == z[L])?.label || z[L]));
|
|
1050
1055
|
}), f));
|
|
1051
1056
|
e.table.data = r.option.data ? await r.option.data(i, m) : i, e.page.total = p[d.total] || 0;
|
|
1052
1057
|
} catch (t) {
|
|
@@ -1072,8 +1077,8 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1072
1077
|
order: "",
|
|
1073
1078
|
/** 排序变更回调 */
|
|
1074
1079
|
change: (n) => {
|
|
1075
|
-
|
|
1076
|
-
const t =
|
|
1080
|
+
V.config.table.sort.resetPage && (e.page.num = 1);
|
|
1081
|
+
const t = V.config.table.sort;
|
|
1077
1082
|
if (t.change) {
|
|
1078
1083
|
t.change(n, e);
|
|
1079
1084
|
return;
|
|
@@ -1098,13 +1103,13 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1098
1103
|
/** 获取当前选中项进行导出 */
|
|
1099
1104
|
select: () => {
|
|
1100
1105
|
if (e.table.selection.list.length === 0)
|
|
1101
|
-
throw
|
|
1106
|
+
throw $.fail(y.tCurd("selectDataToExport")), new Error(y.tCurd("selectDataToExport"));
|
|
1102
1107
|
return e.table.selection.list;
|
|
1103
1108
|
},
|
|
1104
1109
|
/** 导出当前页的数据 */
|
|
1105
1110
|
page: () => {
|
|
1106
1111
|
if (e.table.data.length === 0)
|
|
1107
|
-
throw
|
|
1112
|
+
throw $.fail(y.tCurd("noData")), new Error(y.tCurd("noData"));
|
|
1108
1113
|
return e.table.data;
|
|
1109
1114
|
},
|
|
1110
1115
|
/** 导出所有数据 */
|
|
@@ -1113,17 +1118,17 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1113
1118
|
try {
|
|
1114
1119
|
if (r.option.tools?.export?.all) {
|
|
1115
1120
|
await r.option.tools?.export?.all({
|
|
1116
|
-
[
|
|
1117
|
-
[
|
|
1121
|
+
[V.config.page.size]: e.page.size,
|
|
1122
|
+
[V.config.page.num]: e.page.num,
|
|
1118
1123
|
...e.search.getFormData()
|
|
1119
1124
|
});
|
|
1120
1125
|
return;
|
|
1121
1126
|
}
|
|
1122
1127
|
const n = r.option.api.list, t = await n({
|
|
1123
|
-
[
|
|
1124
|
-
[
|
|
1128
|
+
[V.config.page.size]: 999999,
|
|
1129
|
+
[V.config.page.num]: 1
|
|
1125
1130
|
});
|
|
1126
|
-
return (t.data || { [
|
|
1131
|
+
return (t.data || { [V.config.result.list]: t })[V.config.result.list];
|
|
1127
1132
|
} catch (n) {
|
|
1128
1133
|
console.error(n);
|
|
1129
1134
|
} finally {
|
|
@@ -1180,7 +1185,7 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1180
1185
|
/** 打开增改弹窗 */
|
|
1181
1186
|
open: (n, t) => {
|
|
1182
1187
|
e.update.showContent || FunUtil.throttle(async () => {
|
|
1183
|
-
|
|
1188
|
+
$.loading(!0);
|
|
1184
1189
|
try {
|
|
1185
1190
|
await e.initApiData("update");
|
|
1186
1191
|
const a = n === K.Insert;
|
|
@@ -1192,7 +1197,7 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1192
1197
|
} catch (a) {
|
|
1193
1198
|
console.error(a);
|
|
1194
1199
|
} finally {
|
|
1195
|
-
|
|
1200
|
+
$.loading(!1);
|
|
1196
1201
|
}
|
|
1197
1202
|
});
|
|
1198
1203
|
},
|
|
@@ -1200,7 +1205,7 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1200
1205
|
submit: () => {
|
|
1201
1206
|
FunUtil.throttle(async () => {
|
|
1202
1207
|
await s.value?.validate(async (d, p) => new Promise((m, u) => {
|
|
1203
|
-
d || (
|
|
1208
|
+
d || ($.fail(y.tCurd("checkFormData")), u(!1)), m();
|
|
1204
1209
|
})), e.update.loading = !0;
|
|
1205
1210
|
const n = e.update.type === K.Insert ? r.option.api.create : r.option.api.update;
|
|
1206
1211
|
let t = JSONUtil.cp(e.update.form);
|
|
@@ -1256,7 +1261,7 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1256
1261
|
delete t.children;
|
|
1257
1262
|
try {
|
|
1258
1263
|
if (!n) return;
|
|
1259
|
-
await n({ ...t }), e.inlineEdit.close(), await e.table.getList(),
|
|
1264
|
+
await n({ ...t }), e.inlineEdit.close(), await e.table.getList(), $.success(y.tCurd("operationSuccess"));
|
|
1260
1265
|
} catch (a) {
|
|
1261
1266
|
console.error(a);
|
|
1262
1267
|
} finally {
|
|
@@ -1282,7 +1287,7 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1282
1287
|
/** 打开删除弹窗并设置待删除项 */
|
|
1283
1288
|
open: (n) => {
|
|
1284
1289
|
if (n.length === 0) {
|
|
1285
|
-
|
|
1290
|
+
$.fail(y.tCurd("selectDataToDelete"));
|
|
1286
1291
|
return;
|
|
1287
1292
|
}
|
|
1288
1293
|
e.remove.items = n, e.remove.show = !0;
|
|
@@ -1297,7 +1302,7 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1297
1302
|
await n({
|
|
1298
1303
|
[r.option.table?.rowKey]: e.remove.items.map((t) => t[r.option.table?.rowKey]),
|
|
1299
1304
|
items: e.remove.items
|
|
1300
|
-
}),
|
|
1305
|
+
}), $.success(y.tCurd("operationSuccess")), e.table.data.length <= 1 && e.page.num > 1 && (e.page.num -= 1), e.remove.close(), await e.table.getList();
|
|
1301
1306
|
} catch (t) {
|
|
1302
1307
|
console.error(t);
|
|
1303
1308
|
} finally {
|
|
@@ -1340,7 +1345,7 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1340
1345
|
},
|
|
1341
1346
|
/** 初始化curd配置(option默认值合并等) */
|
|
1342
1347
|
initCurdConfig: () => {
|
|
1343
|
-
const n = JSONUtil.cp(
|
|
1348
|
+
const n = JSONUtil.cp(V.config);
|
|
1344
1349
|
n.table.emptyText = y.tCurd("noData");
|
|
1345
1350
|
const t = ObjectUtil.deepMerge(n, r.option || {});
|
|
1346
1351
|
Object.keys(t).forEach((a) => {
|
|
@@ -1353,7 +1358,7 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1353
1358
|
* @returns
|
|
1354
1359
|
*/
|
|
1355
1360
|
initColumnOptions: () => {
|
|
1356
|
-
let n = JSONUtil.cp(
|
|
1361
|
+
let n = JSONUtil.cp(V.config.columnConfig);
|
|
1357
1362
|
n.options = ObjectUtil.deepMerge(n.options, {
|
|
1358
1363
|
switch: {
|
|
1359
1364
|
activeLabel: y.tCurd("switchOn"),
|
|
@@ -1381,7 +1386,7 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1381
1386
|
final(u, i, f) {
|
|
1382
1387
|
e.table.loading = !1;
|
|
1383
1388
|
}
|
|
1384
|
-
}), e.table.loading = !1,
|
|
1389
|
+
}), e.table.loading = !1, $.success(y.tCurd("operationSuccess")), e.table.getList(), !0) : void 0;
|
|
1385
1390
|
} catch (u) {
|
|
1386
1391
|
return console.error(u), !1;
|
|
1387
1392
|
} finally {
|
|
@@ -1396,7 +1401,7 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1396
1401
|
},
|
|
1397
1402
|
getColumnSpan: (n, t) => {
|
|
1398
1403
|
if (n.item.form?.spanCol) {
|
|
1399
|
-
const a =
|
|
1404
|
+
const a = V.config.form.defaultSpan, p = t.filter((m) => !$.isFun(m.item.show?.form, e.update.form, e.update.type)).reduce((m, u) => m + (u.item.form?.span || a), 0);
|
|
1400
1405
|
return (n.item?.form.span || a) + p;
|
|
1401
1406
|
}
|
|
1402
1407
|
return n.item.form.span;
|
|
@@ -1419,13 +1424,13 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1419
1424
|
}
|
|
1420
1425
|
if (e.update.formDefault[f.key] = f.value, f.table.table && (f.show.table && e.table.column.show.list.push(f.key), f.table.table && e.table.column.show.listSource.push(f.key)), !(f.isForm && typeof f.show?.form == "boolean") || f.show?.form) {
|
|
1421
1426
|
f.form = f.form || { span: d }, f.form.span = f.form.span ?? d;
|
|
1422
|
-
let w = f.form.span, L = p.reduce((
|
|
1427
|
+
let w = f.form.span, L = p.reduce((z, P) => z + P.span, w);
|
|
1423
1428
|
const j = p.length;
|
|
1424
1429
|
if (p.push({ item: f, span: w }), (j === 1 && p[0].span === 0 || L >= a || w === 0 && j > 1) && (t.push(p), p = []), f.rules) {
|
|
1425
|
-
const
|
|
1430
|
+
const z = {
|
|
1426
1431
|
input: y.tCurd("placeholderInput"),
|
|
1427
1432
|
select: y.tCurd("placeholderSelect")
|
|
1428
|
-
}, P = (
|
|
1433
|
+
}, P = (z[f.type] || z.input) + f.label;
|
|
1429
1434
|
e.update.rules[f.key] = typeof f.rules == "boolean" ? [
|
|
1430
1435
|
{
|
|
1431
1436
|
required: !0,
|
|
@@ -1477,25 +1482,25 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1477
1482
|
}, {
|
|
1478
1483
|
footer: h(() => [
|
|
1479
1484
|
O("span", Me, [
|
|
1480
|
-
|
|
1485
|
+
D(l(M), { onClick: m }, {
|
|
1481
1486
|
default: h(() => i[1] || (i[1] = [
|
|
1482
|
-
|
|
1487
|
+
E("取消")
|
|
1483
1488
|
])),
|
|
1484
1489
|
_: 1
|
|
1485
1490
|
}),
|
|
1486
|
-
|
|
1491
|
+
D(l(M), {
|
|
1487
1492
|
type: "primary",
|
|
1488
1493
|
onClick: p
|
|
1489
1494
|
}, {
|
|
1490
1495
|
default: h(() => i[2] || (i[2] = [
|
|
1491
|
-
|
|
1496
|
+
E("确认")
|
|
1492
1497
|
])),
|
|
1493
1498
|
_: 1
|
|
1494
1499
|
})
|
|
1495
1500
|
])
|
|
1496
1501
|
]),
|
|
1497
1502
|
default: h(() => [
|
|
1498
|
-
O("div", null,
|
|
1503
|
+
O("div", null, U(n.value), 1)
|
|
1499
1504
|
]),
|
|
1500
1505
|
_: 1
|
|
1501
1506
|
}, 8, ["modelValue", "title"]));
|
|
@@ -1509,7 +1514,7 @@ const K = D.EDialog, Fe = (r) => {
|
|
|
1509
1514
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1510
1515
|
viewBox: "0 0 1024 1024"
|
|
1511
1516
|
};
|
|
1512
|
-
function
|
|
1517
|
+
function ze(r, o) {
|
|
1513
1518
|
return c(), g("svg", je, o[0] || (o[0] = [
|
|
1514
1519
|
O("path", {
|
|
1515
1520
|
fill: "currentColor",
|
|
@@ -1517,7 +1522,7 @@ function Te(r, o) {
|
|
|
1517
1522
|
}, null, -1)
|
|
1518
1523
|
]));
|
|
1519
1524
|
}
|
|
1520
|
-
const
|
|
1525
|
+
const Te = /* @__PURE__ */ re(Le, [["render", ze]]), Re = {}, Pe = {
|
|
1521
1526
|
"data-v-58697b5c": "",
|
|
1522
1527
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1523
1528
|
viewBox: "0 0 1024 1024"
|
|
@@ -1530,7 +1535,7 @@ function Ae(r, o) {
|
|
|
1530
1535
|
}, null, -1)
|
|
1531
1536
|
]));
|
|
1532
1537
|
}
|
|
1533
|
-
const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-center table-header-label inline" }, Be = { class: "table-header-tooltip" }, Je = ["onClick", "innerHTML"],
|
|
1538
|
+
const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-center table-header-label inline" }, Be = { class: "table-header-tooltip" }, Je = ["onClick", "innerHTML"], We = /* @__PURE__ */ J({
|
|
1534
1539
|
__name: "tableColumn",
|
|
1535
1540
|
props: {
|
|
1536
1541
|
conf: {},
|
|
@@ -1538,10 +1543,10 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1538
1543
|
option: {}
|
|
1539
1544
|
},
|
|
1540
1545
|
setup(r) {
|
|
1541
|
-
const o =
|
|
1546
|
+
const o = $.isFun, s = ge().type;
|
|
1542
1547
|
return (e, n) => {
|
|
1543
1548
|
const t = x("el-tooltip");
|
|
1544
|
-
return c(!0), g(
|
|
1549
|
+
return c(!0), g(S, null, I(e.columnList, (a) => (c(), g(S, {
|
|
1545
1550
|
key: a.key
|
|
1546
1551
|
}, [
|
|
1547
1552
|
e.conf.table.column.show.list.includes(a.key) ? (c(), b(l(Z), v({
|
|
@@ -1561,18 +1566,18 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1561
1566
|
}, {
|
|
1562
1567
|
default: h(() => [
|
|
1563
1568
|
O("span", Be, [
|
|
1564
|
-
|
|
1569
|
+
D(Ke)
|
|
1565
1570
|
])
|
|
1566
1571
|
]),
|
|
1567
1572
|
_: 2
|
|
1568
1573
|
}, 1032, ["content"])) : C("", !0),
|
|
1569
|
-
|
|
1574
|
+
E(" " + U(a.label), 1)
|
|
1570
1575
|
])
|
|
1571
1576
|
])
|
|
1572
1577
|
]),
|
|
1573
1578
|
default: h(({ row: d }) => [
|
|
1574
|
-
a.children ? (c(), g(
|
|
1575
|
-
n[0] || (n[0] =
|
|
1579
|
+
a.children ? (c(), g(S, { key: 0 }, [
|
|
1580
|
+
n[0] || (n[0] = E(" ")),
|
|
1576
1581
|
(c(), b(G(l(s)), {
|
|
1577
1582
|
conf: e.conf,
|
|
1578
1583
|
columnList: a.children,
|
|
@@ -1585,8 +1590,8 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1585
1590
|
])
|
|
1586
1591
|
}))
|
|
1587
1592
|
]), 1032, ["conf", "columnList", "option"]))
|
|
1588
|
-
], 64)) : (c(), g(
|
|
1589
|
-
l(o)(a.show?.form, e.conf.inlineEdit.form, l(
|
|
1593
|
+
], 64)) : (c(), g(S, { key: 1 }, [
|
|
1594
|
+
l(o)(a.show?.form, e.conf.inlineEdit.form, l($).EDialog.Update) && e.option.table?.inlineEdit && e.conf.inlineEdit.row === d && (a.type === "input" || a.type === "select") ? (c(), g(S, { key: 0 }, [
|
|
1590
1595
|
a.type === "input" ? (c(), b(l(q), v({
|
|
1591
1596
|
key: 0,
|
|
1592
1597
|
modelValue: e.conf.inlineEdit.form[a.key],
|
|
@@ -1596,7 +1601,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1596
1601
|
size: "small",
|
|
1597
1602
|
style: { width: "100%" },
|
|
1598
1603
|
onKeyup: we(e.conf.inlineEdit.submit, ["enter"])
|
|
1599
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "onKeyup"])) : a.type === "select" ? (c(), b(l(
|
|
1604
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onKeyup"])) : a.type === "select" ? (c(), b(l(W), v({
|
|
1600
1605
|
key: 1,
|
|
1601
1606
|
modelValue: e.conf.inlineEdit.form[a.key],
|
|
1602
1607
|
"onUpdate:modelValue": (p) => e.conf.inlineEdit.form[a.key] = p,
|
|
@@ -1606,7 +1611,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1606
1611
|
style: { width: "100%" }
|
|
1607
1612
|
}), {
|
|
1608
1613
|
default: h(() => [
|
|
1609
|
-
(c(!0), g(
|
|
1614
|
+
(c(!0), g(S, null, I(a.options?.select?.data, (p) => (c(), b(l(N), {
|
|
1610
1615
|
key: p.value,
|
|
1611
1616
|
label: p.label,
|
|
1612
1617
|
value: p.value
|
|
@@ -1642,7 +1647,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1642
1647
|
], 64))), 128);
|
|
1643
1648
|
};
|
|
1644
1649
|
}
|
|
1645
|
-
}),
|
|
1650
|
+
}), He = {
|
|
1646
1651
|
class: "row form-item-content",
|
|
1647
1652
|
style: { width: "100%" }
|
|
1648
1653
|
}, qe = { class: "col" }, Ge = { class: "col" }, Xe = ["innerHTML"], Qe = /* @__PURE__ */ J({
|
|
@@ -1652,16 +1657,16 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1652
1657
|
item: {}
|
|
1653
1658
|
},
|
|
1654
1659
|
setup(r) {
|
|
1655
|
-
return (o, s) => (c(), b(l(
|
|
1660
|
+
return (o, s) => (c(), b(l(H), {
|
|
1656
1661
|
class: A({
|
|
1657
1662
|
"hide-label": typeof o.item.item.text?.form?.label == "boolean" ? !o.item.item.text?.form?.label : !1
|
|
1658
1663
|
}),
|
|
1659
1664
|
label: typeof o.item.item.text?.form?.label == "string" ? o.item.item.text?.form?.label : o.item.item.label,
|
|
1660
1665
|
prop: o.item.item.key,
|
|
1661
|
-
"label-width": o.item.item.form?.labelWidth ||
|
|
1666
|
+
"label-width": o.item.item.form?.labelWidth || o.conf.option.form?.labelWidth
|
|
1662
1667
|
}, {
|
|
1663
1668
|
default: h(() => [
|
|
1664
|
-
O("div",
|
|
1669
|
+
O("div", He, [
|
|
1665
1670
|
k(o.$slots, "form-" + o.item.item.key + "-start", {
|
|
1666
1671
|
row: o.conf.update.form,
|
|
1667
1672
|
item: o.item.item
|
|
@@ -1684,7 +1689,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1684
1689
|
"onUpdate:modelValue": s[1] || (s[1] = (e) => o.conf.update.form[o.item.item.key] = e)
|
|
1685
1690
|
}, o.item.item.options?.switch, {
|
|
1686
1691
|
disabled: o.conf.update.getDisabled(o.item.item)
|
|
1687
|
-
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "select" ? (c(), b(l(
|
|
1692
|
+
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "select" ? (c(), b(l(W), v({
|
|
1688
1693
|
key: 2,
|
|
1689
1694
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
1690
1695
|
"onUpdate:modelValue": s[2] || (s[2] = (e) => o.conf.update.form[o.item.item.key] = e)
|
|
@@ -1693,7 +1698,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1693
1698
|
style: { width: "100%" }
|
|
1694
1699
|
}), {
|
|
1695
1700
|
default: h(() => [
|
|
1696
|
-
(c(!0), g(
|
|
1701
|
+
(c(!0), g(S, null, I(o.item.item.options?.select?.data, (e) => (c(), b(l(N), {
|
|
1697
1702
|
key: e.value,
|
|
1698
1703
|
label: e.label,
|
|
1699
1704
|
value: e.value
|
|
@@ -1709,7 +1714,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1709
1714
|
style: { width: "100%" }
|
|
1710
1715
|
}), {
|
|
1711
1716
|
default: h(() => [
|
|
1712
|
-
(c(!0), g(
|
|
1717
|
+
(c(!0), g(S, null, I(o.item.item.options?.radio?.data, (e) => (c(), b(l(fe), {
|
|
1713
1718
|
key: e.value,
|
|
1714
1719
|
label: e.label,
|
|
1715
1720
|
value: e.value
|
|
@@ -1736,7 +1741,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1736
1741
|
"onUpdate:modelValue": s[5] || (s[5] = (e) => o.conf.update.form[o.item.item.key] = e)
|
|
1737
1742
|
}, o.item.item.options?.datetime, F(o.item.item.options?.datetime?.on || {}), {
|
|
1738
1743
|
disabled: o.conf.update.getDisabled(o.item.item)
|
|
1739
|
-
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type && l(
|
|
1744
|
+
}), null, 16, ["modelValue", "disabled"])) : o.item.item.type && l(T).customComponent[o.item.item.type] ? (c(), b(G(l(T).customComponent[o.item.item.type]), v({
|
|
1740
1745
|
key: 7,
|
|
1741
1746
|
modelValue: o.conf.update.form[o.item.item.key],
|
|
1742
1747
|
"onUpdate:modelValue": s[6] || (s[6] = (e) => o.conf.update.form[o.item.item.key] = e)
|
|
@@ -1792,7 +1797,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1792
1797
|
}
|
|
1793
1798
|
},
|
|
1794
1799
|
setup(r, { expose: o }) {
|
|
1795
|
-
const s =
|
|
1800
|
+
const s = $.EDialog, e = r, n = $.isFun, { conf: t, switchConfirmRef: a, ruleFormRef: d } = Fe(e);
|
|
1796
1801
|
return o({
|
|
1797
1802
|
conf: t
|
|
1798
1803
|
}), (p, m) => {
|
|
@@ -1802,7 +1807,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1802
1807
|
k(p.$slots, "box-left"),
|
|
1803
1808
|
O("div", xe, [
|
|
1804
1809
|
r.option.search?.show !== !1 ? (c(), g("div", _e, [
|
|
1805
|
-
|
|
1810
|
+
D(l(Q), {
|
|
1806
1811
|
model: l(t).search.form,
|
|
1807
1812
|
inline: ""
|
|
1808
1813
|
}, {
|
|
@@ -1810,10 +1815,10 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1810
1815
|
k(p.$slots, "search-start", {
|
|
1811
1816
|
row: l(t).search.form
|
|
1812
1817
|
}),
|
|
1813
|
-
(c(!0), g(
|
|
1818
|
+
(c(!0), g(S, null, I(l(t).search.column.list, (i) => (c(), g(S, {
|
|
1814
1819
|
key: i.key
|
|
1815
1820
|
}, [
|
|
1816
|
-
(typeof i.show?.search == "function" ? i.show?.search(l(t).search.form) : i.show?.search) ? (c(), b(l(
|
|
1821
|
+
(typeof i.show?.search == "function" ? i.show?.search(l(t).search.form) : i.show?.search) ? (c(), b(l(H), {
|
|
1817
1822
|
key: 0,
|
|
1818
1823
|
label: typeof i.text?.search?.label == "string" ? i.text?.search?.label : i.label,
|
|
1819
1824
|
class: A({
|
|
@@ -1832,7 +1837,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1832
1837
|
clearable: "",
|
|
1833
1838
|
disabled: i.disabled?.search,
|
|
1834
1839
|
ref_for: !0
|
|
1835
|
-
}, i.options?.search?.input || i.options?.input, F(i.options?.search?.input?.on || i.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "switch" ? (c(), b(l(
|
|
1840
|
+
}, i.options?.search?.input || i.options?.input, F(i.options?.search?.input?.on || i.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "switch" ? (c(), b(l(W), v({
|
|
1836
1841
|
key: 1,
|
|
1837
1842
|
modelValue: l(t).search.form[i.key],
|
|
1838
1843
|
"onUpdate:modelValue": (f) => l(t).search.form[i.key] = f,
|
|
@@ -1854,7 +1859,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1854
1859
|
}, null, 8, ["label", "value"]))
|
|
1855
1860
|
]),
|
|
1856
1861
|
_: 2
|
|
1857
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "select" ? (c(), b(l(
|
|
1862
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "select" ? (c(), b(l(W), v({
|
|
1858
1863
|
key: 2,
|
|
1859
1864
|
modelValue: l(t).search.form[i.key],
|
|
1860
1865
|
"onUpdate:modelValue": (f) => l(t).search.form[i.key] = f,
|
|
@@ -1864,7 +1869,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1864
1869
|
ref_for: !0
|
|
1865
1870
|
}, i.options?.search?.select || i.options?.select, F(i.options?.search?.select?.on || i.options?.select?.on || {})), {
|
|
1866
1871
|
default: h(() => [
|
|
1867
|
-
(c(!0), g(
|
|
1872
|
+
(c(!0), g(S, null, I(i.options?.select?.data, (f) => (c(), b(l(N), {
|
|
1868
1873
|
key: f.value,
|
|
1869
1874
|
label: f.label,
|
|
1870
1875
|
value: f.value
|
|
@@ -1877,7 +1882,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1877
1882
|
"onUpdate:modelValue": (f) => l(t).search.form[i.key] = f,
|
|
1878
1883
|
disabled: i.disabled?.search,
|
|
1879
1884
|
ref_for: !0
|
|
1880
|
-
}, i.options?.search?.datetime || i.options?.datetime, F(i.options?.search?.datetime?.on || i.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type && l(
|
|
1885
|
+
}, i.options?.search?.datetime || i.options?.datetime, F(i.options?.search?.datetime?.on || i.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type && l(T).customComponent[i.type] ? (c(), b(G(l(T).customComponent[i.type]), v({
|
|
1881
1886
|
key: 4,
|
|
1882
1887
|
modelValue: l(t).search.form[i.key],
|
|
1883
1888
|
"onUpdate:modelValue": (f) => l(t).search.form[i.key] = f,
|
|
@@ -1896,7 +1901,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1896
1901
|
k(p.$slots, "search-center", {
|
|
1897
1902
|
row: l(t).search.form
|
|
1898
1903
|
}),
|
|
1899
|
-
r.option.tools?.search || r.option.tools?.reset ? (c(), b(l(
|
|
1904
|
+
r.option.tools?.search || r.option.tools?.reset ? (c(), b(l(H), { key: 0 }, {
|
|
1900
1905
|
default: h(() => [
|
|
1901
1906
|
r.option.tools?.search ? (c(), b(l(M), {
|
|
1902
1907
|
key: 0,
|
|
@@ -1904,7 +1909,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1904
1909
|
onClick: l(t).search.submit
|
|
1905
1910
|
}, {
|
|
1906
1911
|
default: h(() => [
|
|
1907
|
-
|
|
1912
|
+
E(U(l(y).tCurd("search")), 1)
|
|
1908
1913
|
]),
|
|
1909
1914
|
_: 1
|
|
1910
1915
|
}, 8, ["onClick"])) : C("", !0),
|
|
@@ -1913,7 +1918,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1913
1918
|
onClick: l(t).search.reset
|
|
1914
1919
|
}, {
|
|
1915
1920
|
default: h(() => [
|
|
1916
|
-
|
|
1921
|
+
E(U(l(y).tCurd("reset")), 1)
|
|
1917
1922
|
]),
|
|
1918
1923
|
_: 1
|
|
1919
1924
|
}, 8, ["onClick"])) : C("", !0)
|
|
@@ -1930,34 +1935,34 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1930
1935
|
O("div", et, [
|
|
1931
1936
|
O("div", tt, [
|
|
1932
1937
|
l(n)(r.option.tools?.add) ? (c(), g("div", ot, [
|
|
1933
|
-
|
|
1938
|
+
D(l(M), {
|
|
1934
1939
|
type: "primary",
|
|
1935
1940
|
onClick: m[0] || (m[0] = (i) => l(t).update.open(l(s).Insert))
|
|
1936
1941
|
}, {
|
|
1937
1942
|
default: h(() => [
|
|
1938
|
-
|
|
1943
|
+
E(U(l(y).tCurd("add")), 1)
|
|
1939
1944
|
]),
|
|
1940
1945
|
_: 1
|
|
1941
1946
|
})
|
|
1942
1947
|
])) : C("", !0),
|
|
1943
1948
|
r.option.table?.selectable && l(n)(r.option.tools?.delete) ? (c(), g("div", lt, [
|
|
1944
|
-
|
|
1949
|
+
D(l(M), {
|
|
1945
1950
|
type: "danger",
|
|
1946
1951
|
onClick: m[1] || (m[1] = (i) => l(t).remove.open(l(t).table.selection.list))
|
|
1947
1952
|
}, {
|
|
1948
1953
|
default: h(() => [
|
|
1949
|
-
|
|
1954
|
+
E(U(l(y).tCurd("delete")), 1)
|
|
1950
1955
|
]),
|
|
1951
1956
|
_: 1
|
|
1952
1957
|
})
|
|
1953
1958
|
])) : C("", !0),
|
|
1954
1959
|
r.option.tools?.expand ? (c(), g("div", at, [
|
|
1955
|
-
|
|
1960
|
+
D(l(M), {
|
|
1956
1961
|
type: "warning",
|
|
1957
1962
|
onClick: m[2] || (m[2] = (i) => l(t).table.expand.all())
|
|
1958
1963
|
}, {
|
|
1959
1964
|
default: h(() => [
|
|
1960
|
-
|
|
1965
|
+
E(U(l(y).tCurd("expandCollapse")), 1)
|
|
1961
1966
|
]),
|
|
1962
1967
|
_: 1
|
|
1963
1968
|
})
|
|
@@ -1967,26 +1972,26 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1967
1972
|
onCommand: l(t).export.click
|
|
1968
1973
|
}, {
|
|
1969
1974
|
dropdown: h(() => [
|
|
1970
|
-
|
|
1975
|
+
D(l(me), null, {
|
|
1971
1976
|
default: h(() => [
|
|
1972
1977
|
r.option.table?.selectable ? (c(), b(l(X), {
|
|
1973
1978
|
key: 0,
|
|
1974
1979
|
command: "select"
|
|
1975
1980
|
}, {
|
|
1976
1981
|
default: h(() => [
|
|
1977
|
-
|
|
1982
|
+
E(U(l(y).tCurd("exportSelect")), 1)
|
|
1978
1983
|
]),
|
|
1979
1984
|
_: 1
|
|
1980
1985
|
})) : C("", !0),
|
|
1981
|
-
|
|
1986
|
+
D(l(X), { command: "page" }, {
|
|
1982
1987
|
default: h(() => [
|
|
1983
|
-
|
|
1988
|
+
E(U(l(y).tCurd("exportPage")), 1)
|
|
1984
1989
|
]),
|
|
1985
1990
|
_: 1
|
|
1986
1991
|
}),
|
|
1987
|
-
|
|
1992
|
+
D(l(X), { command: "all" }, {
|
|
1988
1993
|
default: h(() => [
|
|
1989
|
-
|
|
1994
|
+
E(U(l(y).tCurd("exportAll")), 1)
|
|
1990
1995
|
]),
|
|
1991
1996
|
_: 1
|
|
1992
1997
|
})
|
|
@@ -1996,12 +2001,12 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
1996
2001
|
]),
|
|
1997
2002
|
default: h(() => [
|
|
1998
2003
|
O("div", nt, [
|
|
1999
|
-
|
|
2004
|
+
D(l(M), {
|
|
2000
2005
|
type: "warning",
|
|
2001
2006
|
loading: l(t).export.loading
|
|
2002
2007
|
}, {
|
|
2003
2008
|
default: h(() => [
|
|
2004
|
-
|
|
2009
|
+
E(U(l(y).tCurd("export")), 1)
|
|
2005
2010
|
]),
|
|
2006
2011
|
_: 1
|
|
2007
2012
|
}, 8, ["loading"])
|
|
@@ -2019,7 +2024,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2019
2024
|
onClick: m[3] || (m[3] = //@ts-ignore
|
|
2020
2025
|
(...i) => l(t).table.getList && l(t).table.getList(...i))
|
|
2021
2026
|
}, [
|
|
2022
|
-
|
|
2027
|
+
D(Te)
|
|
2023
2028
|
])) : C("", !0)
|
|
2024
2029
|
])
|
|
2025
2030
|
]),
|
|
@@ -2043,7 +2048,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2043
2048
|
fixed: "left",
|
|
2044
2049
|
"show-overflow-tooltip": !1
|
|
2045
2050
|
}, null, 8, ["selectable"])) : C("", !0),
|
|
2046
|
-
|
|
2051
|
+
D(We, {
|
|
2047
2052
|
conf: l(t),
|
|
2048
2053
|
columnList: l(t).table.column.list,
|
|
2049
2054
|
option: r.option
|
|
@@ -2063,35 +2068,35 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2063
2068
|
}, r.option.table?.operate), {
|
|
2064
2069
|
header: h(() => [
|
|
2065
2070
|
k(p.$slots, "table-header-op", {}, () => [
|
|
2066
|
-
|
|
2071
|
+
E(U(l(y).tCurd("operation")), 1)
|
|
2067
2072
|
])
|
|
2068
2073
|
]),
|
|
2069
2074
|
default: h(({ row: i }) => [
|
|
2070
2075
|
k(p.$slots, "table-op-left", { row: i }),
|
|
2071
|
-
r.option.table?.inlineEdit && l(t).inlineEdit.row === i ? (c(), g(
|
|
2072
|
-
|
|
2076
|
+
r.option.table?.inlineEdit && l(t).inlineEdit.row === i ? (c(), g(S, { key: 0 }, [
|
|
2077
|
+
D(l(M), {
|
|
2073
2078
|
link: "",
|
|
2074
2079
|
type: "info",
|
|
2075
2080
|
onClick: l(t).inlineEdit.close
|
|
2076
2081
|
}, {
|
|
2077
2082
|
default: h(() => [
|
|
2078
|
-
|
|
2083
|
+
E(U(l(y).tCurd("cancel")), 1)
|
|
2079
2084
|
]),
|
|
2080
2085
|
_: 1
|
|
2081
2086
|
}, 8, ["onClick"]),
|
|
2082
|
-
|
|
2087
|
+
D(l(M), {
|
|
2083
2088
|
link: "",
|
|
2084
2089
|
type: "primary",
|
|
2085
2090
|
onClick: l(t).inlineEdit.submit,
|
|
2086
2091
|
loading: l(t).inlineEdit.loading
|
|
2087
2092
|
}, {
|
|
2088
2093
|
default: h(() => [
|
|
2089
|
-
|
|
2094
|
+
E(U(l(y).tCurd("confirm")), 1)
|
|
2090
2095
|
]),
|
|
2091
2096
|
_: 1
|
|
2092
2097
|
}, 8, ["onClick", "loading"]),
|
|
2093
2098
|
k(p.$slots, "table-op-edit-right", { row: i })
|
|
2094
|
-
], 64)) : (c(), g(
|
|
2099
|
+
], 64)) : (c(), g(S, { key: 1 }, [
|
|
2095
2100
|
l(n)(r.option.table?.add, i) ? (c(), b(l(M), {
|
|
2096
2101
|
key: 0,
|
|
2097
2102
|
link: "",
|
|
@@ -2099,7 +2104,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2099
2104
|
onClick: (f) => l(t).update.open(l(s).Insert, i)
|
|
2100
2105
|
}, {
|
|
2101
2106
|
default: h(() => [
|
|
2102
|
-
|
|
2107
|
+
E(U(l(y).tCurd("add")), 1)
|
|
2103
2108
|
]),
|
|
2104
2109
|
_: 2
|
|
2105
2110
|
}, 1032, ["onClick"])) : C("", !0),
|
|
@@ -2110,7 +2115,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2110
2115
|
onClick: (f) => l(t).update.open(l(s).View, i)
|
|
2111
2116
|
}, {
|
|
2112
2117
|
default: h(() => [
|
|
2113
|
-
|
|
2118
|
+
E(U(l(y).tCurd("view")), 1)
|
|
2114
2119
|
]),
|
|
2115
2120
|
_: 2
|
|
2116
2121
|
}, 1032, ["onClick"])) : C("", !0),
|
|
@@ -2121,7 +2126,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2121
2126
|
onClick: (f) => l(t).update.open(l(s).Update, i)
|
|
2122
2127
|
}, {
|
|
2123
2128
|
default: h(() => [
|
|
2124
|
-
|
|
2129
|
+
E(U(l(y).tCurd("edit")), 1)
|
|
2125
2130
|
]),
|
|
2126
2131
|
_: 2
|
|
2127
2132
|
}, 1032, ["onClick"])) : C("", !0),
|
|
@@ -2132,7 +2137,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2132
2137
|
onClick: (f) => l(t).remove.open([i])
|
|
2133
2138
|
}, {
|
|
2134
2139
|
default: h(() => [
|
|
2135
|
-
|
|
2140
|
+
E(U(l(y).tCurd("delete")), 1)
|
|
2136
2141
|
]),
|
|
2137
2142
|
_: 2
|
|
2138
2143
|
}, 1032, ["onClick"])) : C("", !0),
|
|
@@ -2149,7 +2154,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2149
2154
|
])
|
|
2150
2155
|
]),
|
|
2151
2156
|
O("div", dt, [
|
|
2152
|
-
r.option.page?.show === void 0 || r.option.page?.show ? (c(), b(l(be), {
|
|
2157
|
+
r.option.page?.show === void 0 || r.option.page?.show ? (c(), b(l(be), v({
|
|
2153
2158
|
key: 0,
|
|
2154
2159
|
"current-page": l(t).page.num,
|
|
2155
2160
|
"onUpdate:currentPage": m[4] || (m[4] = (i) => l(t).page.num = i),
|
|
@@ -2157,17 +2162,17 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2157
2162
|
"onUpdate:pageSize": m[5] || (m[5] = (i) => l(t).page.size = i),
|
|
2158
2163
|
background: "",
|
|
2159
2164
|
"page-sizes": l(t).page.sizeList,
|
|
2160
|
-
"pager-count":
|
|
2165
|
+
"pager-count": l(t).page.pagerCount,
|
|
2161
2166
|
layout: l(t).page.layout,
|
|
2162
2167
|
total: l(t).page.total,
|
|
2163
2168
|
onSizeChange: l(t).table.getList,
|
|
2164
2169
|
onCurrentChange: l(t).table.getList
|
|
2165
|
-
}, null,
|
|
2170
|
+
}, r.option.page?.pagination || {}, F(r.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "onSizeChange", "onCurrentChange"])) : C("", !0)
|
|
2166
2171
|
])
|
|
2167
2172
|
]),
|
|
2168
2173
|
k(p.$slots, "box-right")
|
|
2169
2174
|
]),
|
|
2170
|
-
|
|
2175
|
+
D(l(Y), v({
|
|
2171
2176
|
modelValue: l(t).update.show,
|
|
2172
2177
|
"onUpdate:modelValue": m[6] || (m[6] = (i) => l(t).update.show = i),
|
|
2173
2178
|
title: l(t).update.title,
|
|
@@ -2175,11 +2180,11 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2175
2180
|
}, r.option.dialog), {
|
|
2176
2181
|
footer: h(() => [
|
|
2177
2182
|
O("span", ut, [
|
|
2178
|
-
|
|
2183
|
+
D(l(M), {
|
|
2179
2184
|
onClick: l(t).update.close
|
|
2180
2185
|
}, {
|
|
2181
2186
|
default: h(() => [
|
|
2182
|
-
|
|
2187
|
+
E(U(l(y).tCurd("close")), 1)
|
|
2183
2188
|
]),
|
|
2184
2189
|
_: 1
|
|
2185
2190
|
}, 8, ["onClick"]),
|
|
@@ -2190,21 +2195,21 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2190
2195
|
loading: l(t).update.loading
|
|
2191
2196
|
}, {
|
|
2192
2197
|
default: h(() => [
|
|
2193
|
-
|
|
2198
|
+
E(U(l(y).tCurd("submit")), 1)
|
|
2194
2199
|
]),
|
|
2195
2200
|
_: 1
|
|
2196
2201
|
}, 8, ["onClick", "loading"])) : C("", !0)
|
|
2197
2202
|
])
|
|
2198
2203
|
]),
|
|
2199
2204
|
default: h(() => [
|
|
2200
|
-
|
|
2205
|
+
D(l(Q), {
|
|
2201
2206
|
ref_key: "ruleFormRef",
|
|
2202
2207
|
ref: d,
|
|
2203
2208
|
model: l(t).update.form,
|
|
2204
2209
|
rules: l(t).update.rules
|
|
2205
2210
|
}, {
|
|
2206
2211
|
default: h(() => [
|
|
2207
|
-
l(t).update.showContent ? (c(!0), g(
|
|
2212
|
+
l(t).update.showContent ? (c(!0), g(S, { key: 0 }, I(l(t).update.formColumn, (i) => (c(), g(S, null, [
|
|
2208
2213
|
l(n)(
|
|
2209
2214
|
(() => {
|
|
2210
2215
|
const f = [], w = (L) => {
|
|
@@ -2223,20 +2228,20 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2223
2228
|
k(p.$slots, "form-start", {
|
|
2224
2229
|
row: l(t).update.form
|
|
2225
2230
|
}),
|
|
2226
|
-
(c(!0), g(
|
|
2231
|
+
(c(!0), g(S, null, I(i, (f) => (c(), g(S, null, [
|
|
2227
2232
|
l(n)(f.item.show?.form, l(t).update.form, l(t).update.type) ? (c(), g("div", {
|
|
2228
2233
|
key: 0,
|
|
2229
2234
|
class: A([f.item.form.span > 0 ? `col-${l(t).getColumnSpan(f, i)}` : "col", `form-item-col-${f.item.key}`])
|
|
2230
2235
|
}, [
|
|
2231
|
-
(c(!0), g(
|
|
2236
|
+
(c(!0), g(S, null, I(f.item.children ? f.children : [f], (w) => (c(), b(Qe, {
|
|
2232
2237
|
key: w.item.key,
|
|
2233
2238
|
conf: l(t),
|
|
2234
2239
|
item: w
|
|
2235
2240
|
}, _({ _: 2 }, [
|
|
2236
2241
|
I(p.$slots, (L, j) => ({
|
|
2237
2242
|
name: j,
|
|
2238
|
-
fn: h((
|
|
2239
|
-
k(p.$slots, j, v({ ref_for: !0 },
|
|
2243
|
+
fn: h((z) => [
|
|
2244
|
+
k(p.$slots, j, v({ ref_for: !0 }, z || {}))
|
|
2240
2245
|
])
|
|
2241
2246
|
}))
|
|
2242
2247
|
]), 1032, ["conf", "item"]))), 128))
|
|
@@ -2253,7 +2258,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2253
2258
|
]),
|
|
2254
2259
|
_: 3
|
|
2255
2260
|
}, 16, ["modelValue", "title", "before-close"]),
|
|
2256
|
-
|
|
2261
|
+
D(l(Y), {
|
|
2257
2262
|
modelValue: l(t).remove.show,
|
|
2258
2263
|
"onUpdate:modelValue": m[7] || (m[7] = (i) => l(t).remove.show = i),
|
|
2259
2264
|
title: l(t).remove.title,
|
|
@@ -2261,32 +2266,32 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
|
|
|
2261
2266
|
}, {
|
|
2262
2267
|
footer: h(() => [
|
|
2263
2268
|
O("span", ct, [
|
|
2264
|
-
|
|
2269
|
+
D(l(M), {
|
|
2265
2270
|
onClick: l(t).remove.close
|
|
2266
2271
|
}, {
|
|
2267
2272
|
default: h(() => [
|
|
2268
|
-
|
|
2273
|
+
E(U(l(y).tCurd("close")), 1)
|
|
2269
2274
|
]),
|
|
2270
2275
|
_: 1
|
|
2271
2276
|
}, 8, ["onClick"]),
|
|
2272
|
-
|
|
2277
|
+
D(l(M), {
|
|
2273
2278
|
type: "danger",
|
|
2274
2279
|
onClick: l(t).remove.submit,
|
|
2275
2280
|
loading: l(t).remove.loading
|
|
2276
2281
|
}, {
|
|
2277
2282
|
default: h(() => [
|
|
2278
|
-
|
|
2283
|
+
E(U(l(y).tCurd("confirmDelete")), 1)
|
|
2279
2284
|
]),
|
|
2280
2285
|
_: 1
|
|
2281
2286
|
}, 8, ["onClick", "loading"])
|
|
2282
2287
|
])
|
|
2283
2288
|
]),
|
|
2284
2289
|
default: h(() => [
|
|
2285
|
-
O("div", null,
|
|
2290
|
+
O("div", null, U(l(y).tCurd("confirmDeleteMessage", l(t).remove.items.length)), 1)
|
|
2286
2291
|
]),
|
|
2287
2292
|
_: 1
|
|
2288
2293
|
}, 8, ["modelValue", "title"]),
|
|
2289
|
-
|
|
2294
|
+
D(Ie, {
|
|
2290
2295
|
ref_key: "switchConfirmRef",
|
|
2291
2296
|
ref: a
|
|
2292
2297
|
}, null, 512)
|
|
@@ -2326,7 +2331,7 @@ class yt {
|
|
|
2326
2331
|
n.accept = t, n.style.display = "none", n.onchange = (a) => {
|
|
2327
2332
|
const d = a.target.files[0];
|
|
2328
2333
|
if (!d) {
|
|
2329
|
-
|
|
2334
|
+
$.fail("未选择文件"), e("未选择文件");
|
|
2330
2335
|
return;
|
|
2331
2336
|
}
|
|
2332
2337
|
const p = new FileReader();
|
|
@@ -2334,14 +2339,14 @@ class yt {
|
|
|
2334
2339
|
const u = t == ".json" ? JSON.parse(m.target.result) : m.target.result;
|
|
2335
2340
|
s(u);
|
|
2336
2341
|
}, p.onerror = () => {
|
|
2337
|
-
|
|
2342
|
+
$.fail("文件读取失败"), e("文件读取失败");
|
|
2338
2343
|
}, p.readAsText(d), document.body.removeChild(n);
|
|
2339
2344
|
}, document.body.appendChild(n), n.click();
|
|
2340
2345
|
});
|
|
2341
2346
|
}
|
|
2342
2347
|
const pt = (r, o) => {
|
|
2343
2348
|
if (r.component("TCurd", ft), r.component("TFormList", le), r.component("TColumn", Se), o?.customComponent) {
|
|
2344
|
-
|
|
2349
|
+
T.customComponent = o.customComponent;
|
|
2345
2350
|
for (const s in o.customComponent)
|
|
2346
2351
|
r.component(s, o.customComponent[s]);
|
|
2347
2352
|
}
|
|
@@ -2354,11 +2359,11 @@ export {
|
|
|
2354
2359
|
Se as TColumn,
|
|
2355
2360
|
ft as TCurd,
|
|
2356
2361
|
yt as TFile,
|
|
2357
|
-
|
|
2358
|
-
|
|
2362
|
+
T as TForm,
|
|
2363
|
+
V as TFormConfig,
|
|
2359
2364
|
y as TFormI18n,
|
|
2360
2365
|
le as TFormList,
|
|
2361
|
-
|
|
2366
|
+
$ as TSys,
|
|
2362
2367
|
gt as default,
|
|
2363
2368
|
pt as install
|
|
2364
2369
|
};
|