cc1-form 1.1.4 → 1.1.5

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,6 +1,6 @@
1
- import { defineComponent as J, reactive as Q, onMounted as te, resolveComponent as ee, createElementBlock as k, createCommentVNode as C, openBlock as c, renderSlot as V, createElementVNode as E, createVNode as v, withCtx as h, createTextVNode as x, Fragment as $, renderList as j, createBlock as g, normalizeClass as z, normalizeStyle as ne, ref as R, nextTick as re, unref as r, mergeProps as U, toHandlers as T, resolveDynamicComponent as oe, toDisplayString as D, resolveDirective as ie, withDirectives as de } from "vue";
2
- import { ElMessage as ue, ElLoading as ce, ElForm as H, ElFormItem as A, ElInput as G, ElSwitch as q, ElSelect as B, ElOption as N, ElTreeSelect as le, ElDatePicker as ae, ElDialog as X, ElButton as O, ElDropdown as pe, ElDropdownMenu as fe, ElDropdownItem as W, ElTable as me, ElTableColumn as K, ElPagination as he } from "element-plus";
3
- class S {
1
+ import { defineComponent as B, reactive as Q, onMounted as te, resolveComponent as ee, createElementBlock as k, createCommentVNode as C, openBlock as c, renderSlot as x, createElementVNode as U, createVNode as v, withCtx as h, createTextVNode as D, Fragment as O, renderList as T, createBlock as g, normalizeClass as M, normalizeStyle as ne, ref as z, nextTick as re, unref as r, mergeProps as S, toHandlers as R, resolveDynamicComponent as oe, toDisplayString as E, resolveDirective as ie, withDirectives as de } from "vue";
2
+ import { ElMessage as ue, ElLoading as ce, ElForm as H, ElFormItem as N, ElInput as G, ElSwitch as q, ElSelect as A, ElOption as K, ElTreeSelect as le, ElDatePicker as ae, ElDialog as X, ElButton as F, ElDropdown as pe, ElDropdownMenu as fe, ElDropdownItem as J, ElTable as me, ElTableColumn as W, ElPagination as he } from "element-plus";
3
+ class $ {
4
4
  /**
5
5
  * 路由
6
6
  */
@@ -41,9 +41,9 @@ class S {
41
41
  * @param module
42
42
  */
43
43
  static loadModule = async (n) => {
44
- if (!S.moduleObj[n])
44
+ if (!$.moduleObj[n])
45
45
  throw new Error(`模块${n}未加载,请赋值如:TSys.moduleObj = { ${n}: ()=>import('${n}') }`);
46
- const d = await S.moduleObj[n]();
46
+ const d = await $.moduleObj[n]();
47
47
  return d.default ?? d;
48
48
  };
49
49
  /**
@@ -135,7 +135,7 @@ class S {
135
135
  */
136
136
  static getImgPic = (n) => new Promise(async (d, a) => {
137
137
  let f = document.getElementById(n.id);
138
- const m = await S.loadModule("html2canvas");
138
+ const m = await $.loadModule("html2canvas");
139
139
  try {
140
140
  m(f, {
141
141
  logging: !1,
@@ -156,7 +156,7 @@ class S {
156
156
  }
157
157
  });
158
158
  }
159
- class F {
159
+ class V {
160
160
  /** 全局分页字段 */
161
161
  static pageField = {
162
162
  num: "num",
@@ -170,6 +170,8 @@ class F {
170
170
  size: "size",
171
171
  total: "total"
172
172
  };
173
+ /** 表格行键 - 默认_id */
174
+ static tableRowKey = "_id";
173
175
  /**
174
176
  * 自定义组件
175
177
  */
@@ -202,7 +204,7 @@ class F {
202
204
  )
203
205
  */
204
206
  static setOptionsData = (n, d, a) => {
205
- const f = F.findOptions(n, d);
207
+ const f = V.findOptions(n, d);
206
208
  f && (f.data = a);
207
209
  };
208
210
  static form = {
@@ -215,12 +217,12 @@ class F {
215
217
  * @param option 组件配置
216
218
  */
217
219
  parentId: (n, d, a, f) => {
218
- n ? d.type === S.EDialog.Insert ? (d.form.parentId = n._id, d.form.sort = n.children.length + 1) : d.form.parentId = n.parentId.substring(n.parentId.lastIndexOf(",") + 1) : (d.form.parentId = "0", d.form.sort = a.length + 1), F.setOptionsData(f, "parentId", [{ _id: "0", title: "根", children: a }]);
220
+ n ? d.type === $.EDialog.Insert ? (d.form.parentId = n._id, d.form.sort = n.children.length + 1) : d.form.parentId = n.parentId.substring(n.parentId.lastIndexOf(",") + 1) : (d.form.parentId = "0", d.form.sort = a.length + 1), V.setOptionsData(f, "parentId", [{ _id: "0", title: "根", children: a }]);
219
221
  }
220
222
  }
221
223
  };
222
224
  }
223
- class L {
225
+ class j {
224
226
  /**
225
227
  * 获取id函数-可以直接覆盖
226
228
  */
@@ -235,7 +237,7 @@ class L {
235
237
  a.forEach((m) => {
236
238
  let u = m.default ?? "";
237
239
  m.type === "number" && (u = m.default ?? 0), m.type === "boolean" && (u = m.default ?? !1), m.type === "time" && (u = m.default ?? /* @__PURE__ */ new Date()), f[m.value] === void 0 && (f[m.value] = u);
238
- }), f._id || (f._id = L.getIdFun());
240
+ }), f._id || (f._id = j.getIdFun());
239
241
  });
240
242
  };
241
243
  /**
@@ -247,13 +249,13 @@ class L {
247
249
  */
248
250
  static add = (n, d, a, f) => {
249
251
  const m = JSONUtil.cp(a);
250
- L.setId(n, d, a), d[n].push(
252
+ j.setId(n, d, a), d[n].push(
251
253
  m.reduce(
252
254
  (u, e) => {
253
255
  let s = e.default ?? "";
254
256
  return e.type === "number" && (s = e.default ?? 0), e.type === "boolean" && (s = e.default ?? !1), e.type === "time" && (s = e.default ?? /* @__PURE__ */ new Date()), u[e.value] = s, u;
255
257
  },
256
- { _id: L.getIdFun() }
258
+ { _id: j.getIdFun() }
257
259
  )
258
260
  ), f?.(d);
259
261
  };
@@ -276,7 +278,7 @@ class L {
276
278
  static getNoIdData = (n, d) => {
277
279
  const a = JSONUtil.cp(n);
278
280
  return a.forEach((f) => {
279
- f._id && delete f._id, d && f[d] && L.getNoIdData(f[d], d);
281
+ f._id && delete f._id, d && f[d] && j.getNoIdData(f[d], d);
280
282
  }), a;
281
283
  };
282
284
  }
@@ -287,7 +289,7 @@ const be = {
287
289
  }, ye = {
288
290
  class: "row items-center",
289
291
  style: { gap: "10px", width: "100%" }
290
- }, Y = /* @__PURE__ */ J({
292
+ }, Y = /* @__PURE__ */ B({
291
293
  __name: "list",
292
294
  props: {
293
295
  row: {
@@ -326,50 +328,50 @@ const be = {
326
328
  const d = p, a = Q({
327
329
  show: !1,
328
330
  add: (m, u, e) => {
329
- L.add(m, u, e, () => {
331
+ j.add(m, u, e, () => {
330
332
  f("change");
331
333
  });
332
334
  },
333
335
  remove: (m, u, e) => {
334
- L.remove(m, u, e, () => {
336
+ j.remove(m, u, e, () => {
335
337
  f("change");
336
338
  });
337
339
  }
338
340
  });
339
341
  te(() => {
340
- L.setId(d.field, d.row, d.itemFields), a.show = !0;
342
+ j.setId(d.field, d.row, d.itemFields), a.show = !0;
341
343
  });
342
344
  const f = n;
343
345
  return (m, u) => {
344
346
  const e = ee("el-button"), s = ee("el-input");
345
347
  return a.show ? (c(), k("div", be, [
346
- V(m.$slots, "list-start", { row: p.row }),
347
- E("div", null, [
348
+ x(m.$slots, "list-start", { row: p.row }),
349
+ U("div", null, [
348
350
  v(e, {
349
351
  link: "",
350
352
  type: "primary",
351
353
  onClick: u[0] || (u[0] = (i) => a.add(p.field, p.row, p.itemFields))
352
354
  }, {
353
355
  default: h(() => [...u[2] || (u[2] = [
354
- x("添加", -1)
356
+ D("添加", -1)
355
357
  ])]),
356
358
  _: 1
357
359
  })
358
360
  ]),
359
- (c(!0), k($, null, j(p.row[p.field], (i) => (c(), k("div", ye, [
360
- V(m.$slots, "item-start", {
361
+ (c(!0), k(O, null, T(p.row[p.field], (i) => (c(), k("div", ye, [
362
+ x(m.$slots, "item-start", {
361
363
  item: i,
362
364
  row: p.row
363
365
  }),
364
- (c(!0), k($, null, j(p.itemFields, (o) => (c(), g(s, {
366
+ (c(!0), k(O, null, T(p.itemFields, (o) => (c(), g(s, {
365
367
  modelValue: i[o.value],
366
368
  "onUpdate:modelValue": (t) => i[o.value] = t,
367
369
  style: ne({ width: p.inputWidth }),
368
- class: z(p.inputClass),
370
+ class: M(p.inputClass),
369
371
  placeholder: o[p.label] || o[p.value],
370
372
  onChange: u[1] || (u[1] = (t) => f("change"))
371
373
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
372
- V(m.$slots, "item-end", {
374
+ x(m.$slots, "item-end", {
373
375
  item: i,
374
376
  row: p.row
375
377
  }),
@@ -379,16 +381,16 @@ const be = {
379
381
  onClick: (o) => a.remove(p.field, p.row, i)
380
382
  }, {
381
383
  default: h(() => [...u[3] || (u[3] = [
382
- x("删除", -1)
384
+ D("删除", -1)
383
385
  ])]),
384
386
  _: 1
385
387
  }, 8, ["onClick"])
386
388
  ]))), 256)),
387
- V(m.$slots, "list-end", { row: p.row })
389
+ x(m.$slots, "list-end", { row: p.row })
388
390
  ])) : C("", !0);
389
391
  };
390
392
  }
391
- }), ge = { class: "row curd-row" }, we = /* @__PURE__ */ J({
393
+ }), ge = { class: "row curd-row" }, we = /* @__PURE__ */ B({
392
394
  __name: "column",
393
395
  props: {
394
396
  /**
@@ -405,7 +407,7 @@ const be = {
405
407
  }
406
408
  },
407
409
  setup(p, { expose: n }) {
408
- const d = S.isFun, a = S.EDialog, f = R(), m = p, u = Q({
410
+ const d = $.isFun, a = $.EDialog, f = z(), m = p, u = Q({
409
411
  rules: {},
410
412
  show: !0,
411
413
  form: {},
@@ -420,9 +422,9 @@ const be = {
420
422
  const l = (b) => {
421
423
  if (u.formDefault[b.key] = b.value, b.isForm) {
422
424
  b.form = b.form || { span: o }, b.form.span = b.form.span ?? o;
423
- let _ = b.form.span, y = t.reduce((M, P) => M + P.span, _);
424
- const I = t.length;
425
- t.push({ item: b, span: _ }), (I === 1 && t[0].span === 0 || y >= i || _ === 0 && I > 1) && (s.push(t), t = []), b.rules && (u.rules[b.key] = b.rules);
425
+ let I = b.form.span, y = t.reduce((L, P) => L + P.span, I);
426
+ const _ = t.length;
427
+ t.push({ item: b, span: I }), (_ === 1 && t[0].span === 0 || y >= i || I === 0 && _ > 1) && (s.push(t), t = []), b.rules && (u.rules[b.key] = b.rules);
426
428
  }
427
429
  };
428
430
  e.column.forEach((b) => {
@@ -443,86 +445,86 @@ const be = {
443
445
  rules: u.rules
444
446
  }, {
445
447
  default: h(() => [
446
- u.show ? (c(!0), k($, { key: 0 }, j(u.formColumn, (i) => (c(), k("div", ge, [
447
- V(e.$slots, "form-start", {
448
+ u.show ? (c(!0), k(O, { key: 0 }, T(u.formColumn, (i) => (c(), k("div", ge, [
449
+ x(e.$slots, "form-start", {
448
450
  row: u.form
449
451
  }),
450
- (c(!0), k($, null, j(i, (o) => (c(), k($, null, [
452
+ (c(!0), k(O, null, T(i, (o) => (c(), k(O, null, [
451
453
  r(d)(o.item.show?.form, u.form) ?? !0 ? (c(), k("div", {
452
454
  key: 0,
453
- class: z(o.item.form.span > 0 ? `col-${o.item.form.span}` : "col")
455
+ class: M(o.item.form.span > 0 ? `col-${o.item.form.span}` : "col")
454
456
  }, [
455
- v(r(A), {
457
+ v(r(N), {
456
458
  label: o.item.label,
457
459
  prop: o.item.key,
458
460
  "label-width": o.item.form?.labelWidth || "100px"
459
461
  }, {
460
462
  default: h(() => [
461
- V(e.$slots, "form-" + o.item.key + "-start", {
463
+ x(e.$slots, "form-" + o.item.key + "-start", {
462
464
  row: u.form,
463
465
  item: o.item
464
466
  }),
465
- V(e.$slots, "form-" + o.item.key, {
467
+ x(e.$slots, "form-" + o.item.key, {
466
468
  row: u.form,
467
469
  item: o.item
468
470
  }, () => [
469
- o.item.type === "input" ? (c(), g(r(G), U({
471
+ o.item.type === "input" ? (c(), g(r(G), S({
470
472
  key: 0,
471
473
  modelValue: u.form[o.item.key],
472
474
  "onUpdate:modelValue": (t) => u.form[o.item.key] = t
473
- }, { ref_for: !0 }, o.item.options?.input, T(o.item.options?.input?.on || {}), {
475
+ }, { ref_for: !0 }, o.item.options?.input, R(o.item.options?.input?.on || {}), {
474
476
  disabled: u.getDisabled(o.item)
475
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.item.type === "switch" ? (c(), g(r(q), U({
477
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.item.type === "switch" ? (c(), g(r(q), S({
476
478
  key: 1,
477
479
  modelValue: u.form[o.item.key],
478
480
  "onUpdate:modelValue": (t) => u.form[o.item.key] = t
479
- }, { ref_for: !0 }, o.item.options?.switch, T(o.item.options?.switch?.on || {}), {
481
+ }, { ref_for: !0 }, o.item.options?.switch, R(o.item.options?.switch?.on || {}), {
480
482
  disabled: u.getDisabled(o.item)
481
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.item.type === "select" ? (c(), g(r(B), U({
483
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.item.type === "select" ? (c(), g(r(A), S({
482
484
  key: 2,
483
485
  modelValue: u.form[o.item.key],
484
486
  "onUpdate:modelValue": (t) => u.form[o.item.key] = t
485
- }, { ref_for: !0 }, o.item.options?.select, T(o.item.options?.select?.on || {}), {
487
+ }, { ref_for: !0 }, o.item.options?.select, R(o.item.options?.select?.on || {}), {
486
488
  disabled: u.getDisabled(o.item),
487
489
  style: { width: "100%" }
488
490
  }), {
489
491
  default: h(() => [
490
- (c(!0), k($, null, j(o.item.options?.select?.data, (t) => (c(), g(r(N), {
492
+ (c(!0), k(O, null, T(o.item.options?.select?.data, (t) => (c(), g(r(K), {
491
493
  key: t.value,
492
494
  label: t.label,
493
495
  value: t.value
494
496
  }, null, 8, ["label", "value"]))), 128))
495
497
  ]),
496
498
  _: 2
497
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.item.type === "list" ? (c(), g(Y, U({
499
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.item.type === "list" ? (c(), g(Y, S({
498
500
  key: 3,
499
501
  row: u.form,
500
502
  field: o.item.key
501
- }, { ref_for: !0 }, o.item.options?.list, T(o.item.options?.list?.on || {}), {
503
+ }, { ref_for: !0 }, o.item.options?.list, R(o.item.options?.list?.on || {}), {
502
504
  disabled: u.getDisabled(o.item),
503
505
  style: { width: "100%" }
504
- }), null, 16, ["row", "field", "disabled"])) : o.item.type === "tree-select" ? (c(), g(r(le), U({
506
+ }), null, 16, ["row", "field", "disabled"])) : o.item.type === "tree-select" ? (c(), g(r(le), S({
505
507
  key: 4,
506
508
  modelValue: u.form[o.item.key],
507
509
  "onUpdate:modelValue": (t) => u.form[o.item.key] = t
508
- }, { ref_for: !0 }, o.item.options?.treeSelect, T(o.item.options?.treeSelect?.on || {}), {
510
+ }, { ref_for: !0 }, o.item.options?.treeSelect, R(o.item.options?.treeSelect?.on || {}), {
509
511
  disabled: u.getDisabled(o.item),
510
512
  style: { width: "100%" }
511
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.item.type === "datetime" ? (c(), g(r(ae), U({
513
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.item.type === "datetime" ? (c(), g(r(ae), S({
512
514
  key: 5,
513
515
  modelValue: u.form[o.item.key],
514
516
  "onUpdate:modelValue": (t) => u.form[o.item.key] = t
515
- }, { ref_for: !0 }, o.item.options?.datetime, T(o.item.options?.datetime?.on || {}), {
517
+ }, { ref_for: !0 }, o.item.options?.datetime, R(o.item.options?.datetime?.on || {}), {
516
518
  disabled: u.getDisabled(o.item)
517
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : r(F).customComponent[o.item.type] ? (c(), g(oe(r(F).customComponent[o.item.type]), U({
519
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : r(V).customComponent[o.item.type] ? (c(), g(oe(r(V).customComponent[o.item.type]), S({
518
520
  key: 6,
519
521
  modelValue: u.form[o.item.key],
520
522
  "onUpdate:modelValue": (t) => u.form[o.item.key] = t
521
- }, { ref_for: !0 }, o.item.options?.[o.item.type], T(o.item.options?.[o.item.type]?.on || {}), {
523
+ }, { ref_for: !0 }, o.item.options?.[o.item.type], R(o.item.options?.[o.item.type]?.on || {}), {
522
524
  disabled: u.getDisabled(o.item)
523
525
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
524
526
  ]),
525
- V(e.$slots, "form-" + o.item.key + "-end", {
527
+ x(e.$slots, "form-" + o.item.key + "-end", {
526
528
  row: u.form,
527
529
  item: o.item
528
530
  })
@@ -531,7 +533,7 @@ const be = {
531
533
  }, 1032, ["label", "prop", "label-width"])
532
534
  ], 2)) : C("", !0)
533
535
  ], 64))), 256)),
534
- V(e.$slots, "form-end", {
536
+ x(e.$slots, "form-end", {
535
537
  row: u.form
536
538
  })
537
539
  ]))), 256)) : C("", !0)
@@ -549,7 +551,7 @@ class ke {
549
551
  */
550
552
  static exportToExcel = async (n, d, a) => {
551
553
  if (!n || n.length === 0) return;
552
- const f = await S.loadModule("xlsx"), m = n.map((s) => {
554
+ const f = await $.loadModule("xlsx"), m = n.map((s) => {
553
555
  const i = {};
554
556
  return d.forEach((o) => {
555
557
  i[o.label] = s[o.key];
@@ -600,10 +602,10 @@ class w {
600
602
  /** curd表单 */
601
603
  static curd = Ce;
602
604
  }
603
- const ve = { class: "dialog-footer" }, Ve = /* @__PURE__ */ J({
605
+ const ve = { class: "dialog-footer" }, Ve = /* @__PURE__ */ B({
604
606
  __name: "switchConfirm",
605
607
  setup(p, { expose: n }) {
606
- const d = R(!1), a = R("确认修改"), f = R("确认要修改状态吗?");
608
+ const d = z(!1), a = z("确认修改"), f = z("确认要修改状态吗?");
607
609
  let m = null, u = null;
608
610
  const e = (o) => (o?.title && (a.value = o.title), o?.content && (f.value = o.content), d.value = !0, new Promise((t, l) => {
609
611
  m = t, u = l;
@@ -622,26 +624,26 @@ const ve = { class: "dialog-footer" }, Ve = /* @__PURE__ */ J({
622
624
  width: "400px"
623
625
  }, {
624
626
  footer: h(() => [
625
- E("span", ve, [
626
- v(r(O), { onClick: i }, {
627
+ U("span", ve, [
628
+ v(r(F), { onClick: i }, {
627
629
  default: h(() => [...t[1] || (t[1] = [
628
- x("取消", -1)
630
+ D("取消", -1)
629
631
  ])]),
630
632
  _: 1
631
633
  }),
632
- v(r(O), {
634
+ v(r(F), {
633
635
  type: "primary",
634
636
  onClick: s
635
637
  }, {
636
638
  default: h(() => [...t[2] || (t[2] = [
637
- x("确认", -1)
639
+ D("确认", -1)
638
640
  ])]),
639
641
  _: 1
640
642
  })
641
643
  ])
642
644
  ]),
643
645
  default: h(() => [
644
- E("div", null, D(f.value), 1)
646
+ U("div", null, E(f.value), 1)
645
647
  ]),
646
648
  _: 1
647
649
  }, 8, ["modelValue", "title"]));
@@ -657,7 +659,7 @@ const ve = { class: "dialog-footer" }, Ve = /* @__PURE__ */ J({
657
659
  };
658
660
  function Ue(p, n) {
659
661
  return c(), k("svg", Ee, [...n[0] || (n[0] = [
660
- E("path", {
662
+ U("path", {
661
663
  fill: "currentColor",
662
664
  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"
663
665
  }, null, -1)
@@ -666,19 +668,19 @@ function Ue(p, n) {
666
668
  const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative cc1-form-box" }, Oe = {
667
669
  class: "absolute row fit",
668
670
  style: { overflow: "hidden" }
669
- }, Fe = { class: "col column" }, _e = {
671
+ }, Fe = { class: "col column" }, Ie = {
670
672
  key: 0,
671
673
  class: "relative curd-search"
672
- }, Ie = { class: "mb-10 flex justify-between items-center" }, Te = {
674
+ }, _e = { class: "mb-10 flex justify-between items-center" }, Re = {
673
675
  class: "flex items-center",
674
676
  style: { gap: "10px" }
675
- }, je = { key: 0 }, Le = { key: 1 }, Me = { key: 2 }, ze = { class: "export-btn" }, Re = {
677
+ }, Te = { key: 0 }, je = { key: 1 }, Le = { key: 2 }, Me = { class: "export-btn" }, ze = {
676
678
  class: "flex items-center",
677
679
  style: { gap: "10px" }
678
- }, Pe = { class: "col fit-width relative" }, Ne = { class: "absolute column fit" }, Ae = { class: "row justify-end mt-10 mb-10" }, Be = {
680
+ }, Pe = { class: "col fit-width relative" }, Ke = { class: "absolute column fit" }, Ne = { class: "row justify-end mt-10 mb-10" }, Ae = {
679
681
  class: "row form-item-content",
680
682
  style: { width: "100%" }
681
- }, Je = { class: "col" }, We = { class: "dialog-footer" }, Ke = { class: "dialog-footer" }, He = /* @__PURE__ */ J({
683
+ }, Be = { class: "col" }, Je = { class: "dialog-footer" }, We = { class: "dialog-footer" }, He = /* @__PURE__ */ B({
682
684
  __name: "index",
683
685
  props: {
684
686
  /**
@@ -689,7 +691,7 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
689
691
  }
690
692
  },
691
693
  setup(p, { expose: n }) {
692
- const d = S.EDialog, a = p, f = R(), m = R(), u = S.isFun, e = Q({
694
+ const d = $.EDialog, a = p, f = z(), m = z(), u = $.isFun, e = Q({
693
695
  search: {
694
696
  column: {
695
697
  list: []
@@ -737,7 +739,7 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
737
739
  const s = (i) => {
738
740
  let o = [];
739
741
  return i.forEach((t) => {
740
- o.push(t._id), t.children && t.children.length > 0 && (o = o.concat(s(t.children)));
742
+ o.push(t[V.tableRowKey]), t.children && t.children.length > 0 && (o = o.concat(s(t.children)));
741
743
  }), o;
742
744
  };
743
745
  e.table.expand.rowKeys = s(e.table.data);
@@ -769,10 +771,10 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
769
771
  const s = a.option.api.list;
770
772
  try {
771
773
  const i = await s({
772
- [F.pageField.size]: e.page.size,
773
- [F.pageField.num]: e.page.num,
774
+ [V.pageField.size]: e.page.size,
775
+ [V.pageField.num]: e.page.num,
774
776
  ...e.search.getFormData()
775
- }), o = F.resultField, t = i.data || { [o.list]: i };
777
+ }), o = V.resultField, t = i.data || { [o.list]: i };
776
778
  let l = (Array.isArray(t[o.list]), t[o.list]);
777
779
  e.table.data = a.option.data ? await a.option.data(l) : l, e.page.total = t[o.total] || 0;
778
780
  } catch (i) {
@@ -800,12 +802,12 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
800
802
  },
801
803
  select: () => {
802
804
  if (e.table.selection.list.length === 0)
803
- throw S.fail(w.tCurd("selectDataToExport")), new Error(w.tCurd("selectDataToExport"));
805
+ throw $.fail(w.tCurd("selectDataToExport")), new Error(w.tCurd("selectDataToExport"));
804
806
  return e.table.selection.list;
805
807
  },
806
808
  page: () => {
807
809
  if (e.table.data.length === 0)
808
- throw S.fail(w.tCurd("noData")), new Error(w.tCurd("noData"));
810
+ throw $.fail(w.tCurd("noData")), new Error(w.tCurd("noData"));
809
811
  return e.table.data;
810
812
  },
811
813
  all: async () => {
@@ -816,10 +818,10 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
816
818
  return;
817
819
  }
818
820
  const s = a.option.api.list, i = await s({
819
- [F.pageField.size]: 999999,
820
- [F.pageField.num]: 1
821
+ [V.pageField.size]: 999999,
822
+ [V.pageField.num]: 1
821
823
  });
822
- return (i.data || { [F.resultField.list]: i })[F.resultField.list];
824
+ return (i.data || { [V.resultField.list]: i })[V.resultField.list];
823
825
  } catch (s) {
824
826
  console.error(s);
825
827
  } finally {
@@ -855,7 +857,7 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
855
857
  if (a.option.form?.editAll)
856
858
  return s;
857
859
  let i = {
858
- _id: e.update.edit.data._id
860
+ [V.tableRowKey]: e.update.edit.data[V.tableRowKey]
859
861
  };
860
862
  return Object.keys(e.update.edit.data).forEach((o) => {
861
863
  s[o] !== e.update.edit.data[o] && (i[o] = s[o]);
@@ -872,7 +874,7 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
872
874
  submit: () => {
873
875
  FunUtil.throttle(async () => {
874
876
  await m.value?.validate(async (o, t) => new Promise((l, b) => {
875
- o || (S.fail(w.tCurd("checkFormData")), b(!1)), l();
877
+ o || ($.fail(w.tCurd("checkFormData")), b(!1)), l();
876
878
  })), e.update.loading = !0;
877
879
  const s = e.update.type === d.Insert ? a.option.api.create : a.option.api.update;
878
880
  let i = JSONUtil.cp(e.update.form);
@@ -910,7 +912,7 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
910
912
  },
911
913
  open: (s) => {
912
914
  if (s.length === 0) {
913
- S.fail(w.tCurd("selectDataToDelete"));
915
+ $.fail(w.tCurd("selectDataToDelete"));
914
916
  return;
915
917
  }
916
918
  e.remove.items = s, e.remove.show = !0;
@@ -922,9 +924,9 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
922
924
  try {
923
925
  if (!s) return;
924
926
  await s({
925
- _id: e.remove.items.map((i) => i._id),
927
+ [V.tableRowKey]: e.remove.items.map((i) => i[V.tableRowKey]),
926
928
  items: e.remove.items
927
- }), S.success(w.tCurd("operationSuccess")), e.table.data.length <= 1 && e.page.num > 1 && (e.page.num -= 1), e.remove.close(), await e.table.getList();
929
+ }), $.success(w.tCurd("operationSuccess")), e.table.data.length <= 1 && e.page.num > 1 && (e.page.num -= 1), e.remove.close(), await e.table.getList();
928
930
  } catch (i) {
929
931
  console.error(i);
930
932
  } finally {
@@ -951,7 +953,7 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
951
953
  },
952
954
  table: {
953
955
  headerCellClassName: "table-header",
954
- rowKey: "_id",
956
+ rowKey: V.tableRowKey,
955
957
  emptyText: w.tCurd("noData"),
956
958
  highlightCurrentRow: !0
957
959
  }
@@ -974,8 +976,8 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
974
976
  activeLabel: w.tCurd("switchOn"),
975
977
  inactiveValue: !1,
976
978
  inactiveLabel: w.tCurd("switchOff"),
977
- tableBeforeChange: async (_, y) => {
978
- const I = o.options?.switch;
979
+ tableBeforeChange: async (I, y) => {
980
+ const _ = o.options?.switch;
979
981
  try {
980
982
  await f.value?.open({
981
983
  title: w.tCurd("confirmModify"),
@@ -983,14 +985,14 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
983
985
  }), e.table.loading = !0;
984
986
  try {
985
987
  return a.option.api.update ? (await a.option.api.update({
986
- _id: y._id,
987
- [_]: y[_] === I.activeValue ? I.inactiveValue : I.activeValue,
988
- final(M, P, Z) {
988
+ [V.tableRowKey]: y[V.tableRowKey],
989
+ [I]: y[I] === _.activeValue ? _.inactiveValue : _.activeValue,
990
+ final(L, P, Z) {
989
991
  e.table.loading = !1;
990
992
  }
991
- }), e.table.loading = !1, S.success(w.tCurd("operationSuccess")), e.table.getList(), !0) : void 0;
992
- } catch (M) {
993
- return console.error(M), !1;
993
+ }), e.table.loading = !1, $.success(w.tCurd("operationSuccess")), e.table.getList(), !0) : void 0;
994
+ } catch (L) {
995
+ return console.error(L), !1;
994
996
  } finally {
995
997
  e.table.loading = !1;
996
998
  }
@@ -1000,8 +1002,8 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1000
1002
  }
1001
1003
  },
1002
1004
  treeSelect: {
1003
- rowKey: "_id",
1004
- nodeKey: "_id",
1005
+ rowKey: V.tableRowKey,
1006
+ nodeKey: V.tableRowKey,
1005
1007
  multiple: !0,
1006
1008
  renderAfterExpand: !1,
1007
1009
  showCheckbox: !0,
@@ -1029,8 +1031,8 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1029
1031
  form: 0
1030
1032
  }
1031
1033
  }, b = o;
1032
- Object.keys(l).forEach((_) => {
1033
- b[_] = ObjectUtil.deepMerge(l[_], b[_] || {});
1034
+ Object.keys(l).forEach((I) => {
1035
+ b[I] = ObjectUtil.deepMerge(l[I], b[I] || {});
1034
1036
  });
1035
1037
  };
1036
1038
  s.column.forEach(i), s.table?.column?.forEach(i);
@@ -1046,19 +1048,19 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1046
1048
  const b = (y) => {
1047
1049
  if (e.update.formDefault[y.key] = y.value, y.table.table && (y.show.table && e.table.column.show.list.push(y.key), y.table.table && e.table.column.show.listSource.push(y.key)), y.isForm) {
1048
1050
  y.form = y.form || { span: t }, y.form.span = y.form.span ?? t;
1049
- let I = y.form.span, M = l.reduce((Z, se) => Z + se.span, I);
1051
+ let _ = y.form.span, L = l.reduce((Z, se) => Z + se.span, _);
1050
1052
  const P = l.length;
1051
- l.push({ item: y, span: I }), (P === 1 && l[0].span === 0 || M >= o || I === 0 && P > 1) && (i.push(l), l = []), y.rules && (e.update.rules[y.key] = y.rules);
1053
+ l.push({ item: y, span: _ }), (P === 1 && l[0].span === 0 || L >= o || _ === 0 && P > 1) && (i.push(l), l = []), y.rules && (e.update.rules[y.key] = y.rules);
1052
1054
  }
1053
1055
  };
1054
1056
  s.column.forEach((y) => {
1055
1057
  y.isForm = !0, b(y);
1056
1058
  }), a.option.table?.column?.forEach((y) => {
1057
1059
  y.isForm = !1, b(y);
1058
- }), e.search.column.list = s.column.concat(s.table?.column || []), e.table.column.list = e.search.column.list.filter((y) => y.table?.table), e.search.column.list.sort((y, I) => y.sort?.search - I.sort?.search), e.table.column.list.sort((y, I) => y.sort?.table - I.sort?.table), l.length > 0 && i.push(l), e.update.formColumn = i;
1059
- const _ = a.option.search?.formDefault;
1060
- _ && Object.keys(_).forEach((y) => {
1061
- e.search.formDefault[y] = _[y];
1060
+ }), e.search.column.list = s.column.concat(s.table?.column || []), e.table.column.list = e.search.column.list.filter((y) => y.table?.table), e.search.column.list.sort((y, _) => y.sort?.search - _.sort?.search), e.table.column.list.sort((y, _) => y.sort?.table - _.sort?.table), l.length > 0 && i.push(l), e.update.formColumn = i;
1061
+ const I = a.option.search?.formDefault;
1062
+ I && Object.keys(I).forEach((y) => {
1063
+ e.search.formDefault[y] = I[y];
1062
1064
  }), s.column.forEach((y) => {
1063
1065
  y.show?.search || (e.search.formDefault[y.key] = void 0);
1064
1066
  }), e.search.form = JSONUtil.cp(e.search.formDefault);
@@ -1071,30 +1073,30 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1071
1073
  }), (s, i) => {
1072
1074
  const o = ie("loading");
1073
1075
  return c(), k("div", $e, [
1074
- E("div", Oe, [
1075
- V(s.$slots, "box-left"),
1076
- E("div", Fe, [
1077
- p.option.search?.show !== !1 ? (c(), k("div", _e, [
1076
+ U("div", Oe, [
1077
+ x(s.$slots, "box-left"),
1078
+ U("div", Fe, [
1079
+ p.option.search?.show !== !1 ? (c(), k("div", Ie, [
1078
1080
  v(r(H), {
1079
1081
  model: e.search.form,
1080
1082
  inline: ""
1081
1083
  }, {
1082
1084
  default: h(() => [
1083
- V(s.$slots, "search-start", {
1085
+ x(s.$slots, "search-start", {
1084
1086
  row: e.search.form
1085
1087
  }),
1086
- (c(!0), k($, null, j(e.search.column.list, (t) => (c(), k($, {
1088
+ (c(!0), k(O, null, T(e.search.column.list, (t) => (c(), k(O, {
1087
1089
  key: t.key
1088
1090
  }, [
1089
- (typeof t.show?.search == "function" ? t.show?.search(e.search.form) : t.show?.search) ? (c(), g(r(A), {
1091
+ (typeof t.show?.search == "function" ? t.show?.search(e.search.form) : t.show?.search) ? (c(), g(r(N), {
1090
1092
  key: 0,
1091
1093
  label: typeof t.text?.search?.label == "string" ? t.text?.search?.label : t.label,
1092
- class: z({
1094
+ class: M({
1093
1095
  "hide-label": typeof t.text?.search?.label == "boolean" ? !t.text?.search?.label : !1
1094
1096
  })
1095
1097
  }, {
1096
1098
  default: h(() => [
1097
- V(s.$slots, "search-" + t.key, {
1099
+ x(s.$slots, "search-" + t.key, {
1098
1100
  row: e.search.form
1099
1101
  }, () => [
1100
1102
  t.type === "input" ? (c(), g(r(G), {
@@ -1104,7 +1106,7 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1104
1106
  placeholder: e.search.getPlaceholder(t),
1105
1107
  clearable: "",
1106
1108
  disabled: t.disabled?.search
1107
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : t.type === "switch" ? (c(), g(r(B), {
1109
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : t.type === "switch" ? (c(), g(r(A), {
1108
1110
  key: 1,
1109
1111
  modelValue: e.search.form[t.key],
1110
1112
  "onUpdate:modelValue": (l) => e.search.form[t.key] = l,
@@ -1113,19 +1115,19 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1113
1115
  disabled: t.disabled?.search
1114
1116
  }, {
1115
1117
  default: h(() => [
1116
- (c(), g(r(N), {
1118
+ (c(), g(r(K), {
1117
1119
  key: t.options?.switch?.activeValue,
1118
1120
  label: t.options?.switch?.activeLabel,
1119
1121
  value: t.options?.switch?.activeValue
1120
1122
  }, null, 8, ["label", "value"])),
1121
- (c(), g(r(N), {
1123
+ (c(), g(r(K), {
1122
1124
  key: t.options?.switch?.inactiveValue,
1123
1125
  label: t.options?.switch?.inactiveLabel,
1124
1126
  value: t.options?.switch?.inactiveValue
1125
1127
  }, null, 8, ["label", "value"]))
1126
1128
  ]),
1127
1129
  _: 2
1128
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : t.type === "select" ? (c(), g(r(B), {
1130
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : t.type === "select" ? (c(), g(r(A), {
1129
1131
  key: 2,
1130
1132
  modelValue: e.search.form[t.key],
1131
1133
  "onUpdate:modelValue": (l) => e.search.form[t.key] = l,
@@ -1134,7 +1136,7 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1134
1136
  disabled: t.disabled?.search
1135
1137
  }, {
1136
1138
  default: h(() => [
1137
- (c(!0), k($, null, j(t.options?.select?.data, (l) => (c(), g(r(N), {
1139
+ (c(!0), k(O, null, T(t.options?.select?.data, (l) => (c(), g(r(K), {
1138
1140
  key: l.value,
1139
1141
  label: l.label,
1140
1142
  value: l.value
@@ -1147,71 +1149,71 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1147
1149
  _: 2
1148
1150
  }, 1032, ["label", "class"])) : C("", !0)
1149
1151
  ], 64))), 128)),
1150
- V(s.$slots, "search-center", {
1152
+ x(s.$slots, "search-center", {
1151
1153
  row: e.search.form
1152
1154
  }),
1153
- v(r(A), null, {
1155
+ v(r(N), null, {
1154
1156
  default: h(() => [
1155
- p.option.tools?.search ? (c(), g(r(O), {
1157
+ p.option.tools?.search ? (c(), g(r(F), {
1156
1158
  key: 0,
1157
1159
  type: "primary",
1158
1160
  onClick: e.search.submit
1159
1161
  }, {
1160
1162
  default: h(() => [
1161
- x(D(r(w).tCurd("search")), 1)
1163
+ D(E(r(w).tCurd("search")), 1)
1162
1164
  ]),
1163
1165
  _: 1
1164
1166
  }, 8, ["onClick"])) : C("", !0),
1165
- p.option.tools?.reset ? (c(), g(r(O), {
1167
+ p.option.tools?.reset ? (c(), g(r(F), {
1166
1168
  key: 1,
1167
1169
  onClick: e.search.reset
1168
1170
  }, {
1169
1171
  default: h(() => [
1170
- x(D(r(w).tCurd("reset")), 1)
1172
+ D(E(r(w).tCurd("reset")), 1)
1171
1173
  ]),
1172
1174
  _: 1
1173
1175
  }, 8, ["onClick"])) : C("", !0)
1174
1176
  ]),
1175
1177
  _: 1
1176
1178
  }),
1177
- V(s.$slots, "search-end", {
1179
+ x(s.$slots, "search-end", {
1178
1180
  row: e.search.form
1179
1181
  })
1180
1182
  ]),
1181
1183
  _: 3
1182
1184
  }, 8, ["model"])
1183
1185
  ])) : C("", !0),
1184
- E("div", Ie, [
1185
- E("div", Te, [
1186
- r(u)(p.option.tools?.add) ? (c(), k("div", je, [
1187
- v(r(O), {
1186
+ U("div", _e, [
1187
+ U("div", Re, [
1188
+ r(u)(p.option.tools?.add) ? (c(), k("div", Te, [
1189
+ v(r(F), {
1188
1190
  type: "primary",
1189
1191
  onClick: i[0] || (i[0] = (t) => e.update.open(r(d).Insert))
1190
1192
  }, {
1191
1193
  default: h(() => [
1192
- x(D(r(w).tCurd("add")), 1)
1194
+ D(E(r(w).tCurd("add")), 1)
1193
1195
  ]),
1194
1196
  _: 1
1195
1197
  })
1196
1198
  ])) : C("", !0),
1197
- p.option.table?.selectable && r(u)(p.option.tools?.delete) ? (c(), k("div", Le, [
1198
- v(r(O), {
1199
+ p.option.table?.selectable && r(u)(p.option.tools?.delete) ? (c(), k("div", je, [
1200
+ v(r(F), {
1199
1201
  type: "danger",
1200
1202
  onClick: i[1] || (i[1] = (t) => e.remove.open(e.table.selection.list))
1201
1203
  }, {
1202
1204
  default: h(() => [
1203
- x(D(r(w).tCurd("delete")), 1)
1205
+ D(E(r(w).tCurd("delete")), 1)
1204
1206
  ]),
1205
1207
  _: 1
1206
1208
  })
1207
1209
  ])) : C("", !0),
1208
- p.option.tools?.expand ? (c(), k("div", Me, [
1209
- v(r(O), {
1210
+ p.option.tools?.expand ? (c(), k("div", Le, [
1211
+ v(r(F), {
1210
1212
  type: "warning",
1211
1213
  onClick: i[2] || (i[2] = (t) => e.table.expand.all())
1212
1214
  }, {
1213
1215
  default: h(() => [
1214
- x(D(r(w).tCurd("expandCollapse")), 1)
1216
+ D(E(r(w).tCurd("expandCollapse")), 1)
1215
1217
  ]),
1216
1218
  _: 1
1217
1219
  })
@@ -1223,24 +1225,24 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1223
1225
  dropdown: h(() => [
1224
1226
  v(r(fe), null, {
1225
1227
  default: h(() => [
1226
- p.option.table?.selectable ? (c(), g(r(W), {
1228
+ p.option.table?.selectable ? (c(), g(r(J), {
1227
1229
  key: 0,
1228
1230
  command: "select"
1229
1231
  }, {
1230
1232
  default: h(() => [
1231
- x(D(r(w).tCurd("exportSelect")), 1)
1233
+ D(E(r(w).tCurd("exportSelect")), 1)
1232
1234
  ]),
1233
1235
  _: 1
1234
1236
  })) : C("", !0),
1235
- v(r(W), { command: "page" }, {
1237
+ v(r(J), { command: "page" }, {
1236
1238
  default: h(() => [
1237
- x(D(r(w).tCurd("exportPage")), 1)
1239
+ D(E(r(w).tCurd("exportPage")), 1)
1238
1240
  ]),
1239
1241
  _: 1
1240
1242
  }),
1241
- v(r(W), { command: "all" }, {
1243
+ v(r(J), { command: "all" }, {
1242
1244
  default: h(() => [
1243
- x(D(r(w).tCurd("exportAll")), 1)
1245
+ D(E(r(w).tCurd("exportAll")), 1)
1244
1246
  ]),
1245
1247
  _: 1
1246
1248
  })
@@ -1249,13 +1251,13 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1249
1251
  })
1250
1252
  ]),
1251
1253
  default: h(() => [
1252
- E("div", ze, [
1253
- v(r(O), {
1254
+ U("div", Me, [
1255
+ v(r(F), {
1254
1256
  type: "warning",
1255
1257
  loading: e.export.loading
1256
1258
  }, {
1257
1259
  default: h(() => [
1258
- x(D(r(w).tCurd("export")), 1)
1260
+ D(E(r(w).tCurd("export")), 1)
1259
1261
  ]),
1260
1262
  _: 1
1261
1263
  }, 8, ["loading"])
@@ -1263,10 +1265,10 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1263
1265
  ]),
1264
1266
  _: 1
1265
1267
  }, 8, ["onCommand"])) : C("", !0),
1266
- V(s.$slots, "tools-left")
1268
+ x(s.$slots, "tools-left")
1267
1269
  ]),
1268
- E("div", Re, [
1269
- V(s.$slots, "tools-right"),
1270
+ U("div", ze, [
1271
+ x(s.$slots, "tools-right"),
1270
1272
  p.option.tools?.refresh === void 0 || p.option.tools?.refresh ? (c(), k("div", {
1271
1273
  key: 0,
1272
1274
  class: "refresh-btn",
@@ -1277,9 +1279,9 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1277
1279
  ])) : C("", !0)
1278
1280
  ])
1279
1281
  ]),
1280
- E("div", Pe, [
1281
- E("div", Ne, [
1282
- de((c(), g(r(me), U({
1282
+ U("div", Pe, [
1283
+ U("div", Ke, [
1284
+ de((c(), g(r(me), S({
1283
1285
  data: e.table.data
1284
1286
  }, p.option.table, {
1285
1287
  onSelectionChange: e.table.selection.change,
@@ -1287,39 +1289,39 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1287
1289
  onExpandChange: e.table.expand.change
1288
1290
  }), {
1289
1291
  default: h(() => [
1290
- p.option.table?.selectable && (r(u)(p.option.tools?.delete) || p.option.tools?.export?.show) ? (c(), g(r(K), {
1292
+ p.option.table?.selectable && (r(u)(p.option.tools?.delete) || p.option.tools?.export?.show) ? (c(), g(r(W), {
1291
1293
  key: 0,
1292
1294
  type: "selection",
1293
1295
  selectable: typeof p.option.table?.selectable == "function" ? p.option.table?.selectable : void 0,
1294
1296
  width: "55"
1295
1297
  }, null, 8, ["selectable"])) : C("", !0),
1296
- (c(!0), k($, null, j(e.table.column.list, (t) => (c(), k($, {
1298
+ (c(!0), k(O, null, T(e.table.column.list, (t) => (c(), k(O, {
1297
1299
  key: t.key
1298
1300
  }, [
1299
- e.table.column.show.list.includes(t.key) ? (c(), g(r(K), U({
1301
+ e.table.column.show.list.includes(t.key) ? (c(), g(r(W), S({
1300
1302
  key: 0,
1301
1303
  prop: t.key,
1302
1304
  label: t.label
1303
1305
  }, { ref_for: !0 }, t.table), {
1304
1306
  default: h(({ row: l }) => [
1305
- V(s.$slots, "table-" + t.key, {
1307
+ x(s.$slots, "table-" + t.key, {
1306
1308
  row: l,
1307
1309
  item: t
1308
1310
  }, () => [
1309
- t.type === "switch" ? (c(), g(r(q), U({
1311
+ t.type === "switch" ? (c(), g(r(q), S({
1310
1312
  key: 0,
1311
1313
  modelValue: l[t.key],
1312
1314
  "onUpdate:modelValue": (b) => l[t.key] = b,
1313
1315
  "before-change": () => t.options?.switch?.tableBeforeChange?.(t.key, l)
1314
- }, { ref_for: !0 }, t.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (c(), k($, { key: 1 }, [
1315
- x(D(l[t.key]), 1)
1316
+ }, { ref_for: !0 }, t.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (c(), k(O, { key: 1 }, [
1317
+ D(E(l[t.key]), 1)
1316
1318
  ], 64))
1317
1319
  ])
1318
1320
  ]),
1319
1321
  _: 2
1320
1322
  }, 1040, ["prop", "label"])) : C("", !0)
1321
1323
  ], 64))), 128)),
1322
- r(u)(p.option.tools?.add) || r(u)(p.option.tools?.update) || r(u)(p.option.tools?.delete) || s.$slots["table-op-left"] || s.$slots["table-op-right"] ? (c(), g(r(K), {
1324
+ r(u)(p.option.tools?.add) || r(u)(p.option.tools?.update) || r(u)(p.option.tools?.delete) || s.$slots["table-op-left"] || s.$slots["table-op-right"] ? (c(), g(r(W), {
1323
1325
  key: 1,
1324
1326
  label: r(w).tCurd("operation"),
1325
1327
  width: "180",
@@ -1327,41 +1329,41 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1327
1329
  fixed: "right"
1328
1330
  }, {
1329
1331
  default: h(({ row: t }) => [
1330
- V(s.$slots, "table-op-left", { row: t }),
1331
- r(u)(p.option.tools?.add, t) ? (c(), g(r(O), {
1332
+ x(s.$slots, "table-op-left", { row: t }),
1333
+ r(u)(p.option.tools?.add, t) ? (c(), g(r(F), {
1332
1334
  key: 0,
1333
1335
  link: "",
1334
1336
  type: "primary",
1335
1337
  onClick: (l) => e.update.open(r(d).Insert, t)
1336
1338
  }, {
1337
1339
  default: h(() => [
1338
- x(D(r(w).tCurd("add")), 1)
1340
+ D(E(r(w).tCurd("add")), 1)
1339
1341
  ]),
1340
1342
  _: 1
1341
1343
  }, 8, ["onClick"])) : C("", !0),
1342
- r(u)(p.option.tools?.update, t) ? (c(), g(r(O), {
1344
+ r(u)(p.option.tools?.update, t) ? (c(), g(r(F), {
1343
1345
  key: 1,
1344
1346
  link: "",
1345
1347
  type: "warning",
1346
1348
  onClick: (l) => e.update.open(r(d).Update, t)
1347
1349
  }, {
1348
1350
  default: h(() => [
1349
- x(D(r(w).tCurd("edit")), 1)
1351
+ D(E(r(w).tCurd("edit")), 1)
1350
1352
  ]),
1351
1353
  _: 1
1352
1354
  }, 8, ["onClick"])) : C("", !0),
1353
- r(u)(p.option.tools?.delete, t) ? (c(), g(r(O), {
1355
+ r(u)(p.option.tools?.delete, t) ? (c(), g(r(F), {
1354
1356
  key: 2,
1355
1357
  link: "",
1356
1358
  type: "danger",
1357
1359
  onClick: (l) => e.remove.open([t])
1358
1360
  }, {
1359
1361
  default: h(() => [
1360
- x(D(r(w).tCurd("delete")), 1)
1362
+ D(E(r(w).tCurd("delete")), 1)
1361
1363
  ]),
1362
1364
  _: 1
1363
1365
  }, 8, ["onClick"])) : C("", !0),
1364
- V(s.$slots, "table-op-right", { row: t })
1366
+ x(s.$slots, "table-op-right", { row: t })
1365
1367
  ]),
1366
1368
  _: 3
1367
1369
  }, 8, ["label"])) : C("", !0)
@@ -1372,7 +1374,7 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1372
1374
  ])
1373
1375
  ])
1374
1376
  ]),
1375
- E("div", Ae, [
1377
+ U("div", Ne, [
1376
1378
  v(r(he), {
1377
1379
  "current-page": e.page.num,
1378
1380
  "onUpdate:currentPage": i[4] || (i[4] = (t) => e.page.num = t),
@@ -1388,9 +1390,9 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1388
1390
  }, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total", "onSizeChange", "onCurrentChange"])
1389
1391
  ])
1390
1392
  ]),
1391
- V(s.$slots, "box-right")
1393
+ x(s.$slots, "box-right")
1392
1394
  ]),
1393
- v(r(X), U({
1395
+ v(r(X), S({
1394
1396
  modelValue: e.update.show,
1395
1397
  "onUpdate:modelValue": i[6] || (i[6] = (t) => e.update.show = t),
1396
1398
  title: e.update.title,
@@ -1398,22 +1400,22 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1398
1400
  "before-close": e.update.close
1399
1401
  }, p.option.dialog), {
1400
1402
  footer: h(() => [
1401
- E("span", We, [
1402
- v(r(O), {
1403
+ U("span", Je, [
1404
+ v(r(F), {
1403
1405
  onClick: e.update.close
1404
1406
  }, {
1405
1407
  default: h(() => [
1406
- x(D(r(w).tCurd("close")), 1)
1408
+ D(E(r(w).tCurd("close")), 1)
1407
1409
  ]),
1408
1410
  _: 1
1409
1411
  }, 8, ["onClick"]),
1410
- v(r(O), {
1412
+ v(r(F), {
1411
1413
  type: "primary",
1412
1414
  onClick: e.update.submit,
1413
1415
  loading: e.update.loading
1414
1416
  }, {
1415
1417
  default: h(() => [
1416
- x(D(r(w).tCurd("submit")), 1)
1418
+ D(E(r(w).tCurd("submit")), 1)
1417
1419
  ]),
1418
1420
  _: 1
1419
1421
  }, 8, ["onClick", "loading"])
@@ -1427,26 +1429,26 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1427
1429
  rules: e.update.rules
1428
1430
  }, {
1429
1431
  default: h(() => [
1430
- e.update.showContent ? (c(!0), k($, { key: 0 }, j(e.update.formColumn, (t) => (c(), k($, null, [
1432
+ e.update.showContent ? (c(!0), k(O, { key: 0 }, T(e.update.formColumn, (t) => (c(), k(O, null, [
1431
1433
  r(u)(
1432
1434
  t.map((l) => l.item.show?.form),
1433
1435
  e.update.form
1434
1436
  ) ? (c(), k("div", {
1435
1437
  key: 0,
1436
- class: z(["row curd-row", {
1438
+ class: M(["row curd-row", {
1437
1439
  stripe: p.option.form?.stripe === void 0 ? !0 : p.option.form?.stripe
1438
1440
  }])
1439
1441
  }, [
1440
- V(s.$slots, "form-start", {
1442
+ x(s.$slots, "form-start", {
1441
1443
  row: e.update.form
1442
1444
  }),
1443
- (c(!0), k($, null, j(t, (l) => (c(), k($, null, [
1445
+ (c(!0), k(O, null, T(t, (l) => (c(), k(O, null, [
1444
1446
  r(u)(l.item.show?.form, e.update.form) ? (c(), k("div", {
1445
1447
  key: 0,
1446
- class: z(l.item.form.span > 0 ? `col-${l.item.form.span}` : "col")
1448
+ class: M(l.item.form.span > 0 ? `col-${l.item.form.span}` : "col")
1447
1449
  }, [
1448
- v(r(A), {
1449
- class: z({
1450
+ v(r(N), {
1451
+ class: M({
1450
1452
  "hide-label": typeof l.item.text?.form?.label == "boolean" ? !l.item.text?.form?.label : !1
1451
1453
  }),
1452
1454
  label: typeof l.item.text?.form?.label == "string" ? l.item.text?.form?.label : l.item.label,
@@ -1454,74 +1456,74 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1454
1456
  "label-width": l.item.form?.labelWidth || "100px"
1455
1457
  }, {
1456
1458
  default: h(() => [
1457
- E("div", Be, [
1458
- V(s.$slots, "form-" + l.item.key + "-start", {
1459
+ U("div", Ae, [
1460
+ x(s.$slots, "form-" + l.item.key + "-start", {
1459
1461
  row: e.update.form,
1460
1462
  item: l.item
1461
1463
  }),
1462
- E("div", Je, [
1463
- V(s.$slots, "form-" + l.item.key, {
1464
+ U("div", Be, [
1465
+ x(s.$slots, "form-" + l.item.key, {
1464
1466
  row: e.update.form,
1465
1467
  item: l.item
1466
1468
  }, () => [
1467
- l.item.type === "input" ? (c(), g(r(G), U({
1469
+ l.item.type === "input" ? (c(), g(r(G), S({
1468
1470
  key: 0,
1469
1471
  modelValue: e.update.form[l.item.key],
1470
1472
  "onUpdate:modelValue": (b) => e.update.form[l.item.key] = b
1471
- }, { ref_for: !0 }, l.item.options?.input, T(l.item.options?.input?.on || {}), {
1473
+ }, { ref_for: !0 }, l.item.options?.input, R(l.item.options?.input?.on || {}), {
1472
1474
  disabled: e.update.getDisabled(l.item)
1473
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "switch" ? (c(), g(r(q), U({
1475
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "switch" ? (c(), g(r(q), S({
1474
1476
  key: 1,
1475
1477
  modelValue: e.update.form[l.item.key],
1476
1478
  "onUpdate:modelValue": (b) => e.update.form[l.item.key] = b
1477
1479
  }, { ref_for: !0 }, l.item.options?.switch, {
1478
1480
  disabled: e.update.getDisabled(l.item)
1479
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "select" ? (c(), g(r(B), U({
1481
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "select" ? (c(), g(r(A), S({
1480
1482
  key: 2,
1481
1483
  modelValue: e.update.form[l.item.key],
1482
1484
  "onUpdate:modelValue": (b) => e.update.form[l.item.key] = b
1483
- }, { ref_for: !0 }, l.item.options?.select, T(l.item.options?.select?.on || {}), {
1485
+ }, { ref_for: !0 }, l.item.options?.select, R(l.item.options?.select?.on || {}), {
1484
1486
  disabled: e.update.getDisabled(l.item),
1485
1487
  style: { width: "100%" }
1486
1488
  }), {
1487
1489
  default: h(() => [
1488
- (c(!0), k($, null, j(l.item.options?.select?.data, (b) => (c(), g(r(N), {
1490
+ (c(!0), k(O, null, T(l.item.options?.select?.data, (b) => (c(), g(r(K), {
1489
1491
  key: b.value,
1490
1492
  label: b.label,
1491
1493
  value: b.value
1492
1494
  }, null, 8, ["label", "value"]))), 128))
1493
1495
  ]),
1494
1496
  _: 2
1495
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "list" ? (c(), g(Y, U({
1497
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "list" ? (c(), g(Y, S({
1496
1498
  key: 3,
1497
1499
  row: e.update.form,
1498
1500
  field: l.item.key
1499
- }, { ref_for: !0 }, l.item.options?.list, T(l.item.options?.list?.on || {}), {
1501
+ }, { ref_for: !0 }, l.item.options?.list, R(l.item.options?.list?.on || {}), {
1500
1502
  disabled: e.update.getDisabled(l.item),
1501
1503
  style: { width: "100%" }
1502
- }), null, 16, ["row", "field", "disabled"])) : l.item.type === "tree-select" ? (c(), g(r(le), U({
1504
+ }), null, 16, ["row", "field", "disabled"])) : l.item.type === "tree-select" ? (c(), g(r(le), S({
1503
1505
  key: 4,
1504
1506
  modelValue: e.update.form[l.item.key],
1505
1507
  "onUpdate:modelValue": (b) => e.update.form[l.item.key] = b
1506
- }, { ref_for: !0 }, l.item.options?.treeSelect, T(l.item.options?.treeSelect?.on || {}), {
1508
+ }, { ref_for: !0 }, l.item.options?.treeSelect, R(l.item.options?.treeSelect?.on || {}), {
1507
1509
  disabled: e.update.getDisabled(l.item),
1508
1510
  style: { width: "100%" }
1509
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "datetime" ? (c(), g(r(ae), U({
1511
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "datetime" ? (c(), g(r(ae), S({
1510
1512
  key: 5,
1511
1513
  modelValue: e.update.form[l.item.key],
1512
1514
  "onUpdate:modelValue": (b) => e.update.form[l.item.key] = b
1513
- }, { ref_for: !0 }, l.item.options?.datetime, T(l.item.options?.datetime?.on || {}), {
1515
+ }, { ref_for: !0 }, l.item.options?.datetime, R(l.item.options?.datetime?.on || {}), {
1514
1516
  disabled: e.update.getDisabled(l.item)
1515
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : r(F).customComponent[l.item.type] ? (c(), g(oe(r(F).customComponent[l.item.type]), U({
1517
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : r(V).customComponent[l.item.type] ? (c(), g(oe(r(V).customComponent[l.item.type]), S({
1516
1518
  key: 6,
1517
1519
  modelValue: e.update.form[l.item.key],
1518
1520
  "onUpdate:modelValue": (b) => e.update.form[l.item.key] = b
1519
- }, { ref_for: !0 }, l.item.options?.[l.item.type], T(l.item.options?.[l.item.type]?.on || {}), {
1521
+ }, { ref_for: !0 }, l.item.options?.[l.item.type], R(l.item.options?.[l.item.type]?.on || {}), {
1520
1522
  disabled: e.update.getDisabled(l.item)
1521
1523
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
1522
1524
  ])
1523
1525
  ]),
1524
- V(s.$slots, "form-" + l.item.key + "-end", {
1526
+ x(s.$slots, "form-" + l.item.key + "-end", {
1525
1527
  row: e.update.form,
1526
1528
  item: l.item
1527
1529
  })
@@ -1531,7 +1533,7 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1531
1533
  }, 1032, ["class", "label", "prop", "label-width"])
1532
1534
  ], 2)) : C("", !0)
1533
1535
  ], 64))), 256)),
1534
- V(s.$slots, "form-end", {
1536
+ x(s.$slots, "form-end", {
1535
1537
  row: e.update.form
1536
1538
  })
1537
1539
  ], 2)) : C("", !0)
@@ -1549,29 +1551,29 @@ const Se = /* @__PURE__ */ xe(De, [["render", Ue]]), $e = { class: "col relative
1549
1551
  "close-on-click-modal": !1
1550
1552
  }, {
1551
1553
  footer: h(() => [
1552
- E("span", Ke, [
1553
- v(r(O), {
1554
+ U("span", We, [
1555
+ v(r(F), {
1554
1556
  onClick: e.remove.close
1555
1557
  }, {
1556
1558
  default: h(() => [
1557
- x(D(r(w).tCurd("close")), 1)
1559
+ D(E(r(w).tCurd("close")), 1)
1558
1560
  ]),
1559
1561
  _: 1
1560
1562
  }, 8, ["onClick"]),
1561
- v(r(O), {
1563
+ v(r(F), {
1562
1564
  type: "danger",
1563
1565
  onClick: e.remove.submit,
1564
1566
  loading: e.remove.loading
1565
1567
  }, {
1566
1568
  default: h(() => [
1567
- x(D(r(w).tCurd("confirmDelete")), 1)
1569
+ D(E(r(w).tCurd("confirmDelete")), 1)
1568
1570
  ]),
1569
1571
  _: 1
1570
1572
  }, 8, ["onClick", "loading"])
1571
1573
  ])
1572
1574
  ]),
1573
1575
  default: h(() => [
1574
- E("div", null, D(r(w).tCurd("confirmDeleteMessage", e.remove.items.length)), 1)
1576
+ U("div", null, E(r(w).tCurd("confirmDeleteMessage", e.remove.items.length)), 1)
1575
1577
  ]),
1576
1578
  _: 1
1577
1579
  }, 8, ["modelValue", "title"]),
@@ -1612,7 +1614,7 @@ class Qe {
1612
1614
  f.accept = m, f.style.display = "none", f.onchange = (u) => {
1613
1615
  const e = u.target.files[0];
1614
1616
  if (!e) {
1615
- S.fail("未选择文件"), a("未选择文件");
1617
+ $.fail("未选择文件"), a("未选择文件");
1616
1618
  return;
1617
1619
  }
1618
1620
  const s = new FileReader();
@@ -1620,14 +1622,14 @@ class Qe {
1620
1622
  const o = m == ".json" ? JSON.parse(i.target.result) : i.target.result;
1621
1623
  d(o);
1622
1624
  }, s.onerror = () => {
1623
- S.fail("文件读取失败"), a("文件读取失败");
1625
+ $.fail("文件读取失败"), a("文件读取失败");
1624
1626
  }, s.readAsText(e), document.body.removeChild(f);
1625
1627
  }, document.body.appendChild(f), f.click();
1626
1628
  });
1627
1629
  }
1628
1630
  const Ge = (p, n) => {
1629
1631
  if (p.component("TCurd", He), p.component("TFormList", Y), p.component("TColumn", we), n?.customComponent) {
1630
- F.customComponent = n.customComponent;
1632
+ V.customComponent = n.customComponent;
1631
1633
  for (const d in n.customComponent)
1632
1634
  p.component(d, n.customComponent[d]);
1633
1635
  }
@@ -1635,14 +1637,14 @@ const Ge = (p, n) => {
1635
1637
  install: Ge
1636
1638
  };
1637
1639
  export {
1638
- L as ArrUtil,
1640
+ j as ArrUtil,
1639
1641
  ke as ExcelUtil,
1640
1642
  we as TColumn,
1641
1643
  He as TCurd,
1642
1644
  Qe as TFile,
1643
- F as TForm,
1645
+ V as TForm,
1644
1646
  Y as TFormList,
1645
- S as TSys,
1647
+ $ as TSys,
1646
1648
  Ye as default,
1647
1649
  Ge as install
1648
1650
  };