cc1-form 1.1.23 → 1.1.24

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 CHANGED
@@ -1,5 +1,162 @@
1
- import { defineComponent as K, reactive as _, onMounted as ae, resolveComponent as X, createElementBlock as w, createCommentVNode as C, openBlock as f, renderSlot as k, createElementVNode as D, createVNode as v, withCtx as b, createTextVNode as E, Fragment as U, renderList as M, createBlock as y, normalizeClass as T, normalizeStyle as ne, ref as A, nextTick as ue, unref as l, mergeProps as V, toHandlers as O, resolveDynamicComponent as H, toDisplayString as x, getCurrentInstance as ce, createSlots as ie, withKeys as fe, resolveDirective as me, withDirectives as pe, normalizeProps as he, guardReactiveProps as be } from "vue";
2
- import { ElMessage as ye, ElLoading as ge, ElForm as Q, ElFormItem as B, ElInput as q, ElSwitch as ee, ElSelect as J, ElOption as P, ElTreeSelect as se, ElDatePicker as te, ElDialog as Y, ElButton as F, ElTableColumn as Z, ElDropdown as we, ElDropdownMenu as ke, ElDropdownItem as G, ElTable as Ce, ElPagination as ve } from "element-plus";
1
+ import { ElMessage as ue, ElLoading as ce, ElForm as Q, ElFormItem as J, ElInput as q, ElSwitch as _, ElSelect as W, ElOption as P, ElTreeSelect as ae, ElDatePicker as ee, ElDialog as Y, ElButton as F, ElTableColumn as Z, ElDropdown as fe, ElDropdownMenu as me, ElDropdownItem as X, ElTable as pe, ElPagination as he } from "element-plus";
2
+ import { defineComponent as N, reactive as te, onMounted as ne, resolveComponent as H, createElementBlock as w, createCommentVNode as v, openBlock as m, renderSlot as k, createElementVNode as $, createVNode as V, withCtx as h, createTextVNode as E, Fragment as D, renderList as M, createBlock as b, normalizeClass as T, normalizeStyle as ie, ref as K, nextTick as be, unref as o, mergeProps as C, toHandlers as O, resolveDynamicComponent as G, toDisplayString as x, getCurrentInstance as ye, createSlots as se, withKeys as ge, resolveDirective as we, withDirectives as ke, normalizeProps as ve, guardReactiveProps as Ce } from "vue";
3
+ class U {
4
+ /**
5
+ * Vue Router 实例,需在应用初始化时赋值
6
+ */
7
+ static router;
8
+ /**
9
+ * 原始路由列表
10
+ */
11
+ static routes;
12
+ /**
13
+ * 获取路由路径
14
+ */
15
+ static getRouterPath = () => this.router.currentRoute.value.path;
16
+ static EDialog = {
17
+ Insert: "Insert",
18
+ Update: "Update",
19
+ View: "View",
20
+ Remove: "Remove"
21
+ };
22
+ /**
23
+ * 判断是否是函数,是就执行返回,否则返回本身
24
+ * @param fun 函数
25
+ * @param data 数据
26
+ * @returns 是否显示
27
+ */
28
+ static isFun = (s, ...r) => Array.isArray(s) ? s.some((l) => typeof l == "function" ? l(...r) : l) : typeof s == "function" ? s(...r) : s;
29
+ /**
30
+ * 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
31
+ */
32
+ static getRouterParams = () => {
33
+ const s = this.router.currentRoute.value.query || {}, r = this.router.currentRoute.value.params || {};
34
+ return Object.keys(s).length ? s : Object.keys(r).length ? r : {};
35
+ };
36
+ /**
37
+ * 模块赋值
38
+ */
39
+ static moduleObj = {};
40
+ /**
41
+ * 加载模块
42
+ * @param module
43
+ */
44
+ static loadModule = async (s) => {
45
+ if (!U.moduleObj[s])
46
+ throw new Error(`模块${s}未加载,请赋值如:TSys.moduleObj = { ${s}: ()=>import('${s}') }`);
47
+ const r = await U.moduleObj[s]();
48
+ return r.default ?? r;
49
+ };
50
+ /**
51
+ * 提示信息对象管理
52
+ */
53
+ static tipMessages = {};
54
+ /**
55
+ * 提示信息间隔时间
56
+ */
57
+ static tipMessagesGap = 500;
58
+ /**
59
+ * 显示提示信息
60
+ * @param content 消息内容
61
+ * @param type 消息类型
62
+ * @param options 其他选项
63
+ */
64
+ static showMessage(s, r, l = {}) {
65
+ const n = Date.now();
66
+ if (!this.tipMessages[s] || n - this.tipMessages[s] > this.tipMessagesGap) {
67
+ this.tipMessages[s] = n;
68
+ const e = Object.assign(
69
+ {
70
+ message: s,
71
+ type: r
72
+ },
73
+ l
74
+ );
75
+ ue(e), setTimeout(() => {
76
+ delete this.tipMessages[s];
77
+ }, this.tipMessagesGap);
78
+ }
79
+ }
80
+ /**
81
+ * 失败提示
82
+ * @param content
83
+ * @param options
84
+ */
85
+ static fail = (s, r = {}) => {
86
+ this.showMessage(s, "error", r);
87
+ };
88
+ /**
89
+ * 成功提示
90
+ * @param content
91
+ * @param options
92
+ */
93
+ static success = (s, r = {}) => {
94
+ this.showMessage(s, "success", r);
95
+ };
96
+ static loadingObj = null;
97
+ static loadingTimer = null;
98
+ /**
99
+ * 加载中
100
+ * @param show
101
+ * @param text
102
+ */
103
+ static loading = (s = !0, r = "Loading...") => {
104
+ Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
105
+ s ? this.loadingObj = ce.service({
106
+ lock: !0,
107
+ text: r,
108
+ background: "rgba(0, 0, 0, 0.3)"
109
+ }) : this.loadingObj && (this.loadingObj.close(), this.loadingObj = null);
110
+ }, 50);
111
+ };
112
+ /**
113
+ * 使用window.open打开新地址
114
+ * @param url 地址
115
+ * @param isCenter 是否居中
116
+ */
117
+ static openUrl = (s, r = !0) => {
118
+ if (r) {
119
+ let l = screen.width / 2 - 500, n = screen.height / 2 - 800 / 2 - 30;
120
+ window.open(
121
+ s,
122
+ "_blank",
123
+ "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + n + ", left=" + l
124
+ );
125
+ } else
126
+ window.open(
127
+ s,
128
+ "DescriptiveWindowName" + StrUtil.getId(),
129
+ "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0"
130
+ );
131
+ };
132
+ /**
133
+ * 根据dom id截图并返回图片数据
134
+ * @param param
135
+ * @returns
136
+ */
137
+ static getImgPic = (s) => new Promise(async (r, l) => {
138
+ let n = document.getElementById(s.id);
139
+ const e = await U.loadModule("html2canvas");
140
+ try {
141
+ e(n, {
142
+ logging: !1,
143
+ allowTaint: !0,
144
+ scale: window.devicePixelRatio,
145
+ width: s.windowWidth,
146
+ height: s.windowHeight,
147
+ windowWidth: s.windowWidth,
148
+ windowHeight: s.windowHeight,
149
+ useCORS: !0,
150
+ backgroundColor: "#ffffff00"
151
+ }).then(function(a) {
152
+ let u = a.toDataURL("image/png");
153
+ r(u);
154
+ });
155
+ } catch (a) {
156
+ l(a);
157
+ }
158
+ });
159
+ }
3
160
  class S {
4
161
  /**
5
162
  * 全局配置对象
@@ -263,6 +420,16 @@ class S {
263
420
  create: !0,
264
421
  update: !0
265
422
  }
423
+ },
424
+ radio: {
425
+ data: [],
426
+ dataPath: "data.data",
427
+ dataApiConfig: {
428
+ once: !0,
429
+ init: !0,
430
+ create: !0,
431
+ update: !0
432
+ }
266
433
  }
267
434
  }
268
435
  }
@@ -276,162 +443,6 @@ class S {
276
443
  S.config = ObjectUtil.deepMerge(S.config, s);
277
444
  };
278
445
  }
279
- class $ {
280
- /**
281
- * Vue Router 实例,需在应用初始化时赋值
282
- */
283
- static router;
284
- /**
285
- * 原始路由列表
286
- */
287
- static routes;
288
- /**
289
- * 获取路由路径
290
- */
291
- static getRouterPath = () => this.router.currentRoute.value.path;
292
- static EDialog = {
293
- Insert: "Insert",
294
- Update: "Update",
295
- Remove: "Remove"
296
- };
297
- /**
298
- * 判断是否是函数,是就执行返回,否则返回本身
299
- * @param fun 函数
300
- * @param data 数据
301
- * @returns 是否显示
302
- */
303
- static isFun = (s, r) => Array.isArray(s) ? s.some((t) => typeof t == "function" ? t(r) : t) : typeof s == "function" ? s(r) : s;
304
- /**
305
- * 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
306
- */
307
- static getRouterParams = () => {
308
- const s = this.router.currentRoute.value.query || {}, r = this.router.currentRoute.value.params || {};
309
- return Object.keys(s).length ? s : Object.keys(r).length ? r : {};
310
- };
311
- /**
312
- * 模块赋值
313
- */
314
- static moduleObj = {};
315
- /**
316
- * 加载模块
317
- * @param module
318
- */
319
- static loadModule = async (s) => {
320
- if (!$.moduleObj[s])
321
- throw new Error(`模块${s}未加载,请赋值如:TSys.moduleObj = { ${s}: ()=>import('${s}') }`);
322
- const r = await $.moduleObj[s]();
323
- return r.default ?? r;
324
- };
325
- /**
326
- * 提示信息对象管理
327
- */
328
- static tipMessages = {};
329
- /**
330
- * 提示信息间隔时间
331
- */
332
- static tipMessagesGap = 500;
333
- /**
334
- * 显示提示信息
335
- * @param content 消息内容
336
- * @param type 消息类型
337
- * @param options 其他选项
338
- */
339
- static showMessage(s, r, t = {}) {
340
- const n = Date.now();
341
- if (!this.tipMessages[s] || n - this.tipMessages[s] > this.tipMessagesGap) {
342
- this.tipMessages[s] = n;
343
- const e = Object.assign(
344
- {
345
- message: s,
346
- type: r
347
- },
348
- t
349
- );
350
- ye(e), setTimeout(() => {
351
- delete this.tipMessages[s];
352
- }, this.tipMessagesGap);
353
- }
354
- }
355
- /**
356
- * 失败提示
357
- * @param content
358
- * @param options
359
- */
360
- static fail = (s, r = {}) => {
361
- this.showMessage(s, "error", r);
362
- };
363
- /**
364
- * 成功提示
365
- * @param content
366
- * @param options
367
- */
368
- static success = (s, r = {}) => {
369
- this.showMessage(s, "success", r);
370
- };
371
- static loadingObj = null;
372
- static loadingTimer = null;
373
- /**
374
- * 加载中
375
- * @param show
376
- * @param text
377
- */
378
- static loading = (s = !0, r = "Loading...") => {
379
- Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
380
- s ? this.loadingObj = ge.service({
381
- lock: !0,
382
- text: r,
383
- background: "rgba(0, 0, 0, 0.3)"
384
- }) : this.loadingObj && (this.loadingObj.close(), this.loadingObj = null);
385
- }, 50);
386
- };
387
- /**
388
- * 使用window.open打开新地址
389
- * @param url 地址
390
- * @param isCenter 是否居中
391
- */
392
- static openUrl = (s, r = !0) => {
393
- if (r) {
394
- let t = screen.width / 2 - 500, n = screen.height / 2 - 800 / 2 - 30;
395
- window.open(
396
- s,
397
- "_blank",
398
- "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + n + ", left=" + t
399
- );
400
- } else
401
- window.open(
402
- s,
403
- "DescriptiveWindowName" + StrUtil.getId(),
404
- "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0"
405
- );
406
- };
407
- /**
408
- * 根据dom id截图并返回图片数据
409
- * @param param
410
- * @returns
411
- */
412
- static getImgPic = (s) => new Promise(async (r, t) => {
413
- let n = document.getElementById(s.id);
414
- const e = await $.loadModule("html2canvas");
415
- try {
416
- e(n, {
417
- logging: !1,
418
- allowTaint: !0,
419
- scale: window.devicePixelRatio,
420
- width: s.windowWidth,
421
- height: s.windowHeight,
422
- windowWidth: s.windowWidth,
423
- windowHeight: s.windowHeight,
424
- useCORS: !0,
425
- backgroundColor: "#ffffff00"
426
- }).then(function(a) {
427
- let d = a.toDataURL("image/png");
428
- r(d);
429
- });
430
- } catch (a) {
431
- t(a);
432
- }
433
- });
434
- }
435
446
  class L {
436
447
  /**
437
448
  * 自定义组件映射表,key 为组件名(同时作为 column.type 值),value 为 Vue 组件定义
@@ -450,9 +461,9 @@ class L {
450
461
  * @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
451
462
  */
452
463
  static findOptions = (s, r) => {
453
- const t = s.column.find((e) => e.key === r), n = (e) => e.replace(/-([a-z])/g, (a, d) => d.toUpperCase());
454
- if (t)
455
- return t.options[n(t.type)];
464
+ const l = s.column.find((e) => e.key === r), n = (e) => e.replace(/-([a-z])/g, (a, u) => u.toUpperCase());
465
+ if (l)
466
+ return l.options[n(l.type)];
456
467
  };
457
468
  /**
458
469
  * 更新组件数据
@@ -470,9 +481,9 @@ class L {
470
481
  }))
471
482
  )
472
483
  */
473
- static setOptionsData = (s, r, t) => {
484
+ static setOptionsData = (s, r, l) => {
474
485
  const n = L.findOptions(s, r);
475
- n && (n.data = t);
486
+ n && (n.data = l);
476
487
  };
477
488
  static form = {
478
489
  openBefore: {
@@ -483,9 +494,9 @@ class L {
483
494
  * @param treeData 树形数据
484
495
  * @param option 组件配置
485
496
  */
486
- parentId: (s, r, t, n) => {
497
+ parentId: (s, r, l, n) => {
487
498
  const e = S.config.table.rowKey;
488
- s ? r.type === $.EDialog.Insert ? (r.form.parentId = s[e], r.form.sort = s.children.length + 1) : r.form.parentId = s.parentId.substring(s.parentId.lastIndexOf(",") + 1) : (r.form.parentId = "0", r.form.sort = t.length + 1), L.setOptionsData(n, "parentId", [{ [e]: "0", title: "根", children: t }]);
499
+ s ? r.type === U.EDialog.Insert ? (r.form.parentId = s[e], r.form.sort = s.children.length + 1) : r.form.parentId = s.parentId.substring(s.parentId.lastIndexOf(",") + 1) : (r.form.parentId = "0", r.form.sort = l.length + 1), L.setOptionsData(n, "parentId", [{ [e]: "0", title: "根", children: l }]);
489
500
  }
490
501
  }
491
502
  };
@@ -500,13 +511,13 @@ class R {
500
511
  * @param field 字段名
501
512
  * @param row 行数据
502
513
  */
503
- static setId = (s, r, t) => {
514
+ static setId = (s, r, l) => {
504
515
  r[s] || (r[s] = []);
505
516
  const n = S.config.table.rowKey;
506
517
  r[s].forEach((e) => {
507
- t.forEach((a) => {
508
- let d = a.default ?? "";
509
- a.type === "number" && (d = a.default ?? 0), a.type === "boolean" && (d = a.default ?? !1), a.type === "time" && (d = a.default ?? /* @__PURE__ */ new Date()), e[a.value] === void 0 && (e[a.value] = d);
518
+ l.forEach((a) => {
519
+ let u = a.default ?? "";
520
+ a.type === "number" && (u = a.default ?? 0), a.type === "boolean" && (u = a.default ?? !1), a.type === "time" && (u = a.default ?? /* @__PURE__ */ new Date()), e[a.value] === void 0 && (e[a.value] = u);
510
521
  }), e[n] || (e[n] = R.getIdFun());
511
522
  });
512
523
  };
@@ -517,15 +528,15 @@ class R {
517
528
  * @param itemFields 元素字段-如:[{label:'',value:''}]
518
529
  * @param callback 回调函数
519
530
  */
520
- static add = (s, r, t, n) => {
521
- const e = JSONUtil.cp(t);
522
- R.setId(s, r, t);
531
+ static add = (s, r, l, n) => {
532
+ const e = JSONUtil.cp(l);
533
+ R.setId(s, r, l);
523
534
  const a = S.config.table.rowKey;
524
535
  r[s].push(
525
536
  e.reduce(
526
- (d, m) => {
527
- let p = m.default ?? "";
528
- return m.type === "number" && (p = m.default ?? 0), m.type === "boolean" && (p = m.default ?? !1), m.type === "time" && (p = m.default ?? /* @__PURE__ */ new Date()), d[m.value] = p, d;
537
+ (u, f) => {
538
+ let p = f.default ?? "";
539
+ return f.type === "number" && (p = f.default ?? 0), f.type === "boolean" && (p = f.default ?? !1), f.type === "time" && (p = f.default ?? /* @__PURE__ */ new Date()), u[f.value] = p, u;
529
540
  },
530
541
  { [a]: R.getIdFun() }
531
542
  )
@@ -538,9 +549,9 @@ class R {
538
549
  * @param item 元素-如:{_id:''}
539
550
  * @param callback 回调函数
540
551
  */
541
- static remove = (s, r, t, n) => {
552
+ static remove = (s, r, l, n) => {
542
553
  const e = S.config.table.rowKey;
543
- r[s] = r[s].filter((a) => a[e] !== t[e]), n?.(r);
554
+ r[s] = r[s].filter((a) => a[e] !== l[e]), n?.(r);
544
555
  };
545
556
  /**
546
557
  * 获取没有id的数据
@@ -549,10 +560,10 @@ class R {
549
560
  * @returns 没有id的数据
550
561
  */
551
562
  static getNoIdData = (s, r) => {
552
- const t = JSONUtil.cp(s), n = S.config.table.rowKey;
553
- return t.forEach((e) => {
563
+ const l = JSONUtil.cp(s), n = S.config.table.rowKey;
564
+ return l.forEach((e) => {
554
565
  e[n] && delete e[n], r && e[r] && R.getNoIdData(e[r], r);
555
- }), t;
566
+ }), l;
556
567
  };
557
568
  }
558
569
  const Ve = {
@@ -562,7 +573,7 @@ const Ve = {
562
573
  }, Ee = {
563
574
  class: "row items-center",
564
575
  style: { gap: "10px", width: "100%" }
565
- }, oe = /* @__PURE__ */ K({
576
+ }, oe = /* @__PURE__ */ N({
566
577
  __name: "list",
567
578
  props: {
568
579
  row: {
@@ -597,73 +608,73 @@ const Ve = {
597
608
  }
598
609
  },
599
610
  emits: ["change"],
600
- setup(o, { emit: s }) {
601
- const r = o, t = _({
611
+ setup(t, { emit: s }) {
612
+ const r = t, l = te({
602
613
  show: !1,
603
- add: (e, a, d) => {
604
- R.add(e, a, d, () => {
614
+ add: (e, a, u) => {
615
+ R.add(e, a, u, () => {
605
616
  n("change");
606
617
  });
607
618
  },
608
- remove: (e, a, d) => {
609
- R.remove(e, a, d, () => {
619
+ remove: (e, a, u) => {
620
+ R.remove(e, a, u, () => {
610
621
  n("change");
611
622
  });
612
623
  }
613
624
  });
614
- ae(() => {
615
- R.setId(r.field, r.row, r.itemFields), t.show = !0;
625
+ ne(() => {
626
+ R.setId(r.field, r.row, r.itemFields), l.show = !0;
616
627
  });
617
628
  const n = s;
618
629
  return (e, a) => {
619
- const d = X("el-button"), m = X("el-input");
620
- return t.show ? (f(), w("div", Ve, [
621
- k(e.$slots, "list-start", { row: o.row }),
622
- D("div", null, [
623
- v(d, {
630
+ const u = H("el-button"), f = H("el-input");
631
+ return l.show ? (m(), w("div", Ve, [
632
+ k(e.$slots, "list-start", { row: t.row }),
633
+ $("div", null, [
634
+ V(u, {
624
635
  link: "",
625
636
  type: "primary",
626
- onClick: a[0] || (a[0] = (p) => t.add(o.field, o.row, o.itemFields))
637
+ onClick: a[0] || (a[0] = (p) => l.add(t.field, t.row, t.itemFields))
627
638
  }, {
628
- default: b(() => [...a[2] || (a[2] = [
639
+ default: h(() => [...a[2] || (a[2] = [
629
640
  E("添加", -1)
630
641
  ])]),
631
642
  _: 1
632
643
  })
633
644
  ]),
634
- (f(!0), w(U, null, M(o.row[o.field], (p) => (f(), w("div", Ee, [
645
+ (m(!0), w(D, null, M(t.row[t.field], (p) => (m(), w("div", Ee, [
635
646
  k(e.$slots, "item-start", {
636
647
  item: p,
637
- row: o.row
648
+ row: t.row
638
649
  }),
639
- (f(!0), w(U, null, M(o.itemFields, (c) => (f(), y(m, {
650
+ (m(!0), w(D, null, M(t.itemFields, (c) => (m(), b(f, {
640
651
  modelValue: p[c.value],
641
652
  "onUpdate:modelValue": (i) => p[c.value] = i,
642
- style: ne({ width: o.inputWidth }),
643
- class: T(o.inputClass),
644
- placeholder: c[o.label] || c[o.value],
653
+ style: ie({ width: t.inputWidth }),
654
+ class: T(t.inputClass),
655
+ placeholder: c[t.label] || c[t.value],
645
656
  onChange: a[1] || (a[1] = (i) => n("change"))
646
657
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
647
658
  k(e.$slots, "item-end", {
648
659
  item: p,
649
- row: o.row
660
+ row: t.row
650
661
  }),
651
- v(d, {
662
+ V(u, {
652
663
  link: "",
653
664
  type: "danger",
654
- onClick: (c) => t.remove(o.field, o.row, p)
665
+ onClick: (c) => l.remove(t.field, t.row, p)
655
666
  }, {
656
- default: b(() => [...a[3] || (a[3] = [
667
+ default: h(() => [...a[3] || (a[3] = [
657
668
  E("删除", -1)
658
669
  ])]),
659
670
  _: 1
660
671
  }, 8, ["onClick"])
661
672
  ]))), 256)),
662
- k(e.$slots, "list-end", { row: o.row })
663
- ])) : C("", !0);
673
+ k(e.$slots, "list-end", { row: t.row })
674
+ ])) : v("", !0);
664
675
  };
665
676
  }
666
- }), xe = { class: "row curd-row" }, De = /* @__PURE__ */ K({
677
+ }), xe = { class: "row curd-row" }, De = /* @__PURE__ */ N({
667
678
  __name: "column",
668
679
  props: {
669
680
  /**
@@ -679,81 +690,81 @@ const Ve = {
679
690
  default: ""
680
691
  }
681
692
  },
682
- setup(o, { expose: s }) {
683
- const r = $.isFun, t = $.EDialog, n = A(), e = o, a = _({
693
+ setup(t, { expose: s }) {
694
+ const r = U.isFun, l = U.EDialog, n = K(), e = t, a = te({
684
695
  rules: {},
685
696
  show: !0,
686
697
  form: {},
687
698
  formDefault: {},
688
699
  formColumn: [],
689
- getDisabled: (d) => d.disabled?.[(e.type || t.Insert) === t.Insert ? "create" : "update"],
700
+ getDisabled: (u) => u.disabled?.[(e.type || l.Insert) === l.Insert ? "create" : "update"],
690
701
  initColumnForm: async () => {
691
- const d = e.option;
702
+ const u = e.option;
692
703
  a.formColumn = [];
693
- const m = [], p = e.option.form?.maxSpan || 12, c = e.option.form?.defaultSpan || p;
704
+ const f = [], p = e.option.form?.maxSpan || 12, c = e.option.form?.defaultSpan || p;
694
705
  let i = [];
695
- const u = (h) => {
696
- if (a.formDefault[h.key] = h.value, h.isForm) {
697
- h.form = h.form || { span: c }, h.form.span = h.form.span ?? c;
698
- let I = h.form.span, j = i.reduce((N, de) => N + de.span, I);
706
+ const d = (y) => {
707
+ if (a.formDefault[y.key] = y.value, y.isForm) {
708
+ y.form = y.form || { span: c }, y.form.span = y.form.span ?? c;
709
+ let I = y.form.span, j = i.reduce((B, de) => B + de.span, I);
699
710
  const z = i.length;
700
- i.push({ item: h, span: I }), (z === 1 && i[0].span === 0 || j >= p || I === 0 && z > 1) && (m.push(i), i = []), h.rules && (a.rules[h.key] = h.rules);
711
+ i.push({ item: y, span: I }), (z === 1 && i[0].span === 0 || j >= p || I === 0 && z > 1) && (f.push(i), i = []), y.rules && (a.rules[y.key] = y.rules);
701
712
  }
702
713
  };
703
- d.column.forEach((h) => {
704
- h.isForm = !0, u(h);
705
- }), i.length > 0 && m.push(i), a.formColumn = m, a.form = JSONUtil.cp(a.formDefault);
714
+ u.column.forEach((y) => {
715
+ y.isForm = !0, d(y);
716
+ }), i.length > 0 && f.push(i), a.formColumn = f, a.form = JSONUtil.cp(a.formDefault);
706
717
  },
707
718
  init: async () => {
708
- a.show = !1, await ue(), a.initColumnForm();
719
+ a.show = !1, await be(), a.initColumnForm();
709
720
  }
710
721
  });
711
722
  return a.initColumnForm(), s({
712
723
  ref: n,
713
724
  conf: a
714
- }), (d, m) => (f(), y(l(Q), {
725
+ }), (u, f) => (m(), b(o(Q), {
715
726
  ref_key: "ruleFormRef",
716
727
  ref: n,
717
728
  model: a.form,
718
729
  rules: a.rules
719
730
  }, {
720
- default: b(() => [
721
- a.show ? (f(!0), w(U, { key: 0 }, M(a.formColumn, (p) => (f(), w("div", xe, [
722
- k(d.$slots, "form-start", {
731
+ default: h(() => [
732
+ a.show ? (m(!0), w(D, { key: 0 }, M(a.formColumn, (p) => (m(), w("div", xe, [
733
+ k(u.$slots, "form-start", {
723
734
  row: a.form
724
735
  }),
725
- (f(!0), w(U, null, M(p, (c) => (f(), w(U, null, [
726
- l(r)(c.item.show?.form, a.form) ?? !0 ? (f(), w("div", {
736
+ (m(!0), w(D, null, M(p, (c) => (m(), w(D, null, [
737
+ o(r)(c.item.show?.form, a.form) ?? !0 ? (m(), w("div", {
727
738
  key: 0,
728
739
  class: T(c.item.form.span > 0 ? `col-${c.item.form.span}` : "col")
729
740
  }, [
730
- v(l(B), {
741
+ V(o(J), {
731
742
  label: c.item.label,
732
743
  prop: c.item.key,
733
744
  "label-width": c.item.form?.labelWidth || "100px"
734
745
  }, {
735
- default: b(() => [
736
- k(d.$slots, "form-" + c.item.key + "-start", {
746
+ default: h(() => [
747
+ k(u.$slots, "form-" + c.item.key + "-start", {
737
748
  row: a.form,
738
749
  item: c.item
739
750
  }),
740
- k(d.$slots, "form-" + c.item.key, {
751
+ k(u.$slots, "form-" + c.item.key, {
741
752
  row: a.form,
742
753
  item: c.item
743
754
  }, () => [
744
- c.item.type === "input" ? (f(), y(l(q), V({
755
+ c.item.type === "input" ? (m(), b(o(q), C({
745
756
  key: 0,
746
757
  modelValue: a.form[c.item.key],
747
758
  "onUpdate:modelValue": (i) => a.form[c.item.key] = i
748
759
  }, { ref_for: !0 }, c.item.options?.input, O(c.item.options?.input?.on || {}), {
749
760
  disabled: a.getDisabled(c.item)
750
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "switch" ? (f(), y(l(ee), V({
761
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "switch" ? (m(), b(o(_), C({
751
762
  key: 1,
752
763
  modelValue: a.form[c.item.key],
753
764
  "onUpdate:modelValue": (i) => a.form[c.item.key] = i
754
765
  }, { ref_for: !0 }, c.item.options?.switch, O(c.item.options?.switch?.on || {}), {
755
766
  disabled: a.getDisabled(c.item)
756
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "select" ? (f(), y(l(J), V({
767
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "select" ? (m(), b(o(W), C({
757
768
  key: 2,
758
769
  modelValue: a.form[c.item.key],
759
770
  "onUpdate:modelValue": (i) => a.form[c.item.key] = i
@@ -761,55 +772,55 @@ const Ve = {
761
772
  disabled: a.getDisabled(c.item),
762
773
  style: { width: "100%" }
763
774
  }), {
764
- default: b(() => [
765
- (f(!0), w(U, null, M(c.item.options?.select?.data, (i) => (f(), y(l(P), {
775
+ default: h(() => [
776
+ (m(!0), w(D, null, M(c.item.options?.select?.data, (i) => (m(), b(o(P), {
766
777
  key: i.value,
767
778
  label: i.label,
768
779
  value: i.value
769
780
  }, null, 8, ["label", "value"]))), 128))
770
781
  ]),
771
782
  _: 2
772
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "list" ? (f(), y(oe, V({
783
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "list" ? (m(), b(oe, C({
773
784
  key: 3,
774
785
  row: a.form,
775
786
  field: c.item.key
776
787
  }, { ref_for: !0 }, c.item.options?.list, O(c.item.options?.list?.on || {}), {
777
788
  disabled: a.getDisabled(c.item),
778
789
  style: { width: "100%" }
779
- }), null, 16, ["row", "field", "disabled"])) : c.item.type === "tree-select" ? (f(), y(l(se), V({
790
+ }), null, 16, ["row", "field", "disabled"])) : c.item.type === "tree-select" ? (m(), b(o(ae), C({
780
791
  key: 4,
781
792
  modelValue: a.form[c.item.key],
782
793
  "onUpdate:modelValue": (i) => a.form[c.item.key] = i
783
794
  }, { ref_for: !0 }, c.item.options?.treeSelect, O(c.item.options?.treeSelect?.on || {}), {
784
795
  disabled: a.getDisabled(c.item),
785
796
  style: { width: "100%" }
786
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "datetime" ? (f(), y(l(te), V({
797
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "datetime" ? (m(), b(o(ee), C({
787
798
  key: 5,
788
799
  modelValue: a.form[c.item.key],
789
800
  "onUpdate:modelValue": (i) => a.form[c.item.key] = i
790
801
  }, { ref_for: !0 }, c.item.options?.datetime, O(c.item.options?.datetime?.on || {}), {
791
802
  disabled: a.getDisabled(c.item)
792
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type && l(L).customComponent[c.item.type] ? (f(), y(H(l(L).customComponent[c.item.type]), V({
803
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type && o(L).customComponent[c.item.type] ? (m(), b(G(o(L).customComponent[c.item.type]), C({
793
804
  key: 6,
794
805
  modelValue: a.form[c.item.key],
795
806
  "onUpdate:modelValue": (i) => a.form[c.item.key] = i
796
807
  }, { ref_for: !0 }, c.item.options?.[c.item.type], O(c.item.options?.[c.item.type]?.on || {}), {
797
808
  disabled: a.getDisabled(c.item)
798
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
809
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
799
810
  ]),
800
- k(d.$slots, "form-" + c.item.key + "-end", {
811
+ k(u.$slots, "form-" + c.item.key + "-end", {
801
812
  row: a.form,
802
813
  item: c.item
803
814
  })
804
815
  ]),
805
816
  _: 2
806
817
  }, 1032, ["label", "prop", "label-width"])
807
- ], 2)) : C("", !0)
818
+ ], 2)) : v("", !0)
808
819
  ], 64))), 256)),
809
- k(d.$slots, "form-end", {
820
+ k(u.$slots, "form-end", {
810
821
  row: a.form
811
822
  })
812
- ]))), 256)) : C("", !0)
823
+ ]))), 256)) : v("", !0)
813
824
  ]),
814
825
  _: 3
815
826
  }, 8, ["model", "rules"]));
@@ -819,6 +830,7 @@ const Ue = {
819
830
  search: "搜索",
820
831
  add: "新增",
821
832
  edit: "编辑",
833
+ view: "查看",
822
834
  delete: "删除",
823
835
  export: "导出",
824
836
  exportSelect: "导出选中",
@@ -853,8 +865,8 @@ class g {
853
865
  if (typeof s == "function")
854
866
  return s(...r);
855
867
  s = String(s);
856
- let t = 0;
857
- return s.replace(/{([^}]+)}/g, (n, e) => t < r.length ? String(r[t++]) : `{${e}}`);
868
+ let l = 0;
869
+ return s.replace(/{([^}]+)}/g, (n, e) => l < r.length ? String(r[l++]) : `{${e}}`);
858
870
  }
859
871
  static setI18n = (s) => {
860
872
  g.curd = ObjectUtil.deepMerge(g.curd, s);
@@ -874,19 +886,19 @@ class $e {
874
886
  * @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
875
887
  * @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
876
888
  */
877
- static exportToExcel = async (s, r, t) => {
889
+ static exportToExcel = async (s, r, l) => {
878
890
  if (!s || s.length === 0) return;
879
- const n = await $.loadModule("xlsx"), e = s.map((m) => {
891
+ const n = await U.loadModule("xlsx"), e = s.map((f) => {
880
892
  const p = {};
881
893
  return r.forEach((c) => {
882
- p[c.label] = m[c.key];
894
+ p[c.label] = f[c.key];
883
895
  }), p;
884
- }), a = n.utils.json_to_sheet(e), d = n.utils.book_new();
885
- n.utils.book_append_sheet(d, a, "Sheet1"), t ? typeof t == "function" && (t = t()) : t = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, n.writeFile(d, `${t}.xlsx`);
896
+ }), a = n.utils.json_to_sheet(e), u = n.utils.book_new();
897
+ n.utils.book_append_sheet(u, a, "Sheet1"), l ? typeof l == "function" && (l = l()) : l = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, n.writeFile(u, `${l}.xlsx`);
886
898
  };
887
899
  }
888
- const W = $.EDialog, Se = (o) => {
889
- const s = A(), r = A(), t = _({
900
+ const A = U.EDialog, Se = (t) => {
901
+ const s = K(), r = K(), l = te({
890
902
  /** 查询区域相关配置对象 */
891
903
  search: {
892
904
  /** 查询表单列集合 */
@@ -903,36 +915,36 @@ const W = $.EDialog, Se = (o) => {
903
915
  /** 组装实际要搜索的数据对象 */
904
916
  getFormData: () => {
905
917
  let n = {};
906
- o.option.column.forEach((a) => {
907
- (typeof a.show?.search == "function" ? a.show?.search(t.search.form) : a.show?.search) && (n[a.key] = t.search.form[a.key]);
918
+ t.option.column.forEach((a) => {
919
+ (typeof a.show?.search == "function" ? a.show?.search(l.search.form) : a.show?.search) && (n[a.key] = l.search.form[a.key]);
908
920
  });
909
- const e = o.option.search?.before?.(n);
921
+ const e = t.option.search?.before?.(n);
910
922
  return e && (n = e), n;
911
923
  },
912
924
  /** 重置搜索表单 */
913
925
  reset: () => {
914
- const n = t.search.formDefault;
926
+ const n = l.search.formDefault;
915
927
  Object.keys(n).forEach((e) => {
916
- o.option.search?.resetMode === "none" ? n[e] = void 0 : n[e] = t.search.formDefault[e];
917
- }), t.search.form = JSONUtil.cp(n), t.page.num = 1, o.option.init !== !1 && t.table.getList();
928
+ t.option.search?.resetMode === "none" ? n[e] = void 0 : n[e] = l.search.formDefault[e];
929
+ }), l.search.form = JSONUtil.cp(n), l.page.num = 1, t.option.init !== !1 && l.table.getList();
918
930
  },
919
931
  /** 提交搜索表单 */
920
932
  submit: () => {
921
- t.page.num = 1, t.table.getList();
933
+ l.page.num = 1, l.table.getList();
922
934
  }
923
935
  },
924
936
  /** 分页区域相关配置对象 */
925
937
  page: {
926
938
  /** 当前每页条数 */
927
- size: o.option.page?.size || 10,
939
+ size: t.option.page?.size || 10,
928
940
  /** 支持切换的每页条数选项 */
929
- sizeList: o.option.page?.sizeList || [10, 20, 50, 100],
941
+ sizeList: t.option.page?.sizeList || [10, 20, 50, 100],
930
942
  /** 当前页码 */
931
943
  num: 1,
932
944
  /** 总条数 */
933
945
  total: 0,
934
946
  /** 分页控件的布局方式 */
935
- layout: o.option.page?.layout || "total, sizes, prev, pager, next, jumper"
947
+ layout: t.option.page?.layout || "total, sizes, prev, pager, next, jumper"
936
948
  },
937
949
  /** 表格区域相关配置对象 */
938
950
  table: {
@@ -956,18 +968,18 @@ const W = $.EDialog, Se = (o) => {
956
968
  },
957
969
  /** 全部展开/收起 */
958
970
  all: () => {
959
- if (t.table.expand.isExpand)
960
- t.table.expand.rowKeys = [];
971
+ if (l.table.expand.isExpand)
972
+ l.table.expand.rowKeys = [];
961
973
  else {
962
974
  const n = (e) => {
963
975
  let a = [];
964
- return e.forEach((d) => {
965
- a.push(d[o.option.table.rowKey]), d.children && d.children.length > 0 && (a = a.concat(n(d.children)));
976
+ return e.forEach((u) => {
977
+ a.push(u[t.option.table.rowKey]), u.children && u.children.length > 0 && (a = a.concat(n(u.children)));
966
978
  }), a;
967
979
  };
968
- t.table.expand.rowKeys = n(t.table.data);
980
+ l.table.expand.rowKeys = n(l.table.data);
969
981
  }
970
- t.table.expand.isExpand = !t.table.expand.isExpand;
982
+ l.table.expand.isExpand = !l.table.expand.isExpand;
971
983
  }
972
984
  },
973
985
  /** 表格列相关配置 */
@@ -984,28 +996,25 @@ const W = $.EDialog, Se = (o) => {
984
996
  },
985
997
  /** 获取数据列表接口实现 */
986
998
  getList: async () => {
987
- t.table.loading = !0;
988
- const n = o.option.api.list;
999
+ l.table.loading = !0;
1000
+ const n = t.option.api.list;
989
1001
  try {
990
- await t.initApiData("init");
1002
+ await l.initApiData("init");
991
1003
  const e = await n({
992
- [S.config.page.size]: t.page.size,
993
- [S.config.page.num]: t.page.num,
994
- ...t.search.getFormData()
995
- }), a = S.config.result, d = e.data || { [a.list]: e };
996
- let m = (Array.isArray(d[a.list]), d[a.list]);
997
- const p = t.update.formColumn.flat(), c = JSONUtil.cp(m).map((i) => (Object.keys(i).forEach((h) => {
998
- const I = p.find((j) => j.item.key === h);
999
- if (I && I.item.type === "select") {
1000
- const j = I.item.options?.select?.data?.find((z) => z.value == i[h])?.label;
1001
- j && (i[h] = j);
1002
- }
1004
+ [S.config.page.size]: l.page.size,
1005
+ [S.config.page.num]: l.page.num,
1006
+ ...l.search.getFormData()
1007
+ }), a = S.config.result, u = e.data || { [a.list]: e };
1008
+ let f = (Array.isArray(u[a.list]), u[a.list]);
1009
+ const p = l.update.formColumn.flat(), c = JSONUtil.cp(f).map((i) => (Object.keys(i).forEach((y) => {
1010
+ const I = p.find((j) => j.item.key === y);
1011
+ I && I.item.type === "select" && (I.item.table.format || (I.item.table.format = (j) => I.item.options?.select?.data?.find((z) => z.value == j[y])?.label));
1003
1012
  }), i));
1004
- t.table.data = o.option.data ? await o.option.data(c, m) : c, t.page.total = d[a.total] || 0;
1013
+ l.table.data = t.option.data ? await t.option.data(c, f) : c, l.page.total = u[a.total] || 0;
1005
1014
  } catch (e) {
1006
1015
  console.error(e);
1007
1016
  } finally {
1008
- t.table.loading = !1;
1017
+ l.table.loading = !1;
1009
1018
  }
1010
1019
  },
1011
1020
  /** 表格多选相关配置 */
@@ -1014,7 +1023,7 @@ const W = $.EDialog, Se = (o) => {
1014
1023
  list: [],
1015
1024
  /** 选中状态回调 */
1016
1025
  change: (n) => {
1017
- t.table.selection.list = n;
1026
+ l.table.selection.list = n;
1018
1027
  }
1019
1028
  }
1020
1029
  },
@@ -1024,38 +1033,38 @@ const W = $.EDialog, Se = (o) => {
1024
1033
  run: {
1025
1034
  /** 执行指定方式的导出(如select、page、all) */
1026
1035
  start: async (n) => {
1027
- let e = await t.export.run[n](), a = o.option.column;
1028
- const d = JSONUtil.cp({
1036
+ let e = await l.export.run[n](), a = t.option.column;
1037
+ const u = JSONUtil.cp({
1029
1038
  data: e,
1030
1039
  columns: a
1031
- }), m = o.option.tools?.export || {};
1032
- m.before && m.before(d), $e.exportToExcel(d.data, d.columns, m.fileName);
1040
+ }), f = t.option.tools?.export || {};
1041
+ f.before && f.before(u), $e.exportToExcel(u.data, u.columns, f.fileName);
1033
1042
  },
1034
1043
  /** 获取当前选中项进行导出 */
1035
1044
  select: () => {
1036
- if (t.table.selection.list.length === 0)
1037
- throw $.fail(g.tCurd("selectDataToExport")), new Error(g.tCurd("selectDataToExport"));
1038
- return t.table.selection.list;
1045
+ if (l.table.selection.list.length === 0)
1046
+ throw U.fail(g.tCurd("selectDataToExport")), new Error(g.tCurd("selectDataToExport"));
1047
+ return l.table.selection.list;
1039
1048
  },
1040
1049
  /** 导出当前页的数据 */
1041
1050
  page: () => {
1042
- if (t.table.data.length === 0)
1043
- throw $.fail(g.tCurd("noData")), new Error(g.tCurd("noData"));
1044
- return t.table.data;
1051
+ if (l.table.data.length === 0)
1052
+ throw U.fail(g.tCurd("noData")), new Error(g.tCurd("noData"));
1053
+ return l.table.data;
1045
1054
  },
1046
1055
  /** 导出所有数据 */
1047
1056
  all: async () => {
1048
- t.export.loading = !0;
1057
+ l.export.loading = !0;
1049
1058
  try {
1050
- if (o.option.tools?.export?.all) {
1051
- await o.option.tools?.export?.all({
1052
- [S.config.page.size]: t.page.size,
1053
- [S.config.page.num]: t.page.num,
1054
- ...t.search.getFormData()
1059
+ if (t.option.tools?.export?.all) {
1060
+ await t.option.tools?.export?.all({
1061
+ [S.config.page.size]: l.page.size,
1062
+ [S.config.page.num]: l.page.num,
1063
+ ...l.search.getFormData()
1055
1064
  });
1056
1065
  return;
1057
1066
  }
1058
- const n = o.option.api.list, e = await n({
1067
+ const n = t.option.api.list, e = await n({
1059
1068
  [S.config.page.size]: 999999,
1060
1069
  [S.config.page.num]: 1
1061
1070
  });
@@ -1063,7 +1072,7 @@ const W = $.EDialog, Se = (o) => {
1063
1072
  } catch (n) {
1064
1073
  console.error(n);
1065
1074
  } finally {
1066
- t.export.loading = !1;
1075
+ l.export.loading = !1;
1067
1076
  }
1068
1077
  }
1069
1078
  },
@@ -1071,7 +1080,7 @@ const W = $.EDialog, Se = (o) => {
1071
1080
  loading: !1,
1072
1081
  /** 执行导出操作的触发函数 */
1073
1082
  click: (n) => {
1074
- t.export.loading || t.export.run.start(n);
1083
+ l.export.loading || l.export.run.start(n);
1075
1084
  }
1076
1085
  },
1077
1086
  /** 表单增删改弹窗相关对象 */
@@ -1087,7 +1096,7 @@ const W = $.EDialog, Se = (o) => {
1087
1096
  /** 弹窗loading */
1088
1097
  loading: !1,
1089
1098
  /** 当前操作类型,插入或修改 */
1090
- type: W.Insert,
1099
+ type: A.Insert,
1091
1100
  /** 当前操作表单数据 */
1092
1101
  form: {},
1093
1102
  /** 表单默认值 */
@@ -1095,74 +1104,75 @@ const W = $.EDialog, Se = (o) => {
1095
1104
  /** 表单所有列,二维数组结构按行分组 */
1096
1105
  formColumn: [],
1097
1106
  /** 判断是否禁用当前字段 */
1098
- getDisabled: (n) => n.disabled?.[t.update.type === W.Insert ? "create" : "update"],
1107
+ getDisabled: (n) => l.update.type === A.View ? !0 : n.disabled?.[l.update.type === A.Insert ? "create" : "update"],
1099
1108
  /** 编辑相关数据与方法 */
1100
1109
  edit: {
1101
1110
  /** 当前编辑的数据原始项对象 */
1102
1111
  data: {},
1103
1112
  /** 返回编辑时与原值的变更数据,用于局部更新API */
1104
1113
  getApiData: (n) => {
1105
- if (o.option.form?.editAll)
1114
+ if (t.option.form?.editAll)
1106
1115
  return n;
1107
1116
  let e = {
1108
- [o.option.table?.rowKey]: t.update.edit.data[o.option.table?.rowKey]
1117
+ [t.option.table?.rowKey]: l.update.edit.data[t.option.table?.rowKey]
1109
1118
  };
1110
- return Object.keys(t.update.edit.data).forEach((a) => {
1111
- n[a] !== t.update.edit.data[a] && (e[a] = n[a]);
1119
+ return Object.keys(l.update.edit.data).forEach((a) => {
1120
+ n[a] !== l.update.edit.data[a] && (e[a] = n[a]);
1112
1121
  }), e;
1113
1122
  }
1114
1123
  },
1124
+ view: {},
1115
1125
  /** 打开增改弹窗 */
1116
1126
  open: (n, e) => {
1117
- t.update.showContent || FunUtil.throttle(async () => {
1118
- $.loading(!0);
1127
+ l.update.showContent || FunUtil.throttle(async () => {
1128
+ U.loading(!0);
1119
1129
  try {
1120
- await t.initApiData("update");
1121
- const a = n === W.Insert;
1122
- if (!a && o.option.table?.inlineEdit) {
1123
- t.inlineEdit.open(e);
1130
+ await l.initApiData("update");
1131
+ const a = n === A.Insert;
1132
+ if (!a && t.option.table?.inlineEdit) {
1133
+ l.inlineEdit.open(e);
1124
1134
  return;
1125
1135
  }
1126
- t.update.type = n, t.update.edit.data = e, t.update.title = a ? g.tCurd("add") : g.tCurd("edit"), t.update.form = JSONUtil.cp(a ? t.update.formDefault : e), await o.option.form?.openBefore?.(e, t.update), t.update.show = !0, t.update.showContent = !0, o.option.form?.openAfter?.(e, t.update);
1136
+ l.update.type = n, l.update.edit.data = e, l.update.title = g.tCurd(a ? "add" : n === A.View ? "view" : "edit"), l.update.form = JSONUtil.cp(a ? l.update.formDefault : e), await t.option.form?.openBefore?.(e, l.update), l.update.show = !0, l.update.showContent = !0, t.option.form?.openAfter?.(e, l.update);
1127
1137
  } catch (a) {
1128
1138
  console.error(a);
1129
1139
  } finally {
1130
- $.loading(!1);
1140
+ U.loading(!1);
1131
1141
  }
1132
1142
  });
1133
1143
  },
1134
1144
  /** 提交增改表单操作 */
1135
1145
  submit: () => {
1136
1146
  FunUtil.throttle(async () => {
1137
- await r.value?.validate(async (d, m) => new Promise((p, c) => {
1138
- d || ($.fail(g.tCurd("checkFormData")), c(!1)), p();
1139
- })), t.update.loading = !0;
1140
- const n = t.update.type === W.Insert ? o.option.api.create : o.option.api.update;
1141
- let e = JSONUtil.cp(t.update.form);
1142
- delete e.children, await o.option.form?.submitBefore?.(e, t.update);
1143
- const a = new Set(o.option.column.filter((d) => d.type === "datetime").map((d) => d.key));
1144
- Object.keys(e).forEach((d) => {
1145
- if (a.has(d) && e[d] != null) {
1146
- const m = new Date(e[d]).getTime();
1147
- isNaN(m) || (e[d] = m);
1147
+ await r.value?.validate(async (u, f) => new Promise((p, c) => {
1148
+ u || (U.fail(g.tCurd("checkFormData")), c(!1)), p();
1149
+ })), l.update.loading = !0;
1150
+ const n = l.update.type === A.Insert ? t.option.api.create : t.option.api.update;
1151
+ let e = JSONUtil.cp(l.update.form);
1152
+ delete e.children, await t.option.form?.submitBefore?.(e, l.update);
1153
+ const a = new Set(t.option.column.filter((u) => u.type === "datetime").map((u) => u.key));
1154
+ Object.keys(e).forEach((u) => {
1155
+ if (a.has(u) && e[u] != null) {
1156
+ const f = new Date(e[u]).getTime();
1157
+ isNaN(f) || (e[u] = f);
1148
1158
  }
1149
1159
  });
1150
1160
  try {
1151
1161
  if (!n) return;
1152
1162
  await n({
1153
1163
  ...e
1154
- }), t.update.close(), await t.table.getList(), o.option.form?.submitAfter?.(e, t.update);
1155
- } catch (d) {
1156
- console.error(d);
1164
+ }), l.update.close(), await l.table.getList(), t.option.form?.submitAfter?.(e, l.update);
1165
+ } catch (u) {
1166
+ console.error(u);
1157
1167
  } finally {
1158
- t.update.loading = !1;
1168
+ l.update.loading = !1;
1159
1169
  }
1160
1170
  });
1161
1171
  },
1162
1172
  /** 关闭弹窗和内容 */
1163
1173
  close: () => {
1164
- t.update.show = !1, setTimeout(() => {
1165
- t.update.showContent = !1;
1174
+ l.update.show = !1, setTimeout(() => {
1175
+ l.update.showContent = !1;
1166
1176
  }, 350);
1167
1177
  }
1168
1178
  },
@@ -1176,26 +1186,26 @@ const W = $.EDialog, Se = (o) => {
1176
1186
  loading: !1,
1177
1187
  /** 打开行内编辑 */
1178
1188
  open: (n) => {
1179
- t.inlineEdit.row = n, t.inlineEdit.form = JSONUtil.cp(n);
1189
+ l.inlineEdit.row = n, l.inlineEdit.form = JSONUtil.cp(n);
1180
1190
  },
1181
1191
  /** 关闭行内编辑 */
1182
1192
  close: () => {
1183
- t.inlineEdit.row = null, t.inlineEdit.form = {};
1193
+ l.inlineEdit.row = null, l.inlineEdit.form = {};
1184
1194
  },
1185
1195
  /** 行内保存提交 */
1186
1196
  submit: () => {
1187
1197
  FunUtil.throttle(async () => {
1188
- t.inlineEdit.loading = !0;
1189
- const n = o.option.api.update;
1190
- let e = JSONUtil.cp(t.inlineEdit.form);
1198
+ l.inlineEdit.loading = !0;
1199
+ const n = t.option.api.update;
1200
+ let e = JSONUtil.cp(l.inlineEdit.form);
1191
1201
  delete e.children;
1192
1202
  try {
1193
1203
  if (!n) return;
1194
- await n({ ...e }), t.inlineEdit.close(), await t.table.getList(), $.success(g.tCurd("operationSuccess"));
1204
+ await n({ ...e }), l.inlineEdit.close(), await l.table.getList(), U.success(g.tCurd("operationSuccess"));
1195
1205
  } catch (a) {
1196
1206
  console.error(a);
1197
1207
  } finally {
1198
- t.inlineEdit.loading = !1;
1208
+ l.inlineEdit.loading = !1;
1199
1209
  }
1200
1210
  });
1201
1211
  }
@@ -1212,74 +1222,74 @@ const W = $.EDialog, Se = (o) => {
1212
1222
  loading: !1,
1213
1223
  /** 关闭删除弹窗 */
1214
1224
  close: () => {
1215
- t.remove.show = !1;
1225
+ l.remove.show = !1;
1216
1226
  },
1217
1227
  /** 打开删除弹窗并设置待删除项 */
1218
1228
  open: (n) => {
1219
1229
  if (n.length === 0) {
1220
- $.fail(g.tCurd("selectDataToDelete"));
1230
+ U.fail(g.tCurd("selectDataToDelete"));
1221
1231
  return;
1222
1232
  }
1223
- t.remove.items = n, t.remove.show = !0;
1233
+ l.remove.items = n, l.remove.show = !0;
1224
1234
  },
1225
1235
  /** 执行删除实际操作 */
1226
1236
  submit: () => {
1227
1237
  FunUtil.throttle(async () => {
1228
- t.remove.loading = !0;
1229
- const n = o.option.api.delete;
1238
+ l.remove.loading = !0;
1239
+ const n = t.option.api.delete;
1230
1240
  try {
1231
1241
  if (!n) return;
1232
1242
  await n({
1233
- [o.option.table?.rowKey]: t.remove.items.map((e) => e[o.option.table?.rowKey]),
1234
- items: t.remove.items
1235
- }), $.success(g.tCurd("operationSuccess")), t.table.data.length <= 1 && t.page.num > 1 && (t.page.num -= 1), t.remove.close(), await t.table.getList();
1243
+ [t.option.table?.rowKey]: l.remove.items.map((e) => e[t.option.table?.rowKey]),
1244
+ items: l.remove.items
1245
+ }), U.success(g.tCurd("operationSuccess")), l.table.data.length <= 1 && l.page.num > 1 && (l.page.num -= 1), l.remove.close(), await l.table.getList();
1236
1246
  } catch (e) {
1237
1247
  console.error(e);
1238
1248
  } finally {
1239
- t.remove.loading = !1;
1249
+ l.remove.loading = !1;
1240
1250
  }
1241
1251
  });
1242
1252
  }
1243
1253
  },
1244
1254
  /** 初始化curd关联所有默认与依赖配置及表单列 */
1245
1255
  init: () => {
1246
- t.initCurdConfig(), t.initColumnOptions(), t.initColumnForm();
1256
+ l.initCurdConfig(), l.initColumnOptions(), l.initColumnForm();
1247
1257
  },
1248
1258
  /** 下拉请求等数据缓存 */
1249
1259
  apiDataMap: {},
1250
1260
  /** 获取并绑定curd中所有下拉数据等远程依赖 */
1251
1261
  initApiData: async (n) => {
1252
- const e = [], a = (d) => {
1253
- if (d.children && d.children.length) {
1254
- d.children.forEach((m) => a(m));
1262
+ const e = [], a = (u) => {
1263
+ if (u.children && u.children.length) {
1264
+ u.children.forEach((f) => a(f));
1255
1265
  return;
1256
1266
  }
1257
- if (d.type === "select" && d.options?.select?.dataApi && d.options?.select?.dataApiConfig?.[n]) {
1258
- if (t.apiDataMap[d.key] && d.options?.select?.dataApiConfig?.once) return;
1259
- const m = (async () => {
1267
+ if (u.type === "select" && u.options?.select?.dataApi && u.options?.select?.dataApiConfig?.[n]) {
1268
+ if (l.apiDataMap[u.key] && u.options?.select?.dataApiConfig?.once) return;
1269
+ const f = (async () => {
1260
1270
  try {
1261
- let p = await d.options?.select?.dataApi?.();
1271
+ let p = await u.options?.select?.dataApi?.();
1262
1272
  if (p) {
1263
- const c = d.options?.select?.dataPath;
1264
- c && (p = ObjectUtil.getPathValue(p, c)), d.options.select.data = p, t.apiDataMap[d.key] = p;
1273
+ const c = u.options?.select?.dataPath;
1274
+ c && (p = ObjectUtil.getPathValue(p, c)), u.options.select.data = p, l.apiDataMap[u.key] = p;
1265
1275
  }
1266
1276
  } catch {
1267
1277
  }
1268
1278
  })();
1269
- e.push(m);
1279
+ e.push(f);
1270
1280
  }
1271
1281
  };
1272
- return o.option.column.forEach((d) => {
1273
- a(d);
1282
+ return t.option.column.forEach((u) => {
1283
+ a(u);
1274
1284
  }), await Promise.all(e), !0;
1275
1285
  },
1276
1286
  /** 初始化curd配置(option默认值合并等) */
1277
1287
  initCurdConfig: () => {
1278
1288
  const n = JSONUtil.cp(S.config);
1279
1289
  n.table.emptyText = g.tCurd("noData");
1280
- const e = ObjectUtil.deepMerge(n, o.option || {});
1290
+ const e = ObjectUtil.deepMerge(n, t.option || {});
1281
1291
  Object.keys(e).forEach((a) => {
1282
- o.option[a] = e[a];
1292
+ t.option[a] = e[a];
1283
1293
  });
1284
1294
  },
1285
1295
  /**
@@ -1297,149 +1307,149 @@ const W = $.EDialog, Se = (o) => {
1297
1307
  });
1298
1308
  const e = (a) => {
1299
1309
  if (a.table = ObjectUtil.deepMerge(n.table, a.table || {}), a.children) {
1300
- a.children.forEach((d) => {
1301
- e(d);
1310
+ a.children.forEach((u) => {
1311
+ e(u);
1302
1312
  });
1303
1313
  return;
1304
1314
  }
1305
- a.options = ObjectUtil.deepMerge(n.options, a.options || {}), a.form = ObjectUtil.deepMerge(n.form, a.form || {}), a.show = ObjectUtil.deepMerge(n.show, a.show || {}), a.sort = ObjectUtil.deepMerge(n.sort, a.sort || {}), a.type = a.type || n.type, a.type === "switch" && (a.options.switch.tableBeforeChange = async (d, m) => {
1315
+ a.options = ObjectUtil.deepMerge(n.options, a.options || {}), a.form = ObjectUtil.deepMerge(n.form, a.form || {}), a.show = ObjectUtil.deepMerge(n.show, a.show || {}), a.sort = ObjectUtil.deepMerge(n.sort, a.sort || {}), a.type = a.type || n.type, a.type === "switch" && (a.options.switch.tableBeforeChange = async (u, f) => {
1306
1316
  const p = a.options?.switch;
1307
1317
  try {
1308
1318
  await s.value?.open({
1309
1319
  title: g.tCurd("confirmModify"),
1310
1320
  content: g.tCurd("confirmSwitchMessage")
1311
- }), t.table.loading = !0;
1321
+ }), l.table.loading = !0;
1312
1322
  try {
1313
- return o.option.api.update ? (await o.option.api.update({
1314
- [o.option.table?.rowKey]: m[o.option.table?.rowKey],
1315
- [d]: m[d] === p.activeValue ? p.inactiveValue : p.activeValue,
1316
- final(c, i, u) {
1317
- t.table.loading = !1;
1323
+ return t.option.api.update ? (await t.option.api.update({
1324
+ [t.option.table?.rowKey]: f[t.option.table?.rowKey],
1325
+ [u]: f[u] === p.activeValue ? p.inactiveValue : p.activeValue,
1326
+ final(c, i, d) {
1327
+ l.table.loading = !1;
1318
1328
  }
1319
- }), t.table.loading = !1, $.success(g.tCurd("operationSuccess")), t.table.getList(), !0) : void 0;
1329
+ }), l.table.loading = !1, U.success(g.tCurd("operationSuccess")), l.table.getList(), !0) : void 0;
1320
1330
  } catch (c) {
1321
1331
  return console.error(c), !1;
1322
1332
  } finally {
1323
- t.table.loading = !1;
1333
+ l.table.loading = !1;
1324
1334
  }
1325
1335
  } catch {
1326
1336
  return !1;
1327
1337
  }
1328
- }), a.type === "tree-select" && (a.options.treeSelect.rowKey = o.option.table?.rowKey, a.options.treeSelect.nodeKey = o.option.table?.rowKey);
1338
+ }), a.type === "tree-select" && (a.options.treeSelect.rowKey = t.option.table?.rowKey, a.options.treeSelect.nodeKey = t.option.table?.rowKey);
1329
1339
  };
1330
- o.option.column.forEach(e), o.option.table?.column?.forEach(e);
1340
+ t.option.column.forEach(e), t.option.table?.column?.forEach(e);
1331
1341
  },
1332
1342
  /** 初始化配置并生成表单列及默认值及规则 */
1333
1343
  initColumnForm: () => {
1334
- const n = o.option;
1335
- t.update.formColumn = [], t.table.column.show = {
1344
+ const n = t.option;
1345
+ l.update.formColumn = [], l.table.column.show = {
1336
1346
  list: [],
1337
1347
  listSource: []
1338
1348
  };
1339
- const e = [], a = o.option.form?.maxSpan || 12, d = o.option.form?.defaultSpan || a / 2;
1340
- let m = [];
1341
- const p = (u) => {
1342
- if (u.children) {
1343
- t.table.column.show.list.push(u.key), u.children.forEach((h) => {
1344
- p(h);
1349
+ const e = [], a = t.option.form?.maxSpan || 12, u = t.option.form?.defaultSpan || a / 2;
1350
+ let f = [];
1351
+ const p = (d) => {
1352
+ if (d.children) {
1353
+ l.table.column.show.list.push(d.key), d.children.forEach((y) => {
1354
+ p(y);
1345
1355
  });
1346
1356
  return;
1347
1357
  }
1348
- if (t.update.formDefault[u.key] = u.value, u.table.table && (u.show.table && t.table.column.show.list.push(u.key), u.table.table && t.table.column.show.listSource.push(u.key)), u.isForm) {
1349
- u.form = u.form || { span: d }, u.form.span = u.form.span ?? d;
1350
- let h = u.form.span, I = m.reduce((z, N) => z + N.span, h);
1351
- const j = m.length;
1352
- if (m.push({ item: u, span: h }), (j === 1 && m[0].span === 0 || I >= a || h === 0 && j > 1) && (e.push(m), m = []), u.rules) {
1358
+ if (l.update.formDefault[d.key] = d.value, d.table.table && (d.show.table && l.table.column.show.list.push(d.key), d.table.table && l.table.column.show.listSource.push(d.key)), d.isForm) {
1359
+ d.form = d.form || { span: u }, d.form.span = d.form.span ?? u;
1360
+ let y = d.form.span, I = f.reduce((z, B) => z + B.span, y);
1361
+ const j = f.length;
1362
+ if (f.push({ item: d, span: y }), (j === 1 && f[0].span === 0 || I >= a || y === 0 && j > 1) && (e.push(f), f = []), d.rules) {
1353
1363
  const z = {
1354
1364
  input: g.tCurd("placeholderInput"),
1355
1365
  select: g.tCurd("placeholderSelect")
1356
- }, N = (z[u.type] || z.input) + u.label;
1357
- t.update.rules[u.key] = typeof u.rules == "boolean" ? [
1366
+ }, B = (z[d.type] || z.input) + d.label;
1367
+ l.update.rules[d.key] = typeof d.rules == "boolean" ? [
1358
1368
  {
1359
1369
  required: !0,
1360
- message: N,
1370
+ message: B,
1361
1371
  trigger: "blur"
1362
1372
  }
1363
- ] : u.rules;
1373
+ ] : d.rules;
1364
1374
  }
1365
1375
  }
1366
- }, c = (u, h) => {
1367
- u.isForm = h, Array.isArray(u.children) && u.children.forEach((I) => c(I, h));
1376
+ }, c = (d, y) => {
1377
+ d.isForm = y, Array.isArray(d.children) && d.children.forEach((I) => c(I, y));
1368
1378
  };
1369
- n.column.forEach((u) => {
1370
- u.isForm = !0, c(u, !0), p(u);
1371
- }), o.option.table?.column?.forEach((u) => {
1372
- c(u, !1), p(u);
1373
- }), t.search.column.list = n.column.concat(n.table?.column || []), t.table.column.list = t.search.column.list.filter((u) => u.table?.table), t.search.column.list.sort((u, h) => u.sort?.search - h.sort?.search), t.table.column.list.sort((u, h) => u.sort?.table - h.sort?.table), m.length > 0 && e.push(m), t.update.formColumn = e;
1374
- const i = o.option.search?.formDefault;
1375
- i && Object.keys(i).forEach((u) => {
1376
- t.search.formDefault[u] = i[u];
1377
- }), n.column.forEach((u) => {
1378
- u.show?.search || (t.search.formDefault[u.key] = void 0);
1379
- }), t.search.form = JSONUtil.cp(t.search.formDefault);
1379
+ n.column.forEach((d) => {
1380
+ d.isForm = !0, c(d, !0), p(d);
1381
+ }), t.option.table?.column?.forEach((d) => {
1382
+ c(d, !1), p(d);
1383
+ }), l.search.column.list = n.column.concat(n.table?.column || []), l.table.column.list = l.search.column.list.filter((d) => d.table?.table), l.search.column.list.sort((d, y) => d.sort?.search - y.sort?.search), l.table.column.list.sort((d, y) => d.sort?.table - y.sort?.table), f.length > 0 && e.push(f), l.update.formColumn = e;
1384
+ const i = t.option.search?.formDefault;
1385
+ i && Object.keys(i).forEach((d) => {
1386
+ l.search.formDefault[d] = i[d];
1387
+ }), n.column.forEach((d) => {
1388
+ d.show?.search || (l.search.formDefault[d.key] = void 0);
1389
+ }), l.search.form = JSONUtil.cp(l.search.formDefault);
1380
1390
  }
1381
1391
  });
1382
- return t.init(), ae(() => {
1383
- o.option.init !== !1 && t.table.getList();
1384
- }), { conf: t, switchConfirmRef: s, ruleFormRef: r };
1385
- }, Oe = { class: "dialog-footer" }, Fe = /* @__PURE__ */ K({
1392
+ return l.init(), ne(() => {
1393
+ t.option.init !== !1 && l.table.getList();
1394
+ }), { conf: l, switchConfirmRef: s, ruleFormRef: r };
1395
+ }, Oe = { class: "dialog-footer" }, Fe = /* @__PURE__ */ N({
1386
1396
  __name: "switchConfirm",
1387
- setup(o, { expose: s }) {
1388
- const r = A(!1), t = A("确认修改"), n = A("确认要修改状态吗?");
1397
+ setup(t, { expose: s }) {
1398
+ const r = K(!1), l = K("确认修改"), n = K("确认要修改状态吗?");
1389
1399
  let e = null, a = null;
1390
- const d = (c) => (c?.title && (t.value = c.title), c?.content && (n.value = c.content), r.value = !0, new Promise((i, u) => {
1391
- e = i, a = u;
1392
- })), m = () => {
1400
+ const u = (c) => (c?.title && (l.value = c.title), c?.content && (n.value = c.content), r.value = !0, new Promise((i, d) => {
1401
+ e = i, a = d;
1402
+ })), f = () => {
1393
1403
  r.value = !1, e?.(!0), e = null, a = null;
1394
1404
  }, p = () => {
1395
1405
  r.value = !1, a?.(new Error("用户取消操作")), e = null, a = null;
1396
1406
  };
1397
1407
  return s({
1398
- open: d
1399
- }), (c, i) => (f(), y(l(Y), {
1408
+ open: u
1409
+ }), (c, i) => (m(), b(o(Y), {
1400
1410
  modelValue: r.value,
1401
- "onUpdate:modelValue": i[0] || (i[0] = (u) => r.value = u),
1402
- title: t.value,
1411
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => r.value = d),
1412
+ title: l.value,
1403
1413
  "close-on-click-modal": !1,
1404
1414
  width: "400px"
1405
1415
  }, {
1406
- footer: b(() => [
1407
- D("span", Oe, [
1408
- v(l(F), { onClick: p }, {
1409
- default: b(() => [...i[1] || (i[1] = [
1416
+ footer: h(() => [
1417
+ $("span", Oe, [
1418
+ V(o(F), { onClick: p }, {
1419
+ default: h(() => [...i[1] || (i[1] = [
1410
1420
  E("取消", -1)
1411
1421
  ])]),
1412
1422
  _: 1
1413
1423
  }),
1414
- v(l(F), {
1424
+ V(o(F), {
1415
1425
  type: "primary",
1416
- onClick: m
1426
+ onClick: f
1417
1427
  }, {
1418
- default: b(() => [...i[2] || (i[2] = [
1428
+ default: h(() => [...i[2] || (i[2] = [
1419
1429
  E("确认", -1)
1420
1430
  ])]),
1421
1431
  _: 1
1422
1432
  })
1423
1433
  ])
1424
1434
  ]),
1425
- default: b(() => [
1426
- D("div", null, x(n.value), 1)
1435
+ default: h(() => [
1436
+ $("div", null, x(n.value), 1)
1427
1437
  ]),
1428
1438
  _: 1
1429
1439
  }, 8, ["modelValue", "title"]));
1430
1440
  }
1431
- }), re = (o, s) => {
1432
- const r = o.__vccOpts || o;
1433
- for (const [t, n] of s)
1434
- r[t] = n;
1441
+ }), re = (t, s) => {
1442
+ const r = t.__vccOpts || t;
1443
+ for (const [l, n] of s)
1444
+ r[l] = n;
1435
1445
  return r;
1436
1446
  }, Ie = {}, Me = {
1437
1447
  xmlns: "http://www.w3.org/2000/svg",
1438
1448
  viewBox: "0 0 1024 1024"
1439
1449
  };
1440
- function je(o, s) {
1441
- return f(), w("svg", Me, [...s[0] || (s[0] = [
1442
- D("path", {
1450
+ function je(t, s) {
1451
+ return m(), w("svg", Me, [...s[0] || (s[0] = [
1452
+ $("path", {
1443
1453
  fill: "currentColor",
1444
1454
  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"
1445
1455
  }, null, -1)
@@ -1450,183 +1460,202 @@ const Le = /* @__PURE__ */ re(Ie, [["render", je]]), ze = {}, Te = {
1450
1460
  xmlns: "http://www.w3.org/2000/svg",
1451
1461
  viewBox: "0 0 1024 1024"
1452
1462
  };
1453
- function Re(o, s) {
1454
- return f(), w("svg", Te, [...s[0] || (s[0] = [
1455
- D("path", {
1463
+ function Re(t, s) {
1464
+ return m(), w("svg", Te, [...s[0] || (s[0] = [
1465
+ $("path", {
1456
1466
  fill: "currentColor",
1457
1467
  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"
1458
1468
  }, null, -1)
1459
1469
  ])]);
1460
1470
  }
1461
- const Ae = /* @__PURE__ */ re(ze, [["render", Re]]), Pe = { class: "row flex-center table-header-label" }, Ke = { class: "table-header-tooltip" }, Ne = ["onClick"], Be = /* @__PURE__ */ K({
1471
+ const Ae = /* @__PURE__ */ re(ze, [["render", Re]]), Pe = { class: "row flex-center table-header-label" }, Ke = { class: "table-header-tooltip" }, Ne = ["onClick"], Be = /* @__PURE__ */ N({
1462
1472
  __name: "tableColumn",
1463
1473
  props: {
1464
1474
  conf: {},
1465
1475
  columnList: {},
1466
1476
  option: {}
1467
1477
  },
1468
- setup(o) {
1469
- const s = ce().type;
1470
- return (r, t) => {
1471
- const n = X("el-tooltip");
1472
- return f(!0), w(U, null, M(o.columnList, (e) => (f(), w(U, {
1473
- key: e.key
1478
+ setup(t) {
1479
+ const s = U.isFun, r = ye().type;
1480
+ return (l, n) => {
1481
+ const e = H("el-tooltip");
1482
+ return m(!0), w(D, null, M(t.columnList, (a) => (m(), w(D, {
1483
+ key: a.key
1474
1484
  }, [
1475
- o.conf.table.column.show.list.includes(e.key) ? (f(), y(l(Z), V({
1485
+ t.conf.table.column.show.list.includes(a.key) ? (m(), b(o(Z), C({
1476
1486
  key: 0,
1477
- prop: e.key,
1478
- label: e.label
1479
- }, { ref_for: !0 }, e.table), {
1480
- header: b(() => [
1481
- k(r.$slots, "table-header-" + e.key, { item: e }, () => [
1482
- D("div", Pe, [
1483
- e.table?.tooltip ? (f(), y(n, {
1487
+ prop: a.key,
1488
+ label: a.label
1489
+ }, { ref_for: !0 }, a.table), {
1490
+ header: h(() => [
1491
+ k(l.$slots, "table-header-" + a.key, { item: a }, () => [
1492
+ $("div", Pe, [
1493
+ a.table?.tooltip ? (m(), b(e, {
1484
1494
  key: 0,
1485
1495
  effect: "dark",
1486
- content: e.table?.tooltip,
1496
+ content: a.table?.tooltip,
1487
1497
  placement: "top"
1488
1498
  }, {
1489
- default: b(() => [
1490
- D("span", Ke, [
1491
- v(Ae)
1499
+ default: h(() => [
1500
+ $("span", Ke, [
1501
+ V(Ae)
1492
1502
  ])
1493
1503
  ]),
1494
1504
  _: 1
1495
- }, 8, ["content"])) : C("", !0),
1496
- E(" " + x(e.label), 1)
1505
+ }, 8, ["content"])) : v("", !0),
1506
+ E(" " + x(a.label), 1)
1497
1507
  ])
1498
1508
  ])
1499
1509
  ]),
1500
- default: b(({ row: a }) => [
1501
- e.children ? (f(), w(U, { key: 0 }, [
1502
- t[0] || (t[0] = E("   ", -1)),
1503
- (f(), y(H(l(s)), {
1504
- conf: o.conf,
1505
- columnList: e.children,
1506
- option: o.option
1507
- }, ie({ _: 2 }, [
1508
- M(r.$slots, (d, m) => ({
1509
- name: m,
1510
- fn: b((p) => [
1511
- k(r.$slots, m, V({ ref_for: !0 }, p || {}))
1510
+ default: h(({ row: u }) => [
1511
+ a.children ? (m(), w(D, { key: 0 }, [
1512
+ n[0] || (n[0] = E("   ", -1)),
1513
+ (m(), b(G(o(r)), {
1514
+ conf: t.conf,
1515
+ columnList: a.children,
1516
+ option: t.option
1517
+ }, se({ _: 2 }, [
1518
+ M(l.$slots, (f, p) => ({
1519
+ name: p,
1520
+ fn: h((c) => [
1521
+ k(l.$slots, p, C({ ref_for: !0 }, c || {}))
1512
1522
  ])
1513
1523
  }))
1514
1524
  ]), 1032, ["conf", "columnList", "option"]))
1515
- ], 64)) : (f(), w(U, { key: 1 }, [
1516
- e.show?.form && o.option.table?.inlineEdit && o.conf.inlineEdit.row === a && (e.type === "input" || e.type === "select") ? (f(), w(U, { key: 0 }, [
1517
- e.type === "input" ? (f(), y(l(q), V({
1525
+ ], 64)) : (m(), w(D, { key: 1 }, [
1526
+ o(s)(a.show?.form, t.conf.inlineEdit.form, o(U).EDialog.Update) && t.option.table?.inlineEdit && t.conf.inlineEdit.row === u && (a.type === "input" || a.type === "select") ? (m(), w(D, { key: 0 }, [
1527
+ a.type === "input" ? (m(), b(o(q), C({
1518
1528
  key: 0,
1519
- modelValue: o.conf.inlineEdit.form[e.key],
1520
- "onUpdate:modelValue": (d) => o.conf.inlineEdit.form[e.key] = d
1521
- }, { ref_for: !0 }, e.options?.input, {
1529
+ modelValue: t.conf.inlineEdit.form[a.key],
1530
+ "onUpdate:modelValue": (f) => t.conf.inlineEdit.form[a.key] = f
1531
+ }, { ref_for: !0 }, a.options?.input, {
1522
1532
  size: "small",
1523
1533
  style: { width: "100%" },
1524
- onKeyup: fe(o.conf.inlineEdit.submit, ["enter"])
1525
- }), null, 16, ["modelValue", "onUpdate:modelValue", "onKeyup"])) : e.type === "select" ? (f(), y(l(J), V({
1534
+ onKeyup: ge(t.conf.inlineEdit.submit, ["enter"])
1535
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "onKeyup"])) : a.type === "select" ? (m(), b(o(W), C({
1526
1536
  key: 1,
1527
- modelValue: o.conf.inlineEdit.form[e.key],
1528
- "onUpdate:modelValue": (d) => o.conf.inlineEdit.form[e.key] = d
1529
- }, { ref_for: !0 }, e.options?.select, {
1537
+ modelValue: t.conf.inlineEdit.form[a.key],
1538
+ "onUpdate:modelValue": (f) => t.conf.inlineEdit.form[a.key] = f
1539
+ }, { ref_for: !0 }, a.options?.select, {
1530
1540
  size: "small",
1531
1541
  style: { width: "100%" }
1532
1542
  }), {
1533
- default: b(() => [
1534
- (f(!0), w(U, null, M(e.options?.select?.data, (d) => (f(), y(l(P), {
1535
- key: d.value,
1536
- label: d.label,
1537
- value: d.value
1543
+ default: h(() => [
1544
+ (m(!0), w(D, null, M(a.options?.select?.data, (f) => (m(), b(o(P), {
1545
+ key: f.value,
1546
+ label: f.label,
1547
+ value: f.value
1538
1548
  }, null, 8, ["label", "value"]))), 128))
1539
1549
  ]),
1540
1550
  _: 2
1541
- }, 1040, ["modelValue", "onUpdate:modelValue"])) : C("", !0)
1542
- ], 64)) : k(r.$slots, "table-" + e.key, {
1551
+ }, 1040, ["modelValue", "onUpdate:modelValue"])) : v("", !0)
1552
+ ], 64)) : k(l.$slots, "table-" + a.key, {
1543
1553
  key: 1,
1544
- row: a,
1545
- item: e
1554
+ row: u,
1555
+ item: a
1546
1556
  }, () => [
1547
- e.type === "switch" ? (f(), y(l(ee), V({
1557
+ a.type === "switch" ? (m(), b(o(_), C({
1548
1558
  key: 0,
1549
- modelValue: a[e.key],
1550
- "onUpdate:modelValue": (d) => a[e.key] = d,
1551
- "before-change": () => e.options?.switch?.tableBeforeChange?.(e.key, a)
1552
- }, { ref_for: !0 }, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (f(), w("span", {
1559
+ modelValue: u[a.key],
1560
+ "onUpdate:modelValue": (f) => u[a.key] = f,
1561
+ "before-change": () => a.options?.switch?.tableBeforeChange?.(a.key, u)
1562
+ }, { ref_for: !0 }, a.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (m(), w("span", {
1553
1563
  key: 1,
1554
- style: ne({
1555
- "--table-text-click-color": e.table?.click?.color
1564
+ style: ie({
1565
+ "--table-text-click-color": a.table?.click?.color
1556
1566
  }),
1557
- class: T({ "table-text-click": e.table?.click?.callback }),
1558
- onClick: (d) => e.table?.click?.callback?.(a)
1559
- }, x(a[e.key]), 15, Ne))
1567
+ class: T({ "table-text-click": a.table?.click?.callback }),
1568
+ onClick: (f) => a.table?.click?.callback?.(u)
1569
+ }, x(a.table?.format ? a.table?.format(u) : u[a.key]), 15, Ne))
1560
1570
  ])
1561
1571
  ], 64))
1562
1572
  ]),
1563
1573
  _: 2
1564
- }, 1040, ["prop", "label"])) : C("", !0)
1574
+ }, 1040, ["prop", "label"])) : v("", !0)
1565
1575
  ], 64))), 128);
1566
1576
  };
1567
1577
  }
1568
- }), le = /* @__PURE__ */ K({
1578
+ }), le = /* @__PURE__ */ N({
1569
1579
  __name: "formColumn",
1570
1580
  props: {
1571
1581
  conf: {},
1572
1582
  item: {}
1573
1583
  },
1574
- setup(o) {
1575
- return (s, r) => o.item.item.type === "input" ? (f(), y(l(q), V({
1576
- key: 0,
1577
- modelValue: o.conf.update.form[o.item.item.key],
1578
- "onUpdate:modelValue": r[0] || (r[0] = (t) => o.conf.update.form[o.item.item.key] = t)
1579
- }, o.item.item.options?.input, O(o.item.item.options?.input?.on || {}), {
1580
- disabled: o.conf.update.getDisabled(o.item.item)
1581
- }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "switch" ? (f(), y(l(ee), V({
1582
- key: 1,
1583
- modelValue: o.conf.update.form[o.item.item.key],
1584
- "onUpdate:modelValue": r[1] || (r[1] = (t) => o.conf.update.form[o.item.item.key] = t)
1585
- }, o.item.item.options?.switch, {
1586
- disabled: o.conf.update.getDisabled(o.item.item)
1587
- }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "select" ? (f(), y(l(J), V({
1588
- key: 2,
1589
- modelValue: o.conf.update.form[o.item.item.key],
1590
- "onUpdate:modelValue": r[2] || (r[2] = (t) => o.conf.update.form[o.item.item.key] = t)
1591
- }, o.item.item.options?.select, O(o.item.item.options?.select?.on || {}), {
1592
- disabled: o.conf.update.getDisabled(o.item.item),
1593
- style: { width: "100%" }
1594
- }), {
1595
- default: b(() => [
1596
- (f(!0), w(U, null, M(o.item.item.options?.select?.data, (t) => (f(), y(l(P), {
1597
- key: t.value,
1598
- label: t.label,
1599
- value: t.value
1600
- }, null, 8, ["label", "value"]))), 128))
1601
- ]),
1602
- _: 1
1603
- }, 16, ["modelValue", "disabled"])) : o.item.item.type === "list" ? (f(), y(oe, V({
1604
- key: 3,
1605
- row: o.conf.update.form,
1606
- field: o.item.item.key
1607
- }, o.item.item.options?.list, O(o.item.item.options?.list?.on || {}), {
1608
- disabled: o.conf.update.getDisabled(o.item.item),
1609
- style: { width: "100%" }
1610
- }), null, 16, ["row", "field", "disabled"])) : o.item.item.type === "tree-select" ? (f(), y(l(se), V({
1611
- key: 4,
1612
- modelValue: o.conf.update.form[o.item.item.key],
1613
- "onUpdate:modelValue": r[3] || (r[3] = (t) => o.conf.update.form[o.item.item.key] = t)
1614
- }, o.item.item.options?.treeSelect, O(o.item.item.options?.treeSelect?.on || {}), {
1615
- disabled: o.conf.update.getDisabled(o.item.item),
1616
- style: { width: "100%" }
1617
- }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "datetime" ? (f(), y(l(te), V({
1618
- key: 5,
1619
- modelValue: o.conf.update.form[o.item.item.key],
1620
- "onUpdate:modelValue": r[4] || (r[4] = (t) => o.conf.update.form[o.item.item.key] = t)
1621
- }, o.item.item.options?.datetime, O(o.item.item.options?.datetime?.on || {}), {
1622
- disabled: o.conf.update.getDisabled(o.item.item)
1623
- }), null, 16, ["modelValue", "disabled"])) : o.item.item.type && l(L).customComponent[o.item.item.type] ? (f(), y(H(l(L).customComponent[o.item.item.type]), V({
1624
- key: 6,
1625
- modelValue: o.conf.update.form[o.item.item.key],
1626
- "onUpdate:modelValue": r[5] || (r[5] = (t) => o.conf.update.form[o.item.item.key] = t)
1627
- }, o.item.item.options?.[o.item.item.type], O(o.item.item.options?.[o.item.item.type]?.on || {}), {
1628
- disabled: o.conf.update.getDisabled(o.item.item)
1629
- }), null, 16, ["modelValue", "disabled"])) : C("", !0);
1584
+ setup(t) {
1585
+ return (s, r) => {
1586
+ const l = H("el-radio"), n = H("el-radio-group");
1587
+ return t.item.item.type === "input" ? (m(), b(o(q), C({
1588
+ key: 0,
1589
+ modelValue: t.conf.update.form[t.item.item.key],
1590
+ "onUpdate:modelValue": r[0] || (r[0] = (e) => t.conf.update.form[t.item.item.key] = e)
1591
+ }, t.item.item.options?.input, O(t.item.item.options?.input?.on || {}), {
1592
+ disabled: t.conf.update.getDisabled(t.item.item)
1593
+ }), null, 16, ["modelValue", "disabled"])) : t.item.item.type === "switch" ? (m(), b(o(_), C({
1594
+ key: 1,
1595
+ modelValue: t.conf.update.form[t.item.item.key],
1596
+ "onUpdate:modelValue": r[1] || (r[1] = (e) => t.conf.update.form[t.item.item.key] = e)
1597
+ }, t.item.item.options?.switch, {
1598
+ disabled: t.conf.update.getDisabled(t.item.item)
1599
+ }), null, 16, ["modelValue", "disabled"])) : t.item.item.type === "select" ? (m(), b(o(W), C({
1600
+ key: 2,
1601
+ modelValue: t.conf.update.form[t.item.item.key],
1602
+ "onUpdate:modelValue": r[2] || (r[2] = (e) => t.conf.update.form[t.item.item.key] = e)
1603
+ }, t.item.item.options?.select, O(t.item.item.options?.select?.on || {}), {
1604
+ disabled: t.conf.update.getDisabled(t.item.item),
1605
+ style: { width: "100%" }
1606
+ }), {
1607
+ default: h(() => [
1608
+ (m(!0), w(D, null, M(t.item.item.options?.select?.data, (e) => (m(), b(o(P), {
1609
+ key: e.value,
1610
+ label: e.label,
1611
+ value: e.value
1612
+ }, null, 8, ["label", "value"]))), 128))
1613
+ ]),
1614
+ _: 1
1615
+ }, 16, ["modelValue", "disabled"])) : t.item.item.type === "radio" ? (m(), b(n, C({
1616
+ key: 3,
1617
+ modelValue: t.conf.update.form[t.item.item.key],
1618
+ "onUpdate:modelValue": r[3] || (r[3] = (e) => t.conf.update.form[t.item.item.key] = e)
1619
+ }, t.item.item.options?.radio, O(t.item.item.options?.radio?.on || {}), {
1620
+ disabled: t.conf.update.getDisabled(t.item.item),
1621
+ style: { width: "100%" }
1622
+ }), {
1623
+ default: h(() => [
1624
+ (m(!0), w(D, null, M(t.item.item.options?.radio?.data, (e) => (m(), b(l, {
1625
+ key: e.value,
1626
+ label: e.label,
1627
+ value: e.value
1628
+ }, null, 8, ["label", "value"]))), 128))
1629
+ ]),
1630
+ _: 1
1631
+ }, 16, ["modelValue", "disabled"])) : t.item.item.type === "list" ? (m(), b(oe, C({
1632
+ key: 4,
1633
+ row: t.conf.update.form,
1634
+ field: t.item.item.key
1635
+ }, t.item.item.options?.list, O(t.item.item.options?.list?.on || {}), {
1636
+ disabled: t.conf.update.getDisabled(t.item.item),
1637
+ style: { width: "100%" }
1638
+ }), null, 16, ["row", "field", "disabled"])) : t.item.item.type === "tree-select" ? (m(), b(o(ae), C({
1639
+ key: 5,
1640
+ modelValue: t.conf.update.form[t.item.item.key],
1641
+ "onUpdate:modelValue": r[4] || (r[4] = (e) => t.conf.update.form[t.item.item.key] = e)
1642
+ }, t.item.item.options?.treeSelect, O(t.item.item.options?.treeSelect?.on || {}), {
1643
+ disabled: t.conf.update.getDisabled(t.item.item),
1644
+ style: { width: "100%" }
1645
+ }), null, 16, ["modelValue", "disabled"])) : t.item.item.type === "datetime" ? (m(), b(o(ee), C({
1646
+ key: 6,
1647
+ modelValue: t.conf.update.form[t.item.item.key],
1648
+ "onUpdate:modelValue": r[5] || (r[5] = (e) => t.conf.update.form[t.item.item.key] = e)
1649
+ }, t.item.item.options?.datetime, O(t.item.item.options?.datetime?.on || {}), {
1650
+ disabled: t.conf.update.getDisabled(t.item.item)
1651
+ }), null, 16, ["modelValue", "disabled"])) : t.item.item.type && o(L).customComponent[t.item.item.type] ? (m(), b(G(o(L).customComponent[t.item.item.type]), C({
1652
+ key: 7,
1653
+ modelValue: t.conf.update.form[t.item.item.key],
1654
+ "onUpdate:modelValue": r[6] || (r[6] = (e) => t.conf.update.form[t.item.item.key] = e)
1655
+ }, t.item.item.options?.[t.item.item.type], O(t.item.item.options?.[t.item.item.type]?.on || {}), {
1656
+ disabled: t.conf.update.getDisabled(t.item.item)
1657
+ }), null, 16, ["modelValue", "disabled"])) : v("", !0);
1658
+ };
1630
1659
  }
1631
1660
  }), Je = { class: "col relative cc1-form-box" }, We = {
1632
1661
  class: "absolute row fit",
@@ -1646,7 +1675,7 @@ const Ae = /* @__PURE__ */ re(ze, [["render", Re]]), Pe = { class: "row flex-cen
1646
1675
  }, nt = { class: "col" }, it = {
1647
1676
  class: "row form-item-content",
1648
1677
  style: { width: "100%" }
1649
- }, st = { class: "col" }, rt = { class: "dialog-footer" }, dt = { class: "dialog-footer" }, ut = /* @__PURE__ */ K({
1678
+ }, st = { class: "col" }, rt = { class: "dialog-footer" }, dt = { class: "dialog-footer" }, ut = /* @__PURE__ */ N({
1650
1679
  __name: "index",
1651
1680
  props: {
1652
1681
  /**
@@ -1656,198 +1685,198 @@ const Ae = /* @__PURE__ */ re(ze, [["render", Re]]), Pe = { class: "row flex-cen
1656
1685
  default: {}
1657
1686
  }
1658
1687
  },
1659
- setup(o, { expose: s }) {
1660
- const r = $.EDialog, t = o, n = $.isFun, { conf: e, switchConfirmRef: a, ruleFormRef: d } = Se(t);
1688
+ setup(t, { expose: s }) {
1689
+ const r = U.EDialog, l = t, n = U.isFun, { conf: e, switchConfirmRef: a, ruleFormRef: u } = Se(l);
1661
1690
  return s({
1662
1691
  conf: e
1663
- }), (m, p) => {
1664
- const c = me("loading");
1665
- return f(), w("div", Je, [
1666
- D("div", We, [
1667
- k(m.$slots, "box-left"),
1668
- D("div", He, [
1669
- o.option.search?.show !== !1 ? (f(), w("div", qe, [
1670
- v(l(Q), {
1671
- model: l(e).search.form,
1692
+ }), (f, p) => {
1693
+ const c = we("loading");
1694
+ return m(), w("div", Je, [
1695
+ $("div", We, [
1696
+ k(f.$slots, "box-left"),
1697
+ $("div", He, [
1698
+ t.option.search?.show !== !1 ? (m(), w("div", qe, [
1699
+ V(o(Q), {
1700
+ model: o(e).search.form,
1672
1701
  inline: ""
1673
1702
  }, {
1674
- default: b(() => [
1675
- k(m.$slots, "search-start", {
1676
- row: l(e).search.form
1703
+ default: h(() => [
1704
+ k(f.$slots, "search-start", {
1705
+ row: o(e).search.form
1677
1706
  }),
1678
- (f(!0), w(U, null, M(l(e).search.column.list, (i) => (f(), w(U, {
1707
+ (m(!0), w(D, null, M(o(e).search.column.list, (i) => (m(), w(D, {
1679
1708
  key: i.key
1680
1709
  }, [
1681
- (typeof i.show?.search == "function" ? i.show?.search(l(e).search.form) : i.show?.search) ? (f(), y(l(B), {
1710
+ (typeof i.show?.search == "function" ? i.show?.search(o(e).search.form) : i.show?.search) ? (m(), b(o(J), {
1682
1711
  key: 0,
1683
1712
  label: typeof i.text?.search?.label == "string" ? i.text?.search?.label : i.label,
1684
1713
  class: T({
1685
1714
  "hide-label": typeof i.text?.search?.label == "boolean" ? !i.text?.search?.label : !1
1686
1715
  })
1687
1716
  }, {
1688
- default: b(() => [
1689
- k(m.$slots, "search-" + i.key, {
1690
- row: l(e).search.form
1717
+ default: h(() => [
1718
+ k(f.$slots, "search-" + i.key, {
1719
+ row: o(e).search.form
1691
1720
  }, () => [
1692
- i.type === "input" ? (f(), y(l(q), V({
1721
+ i.type === "input" ? (m(), b(o(q), C({
1693
1722
  key: 0,
1694
- modelValue: l(e).search.form[i.key],
1695
- "onUpdate:modelValue": (u) => l(e).search.form[i.key] = u,
1696
- placeholder: l(e).search.getPlaceholder(i),
1723
+ modelValue: o(e).search.form[i.key],
1724
+ "onUpdate:modelValue": (d) => o(e).search.form[i.key] = d,
1725
+ placeholder: o(e).search.getPlaceholder(i),
1697
1726
  clearable: "",
1698
1727
  disabled: i.disabled?.search
1699
- }, { ref_for: !0 }, i.options?.input, O(i.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "switch" ? (f(), y(l(J), V({
1728
+ }, { ref_for: !0 }, i.options?.input, O(i.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "switch" ? (m(), b(o(W), C({
1700
1729
  key: 1,
1701
- modelValue: l(e).search.form[i.key],
1702
- "onUpdate:modelValue": (u) => l(e).search.form[i.key] = u,
1703
- placeholder: l(e).search.getPlaceholder(i, l(g).tCurd("placeholderSelect")),
1730
+ modelValue: o(e).search.form[i.key],
1731
+ "onUpdate:modelValue": (d) => o(e).search.form[i.key] = d,
1732
+ placeholder: o(e).search.getPlaceholder(i, o(g).tCurd("placeholderSelect")),
1704
1733
  clearable: "",
1705
1734
  disabled: i.disabled?.search
1706
1735
  }, { ref_for: !0 }, i.options?.switch, O(i.options?.switch?.on || {})), {
1707
- default: b(() => [
1708
- (f(), y(l(P), {
1736
+ default: h(() => [
1737
+ (m(), b(o(P), {
1709
1738
  key: i.options?.switch?.activeValue,
1710
1739
  label: i.options?.switch?.activeLabel,
1711
1740
  value: i.options?.switch?.activeValue
1712
1741
  }, null, 8, ["label", "value"])),
1713
- (f(), y(l(P), {
1742
+ (m(), b(o(P), {
1714
1743
  key: i.options?.switch?.inactiveValue,
1715
1744
  label: i.options?.switch?.inactiveLabel,
1716
1745
  value: i.options?.switch?.inactiveValue
1717
1746
  }, null, 8, ["label", "value"]))
1718
1747
  ]),
1719
1748
  _: 2
1720
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "select" ? (f(), y(l(J), V({
1749
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "select" ? (m(), b(o(W), C({
1721
1750
  key: 2,
1722
- modelValue: l(e).search.form[i.key],
1723
- "onUpdate:modelValue": (u) => l(e).search.form[i.key] = u,
1724
- placeholder: l(e).search.getPlaceholder(i, l(g).tCurd("placeholderSelect")),
1751
+ modelValue: o(e).search.form[i.key],
1752
+ "onUpdate:modelValue": (d) => o(e).search.form[i.key] = d,
1753
+ placeholder: o(e).search.getPlaceholder(i, o(g).tCurd("placeholderSelect")),
1725
1754
  clearable: "",
1726
1755
  disabled: i.disabled?.search
1727
1756
  }, { ref_for: !0 }, i.options?.select, O(i.options?.select?.on || {})), {
1728
- default: b(() => [
1729
- (f(!0), w(U, null, M(i.options?.select?.data, (u) => (f(), y(l(P), {
1730
- key: u.value,
1731
- label: u.label,
1732
- value: u.value
1757
+ default: h(() => [
1758
+ (m(!0), w(D, null, M(i.options?.select?.data, (d) => (m(), b(o(P), {
1759
+ key: d.value,
1760
+ label: d.label,
1761
+ value: d.value
1733
1762
  }, null, 8, ["label", "value"]))), 128))
1734
1763
  ]),
1735
1764
  _: 2
1736
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "datetime" ? (f(), y(l(te), V({
1765
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "datetime" ? (m(), b(o(ee), C({
1737
1766
  key: 3,
1738
- modelValue: l(e).search.form[i.key],
1739
- "onUpdate:modelValue": (u) => l(e).search.form[i.key] = u
1767
+ modelValue: o(e).search.form[i.key],
1768
+ "onUpdate:modelValue": (d) => o(e).search.form[i.key] = d
1740
1769
  }, { ref_for: !0 }, i.options?.datetime, O(i.options?.datetime?.on || {}), {
1741
1770
  disabled: i.disabled?.search
1742
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type && l(L).customComponent[i.type] ? (f(), y(H(l(L).customComponent[i.type]), V({
1771
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type && o(L).customComponent[i.type] ? (m(), b(G(o(L).customComponent[i.type]), C({
1743
1772
  key: 4,
1744
- modelValue: l(e).search.form[i.key],
1745
- "onUpdate:modelValue": (u) => l(e).search.form[i.key] = u
1773
+ modelValue: o(e).search.form[i.key],
1774
+ "onUpdate:modelValue": (d) => o(e).search.form[i.key] = d
1746
1775
  }, { ref_for: !0 }, i.options?.[i.type], O(i.options?.[i.type]?.on || {}), {
1747
1776
  disabled: i.disabled?.search
1748
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
1777
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
1749
1778
  ]),
1750
- k(m.$slots, "search-" + i.key + "-right", {
1751
- row: l(e).search.form
1779
+ k(f.$slots, "search-" + i.key + "-right", {
1780
+ row: o(e).search.form
1752
1781
  })
1753
1782
  ]),
1754
1783
  _: 2
1755
- }, 1032, ["label", "class"])) : C("", !0)
1784
+ }, 1032, ["label", "class"])) : v("", !0)
1756
1785
  ], 64))), 128)),
1757
- k(m.$slots, "search-center", {
1758
- row: l(e).search.form
1786
+ k(f.$slots, "search-center", {
1787
+ row: o(e).search.form
1759
1788
  }),
1760
- o.option.tools?.search || o.option.tools?.reset ? (f(), y(l(B), { key: 0 }, {
1761
- default: b(() => [
1762
- o.option.tools?.search ? (f(), y(l(F), {
1789
+ t.option.tools?.search || t.option.tools?.reset ? (m(), b(o(J), { key: 0 }, {
1790
+ default: h(() => [
1791
+ t.option.tools?.search ? (m(), b(o(F), {
1763
1792
  key: 0,
1764
1793
  type: "primary",
1765
- onClick: l(e).search.submit
1794
+ onClick: o(e).search.submit
1766
1795
  }, {
1767
- default: b(() => [
1768
- E(x(l(g).tCurd("search")), 1)
1796
+ default: h(() => [
1797
+ E(x(o(g).tCurd("search")), 1)
1769
1798
  ]),
1770
1799
  _: 1
1771
- }, 8, ["onClick"])) : C("", !0),
1772
- o.option.tools?.reset ? (f(), y(l(F), {
1800
+ }, 8, ["onClick"])) : v("", !0),
1801
+ t.option.tools?.reset ? (m(), b(o(F), {
1773
1802
  key: 1,
1774
- onClick: l(e).search.reset
1803
+ onClick: o(e).search.reset
1775
1804
  }, {
1776
- default: b(() => [
1777
- E(x(l(g).tCurd("reset")), 1)
1805
+ default: h(() => [
1806
+ E(x(o(g).tCurd("reset")), 1)
1778
1807
  ]),
1779
1808
  _: 1
1780
- }, 8, ["onClick"])) : C("", !0)
1809
+ }, 8, ["onClick"])) : v("", !0)
1781
1810
  ]),
1782
1811
  _: 1
1783
- })) : C("", !0),
1784
- k(m.$slots, "search-end", {
1785
- row: l(e).search.form
1812
+ })) : v("", !0),
1813
+ k(f.$slots, "search-end", {
1814
+ row: o(e).search.form
1786
1815
  })
1787
1816
  ]),
1788
1817
  _: 3
1789
1818
  }, 8, ["model"])
1790
- ])) : C("", !0),
1791
- D("div", Ge, [
1792
- D("div", Xe, [
1793
- l(n)(o.option.tools?.add) ? (f(), w("div", Qe, [
1794
- v(l(F), {
1819
+ ])) : v("", !0),
1820
+ $("div", Ge, [
1821
+ $("div", Xe, [
1822
+ o(n)(t.option.tools?.add) ? (m(), w("div", Qe, [
1823
+ V(o(F), {
1795
1824
  type: "primary",
1796
- onClick: p[0] || (p[0] = (i) => l(e).update.open(l(r).Insert))
1825
+ onClick: p[0] || (p[0] = (i) => o(e).update.open(o(r).Insert))
1797
1826
  }, {
1798
- default: b(() => [
1799
- E(x(l(g).tCurd("add")), 1)
1827
+ default: h(() => [
1828
+ E(x(o(g).tCurd("add")), 1)
1800
1829
  ]),
1801
1830
  _: 1
1802
1831
  })
1803
- ])) : C("", !0),
1804
- o.option.table?.selectable && l(n)(o.option.tools?.delete) ? (f(), w("div", Ye, [
1805
- v(l(F), {
1832
+ ])) : v("", !0),
1833
+ t.option.table?.selectable && o(n)(t.option.tools?.delete) ? (m(), w("div", Ye, [
1834
+ V(o(F), {
1806
1835
  type: "danger",
1807
- onClick: p[1] || (p[1] = (i) => l(e).remove.open(l(e).table.selection.list))
1836
+ onClick: p[1] || (p[1] = (i) => o(e).remove.open(o(e).table.selection.list))
1808
1837
  }, {
1809
- default: b(() => [
1810
- E(x(l(g).tCurd("delete")), 1)
1838
+ default: h(() => [
1839
+ E(x(o(g).tCurd("delete")), 1)
1811
1840
  ]),
1812
1841
  _: 1
1813
1842
  })
1814
- ])) : C("", !0),
1815
- o.option.tools?.expand ? (f(), w("div", Ze, [
1816
- v(l(F), {
1843
+ ])) : v("", !0),
1844
+ t.option.tools?.expand ? (m(), w("div", Ze, [
1845
+ V(o(F), {
1817
1846
  type: "warning",
1818
- onClick: p[2] || (p[2] = (i) => l(e).table.expand.all())
1847
+ onClick: p[2] || (p[2] = (i) => o(e).table.expand.all())
1819
1848
  }, {
1820
- default: b(() => [
1821
- E(x(l(g).tCurd("expandCollapse")), 1)
1849
+ default: h(() => [
1850
+ E(x(o(g).tCurd("expandCollapse")), 1)
1822
1851
  ]),
1823
1852
  _: 1
1824
1853
  })
1825
- ])) : C("", !0),
1826
- o.option.tools?.export?.show ? (f(), y(l(we), {
1854
+ ])) : v("", !0),
1855
+ t.option.tools?.export?.show ? (m(), b(o(fe), {
1827
1856
  key: 3,
1828
- onCommand: l(e).export.click
1857
+ onCommand: o(e).export.click
1829
1858
  }, {
1830
- dropdown: b(() => [
1831
- v(l(ke), null, {
1832
- default: b(() => [
1833
- o.option.table?.selectable ? (f(), y(l(G), {
1859
+ dropdown: h(() => [
1860
+ V(o(me), null, {
1861
+ default: h(() => [
1862
+ t.option.table?.selectable ? (m(), b(o(X), {
1834
1863
  key: 0,
1835
1864
  command: "select"
1836
1865
  }, {
1837
- default: b(() => [
1838
- E(x(l(g).tCurd("exportSelect")), 1)
1866
+ default: h(() => [
1867
+ E(x(o(g).tCurd("exportSelect")), 1)
1839
1868
  ]),
1840
1869
  _: 1
1841
- })) : C("", !0),
1842
- v(l(G), { command: "page" }, {
1843
- default: b(() => [
1844
- E(x(l(g).tCurd("exportPage")), 1)
1870
+ })) : v("", !0),
1871
+ V(o(X), { command: "page" }, {
1872
+ default: h(() => [
1873
+ E(x(o(g).tCurd("exportPage")), 1)
1845
1874
  ]),
1846
1875
  _: 1
1847
1876
  }),
1848
- v(l(G), { command: "all" }, {
1849
- default: b(() => [
1850
- E(x(l(g).tCurd("exportAll")), 1)
1877
+ V(o(X), { command: "all" }, {
1878
+ default: h(() => [
1879
+ E(x(o(g).tCurd("exportAll")), 1)
1851
1880
  ]),
1852
1881
  _: 1
1853
1882
  })
@@ -1855,344 +1884,356 @@ const Ae = /* @__PURE__ */ re(ze, [["render", Re]]), Pe = { class: "row flex-cen
1855
1884
  _: 1
1856
1885
  })
1857
1886
  ]),
1858
- default: b(() => [
1859
- D("div", _e, [
1860
- v(l(F), {
1887
+ default: h(() => [
1888
+ $("div", _e, [
1889
+ V(o(F), {
1861
1890
  type: "warning",
1862
- loading: l(e).export.loading
1891
+ loading: o(e).export.loading
1863
1892
  }, {
1864
- default: b(() => [
1865
- E(x(l(g).tCurd("export")), 1)
1893
+ default: h(() => [
1894
+ E(x(o(g).tCurd("export")), 1)
1866
1895
  ]),
1867
1896
  _: 1
1868
1897
  }, 8, ["loading"])
1869
1898
  ])
1870
1899
  ]),
1871
1900
  _: 1
1872
- }, 8, ["onCommand"])) : C("", !0),
1873
- k(m.$slots, "tools-left")
1901
+ }, 8, ["onCommand"])) : v("", !0),
1902
+ k(f.$slots, "tools-left")
1874
1903
  ]),
1875
- D("div", et, [
1876
- k(m.$slots, "tools-right"),
1877
- o.option.tools?.refresh === void 0 || o.option.tools?.refresh ? (f(), w("div", {
1904
+ $("div", et, [
1905
+ k(f.$slots, "tools-right"),
1906
+ t.option.tools?.refresh === void 0 || t.option.tools?.refresh ? (m(), w("div", {
1878
1907
  key: 0,
1879
1908
  class: "refresh-btn",
1880
1909
  onClick: p[3] || (p[3] = //@ts-ignore
1881
- (...i) => l(e).table.getList && l(e).table.getList(...i))
1910
+ (...i) => o(e).table.getList && o(e).table.getList(...i))
1882
1911
  }, [
1883
- v(Le)
1884
- ])) : C("", !0)
1912
+ V(Le)
1913
+ ])) : v("", !0)
1885
1914
  ])
1886
1915
  ]),
1887
- D("div", tt, [
1888
- D("div", ot, [
1889
- pe((f(), y(l(Ce), V({
1890
- data: l(e).table.data,
1891
- border: o.option.table?.border === void 0 ? !0 : o.option.table?.border
1892
- }, o.option.table, {
1893
- onSelectionChange: l(e).table.selection.change,
1894
- "expand-row-keys": l(e).table.expand.rowKeys,
1895
- onExpandChange: l(e).table.expand.change
1916
+ $("div", tt, [
1917
+ $("div", ot, [
1918
+ ke((m(), b(o(pe), C({
1919
+ data: o(e).table.data,
1920
+ border: t.option.table?.border === void 0 ? !0 : t.option.table?.border
1921
+ }, t.option.table, {
1922
+ onSelectionChange: o(e).table.selection.change,
1923
+ "expand-row-keys": o(e).table.expand.rowKeys,
1924
+ onExpandChange: o(e).table.expand.change
1896
1925
  }), {
1897
- default: b(() => [
1898
- o.option.table?.selectable || l(n)(o.option.tools?.delete) || o.option.tools?.export?.show ? (f(), y(l(Z), {
1926
+ default: h(() => [
1927
+ t.option.table?.selectable || o(n)(t.option.tools?.delete) || t.option.tools?.export?.show ? (m(), b(o(Z), {
1899
1928
  key: 0,
1900
1929
  type: "selection",
1901
- selectable: typeof o.option.table?.selectable == "function" ? o.option.table?.selectable : void 0,
1930
+ selectable: typeof t.option.table?.selectable == "function" ? t.option.table?.selectable : void 0,
1902
1931
  width: "55"
1903
- }, null, 8, ["selectable"])) : C("", !0),
1904
- v(Be, {
1905
- conf: l(e),
1906
- columnList: l(e).table.column.list,
1907
- option: o.option
1908
- }, ie({ _: 2 }, [
1909
- M(m.$slots, (i, u) => ({
1910
- name: u,
1911
- fn: b((h) => [
1912
- k(m.$slots, u, he(be(h || {})))
1932
+ }, null, 8, ["selectable"])) : v("", !0),
1933
+ V(Be, {
1934
+ conf: o(e),
1935
+ columnList: o(e).table.column.list,
1936
+ option: t.option
1937
+ }, se({ _: 2 }, [
1938
+ M(f.$slots, (i, d) => ({
1939
+ name: d,
1940
+ fn: h((y) => [
1941
+ k(f.$slots, d, ve(Ce(y || {})))
1913
1942
  ])
1914
1943
  }))
1915
1944
  ]), 1032, ["conf", "columnList", "option"]),
1916
- l(n)(o.option.table?.add) || l(n)(o.option.table?.update) || l(n)(o.option.table?.delete) || m.$slots["table-op-left"] || m.$slots["table-op-right"] ? (f(), y(l(Z), V({
1945
+ o(n)(t.option.table?.add) || o(n)(t.option.table?.update) || o(n)(t.option.table?.delete) || o(n)(t.option.table?.view) || f.$slots["table-op-left"] || f.$slots["table-op-right"] ? (m(), b(o(Z), C({
1917
1946
  key: 1,
1918
- width: l(e).table.op.width(l(n)(o.option.table?.add), l(n)(o.option.table?.update), l(n)(o.option.table?.delete), m.$slots["table-op-left"], m.$slots["table-op-right"]),
1947
+ width: o(e).table.op.width(o(n)(t.option.table?.add), o(n)(t.option.table?.update), o(n)(t.option.table?.delete), o(n)(t.option.table?.view), f.$slots["table-op-left"], f.$slots["table-op-right"]),
1919
1948
  align: "center",
1920
1949
  fixed: "right"
1921
- }, o.option.table?.operate), {
1922
- header: b(() => [
1923
- k(m.$slots, "table-header-op", {}, () => [
1924
- E(x(l(g).tCurd("operation")), 1)
1950
+ }, t.option.table?.operate), {
1951
+ header: h(() => [
1952
+ k(f.$slots, "table-header-op", {}, () => [
1953
+ E(x(o(g).tCurd("operation")), 1)
1925
1954
  ])
1926
1955
  ]),
1927
- default: b(({ row: i }) => [
1928
- k(m.$slots, "table-op-left", { row: i }),
1929
- o.option.table?.inlineEdit && l(e).inlineEdit.row === i ? (f(), w(U, { key: 0 }, [
1930
- v(l(F), {
1956
+ default: h(({ row: i }) => [
1957
+ k(f.$slots, "table-op-left", { row: i }),
1958
+ t.option.table?.inlineEdit && o(e).inlineEdit.row === i ? (m(), w(D, { key: 0 }, [
1959
+ V(o(F), {
1931
1960
  link: "",
1932
1961
  type: "info",
1933
- onClick: l(e).inlineEdit.close
1962
+ onClick: o(e).inlineEdit.close
1934
1963
  }, {
1935
- default: b(() => [
1936
- E(x(l(g).tCurd("cancel")), 1)
1964
+ default: h(() => [
1965
+ E(x(o(g).tCurd("cancel")), 1)
1937
1966
  ]),
1938
1967
  _: 1
1939
1968
  }, 8, ["onClick"]),
1940
- v(l(F), {
1969
+ V(o(F), {
1941
1970
  link: "",
1942
1971
  type: "primary",
1943
- onClick: l(e).inlineEdit.submit,
1944
- loading: l(e).inlineEdit.loading
1972
+ onClick: o(e).inlineEdit.submit,
1973
+ loading: o(e).inlineEdit.loading
1945
1974
  }, {
1946
- default: b(() => [
1947
- E(x(l(g).tCurd("confirm")), 1)
1975
+ default: h(() => [
1976
+ E(x(o(g).tCurd("confirm")), 1)
1948
1977
  ]),
1949
1978
  _: 1
1950
1979
  }, 8, ["onClick", "loading"]),
1951
- k(m.$slots, "table-op-edit-right", { row: i })
1952
- ], 64)) : (f(), w(U, { key: 1 }, [
1953
- l(n)(o.option.table?.add, i) ? (f(), y(l(F), {
1980
+ k(f.$slots, "table-op-edit-right", { row: i })
1981
+ ], 64)) : (m(), w(D, { key: 1 }, [
1982
+ o(n)(t.option.table?.add, i) ? (m(), b(o(F), {
1954
1983
  key: 0,
1955
1984
  link: "",
1956
1985
  type: "primary",
1957
- onClick: (u) => l(e).update.open(l(r).Insert, i)
1986
+ onClick: (d) => o(e).update.open(o(r).Insert, i)
1958
1987
  }, {
1959
- default: b(() => [
1960
- E(x(l(g).tCurd("add")), 1)
1988
+ default: h(() => [
1989
+ E(x(o(g).tCurd("add")), 1)
1961
1990
  ]),
1962
1991
  _: 1
1963
- }, 8, ["onClick"])) : C("", !0),
1964
- l(n)(o.option.table?.update, i) ? (f(), y(l(F), {
1992
+ }, 8, ["onClick"])) : v("", !0),
1993
+ o(n)(t.option.table?.view, i) ? (m(), b(o(F), {
1965
1994
  key: 1,
1966
1995
  link: "",
1967
- type: "warning",
1968
- onClick: (u) => l(e).update.open(l(r).Update, i)
1996
+ type: "primary",
1997
+ onClick: (d) => o(e).update.open(o(r).View, i)
1969
1998
  }, {
1970
- default: b(() => [
1971
- E(x(l(g).tCurd("edit")), 1)
1999
+ default: h(() => [
2000
+ E(x(o(g).tCurd("view")), 1)
1972
2001
  ]),
1973
2002
  _: 1
1974
- }, 8, ["onClick"])) : C("", !0),
1975
- l(n)(o.option.table?.delete, i) ? (f(), y(l(F), {
2003
+ }, 8, ["onClick"])) : v("", !0),
2004
+ o(n)(t.option.table?.update, i) ? (m(), b(o(F), {
1976
2005
  key: 2,
1977
2006
  link: "",
2007
+ type: "warning",
2008
+ onClick: (d) => o(e).update.open(o(r).Update, i)
2009
+ }, {
2010
+ default: h(() => [
2011
+ E(x(o(g).tCurd("edit")), 1)
2012
+ ]),
2013
+ _: 1
2014
+ }, 8, ["onClick"])) : v("", !0),
2015
+ o(n)(t.option.table?.delete, i) ? (m(), b(o(F), {
2016
+ key: 3,
2017
+ link: "",
1978
2018
  type: "danger",
1979
- onClick: (u) => l(e).remove.open([i])
2019
+ onClick: (d) => o(e).remove.open([i])
1980
2020
  }, {
1981
- default: b(() => [
1982
- E(x(l(g).tCurd("delete")), 1)
2021
+ default: h(() => [
2022
+ E(x(o(g).tCurd("delete")), 1)
1983
2023
  ]),
1984
2024
  _: 1
1985
- }, 8, ["onClick"])) : C("", !0),
1986
- k(m.$slots, "table-op-right", { row: i })
2025
+ }, 8, ["onClick"])) : v("", !0),
2026
+ k(f.$slots, "table-op-right", { row: i })
1987
2027
  ], 64))
1988
2028
  ]),
1989
2029
  _: 3
1990
- }, 16, ["width"])) : C("", !0)
2030
+ }, 16, ["width"])) : v("", !0)
1991
2031
  ]),
1992
2032
  _: 3
1993
2033
  }, 16, ["data", "border", "onSelectionChange", "expand-row-keys", "onExpandChange"])), [
1994
- [c, l(e).table.loading]
2034
+ [c, o(e).table.loading]
1995
2035
  ])
1996
2036
  ])
1997
2037
  ]),
1998
- D("div", lt, [
1999
- o.option.page?.show === void 0 || o.option.page?.show ? (f(), y(l(ve), {
2038
+ $("div", lt, [
2039
+ t.option.page?.show === void 0 || t.option.page?.show ? (m(), b(o(he), {
2000
2040
  key: 0,
2001
- "current-page": l(e).page.num,
2002
- "onUpdate:currentPage": p[4] || (p[4] = (i) => l(e).page.num = i),
2003
- "page-size": l(e).page.size,
2004
- "onUpdate:pageSize": p[5] || (p[5] = (i) => l(e).page.size = i),
2041
+ "current-page": o(e).page.num,
2042
+ "onUpdate:currentPage": p[4] || (p[4] = (i) => o(e).page.num = i),
2043
+ "page-size": o(e).page.size,
2044
+ "onUpdate:pageSize": p[5] || (p[5] = (i) => o(e).page.size = i),
2005
2045
  background: "",
2006
- "page-sizes": l(e).page.sizeList,
2046
+ "page-sizes": o(e).page.sizeList,
2007
2047
  "pager-count": 7,
2008
- layout: l(e).page.layout,
2009
- total: l(e).page.total,
2010
- onSizeChange: l(e).table.getList,
2011
- onCurrentChange: l(e).table.getList
2012
- }, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total", "onSizeChange", "onCurrentChange"])) : C("", !0)
2048
+ layout: o(e).page.layout,
2049
+ total: o(e).page.total,
2050
+ onSizeChange: o(e).table.getList,
2051
+ onCurrentChange: o(e).table.getList
2052
+ }, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total", "onSizeChange", "onCurrentChange"])) : v("", !0)
2013
2053
  ])
2014
2054
  ]),
2015
- k(m.$slots, "box-right")
2055
+ k(f.$slots, "box-right")
2016
2056
  ]),
2017
- v(l(Y), V({
2018
- modelValue: l(e).update.show,
2019
- "onUpdate:modelValue": p[6] || (p[6] = (i) => l(e).update.show = i),
2020
- title: l(e).update.title,
2021
- "before-close": l(e).update.close
2022
- }, o.option.dialog), {
2023
- footer: b(() => [
2024
- D("span", rt, [
2025
- v(l(F), {
2026
- onClick: l(e).update.close
2057
+ V(o(Y), C({
2058
+ modelValue: o(e).update.show,
2059
+ "onUpdate:modelValue": p[6] || (p[6] = (i) => o(e).update.show = i),
2060
+ title: o(e).update.title,
2061
+ "before-close": o(e).update.close
2062
+ }, t.option.dialog), {
2063
+ footer: h(() => [
2064
+ $("span", rt, [
2065
+ V(o(F), {
2066
+ onClick: o(e).update.close
2027
2067
  }, {
2028
- default: b(() => [
2029
- E(x(l(g).tCurd("close")), 1)
2068
+ default: h(() => [
2069
+ E(x(o(g).tCurd("close")), 1)
2030
2070
  ]),
2031
2071
  _: 1
2032
2072
  }, 8, ["onClick"]),
2033
- v(l(F), {
2073
+ o(e).update.type !== o(r).View ? (m(), b(o(F), {
2074
+ key: 0,
2034
2075
  type: "primary",
2035
- onClick: l(e).update.submit,
2036
- loading: l(e).update.loading
2076
+ onClick: o(e).update.submit,
2077
+ loading: o(e).update.loading
2037
2078
  }, {
2038
- default: b(() => [
2039
- E(x(l(g).tCurd("submit")), 1)
2079
+ default: h(() => [
2080
+ E(x(o(g).tCurd("submit")), 1)
2040
2081
  ]),
2041
2082
  _: 1
2042
- }, 8, ["onClick", "loading"])
2083
+ }, 8, ["onClick", "loading"])) : v("", !0)
2043
2084
  ])
2044
2085
  ]),
2045
- default: b(() => [
2046
- v(l(Q), {
2086
+ default: h(() => [
2087
+ V(o(Q), {
2047
2088
  ref_key: "ruleFormRef",
2048
- ref: d,
2049
- model: l(e).update.form,
2050
- rules: l(e).update.rules
2089
+ ref: u,
2090
+ model: o(e).update.form,
2091
+ rules: o(e).update.rules
2051
2092
  }, {
2052
- default: b(() => [
2053
- l(e).update.showContent ? (f(!0), w(U, { key: 0 }, M(l(e).update.formColumn, (i) => (f(), w(U, null, [
2054
- l(n)(() => {
2055
- const u = [], h = (I) => {
2093
+ default: h(() => [
2094
+ o(e).update.showContent ? (m(!0), w(D, { key: 0 }, M(o(e).update.formColumn, (i) => (m(), w(D, null, [
2095
+ o(n)(() => {
2096
+ const d = [], y = (I) => {
2056
2097
  if (I.children)
2057
- return h(I.children);
2058
- u.push(...I.map((j) => j.item.show?.form));
2098
+ return y(I.children);
2099
+ d.push(...I.map((j) => j.item.show?.form));
2059
2100
  };
2060
- return h(i), u;
2061
- }, l(e).update.form) ? (f(), w("div", {
2101
+ return y(i), d;
2102
+ }, o(e).update.form, o(e).update.type) ? (m(), w("div", {
2062
2103
  key: 0,
2063
2104
  class: T(["row curd-row", {
2064
- stripe: o.option.form?.stripe === void 0 ? !0 : o.option.form?.stripe
2105
+ stripe: t.option.form?.stripe === void 0 ? !0 : t.option.form?.stripe
2065
2106
  }])
2066
2107
  }, [
2067
- k(m.$slots, "form-start", {
2068
- row: l(e).update.form
2108
+ k(f.$slots, "form-start", {
2109
+ row: o(e).update.form
2069
2110
  }),
2070
- (f(!0), w(U, null, M(i, (u) => (f(), w(U, null, [
2071
- l(n)(u.item.show?.form, l(e).update.form) ? (f(), w("div", {
2111
+ (m(!0), w(D, null, M(i, (d) => (m(), w(D, null, [
2112
+ o(n)(d.item.show?.form, o(e).update.form) ? (m(), w("div", {
2072
2113
  key: 0,
2073
- class: T(u.item.form.span > 0 ? `col-${u.item.form.span}` : "col")
2114
+ class: T(d.item.form.span > 0 ? `col-${d.item.form.span}` : "col")
2074
2115
  }, [
2075
- u.item.children ? (f(!0), w(U, { key: 0 }, M(u.children, (h) => (f(), y(l(B), {
2116
+ d.item.children ? (m(!0), w(D, { key: 0 }, M(d.children, (y) => (m(), b(o(J), {
2076
2117
  class: T({
2077
- "hide-label": typeof h.item.text?.form?.label == "boolean" ? !h.item.text?.form?.label : !1
2118
+ "hide-label": typeof y.item.text?.form?.label == "boolean" ? !y.item.text?.form?.label : !1
2078
2119
  }),
2079
- label: typeof h.item.text?.form?.label == "string" ? h.item.text?.form?.label : h.item.label,
2080
- prop: h.item.key,
2081
- "label-width": h.item.form?.labelWidth || "100px"
2120
+ label: typeof y.item.text?.form?.label == "string" ? y.item.text?.form?.label : y.item.label,
2121
+ prop: y.item.key,
2122
+ "label-width": y.item.form?.labelWidth || "100px"
2082
2123
  }, {
2083
- default: b(() => [
2084
- D("div", at, [
2085
- k(m.$slots, "form-" + h.item.key + "-start", {
2086
- row: l(e).update.form,
2087
- item: h.item
2124
+ default: h(() => [
2125
+ $("div", at, [
2126
+ k(f.$slots, "form-" + y.item.key + "-start", {
2127
+ row: o(e).update.form,
2128
+ item: y.item
2088
2129
  }),
2089
- D("div", nt, [
2090
- k(m.$slots, "form-" + h.item.key, {
2091
- row: l(e).update.form,
2092
- item: h.item
2130
+ $("div", nt, [
2131
+ k(f.$slots, "form-" + y.item.key, {
2132
+ row: o(e).update.form,
2133
+ item: y.item
2093
2134
  }, () => [
2094
- v(le, {
2095
- conf: l(e),
2096
- item: u
2135
+ V(le, {
2136
+ conf: o(e),
2137
+ item: d
2097
2138
  }, null, 8, ["conf", "item"])
2098
2139
  ]),
2099
- k(m.$slots, "form-" + h.item.key + "-right", {
2100
- row: l(e).update.form,
2101
- item: h.item
2140
+ k(f.$slots, "form-" + y.item.key + "-right", {
2141
+ row: o(e).update.form,
2142
+ item: y.item
2102
2143
  })
2103
2144
  ]),
2104
- k(m.$slots, "form-" + h.item.key + "-end", {
2105
- row: l(e).update.form,
2106
- item: h.item
2145
+ k(f.$slots, "form-" + y.item.key + "-end", {
2146
+ row: o(e).update.form,
2147
+ item: y.item
2107
2148
  })
2108
2149
  ])
2109
2150
  ]),
2110
2151
  _: 2
2111
- }, 1032, ["class", "label", "prop", "label-width"]))), 256)) : (f(), y(l(B), {
2152
+ }, 1032, ["class", "label", "prop", "label-width"]))), 256)) : (m(), b(o(J), {
2112
2153
  key: 1,
2113
2154
  class: T({
2114
- "hide-label": typeof u.item.text?.form?.label == "boolean" ? !u.item.text?.form?.label : !1
2155
+ "hide-label": typeof d.item.text?.form?.label == "boolean" ? !d.item.text?.form?.label : !1
2115
2156
  }),
2116
- label: typeof u.item.text?.form?.label == "string" ? u.item.text?.form?.label : u.item.label,
2117
- prop: u.item.key,
2118
- "label-width": u.item.form?.labelWidth || "100px"
2157
+ label: typeof d.item.text?.form?.label == "string" ? d.item.text?.form?.label : d.item.label,
2158
+ prop: d.item.key,
2159
+ "label-width": d.item.form?.labelWidth || "100px"
2119
2160
  }, {
2120
- default: b(() => [
2121
- D("div", it, [
2122
- k(m.$slots, "form-" + u.item.key + "-start", {
2123
- row: l(e).update.form,
2124
- item: u.item
2161
+ default: h(() => [
2162
+ $("div", it, [
2163
+ k(f.$slots, "form-" + d.item.key + "-start", {
2164
+ row: o(e).update.form,
2165
+ item: d.item
2125
2166
  }),
2126
- D("div", st, [
2127
- k(m.$slots, "form-" + u.item.key, {
2128
- row: l(e).update.form,
2129
- item: u.item
2167
+ $("div", st, [
2168
+ k(f.$slots, "form-" + d.item.key, {
2169
+ row: o(e).update.form,
2170
+ item: d.item
2130
2171
  }, () => [
2131
- v(le, {
2132
- conf: l(e),
2133
- item: u
2172
+ V(le, {
2173
+ conf: o(e),
2174
+ item: d
2134
2175
  }, null, 8, ["conf", "item"])
2135
2176
  ]),
2136
- k(m.$slots, "form-" + u.item.key + "-right", {
2137
- row: l(e).update.form,
2138
- item: u.item
2177
+ k(f.$slots, "form-" + d.item.key + "-right", {
2178
+ row: o(e).update.form,
2179
+ item: d.item
2139
2180
  })
2140
2181
  ]),
2141
- k(m.$slots, "form-" + u.item.key + "-end", {
2142
- row: l(e).update.form,
2143
- item: u.item
2182
+ k(f.$slots, "form-" + d.item.key + "-end", {
2183
+ row: o(e).update.form,
2184
+ item: d.item
2144
2185
  })
2145
2186
  ])
2146
2187
  ]),
2147
2188
  _: 2
2148
2189
  }, 1032, ["class", "label", "prop", "label-width"]))
2149
- ], 2)) : C("", !0)
2190
+ ], 2)) : v("", !0)
2150
2191
  ], 64))), 256)),
2151
- k(m.$slots, "form-end", {
2152
- row: l(e).update.form
2192
+ k(f.$slots, "form-end", {
2193
+ row: o(e).update.form
2153
2194
  })
2154
- ], 2)) : C("", !0)
2155
- ], 64))), 256)) : C("", !0)
2195
+ ], 2)) : v("", !0)
2196
+ ], 64))), 256)) : v("", !0)
2156
2197
  ]),
2157
2198
  _: 3
2158
2199
  }, 8, ["model", "rules"])
2159
2200
  ]),
2160
2201
  _: 3
2161
2202
  }, 16, ["modelValue", "title", "before-close"]),
2162
- v(l(Y), {
2163
- modelValue: l(e).remove.show,
2164
- "onUpdate:modelValue": p[7] || (p[7] = (i) => l(e).remove.show = i),
2165
- title: l(e).remove.title,
2203
+ V(o(Y), {
2204
+ modelValue: o(e).remove.show,
2205
+ "onUpdate:modelValue": p[7] || (p[7] = (i) => o(e).remove.show = i),
2206
+ title: o(e).remove.title,
2166
2207
  "close-on-click-modal": !1
2167
2208
  }, {
2168
- footer: b(() => [
2169
- D("span", dt, [
2170
- v(l(F), {
2171
- onClick: l(e).remove.close
2209
+ footer: h(() => [
2210
+ $("span", dt, [
2211
+ V(o(F), {
2212
+ onClick: o(e).remove.close
2172
2213
  }, {
2173
- default: b(() => [
2174
- E(x(l(g).tCurd("close")), 1)
2214
+ default: h(() => [
2215
+ E(x(o(g).tCurd("close")), 1)
2175
2216
  ]),
2176
2217
  _: 1
2177
2218
  }, 8, ["onClick"]),
2178
- v(l(F), {
2219
+ V(o(F), {
2179
2220
  type: "danger",
2180
- onClick: l(e).remove.submit,
2181
- loading: l(e).remove.loading
2221
+ onClick: o(e).remove.submit,
2222
+ loading: o(e).remove.loading
2182
2223
  }, {
2183
- default: b(() => [
2184
- E(x(l(g).tCurd("confirmDelete")), 1)
2224
+ default: h(() => [
2225
+ E(x(o(g).tCurd("confirmDelete")), 1)
2185
2226
  ]),
2186
2227
  _: 1
2187
2228
  }, 8, ["onClick", "loading"])
2188
2229
  ])
2189
2230
  ]),
2190
- default: b(() => [
2191
- D("div", null, x(l(g).tCurd("confirmDeleteMessage", l(e).remove.items.length)), 1)
2231
+ default: h(() => [
2232
+ $("div", null, x(o(g).tCurd("confirmDeleteMessage", o(e).remove.items.length)), 1)
2192
2233
  ]),
2193
2234
  _: 1
2194
2235
  }, 8, ["modelValue", "title"]),
2195
- v(Fe, {
2236
+ V(Fe, {
2196
2237
  ref_key: "switchConfirmRef",
2197
2238
  ref: a
2198
2239
  }, null, 512)
@@ -2208,8 +2249,8 @@ class pt {
2208
2249
  * @param name - 下载后的文件名,默认 `'download.png'`
2209
2250
  */
2210
2251
  static async download(s, r = "download.png") {
2211
- const t = document.createElement("a");
2212
- t.style.display = "none", t.href = s, t.setAttribute("download", r), typeof t.download > "u" && t.setAttribute("target", "_blank"), document.body.appendChild(t), t.click(), document.body.removeChild(t), window.URL.revokeObjectURL(s);
2252
+ const l = document.createElement("a");
2253
+ l.style.display = "none", l.href = s, l.setAttribute("download", r), typeof l.download > "u" && l.setAttribute("target", "_blank"), document.body.appendChild(l), l.click(), document.body.removeChild(l), window.URL.revokeObjectURL(s);
2213
2254
  }
2214
2255
  /**
2215
2256
  * 将json对象或者json数组导出为json文件保存
@@ -2217,7 +2258,7 @@ class pt {
2217
2258
  * @param name
2218
2259
  */
2219
2260
  static exportJSONFile = (s, r) => {
2220
- const t = new Blob([JSON.stringify(s)], { type: "application/json" }), n = URL.createObjectURL(t), e = document.createElement("a");
2261
+ const l = new Blob([JSON.stringify(s)], { type: "application/json" }), n = URL.createObjectURL(l), e = document.createElement("a");
2221
2262
  e.href = n, e.download = `${r || "config"}.json`, e.click();
2222
2263
  };
2223
2264
  /**
@@ -2225,31 +2266,31 @@ class pt {
2225
2266
  * @param param
2226
2267
  * @returns
2227
2268
  */
2228
- static importFile = async (s) => new Promise((r, t) => {
2269
+ static importFile = async (s) => new Promise((r, l) => {
2229
2270
  const n = document.createElement("input");
2230
2271
  n.type = "file";
2231
2272
  const e = s?.accept || ".json";
2232
2273
  n.accept = e, n.style.display = "none", n.onchange = (a) => {
2233
- const d = a.target.files[0];
2234
- if (!d) {
2235
- $.fail("未选择文件"), t("未选择文件");
2274
+ const u = a.target.files[0];
2275
+ if (!u) {
2276
+ U.fail("未选择文件"), l("未选择文件");
2236
2277
  return;
2237
2278
  }
2238
- const m = new FileReader();
2239
- m.onload = async (p) => {
2279
+ const f = new FileReader();
2280
+ f.onload = async (p) => {
2240
2281
  const c = e == ".json" ? JSON.parse(p.target.result) : p.target.result;
2241
2282
  r(c);
2242
- }, m.onerror = () => {
2243
- $.fail("文件读取失败"), t("文件读取失败");
2244
- }, m.readAsText(d), document.body.removeChild(n);
2283
+ }, f.onerror = () => {
2284
+ U.fail("文件读取失败"), l("文件读取失败");
2285
+ }, f.readAsText(u), document.body.removeChild(n);
2245
2286
  }, document.body.appendChild(n), n.click();
2246
2287
  });
2247
2288
  }
2248
- const ct = (o, s) => {
2249
- if (o.component("TCurd", ut), o.component("TFormList", oe), o.component("TColumn", De), s?.customComponent) {
2289
+ const ct = (t, s) => {
2290
+ if (t.component("TCurd", ut), t.component("TFormList", oe), t.component("TColumn", De), s?.customComponent) {
2250
2291
  L.customComponent = s.customComponent;
2251
2292
  for (const r in s.customComponent)
2252
- o.component(r, s.customComponent[r]);
2293
+ t.component(r, s.customComponent[r]);
2253
2294
  }
2254
2295
  }, ht = {
2255
2296
  install: ct
@@ -2264,7 +2305,7 @@ export {
2264
2305
  S as TFormConfig,
2265
2306
  g as TFormI18n,
2266
2307
  oe as TFormList,
2267
- $ as TSys,
2308
+ U as TSys,
2268
2309
  ht as default,
2269
2310
  ct as install
2270
2311
  };