cc1-form 1.2.11 → 1.2.12

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,4 +1,4 @@
1
- import { ElMessage as ce, ElLoading as me, ElForm as W, ElFormItem as ee, ElInput as x, ElSwitch as Z, ElSelect as q, ElOption as K, ElRadioGroup as le, ElRadio as ne, ElTreeSelect as ue, ElDatePicker as ie, ElDialog as oe, ElButton as L, ElTableColumn as ae, ElDropdown as he, ElDropdownMenu as ge, ElDropdownItem as te, ElPagination as de, ElTable as ye } from "element-plus";
1
+ import { ElMessage as ce, ElLoading as me, ElForm as W, ElFormItem as te, ElInput as x, ElSwitch as Z, ElSelect as q, ElOption as K, ElRadioGroup as le, ElRadio as ne, ElTreeSelect as ue, ElDatePicker as ie, ElDialog as ae, ElButton as j, ElTableColumn as ee, ElDropdown as he, ElDropdownMenu as ge, ElDropdownItem as oe, ElPagination as de, ElTable as ye } from "element-plus";
2
2
  import "vue-router";
3
3
  import { defineComponent as G, reactive as re, onMounted as fe, resolveComponent as _, createElementBlock as b, createCommentVNode as v, openBlock as f, renderSlot as C, createVNode as E, withCtx as y, createTextVNode as U, Fragment as $, renderList as F, createBlock as g, normalizeClass as I, normalizeStyle as pe, ref as N, unref as o, createElementVNode as D, mergeProps as V, toHandlers as z, resolveDynamicComponent as Q, nextTick as be, toDisplayString as O, getCurrentInstance as we, createSlots as J, withModifiers as ke, resolveDirective as ve, withDirectives as Ce, normalizeProps as Ve, guardReactiveProps as ze } from "vue";
4
4
  class M {
@@ -303,6 +303,10 @@ class A {
303
303
  },
304
304
  /** 表格配置 */
305
305
  table: {
306
+ /**
307
+ * 是否显示序号-默认不显示
308
+ */
309
+ index: !1,
306
310
  /** 表头标签宽度 默认100px */
307
311
  labelWidth: "100px",
308
312
  /** 表格组件大小 - 默认default */
@@ -515,7 +519,7 @@ class A {
515
519
  A.config = ObjectUtil.deepMerge(A.config, a);
516
520
  };
517
521
  }
518
- class B {
522
+ class L {
519
523
  /**
520
524
  * 自定义组件映射表,key 为组件名(同时作为 column.type 值),value 为 Vue 组件定义
521
525
  *
@@ -555,7 +559,7 @@ class B {
555
559
  )
556
560
  */
557
561
  static setOptionsData = (a, p, s) => {
558
- const l = B.findOptions(a, p);
562
+ const l = L.findOptions(a, p);
559
563
  l && (l.data = s);
560
564
  };
561
565
  static form = {
@@ -569,7 +573,7 @@ class B {
569
573
  */
570
574
  parentId: (a, p, s, l) => {
571
575
  const t = A.config.table.rowKey;
572
- a ? p.type === M.EDialog.Add ? (p.form.parentId = a[t], p.form.sort = a.children.length + 1) : p.form.parentId = a.parentId.substring(a.parentId.lastIndexOf(",") + 1) : (p.form.parentId = "0", p.form.sort = s.length + 1), B.setOptionsData(l, "parentId", [{ [t]: "0", title: "根", children: s }]);
576
+ a ? p.type === M.EDialog.Add ? (p.form.parentId = a[t], p.form.sort = a.children.length + 1) : p.form.parentId = a.parentId.substring(a.parentId.lastIndexOf(",") + 1) : (p.form.parentId = "0", p.form.sort = s.length + 1), L.setOptionsData(l, "parentId", [{ [t]: "0", title: "根", children: s }]);
573
577
  }
574
578
  }
575
579
  };
@@ -738,8 +742,8 @@ const Ue = {
738
742
  }
739
743
  },
740
744
  emits: ["change"],
741
- setup(i, { emit: a }) {
742
- const p = i, s = re({
745
+ setup(n, { emit: a }) {
746
+ const p = n, s = re({
743
747
  show: !1,
744
748
  add: (t, e, r) => {
745
749
  H.add(t, e, r, () => {
@@ -759,12 +763,12 @@ const Ue = {
759
763
  return (t, e) => {
760
764
  const r = _("el-button"), d = _("el-input");
761
765
  return s.show ? (f(), b("div", Ue, [
762
- C(t.$slots, "list-start", { row: i.row }),
763
- i.addBottom ? v("", !0) : (f(), b("div", De, [
766
+ C(t.$slots, "list-start", { row: n.row }),
767
+ n.addBottom ? v("", !0) : (f(), b("div", De, [
764
768
  E(r, {
765
769
  link: "",
766
770
  type: "primary",
767
- onClick: e[0] || (e[0] = (m) => s.add(i.field, i.row, i.itemFields))
771
+ onClick: e[0] || (e[0] = (m) => s.add(n.field, n.row, n.itemFields))
768
772
  }, {
769
773
  default: y(() => e[3] || (e[3] = [
770
774
  U("添加")
@@ -772,27 +776,27 @@ const Ue = {
772
776
  _: 1
773
777
  })
774
778
  ])),
775
- (f(!0), b($, null, F(i.row[i.field], (m) => (f(), b("div", Ee, [
779
+ (f(!0), b($, null, F(n.row[n.field], (m) => (f(), b("div", Ee, [
776
780
  C(t.$slots, "item-start", {
777
781
  item: m,
778
- row: i.row
782
+ row: n.row
779
783
  }),
780
- (f(!0), b($, null, F(i.itemFields, (c) => (f(), g(d, {
784
+ (f(!0), b($, null, F(n.itemFields, (c) => (f(), g(d, {
781
785
  modelValue: m[c.value],
782
786
  "onUpdate:modelValue": (u) => m[c.value] = u,
783
- style: pe({ width: i.inputWidth }),
784
- class: I(i.inputClass),
785
- placeholder: c[i.label] || c[i.value],
787
+ style: pe({ width: n.inputWidth }),
788
+ class: I(n.inputClass),
789
+ placeholder: c[n.label] || c[n.value],
786
790
  onChange: e[1] || (e[1] = (u) => l("change"))
787
791
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
788
792
  C(t.$slots, "item-end", {
789
793
  item: m,
790
- row: i.row
794
+ row: n.row
791
795
  }),
792
796
  E(r, {
793
797
  link: "",
794
798
  type: "danger",
795
- onClick: (c) => s.remove(i.field, i.row, m)
799
+ onClick: (c) => s.remove(n.field, n.row, m)
796
800
  }, {
797
801
  default: y(() => e[4] || (e[4] = [
798
802
  U("删除")
@@ -800,11 +804,11 @@ const Ue = {
800
804
  _: 2
801
805
  }, 1032, ["onClick"])
802
806
  ]))), 256)),
803
- i.addBottom ? (f(), b("div", Oe, [
807
+ n.addBottom ? (f(), b("div", Oe, [
804
808
  E(r, {
805
809
  link: "",
806
810
  type: "primary",
807
- onClick: e[2] || (e[2] = (m) => s.add(i.field, i.row, i.itemFields))
811
+ onClick: e[2] || (e[2] = (m) => s.add(n.field, n.row, n.itemFields))
808
812
  }, {
809
813
  default: y(() => e[5] || (e[5] = [
810
814
  U("添加")
@@ -812,7 +816,7 @@ const Ue = {
812
816
  _: 1
813
817
  })
814
818
  ])) : v("", !0),
815
- C(t.$slots, "list-end", { row: i.row })
819
+ C(t.$slots, "list-end", { row: n.row })
816
820
  ])) : v("", !0);
817
821
  };
818
822
  }
@@ -835,8 +839,8 @@ const Ue = {
835
839
  default: ""
836
840
  }
837
841
  },
838
- setup(i, { expose: a }) {
839
- const p = M.isFun, s = M.EDialog, l = N(), t = i, e = re({
842
+ setup(n, { expose: a }) {
843
+ const p = M.isFun, s = M.EDialog, l = N(), t = n, e = re({
840
844
  rules: {},
841
845
  show: !0,
842
846
  form: {},
@@ -848,7 +852,7 @@ const Ue = {
848
852
  getOn: (r) => r.options?.[e.type === s.Add ? "formAdd" : "formUpdate"]?.[r.type]?.on || r.options?.[r.type]?.on || {},
849
853
  getColumnSpan: (r, d) => {
850
854
  if (r.item.form?.spanCol) {
851
- const m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2, k = d.filter((n) => !M.isFun(n.item.show?.form, e.form, e.type)).reduce((n, h) => n + (h.item.form?.span || c), 0);
855
+ const m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2, k = d.filter((i) => !M.isFun(i.item.show?.form, e.form, e.type)).reduce((i, h) => i + (h.item.form?.span || c), 0);
852
856
  return (r.item.form?.span || c) + k;
853
857
  }
854
858
  return r.item.form?.span;
@@ -867,8 +871,8 @@ const Ue = {
867
871
  }
868
872
  if (e.formDefault[h.key] = h.value, h.isForm && (typeof h.show?.form != "boolean" || h.show?.form)) {
869
873
  h.form = h.form || { span: c }, h.form.span = h.form.span ?? c;
870
- const S = h.form.span, j = u.reduce((R, Y) => R + Y.span, S), T = u.length;
871
- if (u.push({ item: h, span: S }), (T === 1 && u[0].span === 0 || j >= m || S === 0 && T > 1) && (d.push(u), u = []), h.rules) {
874
+ const S = h.form.span, B = u.reduce((R, Y) => R + Y.span, S), T = u.length;
875
+ if (u.push({ item: h, span: S }), (T === 1 && u[0].span === 0 || B >= m || S === 0 && T > 1) && (d.push(u), u = []), h.rules) {
872
876
  const R = {
873
877
  input: w.tCurd("placeholderInput"),
874
878
  select: w.tCurd("placeholderSelect")
@@ -882,11 +886,11 @@ const Ue = {
882
886
  ] : h.rules;
883
887
  }
884
888
  }
885
- }, n = (h, S) => {
886
- h.isForm = S, Array.isArray(h.children) && h.children.forEach((j) => n(j, S));
889
+ }, i = (h, S) => {
890
+ h.isForm = S, Array.isArray(h.children) && h.children.forEach((B) => i(B, S));
887
891
  };
888
892
  r.column.forEach((h) => {
889
- n(h, !0), k(h);
893
+ i(h, !0), k(h);
890
894
  }), u.length > 0 && d.push(u), e.formColumn = d, e.form = JSONUtil.cp(e.formDefault);
891
895
  }
892
896
  });
@@ -908,7 +912,7 @@ const Ue = {
908
912
  ) ? (f(), b("div", {
909
913
  key: 0,
910
914
  class: I(["row curd-row", {
911
- stripe: i.option.form?.stripe === void 0 ? !0 : i.option.form?.stripe
915
+ stripe: n.option.form?.stripe === void 0 ? !0 : n.option.form?.stripe
912
916
  }])
913
917
  }, [
914
918
  C(r.$slots, "form-start", {
@@ -921,10 +925,10 @@ const Ue = {
921
925
  key: 0,
922
926
  class: I([u.item.form.span > 0 ? `col-${e.getColumnSpan(u, m)}` : "col", `form-item-col-${u.item.key}`])
923
927
  }, [
924
- E(o(ee), {
928
+ E(o(te), {
925
929
  label: u.item.text?.form?.label ?? u.item.label,
926
930
  prop: u.item.key,
927
- "label-width": u.item.text?.form?.label == "" ? 0 : u.item.form?.labelWidth || i.option.form?.labelWidth || "100px"
931
+ "label-width": u.item.text?.form?.label == "" ? 0 : u.item.form?.labelWidth || n.option.form?.labelWidth || "100px"
928
932
  }, {
929
933
  default: y(() => [
930
934
  D("div", Se, [
@@ -1009,7 +1013,7 @@ const Ue = {
1009
1013
  ref_for: !0
1010
1014
  }, e.getBind(u.item), z(e.getOn(u.item)), {
1011
1015
  disabled: e.getDisabled(u.item)
1012
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && (o(B).customComponent[u.item.type] || o(B).customComponent[u.item.type]?.form) ? (f(), g(Q(o(B).customComponent[u.item.type]?.form || o(B).customComponent[u.item.type]), V({
1016
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && (o(L).customComponent[u.item.type] || o(L).customComponent[u.item.type]?.form) ? (f(), g(Q(o(L).customComponent[u.item.type]?.form || o(L).customComponent[u.item.type]), V({
1013
1017
  key: 7,
1014
1018
  modelValue: e.form[u.item.key],
1015
1019
  "onUpdate:modelValue": (k) => e.form[u.item.key] = k,
@@ -1054,7 +1058,7 @@ const Ue = {
1054
1058
  }, 8, ["model", "rules"]));
1055
1059
  }
1056
1060
  });
1057
- class Le {
1061
+ class je {
1058
1062
  /**
1059
1063
  * 导出数据为 Excel 文件(.xlsx),自动触发浏览器下载
1060
1064
  *
@@ -1073,9 +1077,9 @@ class Le {
1073
1077
  l.utils.book_append_sheet(r, e, "Sheet1"), s ? typeof s == "function" && (s = s()) : s = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, l.writeFile(r, `${s}.xlsx`);
1074
1078
  };
1075
1079
  }
1076
- const P = M.EDialog, Be = (i) => {
1080
+ const P = M.EDialog, Le = (n) => {
1077
1081
  const a = N(), p = N(), s = N(), l = re({
1078
- option: i.option,
1082
+ option: n.option,
1079
1083
  /** 查询区域相关配置对象 */
1080
1084
  search: {
1081
1085
  /** 查询表单列集合 */
@@ -1092,18 +1096,18 @@ const P = M.EDialog, Be = (i) => {
1092
1096
  /** 组装实际要搜索的数据对象 */
1093
1097
  getFormData: () => {
1094
1098
  let t = {};
1095
- i.option.column.forEach((r) => {
1099
+ n.option.column.forEach((r) => {
1096
1100
  (typeof r.show?.search == "function" ? r.show?.search(l.search.form) : r.show?.search) && (t[r.key] = l.search.form[r.key]);
1097
1101
  });
1098
- const e = i.option.search?.before?.(t);
1102
+ const e = n.option.search?.before?.(t);
1099
1103
  return e && (t = e), t;
1100
1104
  },
1101
1105
  /** 重置搜索表单 */
1102
1106
  reset: () => {
1103
1107
  const t = l.search.formDefault;
1104
1108
  Object.keys(t).forEach((e) => {
1105
- i.option.search?.resetMode === "none" ? t[e] = void 0 : t[e] = l.search.formDefault[e];
1106
- }), l.search.form = ObjectUtil.deepMerge(t, {}), l.page.num = 1, i.option.init !== !1 && l.table.getList();
1109
+ n.option.search?.resetMode === "none" ? t[e] = void 0 : t[e] = l.search.formDefault[e];
1110
+ }), l.search.form = ObjectUtil.deepMerge(t, {}), l.page.num = 1, n.option.init !== !1 && l.table.getList();
1107
1111
  },
1108
1112
  /** 提交搜索表单 */
1109
1113
  submit: () => {
@@ -1117,15 +1121,15 @@ const P = M.EDialog, Be = (i) => {
1117
1121
  /** 总条数 */
1118
1122
  total: 0,
1119
1123
  /** 分页控件的布局方式 */
1120
- layout: i.option.page?.layout || A.config.pagination.layout,
1124
+ layout: n.option.page?.layout || A.config.pagination.layout,
1121
1125
  /** 是否显示到工具栏 默认不显示 配置后show属性无效 */
1122
- showTools: i.option.page?.showTools || A.config.pagination.showTools,
1126
+ showTools: n.option.page?.showTools || A.config.pagination.showTools,
1123
1127
  /** 当前每页条数 */
1124
- size: i.option.page?.size || A.config.pagination.size,
1128
+ size: n.option.page?.size || A.config.pagination.size,
1125
1129
  /** 支持切换的每页条数选项 */
1126
- sizeList: i.option.page?.sizeList || A.config.pagination.pageSizes,
1130
+ sizeList: n.option.page?.sizeList || A.config.pagination.pageSizes,
1127
1131
  /** 分页器计数 */
1128
- pagerCount: i.option.page?.pagerCount || A.config.pagination.pagerCount,
1132
+ pagerCount: n.option.page?.pagerCount || A.config.pagination.pagerCount,
1129
1133
  /** 获取分页查询参数 */
1130
1134
  getQuery: (t = {}) => ({
1131
1135
  [A.config.field.page.size]: t.size || l.page.size,
@@ -1161,7 +1165,7 @@ const P = M.EDialog, Be = (i) => {
1161
1165
  const t = (e) => {
1162
1166
  let r = [];
1163
1167
  return e.forEach((d) => {
1164
- r.push(d[i.option.table.rowKey]), d.children && d.children.length > 0 && (r = r.concat(t(d.children)));
1168
+ r.push(d[n.option.table.rowKey]), d.children && d.children.length > 0 && (r = r.concat(t(d.children)));
1165
1169
  }), r;
1166
1170
  };
1167
1171
  l.table.expand.rowKeys = t(l.table.data);
@@ -1202,7 +1206,7 @@ const P = M.EDialog, Be = (i) => {
1202
1206
  /** 获取数据列表接口实现 */
1203
1207
  getList: async () => {
1204
1208
  l.table.loading = !0;
1205
- const t = i.option.api.list;
1209
+ const t = n.option.api.list;
1206
1210
  try {
1207
1211
  await l.initApiData("init");
1208
1212
  let e = {};
@@ -1218,11 +1222,11 @@ const P = M.EDialog, Be = (i) => {
1218
1222
  ...e
1219
1223
  }), d = A.config.field.result, m = r.data || { [d.list]: r };
1220
1224
  let c = (Array.isArray(m[d.list]), m[d.list]);
1221
- const u = l.update.formColumn.flat(), n = ObjectUtil.deepMerge({ data: c }, {}).data.map((h) => (Object.keys(h).forEach((j) => {
1222
- const T = u.find((R) => R.item.key === j);
1223
- T && ["select", "radio"].includes(T.item.type) && (T.item.table.format || (T.item.table.format = (R) => T.item.options[T.item.type].data?.find((Y) => Y.value == R[j])?.label || R[j]));
1225
+ const u = l.update.formColumn.flat(), i = ObjectUtil.deepMerge({ data: c }, {}).data.map((h) => (Object.keys(h).forEach((B) => {
1226
+ const T = u.find((R) => R.item.key === B);
1227
+ T && ["select", "radio"].includes(T.item.type) && (T.item.table.format || (T.item.table.format = (R) => T.item.options[T.item.type].data?.find((Y) => Y.value == R[B])?.label || R[B]));
1224
1228
  }), h));
1225
- l.table.data = i.option.data ? await i.option.data(n, c) : n, l.page.total = m[d.total] || 0;
1229
+ l.table.data = n.option.data ? await n.option.data(i, c) : i, l.page.total = m[d.total] || 0;
1226
1230
  } catch (e) {
1227
1231
  console.error(e);
1228
1232
  } finally {
@@ -1242,9 +1246,9 @@ const P = M.EDialog, Be = (i) => {
1242
1246
  l.table.selection.list = [];
1243
1247
  const r = s.value;
1244
1248
  if (r?.clearSelection(), !r || !t?.length) return;
1245
- const d = i.option.table?.rowKey, m = l.table.data, c = (u) => {
1246
- const k = (n) => {
1247
- for (const h of n) {
1249
+ const d = n.option.table?.rowKey, m = l.table.data, c = (u) => {
1250
+ const k = (i) => {
1251
+ for (const h of i) {
1248
1252
  if (d != null && d !== "") {
1249
1253
  if (h[d] === u[d]) return h;
1250
1254
  } else if (h === u)
@@ -1261,10 +1265,10 @@ const P = M.EDialog, Be = (i) => {
1261
1265
  t.forEach((u) => {
1262
1266
  const k = c(u) ?? u;
1263
1267
  if (e) {
1264
- const n = () => {
1268
+ const i = () => {
1265
1269
  r.toggleRowSelection(k, !0, !1);
1266
1270
  };
1267
- e(u) !== !1 && n();
1271
+ e(u) !== !1 && i();
1268
1272
  } else
1269
1273
  r.toggleRowSelection(k, !0, !1);
1270
1274
  });
@@ -1285,7 +1289,7 @@ const P = M.EDialog, Be = (i) => {
1285
1289
  e.change(t, l);
1286
1290
  return;
1287
1291
  }
1288
- l.table.sort.prop = t.prop, t.order === null ? l.table.sort.order = "" : l.table.sort.order = t.order === "ascending" ? e.order.asc : e.order.desc, l.table.getList();
1292
+ l.table.sort.prop = t.prop, t.order === null ? (l.table.sort.order = "", l.table.sort.prop = "") : l.table.sort.order = t.order === "ascending" ? e.order.asc : e.order.desc, l.table.getList();
1289
1293
  }
1290
1294
  }
1291
1295
  },
@@ -1295,22 +1299,22 @@ const P = M.EDialog, Be = (i) => {
1295
1299
  run: {
1296
1300
  /** 执行指定方式的导出(如select、page、all) */
1297
1301
  start: async (t) => {
1298
- let e = await l.export.run[t](), r = i.option.column;
1302
+ let e = await l.export.run[t](), r = n.option.column;
1299
1303
  const d = ObjectUtil.deepMerge(
1300
1304
  {
1301
1305
  data: e,
1302
1306
  columns: r
1303
1307
  },
1304
1308
  {}
1305
- ), m = i.option.tools?.export || {};
1306
- m.before && m.before(d), Le.exportToExcel(d.data, d.columns, m.fileName);
1309
+ ), m = n.option.tools?.export || {};
1310
+ m.before && m.before(d), je.exportToExcel(d.data, d.columns, m.fileName);
1307
1311
  },
1308
1312
  /** 获取当前选中项进行导出 */
1309
1313
  select: async () => {
1310
1314
  l.export.loading = !0;
1311
1315
  try {
1312
- if (i.option.tools?.export?.select) {
1313
- await i.option.tools?.export?.select({
1316
+ if (n.option.tools?.export?.select) {
1317
+ await n.option.tools?.export?.select({
1314
1318
  ...l.page.getQuery(),
1315
1319
  items: l.table.selection.list
1316
1320
  });
@@ -1329,8 +1333,8 @@ const P = M.EDialog, Be = (i) => {
1329
1333
  page: async () => {
1330
1334
  l.export.loading = !0;
1331
1335
  try {
1332
- if (i.option.tools?.export?.page) {
1333
- await i.option.tools?.export?.page({
1336
+ if (n.option.tools?.export?.page) {
1337
+ await n.option.tools?.export?.page({
1334
1338
  ...l.page.getQuery()
1335
1339
  });
1336
1340
  return;
@@ -1348,13 +1352,13 @@ const P = M.EDialog, Be = (i) => {
1348
1352
  all: async () => {
1349
1353
  l.export.loading = !0;
1350
1354
  try {
1351
- if (i.option.tools?.export?.all) {
1352
- await i.option.tools?.export?.all({
1355
+ if (n.option.tools?.export?.all) {
1356
+ await n.option.tools?.export?.all({
1353
1357
  ...l.page.getQuery()
1354
1358
  });
1355
1359
  return;
1356
1360
  }
1357
- const t = i.option.api.list, e = await t({
1361
+ const t = n.option.api.list, e = await t({
1358
1362
  ...l.page.getQuery({
1359
1363
  size: 999999,
1360
1364
  num: 1
@@ -1396,7 +1400,7 @@ const P = M.EDialog, Be = (i) => {
1396
1400
  /** 表单所有列,二维数组结构按行分组 */
1397
1401
  formColumn: [],
1398
1402
  /** 判断是否禁用当前字段 */
1399
- getDisabled: (t, e = !1) => i.option.table?.editMode && e ? t.disabled?.table === void 0 ? !1 : t.disabled?.table : l.update.type === P.View ? t.disabled?.view === void 0 ? !0 : t.disabled?.view : t.disabled?.[l.update.type === P.Add ? "create" : "update"],
1403
+ getDisabled: (t, e = !1) => n.option.table?.editMode && e ? t.disabled?.table === void 0 ? !1 : t.disabled?.table : l.update.type === P.View ? t.disabled?.view === void 0 ? !0 : t.disabled?.view : t.disabled?.[l.update.type === P.Add ? "create" : "update"],
1400
1404
  /** 获取表单组件绑定属性 */
1401
1405
  getBind: (t) => t.options?.[l.update.type === P.Add ? "formAdd" : "formUpdate"]?.[t.type] || t.options?.[t.type] || {},
1402
1406
  /** 获取表单组件事件属性 */
@@ -1428,10 +1432,10 @@ const P = M.EDialog, Be = (i) => {
1428
1432
  data: {},
1429
1433
  /** 返回编辑时与原值的变更数据,用于局部更新API */
1430
1434
  getApiData: (t) => {
1431
- if (i.option.form?.editAll)
1435
+ if (n.option.form?.editAll)
1432
1436
  return t;
1433
1437
  let e = {
1434
- [i.option.table?.rowKey]: l.update.edit.data[i.option.table?.rowKey]
1438
+ [n.option.table?.rowKey]: l.update.edit.data[n.option.table?.rowKey]
1435
1439
  };
1436
1440
  return Object.keys(l.update.edit.data).forEach((r) => {
1437
1441
  t[r] !== l.update.edit.data[r] && (e[r] = t[r]);
@@ -1446,7 +1450,7 @@ const P = M.EDialog, Be = (i) => {
1446
1450
  try {
1447
1451
  l.update.type = t;
1448
1452
  const r = t === P.Add;
1449
- l.update.edit.data = e, l.update.title = w.tCurd(r ? "add" : t === P.View ? "view" : "edit"), l.update.form = ObjectUtil.deepMerge(r ? l.update.formDefault : e, {}), await l.initApiData("update"), await i.option.form?.openBefore?.(l.update.form, l.update), (!i.option.table?.inlineEdit || r) && (l.update.show = !0, l.update.showContent = !0), i.option.form?.openAfter?.(l.update.form, l.update);
1453
+ l.update.edit.data = e, l.update.title = w.tCurd(r ? "add" : t === P.View ? "view" : "edit"), l.update.form = ObjectUtil.deepMerge(r ? l.update.formDefault : e, {}), await l.initApiData("update"), await n.option.form?.openBefore?.(l.update.form, l.update), (!n.option.table?.inlineEdit || r) && (l.update.show = !0, l.update.showContent = !0), n.option.form?.openAfter?.(l.update.form, l.update);
1450
1454
  } catch (r) {
1451
1455
  console.error(r);
1452
1456
  } finally {
@@ -1460,16 +1464,16 @@ const P = M.EDialog, Be = (i) => {
1460
1464
  await p.value?.validate(async (d, m) => new Promise((c, u) => {
1461
1465
  d || (M.fail(w.tCurd("checkFormData")), u(!1)), c();
1462
1466
  })), l.update.loading = !0;
1463
- const t = l.update.type === P.Add ? i.option.api.create : i.option.api.update;
1467
+ const t = l.update.type === P.Add ? n.option.api.create : n.option.api.update;
1464
1468
  try {
1465
- await i.option.form?.submitBefore?.(l.update.form, l.update);
1469
+ await n.option.form?.submitBefore?.(l.update.form, l.update);
1466
1470
  } catch {
1467
1471
  l.update.loading = !1;
1468
1472
  return;
1469
1473
  }
1470
1474
  let e = ObjectUtil.deepMerge(l.update.form, {});
1471
1475
  delete e.children;
1472
- const r = new Set(i.option.column.filter((d) => d.type === "datetime").map((d) => d.key));
1476
+ const r = new Set(n.option.column.filter((d) => d.type === "datetime").map((d) => d.key));
1473
1477
  Object.keys(e).forEach((d) => {
1474
1478
  if (r.has(d) && e[d] != null) {
1475
1479
  const m = new Date(e[d]).getTime();
@@ -1480,7 +1484,7 @@ const P = M.EDialog, Be = (i) => {
1480
1484
  if (!t) return;
1481
1485
  await t({
1482
1486
  ...e
1483
- }), l.update.close(), await l.table.getList(), i.option.form?.submitAfter?.(e, l.update);
1487
+ }), l.update.close(), await l.table.getList(), n.option.form?.submitAfter?.(e, l.update);
1484
1488
  } catch (d) {
1485
1489
  console.error(d);
1486
1490
  } finally {
@@ -1490,7 +1494,7 @@ const P = M.EDialog, Be = (i) => {
1490
1494
  },
1491
1495
  /** 关闭弹窗和内容 */
1492
1496
  close: () => {
1493
- l.update.show = !1, i.option.table?.inlineEdit && (l.update.form = {}), setTimeout(() => {
1497
+ l.update.show = !1, n.option.table?.inlineEdit && (l.update.form = {}), setTimeout(() => {
1494
1498
  l.update.showContent = !1;
1495
1499
  }, 350);
1496
1500
  }
@@ -1521,11 +1525,11 @@ const P = M.EDialog, Be = (i) => {
1521
1525
  submit: () => {
1522
1526
  FunUtil.throttle(async () => {
1523
1527
  l.remove.loading = !0;
1524
- const t = i.option.api.delete;
1528
+ const t = n.option.api.delete;
1525
1529
  try {
1526
1530
  if (!t) return;
1527
1531
  await t({
1528
- [i.option.table?.rowKey]: l.remove.items.map((e) => e[i.option.table?.rowKey]),
1532
+ [n.option.table?.rowKey]: l.remove.items.map((e) => e[n.option.table?.rowKey]),
1529
1533
  items: l.remove.items
1530
1534
  }), M.success(w.tCurd("operationSuccess")), l.table.data.length <= 1 && l.page.num > 1 && (l.page.num -= 1), l.remove.close(), await l.table.getList();
1531
1535
  } catch (e) {
@@ -1564,17 +1568,17 @@ const P = M.EDialog, Be = (i) => {
1564
1568
  e.push(m);
1565
1569
  }
1566
1570
  };
1567
- return i.option.column.forEach((d) => {
1571
+ return n.option.column.forEach((d) => {
1568
1572
  r(d);
1569
1573
  }), await Promise.all(e), !0;
1570
1574
  },
1571
1575
  /** 初始化curd配置(option默认值合并等) */
1572
1576
  initCurdConfig: () => {
1573
1577
  const t = ObjectUtil.deepMerge(A.config, {});
1574
- t.table.emptyText = w.tCurd("noData"), i.option.size = i.option.size || {}, t.table.size = i.option.size.table || t.size.table, t.form.size = i.option.size.form || t.size.form, t.size.search = i.option.size.search || t.size.search;
1575
- const e = ObjectUtil.deepMerge(t, i.option || {});
1578
+ t.table.emptyText = w.tCurd("noData"), n.option.size = n.option.size || {}, t.table.size = n.option.size.table || t.size.table, t.form.size = n.option.size.form || t.size.form, t.size.search = n.option.size.search || t.size.search;
1579
+ const e = ObjectUtil.deepMerge(t, n.option || {});
1576
1580
  Object.keys(e).forEach((r) => {
1577
- i.option[r] = e[r];
1581
+ n.option[r] = e[r];
1578
1582
  });
1579
1583
  },
1580
1584
  /**
@@ -1603,8 +1607,8 @@ const P = M.EDialog, Be = (i) => {
1603
1607
  return;
1604
1608
  }
1605
1609
  } else d === "type" ? r.type = r.type || t.type : r[d] = ObjectUtil.deepMerge(t[d], r[d] || {});
1606
- r.options = r.options || {}, r.options[r.type] = r.options[r.type] || {}, r.options[r.type].size = i.option.size.form, ["search", "formAdd", "formUpdate"].forEach((c) => {
1607
- r.options[c] = r.options[c] || ObjectUtil.deepMerge(r.options, {}), r.options[c][r.type] = r.options[c][r.type] || {}, r.options[c][r.type].size = c === "search" ? i.option.size.search : i.option.size.form;
1610
+ r.options = r.options || {}, r.options[r.type] = r.options[r.type] || {}, r.options[r.type].size = n.option.size.form, ["search", "formAdd", "formUpdate"].forEach((c) => {
1611
+ r.options[c] = r.options[c] || ObjectUtil.deepMerge(r.options, {}), r.options[c][r.type] = r.options[c][r.type] || {}, r.options[c][r.type].size = c === "search" ? n.option.size.search : n.option.size.form;
1608
1612
  }), r.table = ObjectUtil.deepMerge(r.table, r.options[r.type].table || {});
1609
1613
  }
1610
1614
  r.type === "switch" && (r.options.switch.tableBeforeChange = async (d, m) => {
@@ -1615,13 +1619,13 @@ const P = M.EDialog, Be = (i) => {
1615
1619
  content: w.tCurd("confirmSwitchMessage")
1616
1620
  });
1617
1621
  try {
1618
- if (!i.option.api.update && !c.tableConfig?.api) return;
1619
- const u = m[i.option.table?.rowKey];
1622
+ if (!n.option.api.update && !c.tableConfig?.api) return;
1623
+ const u = m[n.option.table?.rowKey];
1620
1624
  c.loadingMap || (c.loadingMap = {}), c.loadingMap[u] || (c.loadingMap[u] = { loading: !1 }), c.loadingMap[u].loading = !0;
1621
- const k = m[d] === c.activeValue ? c.inactiveValue : c.activeValue, n = c.tableConfig?.api ? c.tableConfig.api : i.option.api.update;
1622
- if (!n) return;
1625
+ const k = m[d] === c.activeValue ? c.inactiveValue : c.activeValue, i = c.tableConfig?.api ? c.tableConfig.api : n.option.api.update;
1626
+ if (!i) return;
1623
1627
  try {
1624
- await n(
1628
+ await i(
1625
1629
  {
1626
1630
  ...m,
1627
1631
  [d]: k
@@ -1642,9 +1646,9 @@ const P = M.EDialog, Be = (i) => {
1642
1646
  } catch {
1643
1647
  return !1;
1644
1648
  }
1645
- }), r.type === "treeSelect" && (r.options.treeSelect.rowKey = i.option.table?.rowKey, r.options.treeSelect.nodeKey = i.option.table?.rowKey);
1649
+ }), r.type === "treeSelect" && (r.options.treeSelect.rowKey = n.option.table?.rowKey, r.options.treeSelect.nodeKey = n.option.table?.rowKey);
1646
1650
  };
1647
- i.option.column.forEach(e), i.option.table?.column?.forEach(e);
1651
+ n.option.column.forEach(e), n.option.table?.column?.forEach(e);
1648
1652
  },
1649
1653
  getColumnSpan: (t, e) => {
1650
1654
  if (t.item.form?.spanCol) {
@@ -1655,63 +1659,63 @@ const P = M.EDialog, Be = (i) => {
1655
1659
  },
1656
1660
  /** 初始化配置并生成表单列及默认值及规则 */
1657
1661
  initColumnForm: () => {
1658
- const t = i.option;
1662
+ const t = n.option;
1659
1663
  l.update.formColumn = [], l.table.column.show = {
1660
1664
  list: [],
1661
1665
  listSource: []
1662
1666
  };
1663
- const e = [], r = i.option.form?.maxSpan || 12, d = i.option.form?.defaultSpan || r / 2;
1667
+ const e = [], r = n.option.form?.maxSpan || 12, d = n.option.form?.defaultSpan || r / 2;
1664
1668
  let m = [];
1665
- const c = (n) => {
1666
- if (n.children) {
1667
- l.table.column.show.list.push(n.key), n.children.forEach((h) => {
1669
+ const c = (i) => {
1670
+ if (i.children) {
1671
+ l.table.column.show.list.push(i.key), i.children.forEach((h) => {
1668
1672
  c(h);
1669
1673
  });
1670
1674
  return;
1671
1675
  }
1672
- if (l.update.formDefault[n.key] = n.value, n.table.table && (n.show.table && l.table.column.show.list.push(n.key), n.table.table && l.table.column.show.listSource.push(n.key)), !(n.isForm && typeof n.show?.form == "boolean") || n.show?.form) {
1673
- n.form = n.form || { span: d }, n.form.span = n.form.span ?? d;
1674
- let h = n.form.span, S = m.reduce((T, R) => T + R.span, h);
1675
- const j = m.length;
1676
- if (m.push({ item: n, span: h }), (j === 1 && m[0].span === 0 || S >= r || h === 0 && j > 1) && (e.push(m), m = []), n.rules) {
1676
+ if (l.update.formDefault[i.key] = i.value, i.table.table && (i.show.table && l.table.column.show.list.push(i.key), i.table.table && l.table.column.show.listSource.push(i.key)), !(i.isForm && typeof i.show?.form == "boolean") || i.show?.form) {
1677
+ i.form = i.form || { span: d }, i.form.span = i.form.span ?? d;
1678
+ let h = i.form.span, S = m.reduce((T, R) => T + R.span, h);
1679
+ const B = m.length;
1680
+ if (m.push({ item: i, span: h }), (B === 1 && m[0].span === 0 || S >= r || h === 0 && B > 1) && (e.push(m), m = []), i.rules) {
1677
1681
  const T = {
1678
1682
  input: w.tCurd("placeholderInput"),
1679
1683
  select: w.tCurd("placeholderSelect")
1680
- }, R = (T[n.type] || T.input) + n.label;
1681
- l.update.rules[n.key] = typeof n.rules == "boolean" ? [
1684
+ }, R = (T[i.type] || T.input) + i.label;
1685
+ l.update.rules[i.key] = typeof i.rules == "boolean" ? [
1682
1686
  {
1683
1687
  required: !0,
1684
1688
  message: R,
1685
1689
  trigger: "blur"
1686
1690
  }
1687
- ] : n.rules;
1691
+ ] : i.rules;
1688
1692
  }
1689
1693
  }
1690
- }, u = (n, h) => {
1691
- n.isForm = h, Array.isArray(n.children) && n.children.forEach((S) => u(S, h));
1694
+ }, u = (i, h) => {
1695
+ i.isForm = h, Array.isArray(i.children) && i.children.forEach((S) => u(S, h));
1692
1696
  };
1693
- t.column.forEach((n) => {
1694
- n.isForm = !0, u(n, !0), c(n);
1695
- }), i.option.table?.column?.forEach((n) => {
1696
- u(n, !1), c(n);
1697
- }), l.search.column.list = t.column.concat(t.table?.column || []), l.table.column.list = l.search.column.list.filter((n) => n.table?.table), l.search.column.list.sort((n, h) => n.sort?.search - h.sort?.search), l.table.column.list.sort((n, h) => n.sort?.table - h.sort?.table), m.length > 0 && e.push(m), l.update.formColumn = e;
1698
- const k = i.option.search?.formDefault;
1699
- k && Object.keys(k).forEach((n) => {
1700
- l.search.formDefault[n] = k[n];
1701
- }), t.column.forEach((n) => {
1702
- n.show?.search || (l.search.formDefault[n.key] = void 0);
1697
+ t.column.forEach((i) => {
1698
+ i.isForm = !0, u(i, !0), c(i);
1699
+ }), n.option.table?.column?.forEach((i) => {
1700
+ u(i, !1), c(i);
1701
+ }), l.search.column.list = t.column.concat(t.table?.column || []), l.table.column.list = l.search.column.list.filter((i) => i.table?.table), l.search.column.list.sort((i, h) => i.sort?.search - h.sort?.search), l.table.column.list.sort((i, h) => i.sort?.table - h.sort?.table), m.length > 0 && e.push(m), l.update.formColumn = e;
1702
+ const k = n.option.search?.formDefault;
1703
+ k && Object.keys(k).forEach((i) => {
1704
+ l.search.formDefault[i] = k[i];
1705
+ }), t.column.forEach((i) => {
1706
+ i.show?.search || (l.search.formDefault[i.key] = void 0);
1703
1707
  }), l.search.form = ObjectUtil.deepMerge(l.search.formDefault, {});
1704
1708
  }
1705
1709
  });
1706
1710
  return l.init(), fe(() => {
1707
- i.option.init !== !1 && l.table.getList();
1711
+ n.option.init !== !1 && l.table.getList();
1708
1712
  }), { conf: l, switchConfirmRef: a, ruleFormRef: p, tableRef: s };
1709
- }, je = { class: "dialog-footer" }, Re = /* @__PURE__ */ G({
1713
+ }, Be = { class: "dialog-footer" }, Re = /* @__PURE__ */ G({
1710
1714
  __name: "switchConfirm",
1711
1715
  props: {
1712
1716
  size: {}
1713
1717
  },
1714
- setup(i, { expose: a }) {
1718
+ setup(n, { expose: a }) {
1715
1719
  const p = N(!1), s = N("确认修改"), l = N("确认要修改状态吗?");
1716
1720
  let t = null, e = null;
1717
1721
  const r = (c) => (c?.title && (s.value = c.title), c?.content && (l.value = c.content), p.value = !0, new Promise((u, k) => {
@@ -1725,9 +1729,9 @@ const P = M.EDialog, Be = (i) => {
1725
1729
  open: r
1726
1730
  }), (c, u) => {
1727
1731
  const k = _("el-form");
1728
- return f(), g(o(oe), {
1732
+ return f(), g(o(ae), {
1729
1733
  modelValue: p.value,
1730
- "onUpdate:modelValue": u[0] || (u[0] = (n) => p.value = n),
1734
+ "onUpdate:modelValue": u[0] || (u[0] = (i) => p.value = i),
1731
1735
  title: s.value,
1732
1736
  "close-on-click-modal": !1,
1733
1737
  width: "400px"
@@ -1735,14 +1739,14 @@ const P = M.EDialog, Be = (i) => {
1735
1739
  footer: y(() => [
1736
1740
  E(k, { size: c.size }, {
1737
1741
  default: y(() => [
1738
- D("span", je, [
1739
- E(o(L), { onClick: m }, {
1742
+ D("span", Be, [
1743
+ E(o(j), { onClick: m }, {
1740
1744
  default: y(() => u[1] || (u[1] = [
1741
1745
  U("取消")
1742
1746
  ])),
1743
1747
  _: 1
1744
1748
  }),
1745
- E(o(L), {
1749
+ E(o(j), {
1746
1750
  type: "primary",
1747
1751
  onClick: d
1748
1752
  }, {
@@ -1763,8 +1767,8 @@ const P = M.EDialog, Be = (i) => {
1763
1767
  }, 8, ["modelValue", "title"]);
1764
1768
  };
1765
1769
  }
1766
- }), X = (i, a) => {
1767
- const p = i.__vccOpts || i;
1770
+ }), X = (n, a) => {
1771
+ const p = n.__vccOpts || n;
1768
1772
  for (const [s, l] of a)
1769
1773
  p[s] = l;
1770
1774
  return p;
@@ -1772,7 +1776,7 @@ const P = M.EDialog, Be = (i) => {
1772
1776
  xmlns: "http://www.w3.org/2000/svg",
1773
1777
  viewBox: "0 0 1024 1024"
1774
1778
  };
1775
- function He(i, a) {
1779
+ function He(n, a) {
1776
1780
  return f(), b("svg", Pe, a[0] || (a[0] = [
1777
1781
  D("path", {
1778
1782
  fill: "currentColor",
@@ -1785,7 +1789,7 @@ const Ke = /* @__PURE__ */ X(Ie, [["render", He]]), Ne = {}, We = {
1785
1789
  xmlns: "http://www.w3.org/2000/svg",
1786
1790
  viewBox: "0 0 1024 1024"
1787
1791
  };
1788
- function Je(i, a) {
1792
+ function Je(n, a) {
1789
1793
  return f(), b("svg", We, a[0] || (a[0] = [
1790
1794
  D("path", {
1791
1795
  fill: "currentColor",
@@ -1798,7 +1802,7 @@ const qe = /* @__PURE__ */ X(Ne, [["render", Je]]), Qe = {}, Ge = {
1798
1802
  xmlns: "http://www.w3.org/2000/svg",
1799
1803
  viewBox: "0 0 1024 1024"
1800
1804
  };
1801
- function Xe(i, a) {
1805
+ function Xe(n, a) {
1802
1806
  return f(), b("svg", Ge, a[0] || (a[0] = [
1803
1807
  D("path", {
1804
1808
  fill: "currentColor",
@@ -1811,7 +1815,7 @@ const Ye = /* @__PURE__ */ X(Qe, [["render", Xe]]), Ze = {}, xe = {
1811
1815
  xmlns: "http://www.w3.org/2000/svg",
1812
1816
  viewBox: "0 0 1024 1024"
1813
1817
  };
1814
- function _e(i, a) {
1818
+ function _e(n, a) {
1815
1819
  return f(), b("svg", xe, a[0] || (a[0] = [
1816
1820
  D("path", {
1817
1821
  fill: "currentColor",
@@ -1826,7 +1830,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
1826
1830
  columnList: {},
1827
1831
  option: {}
1828
1832
  },
1829
- setup(i) {
1833
+ setup(n) {
1830
1834
  const a = M.isFun, p = we().type;
1831
1835
  return (s, l) => {
1832
1836
  const t = _("el-tooltip");
@@ -1834,7 +1838,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
1834
1838
  key: e.key
1835
1839
  }, [
1836
1840
  s.conf.table.column.show.list.includes(e.key) ? (f(), b($, { key: 0 }, [
1837
- e.table?.header?.groupKey === void 0 || e.table.header.show ? (f(), g(o(ae), V({
1841
+ e.table?.header?.groupKey === void 0 || e.table.header.show ? (f(), g(o(ee), V({
1838
1842
  key: 0,
1839
1843
  prop: e.key,
1840
1844
  label: e.label,
@@ -1990,7 +1994,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
1990
1994
  row: r,
1991
1995
  item: e
1992
1996
  }, () => [
1993
- o(B).customComponent[e.type ?? ""]?.table ? (f(), g(Q(o(B).customComponent[e.type ?? ""]?.table), V({
1997
+ o(L).customComponent[e.type ?? ""]?.table ? (f(), g(Q(o(L).customComponent[e.type ?? ""]?.table), V({
1994
1998
  key: 0,
1995
1999
  modelValue: r[e.key],
1996
2000
  "onUpdate:modelValue": (d) => r[e.key] = d,
@@ -2032,8 +2036,8 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
2032
2036
  conf: {},
2033
2037
  item: {}
2034
2038
  },
2035
- setup(i) {
2036
- return (a, p) => (f(), g(o(ee), {
2039
+ setup(n) {
2040
+ return (a, p) => (f(), g(o(te), {
2037
2041
  label: a.item.item.text?.form?.label ?? a.item.item.label,
2038
2042
  prop: a.item.item.key,
2039
2043
  "label-width": a.item.item.text?.form?.label == "" ? 0 : a.item.item.form?.labelWidth || a.conf.option.form?.labelWidth
@@ -2122,7 +2126,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
2122
2126
  "onUpdate:modelValue": p[5] || (p[5] = (s) => a.conf.update.form[a.item.item.key] = s)
2123
2127
  }, a.conf.update.getBind(a.item.item), z(a.conf.update.getOn(a.item.item)), {
2124
2128
  disabled: a.conf.update.getDisabled(a.item.item)
2125
- }), null, 16, ["modelValue", "disabled"])) : a.item.item.type && (o(B).customComponent[a.item.item.type] || o(B).customComponent[a.item.item.type]?.form) ? (f(), g(Q(o(B).customComponent[a.item.item.type]?.form || o(B).customComponent[a.item.item.type]), V({
2129
+ }), null, 16, ["modelValue", "disabled"])) : a.item.item.type && (o(L).customComponent[a.item.item.type] || o(L).customComponent[a.item.item.type]?.form) ? (f(), g(Q(o(L).customComponent[a.item.item.type]?.form || o(L).customComponent[a.item.item.type]), V({
2126
2130
  key: 7,
2127
2131
  modelValue: a.conf.update.form[a.item.item.key],
2128
2132
  "onUpdate:modelValue": p[6] || (p[6] = (s) => a.conf.update.form[a.item.item.key] = s)
@@ -2159,7 +2163,7 @@ const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-cent
2159
2163
  xmlns: "http://www.w3.org/2000/svg",
2160
2164
  viewBox: "64 64 896 896"
2161
2165
  };
2162
- function ht(i, a) {
2166
+ function ht(n, a) {
2163
2167
  return f(), b("svg", mt, a[0] || (a[0] = [
2164
2168
  D("path", {
2165
2169
  fill: "currentColor",
@@ -2171,7 +2175,7 @@ const gt = /* @__PURE__ */ X(ct, [["render", ht]]), yt = {}, bt = {
2171
2175
  xmlns: "http://www.w3.org/2000/svg",
2172
2176
  viewBox: "64 64 896 896"
2173
2177
  };
2174
- function wt(i, a) {
2178
+ function wt(n, a) {
2175
2179
  return f(), b("svg", bt, a[0] || (a[0] = [
2176
2180
  D("path", {
2177
2181
  fill: "currentColor",
@@ -2201,148 +2205,148 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2201
2205
  default: {}
2202
2206
  }
2203
2207
  },
2204
- setup(i, { expose: a }) {
2205
- const p = M.EDialog, s = i, l = M.isFun, { conf: t, switchConfirmRef: e, ruleFormRef: r, tableRef: d } = Be(s);
2208
+ setup(n, { expose: a }) {
2209
+ const p = M.EDialog, s = n, l = M.isFun, { conf: t, switchConfirmRef: e, ruleFormRef: r, tableRef: d } = Le(s);
2206
2210
  return a({
2207
2211
  conf: t
2208
2212
  }), (m, c) => {
2209
2213
  const u = _("el-tooltip"), k = ve("loading");
2210
2214
  return f(), b("div", {
2211
- class: I(["relative cc1-form-box", [i.option.table?.fitHeight ? "col" : "no-min-height"]])
2215
+ class: I(["relative cc1-form-box", [n.option.table?.fitHeight ? "col" : "no-min-height"]])
2212
2216
  }, [
2213
2217
  D("div", {
2214
- class: I(["row", [i.option.table?.fitHeight ? "absolute fit" : ""]]),
2218
+ class: I(["row", [n.option.table?.fitHeight ? "absolute fit" : ""]]),
2215
2219
  style: { overflow: "hidden" }
2216
2220
  }, [
2217
2221
  C(m.$slots, "box-left"),
2218
2222
  D("div", {
2219
- class: I(["column fit-width no-wrap", [i.option.table?.fitHeight ? "col" : ""]])
2223
+ class: I(["column fit-width no-wrap", [n.option.table?.fitHeight ? "col" : ""]])
2220
2224
  }, [
2221
- i.option.search?.show !== !1 ? (f(), b("div", vt, [
2225
+ n.option.search?.show !== !1 ? (f(), b("div", vt, [
2222
2226
  E(o(W), {
2223
2227
  model: o(t).search.form,
2224
2228
  inline: "",
2225
- size: i.option.size?.search
2229
+ size: n.option.size?.search
2226
2230
  }, {
2227
2231
  default: y(() => [
2228
2232
  C(m.$slots, "search-start", {
2229
2233
  row: o(t).search.form
2230
2234
  }),
2231
- (f(!0), b($, null, F(o(t).search.column.list, (n) => (f(), b($, {
2232
- key: n.key
2235
+ (f(!0), b($, null, F(o(t).search.column.list, (i) => (f(), b($, {
2236
+ key: i.key
2233
2237
  }, [
2234
- C(m.$slots, "search-" + n.key + "-start", {
2238
+ C(m.$slots, "search-" + i.key + "-start", {
2235
2239
  row: o(t).search.form
2236
2240
  }),
2237
- (typeof n.show?.search == "function" ? n.show?.search(o(t).search.form) : n.show?.search) ? (f(), g(o(ee), {
2241
+ (typeof i.show?.search == "function" ? i.show?.search(o(t).search.form) : i.show?.search) ? (f(), g(o(te), {
2238
2242
  key: 0,
2239
- label: n.text?.search?.label ?? n.label
2243
+ label: i.text?.search?.label ?? i.label
2240
2244
  }, {
2241
2245
  default: y(() => [
2242
- C(m.$slots, "search-" + n.key + "-left", {
2246
+ C(m.$slots, "search-" + i.key + "-left", {
2243
2247
  row: o(t).search.form
2244
2248
  }),
2245
- C(m.$slots, "search-" + n.key, {
2249
+ C(m.$slots, "search-" + i.key, {
2246
2250
  row: o(t).search.form
2247
2251
  }, () => [
2248
- o(B).customComponent[n.type ?? ""]?.search ? (f(), g(Q(o(B).customComponent[n.type ?? ""]?.search), V({
2252
+ o(L).customComponent[i.type ?? ""]?.search ? (f(), g(Q(o(L).customComponent[i.type ?? ""]?.search), V({
2249
2253
  key: 0,
2250
- modelValue: o(t).search.form[n.key],
2251
- "onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
2254
+ modelValue: o(t).search.form[i.key],
2255
+ "onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
2252
2256
  ref_for: !0
2253
- }, n.options?.search?.[n.type ?? ""], z(n.options?.search?.[n.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : n.type === "input" ? (f(), g(o(x), V({
2257
+ }, i.options?.search?.[i.type ?? ""], z(i.options?.search?.[i.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : i.type === "input" ? (f(), g(o(x), V({
2254
2258
  key: 1,
2255
- modelValue: o(t).search.form[n.key],
2256
- "onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
2257
- placeholder: o(t).search.getPlaceholder(n),
2259
+ modelValue: o(t).search.form[i.key],
2260
+ "onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
2261
+ placeholder: o(t).search.getPlaceholder(i),
2258
2262
  clearable: "",
2259
- disabled: n.disabled?.search,
2263
+ disabled: i.disabled?.search,
2260
2264
  ref_for: !0
2261
- }, n.options?.search?.input || n.options?.input, z(n.options?.search?.input?.on || n.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "switch" ? (f(), g(o(q), V({
2265
+ }, i.options?.search?.input || i.options?.input, z(i.options?.search?.input?.on || i.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "switch" ? (f(), g(o(q), V({
2262
2266
  key: 2,
2263
- modelValue: o(t).search.form[n.key],
2264
- "onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
2265
- placeholder: o(t).search.getPlaceholder(n, o(w).tCurd("placeholderSelect")),
2267
+ modelValue: o(t).search.form[i.key],
2268
+ "onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
2269
+ placeholder: o(t).search.getPlaceholder(i, o(w).tCurd("placeholderSelect")),
2266
2270
  clearable: "",
2267
- disabled: n.disabled?.search,
2271
+ disabled: i.disabled?.search,
2268
2272
  ref_for: !0
2269
- }, n.options?.search?.switch || n.options?.switch, z(n.options?.search?.switch?.on || n.options?.switch?.on || {})), {
2273
+ }, i.options?.search?.switch || i.options?.switch, z(i.options?.search?.switch?.on || i.options?.switch?.on || {})), {
2270
2274
  default: y(() => [
2271
2275
  (f(), g(o(K), {
2272
- key: n.options?.switch?.activeValue,
2273
- label: n.options?.switch?.activeText,
2274
- value: n.options?.switch?.activeValue
2276
+ key: i.options?.switch?.activeValue,
2277
+ label: i.options?.switch?.activeText,
2278
+ value: i.options?.switch?.activeValue
2275
2279
  }, null, 8, ["label", "value"])),
2276
2280
  (f(), g(o(K), {
2277
- key: n.options?.switch?.inactiveValue,
2278
- label: n.options?.switch?.inactiveText,
2279
- value: n.options?.switch?.inactiveValue
2281
+ key: i.options?.switch?.inactiveValue,
2282
+ label: i.options?.switch?.inactiveText,
2283
+ value: i.options?.switch?.inactiveValue
2280
2284
  }, null, 8, ["label", "value"]))
2281
2285
  ]),
2282
2286
  _: 2
2283
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "select" ? (f(), g(o(q), V({
2287
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "select" ? (f(), g(o(q), V({
2284
2288
  key: 3,
2285
- modelValue: o(t).search.form[n.key],
2286
- "onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
2287
- placeholder: o(t).search.getPlaceholder(n, o(w).tCurd("placeholderSelect")),
2289
+ modelValue: o(t).search.form[i.key],
2290
+ "onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
2291
+ placeholder: o(t).search.getPlaceholder(i, o(w).tCurd("placeholderSelect")),
2288
2292
  clearable: "",
2289
- disabled: n.disabled?.search,
2293
+ disabled: i.disabled?.search,
2290
2294
  ref_for: !0
2291
- }, n.options?.search?.select || n.options?.select, z(n.options?.search?.select?.on || n.options?.select?.on || {})), {
2295
+ }, i.options?.search?.select || i.options?.select, z(i.options?.search?.select?.on || i.options?.select?.on || {})), {
2292
2296
  default: y(() => [
2293
- (f(!0), b($, null, F(n.options?.select?.data, (h) => (f(), g(o(K), {
2297
+ (f(!0), b($, null, F(i.options?.select?.data, (h) => (f(), g(o(K), {
2294
2298
  key: h.value,
2295
2299
  label: h.label,
2296
2300
  value: h.value
2297
2301
  }, null, 8, ["label", "value"]))), 128))
2298
2302
  ]),
2299
2303
  _: 2
2300
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "radio" ? (f(), g(o(le), V({
2304
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "radio" ? (f(), g(o(le), V({
2301
2305
  key: 4,
2302
- modelValue: o(t).search.form[n.key],
2303
- "onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
2304
- disabled: n.disabled?.search,
2306
+ modelValue: o(t).search.form[i.key],
2307
+ "onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
2308
+ disabled: i.disabled?.search,
2305
2309
  ref_for: !0
2306
- }, n.options?.search?.radio || n.options?.radio, z(n.options?.search?.radio?.on || n.options?.radio?.on || {})), {
2310
+ }, i.options?.search?.radio || i.options?.radio, z(i.options?.search?.radio?.on || i.options?.radio?.on || {})), {
2307
2311
  default: y(() => [
2308
- (f(!0), b($, null, F(n.options?.radio?.data, (h) => (f(), g(o(ne), {
2312
+ (f(!0), b($, null, F(i.options?.radio?.data, (h) => (f(), g(o(ne), {
2309
2313
  key: h.value,
2310
2314
  label: h.label,
2311
2315
  value: h.value
2312
2316
  }, null, 8, ["label", "value"]))), 128))
2313
2317
  ]),
2314
2318
  _: 2
2315
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.type === "datetime" ? (f(), g(o(ie), V({
2319
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type === "datetime" ? (f(), g(o(ie), V({
2316
2320
  key: 5,
2317
- modelValue: o(t).search.form[n.key],
2318
- "onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
2319
- disabled: n.disabled?.search,
2321
+ modelValue: o(t).search.form[i.key],
2322
+ "onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
2323
+ disabled: i.disabled?.search,
2320
2324
  ref_for: !0
2321
- }, n.options?.search?.datetime || n.options?.datetime, z(n.options?.search?.datetime?.on || n.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.type && o(B).customComponent[n.type] ? (f(), g(Q(o(B).customComponent[n.type]), V({
2325
+ }, i.options?.search?.datetime || i.options?.datetime, z(i.options?.search?.datetime?.on || i.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type && o(L).customComponent[i.type] ? (f(), g(Q(o(L).customComponent[i.type]), V({
2322
2326
  key: 6,
2323
- modelValue: o(t).search.form[n.key],
2324
- "onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
2327
+ modelValue: o(t).search.form[i.key],
2328
+ "onUpdate:modelValue": (h) => o(t).search.form[i.key] = h,
2325
2329
  ref_for: !0
2326
- }, n.options?.search?.[n.type] || n.options?.[n.type], z(n.options?.search?.[n.type]?.on || n.options?.[n.type]?.on || {}), {
2327
- disabled: n.disabled?.search
2330
+ }, i.options?.search?.[i.type] || i.options?.[i.type], z(i.options?.search?.[i.type]?.on || i.options?.[i.type]?.on || {}), {
2331
+ disabled: i.disabled?.search
2328
2332
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
2329
2333
  ]),
2330
- C(m.$slots, "search-" + n.key + "-right", {
2334
+ C(m.$slots, "search-" + i.key + "-right", {
2331
2335
  row: o(t).search.form
2332
2336
  })
2333
2337
  ]),
2334
2338
  _: 2
2335
2339
  }, 1032, ["label"])) : v("", !0),
2336
- C(m.$slots, "search-" + n.key + "-end", {
2340
+ C(m.$slots, "search-" + i.key + "-end", {
2337
2341
  row: o(t).search.form
2338
2342
  })
2339
2343
  ], 64))), 128)),
2340
2344
  C(m.$slots, "search-center", {
2341
2345
  row: o(t).search.form
2342
2346
  }),
2343
- i.option.tools?.search || i.option.tools?.reset ? (f(), g(o(ee), { key: 0 }, {
2347
+ n.option.tools?.search || n.option.tools?.reset ? (f(), g(o(te), { key: 0 }, {
2344
2348
  default: y(() => [
2345
- i.option.tools?.search ? (f(), g(o(L), {
2349
+ n.option.tools?.search ? (f(), g(o(j), {
2346
2350
  key: 0,
2347
2351
  type: "primary",
2348
2352
  onClick: o(t).search.submit
@@ -2352,7 +2356,7 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2352
2356
  ]),
2353
2357
  _: 1
2354
2358
  }, 8, ["onClick"])) : v("", !0),
2355
- i.option.tools?.reset ? (f(), g(o(L), {
2359
+ n.option.tools?.reset ? (f(), g(o(j), {
2356
2360
  key: 1,
2357
2361
  onClick: o(t).search.reset
2358
2362
  }, {
@@ -2373,11 +2377,11 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2373
2377
  ])) : v("", !0),
2374
2378
  D("div", Ct, [
2375
2379
  D("div", Vt, [
2376
- o(l)(i.option.tools?.add) ? (f(), b("div", zt, [
2377
- E(o(L), {
2380
+ o(l)(n.option.tools?.add) ? (f(), b("div", zt, [
2381
+ E(o(j), {
2378
2382
  type: "primary",
2379
- onClick: c[0] || (c[0] = (n) => o(t).update.open(o(p).Add)),
2380
- size: i.option.size?.search
2383
+ onClick: c[0] || (c[0] = (i) => o(t).update.open(o(p).Add)),
2384
+ size: n.option.size?.search
2381
2385
  }, {
2382
2386
  default: y(() => [
2383
2387
  U(O(o(w).tCurd("add")), 1)
@@ -2385,11 +2389,11 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2385
2389
  _: 1
2386
2390
  }, 8, ["size"])
2387
2391
  ])) : v("", !0),
2388
- i.option.table?.selectable && o(l)(i.option.tools?.delete) ? (f(), b("div", $t, [
2389
- E(o(L), {
2392
+ n.option.table?.selectable && o(l)(n.option.tools?.delete) ? (f(), b("div", $t, [
2393
+ E(o(j), {
2390
2394
  type: "danger",
2391
- onClick: c[1] || (c[1] = (n) => o(t).remove.open(o(t).table.selection.list)),
2392
- size: i.option.size?.search
2395
+ onClick: c[1] || (c[1] = (i) => o(t).remove.open(o(t).table.selection.list)),
2396
+ size: n.option.size?.search
2393
2397
  }, {
2394
2398
  default: y(() => [
2395
2399
  U(O(o(w).tCurd("delete")), 1)
@@ -2397,11 +2401,11 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2397
2401
  _: 1
2398
2402
  }, 8, ["size"])
2399
2403
  ])) : v("", !0),
2400
- i.option.tools?.expand ? (f(), b("div", Ut, [
2401
- E(o(L), {
2404
+ n.option.tools?.expand ? (f(), b("div", Ut, [
2405
+ E(o(j), {
2402
2406
  type: "warning",
2403
- onClick: c[2] || (c[2] = (n) => o(t).table.expand.all()),
2404
- size: i.option.size?.search
2407
+ onClick: c[2] || (c[2] = (i) => o(t).table.expand.all()),
2408
+ size: n.option.size?.search
2405
2409
  }, {
2406
2410
  default: y(() => [
2407
2411
  U(O(o(w).tCurd("expandCollapse")), 1)
@@ -2409,17 +2413,17 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2409
2413
  _: 1
2410
2414
  }, 8, ["size"])
2411
2415
  ])) : v("", !0),
2412
- i.option.tools?.export?.show ? (f(), b($, { key: 3 }, [
2413
- i.option.tools?.export?.dropdown?.show ? (f(), g(o(he), {
2416
+ n.option.tools?.export?.show ? (f(), b($, { key: 3 }, [
2417
+ n.option.tools?.export?.dropdown?.show ? (f(), g(o(he), {
2414
2418
  key: 0,
2415
2419
  onCommand: o(t).export.click
2416
2420
  }, {
2417
2421
  dropdown: y(() => [
2418
2422
  E(o(ge), {
2419
- size: i.option.size?.search
2423
+ size: n.option.size?.search
2420
2424
  }, {
2421
2425
  default: y(() => [
2422
- i.option.tools?.export?.dropdown?.select && (i.option.table?.selectable || o(l)(i.option.tools?.delete)) ? (f(), g(o(te), {
2426
+ n.option.tools?.export?.dropdown?.select && (n.option.table?.selectable || o(l)(n.option.tools?.delete)) ? (f(), g(o(oe), {
2423
2427
  key: 0,
2424
2428
  command: "select"
2425
2429
  }, {
@@ -2428,7 +2432,7 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2428
2432
  ]),
2429
2433
  _: 1
2430
2434
  })) : v("", !0),
2431
- i.option.tools?.export?.dropdown?.page ? (f(), g(o(te), {
2435
+ n.option.tools?.export?.dropdown?.page ? (f(), g(o(oe), {
2432
2436
  key: 1,
2433
2437
  command: "page"
2434
2438
  }, {
@@ -2437,7 +2441,7 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2437
2441
  ]),
2438
2442
  _: 1
2439
2443
  })) : v("", !0),
2440
- i.option.tools?.export?.dropdown?.all ? (f(), g(o(te), {
2444
+ n.option.tools?.export?.dropdown?.all ? (f(), g(o(oe), {
2441
2445
  key: 2,
2442
2446
  command: "all"
2443
2447
  }, {
@@ -2452,10 +2456,10 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2452
2456
  ]),
2453
2457
  default: y(() => [
2454
2458
  D("div", Dt, [
2455
- E(o(L), {
2459
+ E(o(j), {
2456
2460
  type: "warning",
2457
2461
  loading: o(t).export.loading,
2458
- size: i.option.size?.search
2462
+ size: n.option.size?.search
2459
2463
  }, {
2460
2464
  default: y(() => [
2461
2465
  U(O(o(w).tCurd("export")), 1)
@@ -2466,11 +2470,11 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2466
2470
  ]),
2467
2471
  _: 1
2468
2472
  }, 8, ["onCommand"])) : (f(), b("div", Et, [
2469
- E(o(L), {
2473
+ E(o(j), {
2470
2474
  type: "warning",
2471
2475
  loading: o(t).export.loading,
2472
- size: i.option.size?.search,
2473
- onClick: c[3] || (c[3] = (n) => o(t).export.run.start("all"))
2476
+ size: n.option.size?.search,
2477
+ onClick: c[3] || (c[3] = (i) => o(t).export.run.start("all"))
2474
2478
  }, {
2475
2479
  default: y(() => [
2476
2480
  U(O(o(w).tCurd("export")), 1)
@@ -2486,19 +2490,19 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2486
2490
  o(t).page.showTools ? (f(), g(o(de), V({
2487
2491
  key: 0,
2488
2492
  "current-page": o(t).page.num,
2489
- "onUpdate:currentPage": c[4] || (c[4] = (n) => o(t).page.num = n),
2493
+ "onUpdate:currentPage": c[4] || (c[4] = (i) => o(t).page.num = i),
2490
2494
  "page-size": o(t).page.size,
2491
- "onUpdate:pageSize": c[5] || (c[5] = (n) => o(t).page.size = n),
2495
+ "onUpdate:pageSize": c[5] || (c[5] = (i) => o(t).page.size = i),
2492
2496
  background: "",
2493
2497
  "page-sizes": o(t).page.sizeList,
2494
2498
  "pager-count": o(t).page.pagerCount,
2495
2499
  layout: o(t).page.layout,
2496
2500
  total: o(t).page.total,
2497
- size: i.option.size?.table,
2501
+ size: n.option.size?.table,
2498
2502
  onSizeChange: o(t).table.getList,
2499
2503
  onCurrentChange: o(t).table.getList
2500
- }, i.option.page?.pagination || {}, z(i.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0),
2501
- i.option.tools?.expandColumn === void 0 || i.option.tools?.expandColumn ? (f(), g(u, {
2504
+ }, n.option.page?.pagination || {}, z(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0),
2505
+ n.option.tools?.expandColumn === void 0 || n.option.tools?.expandColumn ? (f(), g(u, {
2502
2506
  key: 1,
2503
2507
  effect: "dark",
2504
2508
  content: o(t).table.header.group.expand ? o(w).tCurd("mergeColumn") : o(w).tCurd("expandColumn"),
@@ -2506,43 +2510,43 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2506
2510
  }, {
2507
2511
  default: y(() => [
2508
2512
  D("div", {
2509
- class: I(["refresh-btn", [i.option.size?.search]]),
2513
+ class: I(["refresh-btn", [n.option.size?.search]]),
2510
2514
  onClick: c[6] || (c[6] = //@ts-ignore
2511
- (...n) => o(t).table.header.group.toggleExpandAll && o(t).table.header.group.toggleExpandAll(...n))
2515
+ (...i) => o(t).table.header.group.toggleExpandAll && o(t).table.header.group.toggleExpandAll(...i))
2512
2516
  }, [
2513
2517
  o(t).table.header.group.expand ? (f(), g(gt, { key: 0 })) : (f(), g(kt, { key: 1 }))
2514
2518
  ], 2)
2515
2519
  ]),
2516
2520
  _: 1
2517
2521
  }, 8, ["content"])) : v("", !0),
2518
- i.option.tools?.refresh === void 0 || i.option.tools?.refresh ? (f(), b("div", {
2522
+ n.option.tools?.refresh === void 0 || n.option.tools?.refresh ? (f(), b("div", {
2519
2523
  key: 2,
2520
- class: I(["refresh-btn", [i.option.size?.search]]),
2524
+ class: I(["refresh-btn", [n.option.size?.search]]),
2521
2525
  onClick: c[7] || (c[7] = //@ts-ignore
2522
- (...n) => o(t).table.getList && o(t).table.getList(...n))
2526
+ (...i) => o(t).table.getList && o(t).table.getList(...i))
2523
2527
  }, [
2524
2528
  E(Ke)
2525
2529
  ], 2)) : v("", !0)
2526
2530
  ])
2527
2531
  ]),
2528
2532
  D("div", {
2529
- class: I(["fit-width relative form-box", [i.option.table?.fitHeight ? "col " : "", i.option.table?.editMode ? "edit-mode" : ""]])
2533
+ class: I(["fit-width relative form-box", [n.option.table?.fitHeight ? "col " : "", n.option.table?.editMode ? "edit-mode" : ""]])
2530
2534
  }, [
2531
2535
  D("div", {
2532
- class: I(["column form-box-content", [i.option.table?.fitHeight ? "absolute fit" : ""]])
2536
+ class: I(["column form-box-content", [n.option.table?.fitHeight ? "absolute fit" : ""]])
2533
2537
  }, [
2534
2538
  Ce((f(), g(o(ye), V({
2535
2539
  ref_key: "tableRef",
2536
2540
  ref: d,
2537
2541
  data: o(t).table.data,
2538
- border: i.option.table?.border === void 0 ? !0 : i.option.table?.border,
2542
+ border: n.option.table?.border === void 0 ? !0 : n.option.table?.border,
2539
2543
  onSelectionChange: o(t).table.selection.change,
2540
2544
  onSortChange: o(t).table.sort.change,
2541
2545
  "expand-row-keys": o(t).table.expand.rowKeys,
2542
2546
  onExpandChange: o(t).table.expand.change
2543
- }, i.option.table, z(i.option.table?.on || {})), {
2547
+ }, n.option.table, z(n.option.table?.on || {})), {
2544
2548
  default: y(() => [
2545
- (typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.show : i.option.table?.selectable) || o(l)(i.option.tools?.delete) || i.option.tools?.export?.show && i.option.tools?.export?.select ? (f(), g(o(ae), V({
2549
+ (typeof n.option.table?.selectable == "object" ? n.option.table?.selectable?.show : n.option.table?.selectable) || o(l)(n.option.tools?.delete) || n.option.tools?.export?.show && n.option.tools?.export?.select ? (f(), g(o(ee), V({
2546
2550
  key: 0,
2547
2551
  type: "selection",
2548
2552
  width: "40",
@@ -2550,39 +2554,49 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2550
2554
  fixed: "left",
2551
2555
  "show-overflow-tooltip": !1,
2552
2556
  className: "cc1-form-selectable-column"
2553
- }, typeof i.option.table?.selectable == "object" ? i.option.table?.selectable : {}, z(typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.on || {} : {})), null, 16)) : v("", !0),
2557
+ }, typeof n.option.table?.selectable == "object" ? n.option.table?.selectable : {}, z(typeof n.option.table?.selectable == "object" ? n.option.table?.selectable?.on || {} : {})), null, 16)) : v("", !0),
2558
+ (typeof n.option.table?.index == "object" ? n.option.table?.index?.show : n.option.table?.index) ? (f(), g(o(ee), V({
2559
+ key: 1,
2560
+ type: "index",
2561
+ fixed: "left",
2562
+ width: "40",
2563
+ align: "center",
2564
+ label: "#",
2565
+ "show-overflow-tooltip": !1,
2566
+ className: "cc1-form-index-column"
2567
+ }, typeof n.option.table?.index == "object" ? n.option.table?.index : {}, z(typeof n.option.table?.index == "object" ? n.option.table?.index?.on || {} : {})), null, 16)) : v("", !0),
2554
2568
  E(rt, {
2555
2569
  conf: o(t),
2556
2570
  columnList: o(t).table.column.list,
2557
- option: i.option
2571
+ option: n.option
2558
2572
  }, J({ _: 2 }, [
2559
- F(m.$slots, (n, h) => ({
2573
+ F(m.$slots, (i, h) => ({
2560
2574
  name: h,
2561
2575
  fn: y((S) => [
2562
2576
  C(m.$slots, h, Ve(ze(S || {})))
2563
2577
  ])
2564
2578
  }))
2565
2579
  ]), 1032, ["conf", "columnList", "option"]),
2566
- o(l)(i.option.table?.add) || o(l)(i.option.table?.update) || o(l)(i.option.table?.delete) || o(l)(i.option.table?.view) || m.$slots["table-op-left"] || m.$slots["table-op-right"] ? (f(), g(o(ae), V({
2567
- key: 1,
2580
+ o(l)(n.option.table?.add) || o(l)(n.option.table?.update) || o(l)(n.option.table?.delete) || o(l)(n.option.table?.view) || m.$slots["table-op-left"] || m.$slots["table-op-right"] ? (f(), g(o(ee), V({
2581
+ key: 2,
2568
2582
  width: "auto",
2569
2583
  "max-width": "200",
2570
2584
  align: "center",
2571
2585
  fixed: "right"
2572
- }, i.option.table?.operate, { "show-overflow-tooltip": !1 }), {
2586
+ }, n.option.table?.operate, { "show-overflow-tooltip": !1 }), {
2573
2587
  header: y(() => [
2574
2588
  C(m.$slots, "table-header-op", {}, () => [
2575
2589
  U(O(o(w).tCurd("operation")), 1)
2576
2590
  ])
2577
2591
  ]),
2578
- default: y(({ row: n }) => [
2592
+ default: y(({ row: i }) => [
2579
2593
  E(o(W), {
2580
- size: i.option.size?.table
2594
+ size: n.option.size?.table
2581
2595
  }, {
2582
2596
  default: y(() => [
2583
- C(m.$slots, "table-op-left", { row: n }),
2584
- o(t).update.type === o(p).Update && i.option.table?.inlineEdit && o(t).update.form[s.option.table?.rowKey] === n[s.option.table?.rowKey] ? (f(), b($, { key: 0 }, [
2585
- E(o(L), {
2597
+ C(m.$slots, "table-op-left", { row: i }),
2598
+ o(t).update.type === o(p).Update && n.option.table?.inlineEdit && o(t).update.form[s.option.table?.rowKey] === i[s.option.table?.rowKey] ? (f(), b($, { key: 0 }, [
2599
+ E(o(j), {
2586
2600
  link: "",
2587
2601
  type: "info",
2588
2602
  onClick: o(t).update.close
@@ -2592,7 +2606,7 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2592
2606
  ]),
2593
2607
  _: 1
2594
2608
  }, 8, ["onClick"]),
2595
- E(o(L), {
2609
+ E(o(j), {
2596
2610
  link: "",
2597
2611
  type: "primary",
2598
2612
  onClick: o(t).update.submit,
@@ -2603,53 +2617,53 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2603
2617
  ]),
2604
2618
  _: 1
2605
2619
  }, 8, ["onClick", "loading"]),
2606
- C(m.$slots, "table-op-edit-right", { row: n })
2620
+ C(m.$slots, "table-op-edit-right", { row: i })
2607
2621
  ], 64)) : (f(), b($, { key: 1 }, [
2608
- o(l)(i.option.table?.add, n) ? (f(), g(o(L), {
2622
+ o(l)(n.option.table?.add, i) ? (f(), g(o(j), {
2609
2623
  key: 0,
2610
2624
  link: "",
2611
2625
  type: "primary",
2612
- onClick: (h) => o(t).update.open(o(p).Add, n)
2626
+ onClick: (h) => o(t).update.open(o(p).Add, i)
2613
2627
  }, {
2614
2628
  default: y(() => [
2615
2629
  U(O(o(w).tCurd("add")), 1)
2616
2630
  ]),
2617
2631
  _: 2
2618
2632
  }, 1032, ["onClick"])) : v("", !0),
2619
- o(l)(i.option.table?.view, n) ? (f(), g(o(L), {
2633
+ o(l)(n.option.table?.view, i) ? (f(), g(o(j), {
2620
2634
  key: 1,
2621
2635
  link: "",
2622
2636
  type: "primary",
2623
- onClick: (h) => o(t).update.open(o(p).View, n)
2637
+ onClick: (h) => o(t).update.open(o(p).View, i)
2624
2638
  }, {
2625
2639
  default: y(() => [
2626
2640
  U(O(o(w).tCurd("view")), 1)
2627
2641
  ]),
2628
2642
  _: 2
2629
2643
  }, 1032, ["onClick"])) : v("", !0),
2630
- o(l)(i.option.table?.update, n) ? (f(), g(o(L), {
2644
+ o(l)(n.option.table?.update, i) ? (f(), g(o(j), {
2631
2645
  key: 2,
2632
2646
  link: "",
2633
2647
  type: "warning",
2634
- onClick: (h) => o(t).update.open(o(p).Update, n)
2648
+ onClick: (h) => o(t).update.open(o(p).Update, i)
2635
2649
  }, {
2636
2650
  default: y(() => [
2637
2651
  U(O(o(w).tCurd("edit")), 1)
2638
2652
  ]),
2639
2653
  _: 2
2640
2654
  }, 1032, ["onClick"])) : v("", !0),
2641
- o(l)(i.option.table?.delete, n) ? (f(), g(o(L), {
2655
+ o(l)(n.option.table?.delete, i) ? (f(), g(o(j), {
2642
2656
  key: 3,
2643
2657
  link: "",
2644
2658
  type: "danger",
2645
- onClick: (h) => o(t).remove.open([n])
2659
+ onClick: (h) => o(t).remove.open([i])
2646
2660
  }, {
2647
2661
  default: y(() => [
2648
2662
  U(O(o(w).tCurd("delete")), 1)
2649
2663
  ]),
2650
2664
  _: 2
2651
2665
  }, 1032, ["onClick"])) : v("", !0),
2652
- C(m.$slots, "table-op-right", { row: n })
2666
+ C(m.$slots, "table-op-right", { row: i })
2653
2667
  ], 64))
2654
2668
  ]),
2655
2669
  _: 2
@@ -2665,38 +2679,38 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2665
2679
  ], 2)
2666
2680
  ], 2),
2667
2681
  D("div", St, [
2668
- (i.option.page?.show === void 0 || i.option.page?.show) && !o(t).page.showTools ? (f(), g(o(de), V({
2682
+ (n.option.page?.show === void 0 || n.option.page?.show) && !o(t).page.showTools ? (f(), g(o(de), V({
2669
2683
  key: 0,
2670
2684
  "current-page": o(t).page.num,
2671
- "onUpdate:currentPage": c[8] || (c[8] = (n) => o(t).page.num = n),
2685
+ "onUpdate:currentPage": c[8] || (c[8] = (i) => o(t).page.num = i),
2672
2686
  "page-size": o(t).page.size,
2673
- "onUpdate:pageSize": c[9] || (c[9] = (n) => o(t).page.size = n),
2687
+ "onUpdate:pageSize": c[9] || (c[9] = (i) => o(t).page.size = i),
2674
2688
  background: "",
2675
2689
  "page-sizes": o(t).page.sizeList,
2676
2690
  "pager-count": o(t).page.pagerCount,
2677
2691
  layout: o(t).page.layout,
2678
2692
  total: o(t).page.total,
2679
- size: i.option.size?.table,
2693
+ size: n.option.size?.table,
2680
2694
  onSizeChange: o(t).table.getList,
2681
2695
  onCurrentChange: o(t).table.getList
2682
- }, i.option.page?.pagination || {}, z(i.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0)
2696
+ }, n.option.page?.pagination || {}, z(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0)
2683
2697
  ])
2684
2698
  ], 2),
2685
2699
  C(m.$slots, "box-right")
2686
2700
  ], 2),
2687
- E(o(oe), V({
2701
+ E(o(ae), V({
2688
2702
  modelValue: o(t).update.show,
2689
- "onUpdate:modelValue": c[10] || (c[10] = (n) => o(t).update.show = n),
2703
+ "onUpdate:modelValue": c[10] || (c[10] = (i) => o(t).update.show = i),
2690
2704
  title: o(t).update.title,
2691
2705
  "before-close": o(t).update.close
2692
- }, i.option.dialog), {
2706
+ }, n.option.dialog), {
2693
2707
  footer: y(() => [
2694
2708
  D("span", Mt, [
2695
2709
  E(o(W), {
2696
- size: i.option.size?.form
2710
+ size: n.option.size?.form
2697
2711
  }, {
2698
2712
  default: y(() => [
2699
- E(o(L), {
2713
+ E(o(j), {
2700
2714
  onClick: o(t).update.close
2701
2715
  }, {
2702
2716
  default: y(() => [
@@ -2704,7 +2718,7 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2704
2718
  ]),
2705
2719
  _: 1
2706
2720
  }, 8, ["onClick"]),
2707
- o(t).update.type !== o(p).View ? (f(), g(o(L), {
2721
+ o(t).update.type !== o(p).View ? (f(), g(o(j), {
2708
2722
  key: 0,
2709
2723
  type: "primary",
2710
2724
  onClick: o(t).update.submit,
@@ -2726,40 +2740,40 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2726
2740
  ref: r,
2727
2741
  model: o(t).update.form,
2728
2742
  rules: o(t).update.rules,
2729
- size: i.option.size?.form,
2743
+ size: n.option.size?.form,
2730
2744
  class: "update-dialog-form"
2731
2745
  }, {
2732
2746
  default: y(() => [
2733
- o(t).update.showContent ? (f(!0), b($, { key: 0 }, F(o(t).update.formColumn, (n) => (f(), b($, null, [
2747
+ o(t).update.showContent ? (f(!0), b($, { key: 0 }, F(o(t).update.formColumn, (i) => (f(), b($, null, [
2734
2748
  o(l)(
2735
2749
  (() => {
2736
- const h = [], S = (j) => {
2737
- j?.item?.children ? S(j.item.children) : h.push(...j.map((T) => T.item?.show?.form));
2750
+ const h = [], S = (B) => {
2751
+ B?.item?.children ? S(B.item.children) : h.push(...B.map((T) => T.item?.show?.form));
2738
2752
  };
2739
- return S(n), h;
2753
+ return S(i), h;
2740
2754
  })(),
2741
2755
  o(t).update.form,
2742
2756
  o(t).update.type
2743
2757
  ) ? (f(), b("div", {
2744
2758
  key: 0,
2745
2759
  class: I(["row curd-row", {
2746
- stripe: i.option.form?.stripe === void 0 ? !0 : i.option.form?.stripe
2760
+ stripe: n.option.form?.stripe === void 0 ? !0 : n.option.form?.stripe
2747
2761
  }])
2748
2762
  }, [
2749
2763
  C(m.$slots, "form-start", {
2750
2764
  row: o(t).update.form
2751
2765
  }),
2752
- (f(!0), b($, null, F(n, (h) => (f(), b($, null, [
2766
+ (f(!0), b($, null, F(i, (h) => (f(), b($, null, [
2753
2767
  o(l)(h.item.show?.form, o(t).update.form, o(t).update.type) ? (f(), b("div", {
2754
2768
  key: 0,
2755
- class: I([h.item.form.span > 0 ? `col-${o(t).getColumnSpan(h, n)}` : "col", `form-item-col-${h.item.key}`])
2769
+ class: I([h.item.form.span > 0 ? `col-${o(t).getColumnSpan(h, i)}` : "col", `form-item-col-${h.item.key}`])
2756
2770
  }, [
2757
2771
  (f(!0), b($, null, F(h.item.children ? h.children : [h], (S) => (f(), g(pt, {
2758
2772
  key: S.item.key,
2759
2773
  conf: o(t),
2760
2774
  item: S
2761
2775
  }, J({ _: 2 }, [
2762
- F(m.$slots, (j, T) => ({
2776
+ F(m.$slots, (B, T) => ({
2763
2777
  name: T,
2764
2778
  fn: y((R) => [
2765
2779
  C(m.$slots, T, V({ ref_for: !0 }, R || {}))
@@ -2779,19 +2793,19 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2779
2793
  ]),
2780
2794
  _: 3
2781
2795
  }, 16, ["modelValue", "title", "before-close"]),
2782
- E(o(oe), {
2796
+ E(o(ae), {
2783
2797
  modelValue: o(t).remove.show,
2784
- "onUpdate:modelValue": c[11] || (c[11] = (n) => o(t).remove.show = n),
2798
+ "onUpdate:modelValue": c[11] || (c[11] = (i) => o(t).remove.show = i),
2785
2799
  title: o(t).remove.title,
2786
2800
  "close-on-click-modal": !1
2787
2801
  }, {
2788
2802
  footer: y(() => [
2789
2803
  D("span", At, [
2790
2804
  E(o(W), {
2791
- size: i.option.size?.form
2805
+ size: n.option.size?.form
2792
2806
  }, {
2793
2807
  default: y(() => [
2794
- E(o(L), {
2808
+ E(o(j), {
2795
2809
  onClick: o(t).remove.close
2796
2810
  }, {
2797
2811
  default: y(() => [
@@ -2799,7 +2813,7 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2799
2813
  ]),
2800
2814
  _: 1
2801
2815
  }, 8, ["onClick"]),
2802
- E(o(L), {
2816
+ E(o(j), {
2803
2817
  type: "danger",
2804
2818
  onClick: o(t).remove.submit,
2805
2819
  loading: o(t).remove.loading
@@ -2822,7 +2836,7 @@ const kt = /* @__PURE__ */ X(yt, [["render", wt]]), vt = {
2822
2836
  E(Re, {
2823
2837
  ref_key: "switchConfirmRef",
2824
2838
  ref: e,
2825
- size: i.option.size?.form
2839
+ size: n.option.size?.form
2826
2840
  }, null, 8, ["size"])
2827
2841
  ], 2);
2828
2842
  };
@@ -2873,22 +2887,22 @@ class Rt {
2873
2887
  }, document.body.appendChild(l), l.click();
2874
2888
  });
2875
2889
  }
2876
- const Tt = (i, a) => {
2877
- if (i.component("TCurd", Ft), i.component("TFormList", se), i.component("TColumn", Te), a?.customComponent) {
2878
- B.customComponent = a.customComponent;
2890
+ const Tt = (n, a) => {
2891
+ if (n.component("TCurd", Ft), n.component("TFormList", se), n.component("TColumn", Te), a?.customComponent) {
2892
+ L.customComponent = a.customComponent;
2879
2893
  for (const p in a.customComponent)
2880
- i.component(p, a.customComponent[p]);
2894
+ n.component(p, a.customComponent[p]);
2881
2895
  }
2882
2896
  }, It = {
2883
2897
  install: Tt
2884
2898
  };
2885
2899
  export {
2886
2900
  H as ArrUtil,
2887
- Le as ExcelUtil,
2901
+ je as ExcelUtil,
2888
2902
  Te as TColumn,
2889
2903
  Ft as TCurd,
2890
2904
  Rt as TFile,
2891
- B as TForm,
2905
+ L as TForm,
2892
2906
  A as TFormConfig,
2893
2907
  w as TFormI18n,
2894
2908
  se as TFormList,