@aspire-ui/element-component-pro 1.0.25 → 1.0.26

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.
@@ -1,39 +1,39 @@
1
- import { reactive as et, defineComponent as ne, h as de, useSlots as he, ref as D, computed as w, onMounted as me, nextTick as Le, onUnmounted as Be, watch as J, unref as pe } from "vue";
2
- import { MessageBox as tt } from "element-ui";
3
- const fe = et({});
4
- function Te(s, e) {
1
+ import { reactive as nt, defineComponent as te, h as ve, useSlots as we, ref as D, computed as w, onMounted as ge, nextTick as Ke, onUnmounted as Fe, watch as ee, unref as _e } from "vue";
2
+ import { MessageBox as lt } from "element-ui";
3
+ const he = nt({});
4
+ function $e(r, e) {
5
5
  if (!e)
6
- return s;
6
+ return r;
7
7
  for (const n in e)
8
8
  if (Object.prototype.hasOwnProperty.call(e, n)) {
9
- const t = s[n], o = e[n];
10
- n === "components" ? s[n] = { ...t, ...o } : Ie(o) ? Ie(t) ? s[n] = Te(
9
+ const t = r[n], l = e[n];
10
+ n === "components" ? r[n] = { ...t, ...l } : Ie(l) ? Ie(t) ? r[n] = $e(
11
11
  t,
12
- o
13
- ) : s[n] = { ...o } : s[n] = o;
12
+ l
13
+ ) : r[n] = { ...l } : r[n] = l;
14
14
  }
15
- return s;
15
+ return r;
16
16
  }
17
- function Ie(s) {
18
- if (!s || typeof s != "object")
17
+ function Ie(r) {
18
+ if (!r || typeof r != "object")
19
19
  return !1;
20
- const e = Object.getPrototypeOf(s);
20
+ const e = Object.getPrototypeOf(r);
21
21
  return e === Object.prototype || e === null;
22
22
  }
23
- function Re() {
23
+ function Be() {
24
24
  return {
25
- getSetting: (t) => t === void 0 ? { ...fe } : { ...fe[t] ?? {} },
26
- setSetting: (t, o) => {
27
- const r = fe[t];
28
- r ? fe[t] = Te({ ...r }, o) : fe[t] = { ...o };
25
+ getSetting: (t) => t === void 0 ? { ...he } : { ...he[t] ?? {} },
26
+ setSetting: (t, l) => {
27
+ const a = he[t];
28
+ a ? he[t] = $e({ ...a }, l) : he[t] = { ...l };
29
29
  },
30
- mergeSettings: (t, o) => {
31
- const r = fe[t] ?? {};
32
- return Te({ ...r }, o);
30
+ mergeSettings: (t, l) => {
31
+ const a = he[t] ?? {};
32
+ return $e({ ...a }, l);
33
33
  }
34
34
  };
35
35
  }
36
- const je = ne({
36
+ const je = te({
37
37
  name: "EcpProTableDefaultCellRenderer",
38
38
  props: {
39
39
  column: { type: Object, required: !0 },
@@ -41,22 +41,22 @@ const je = ne({
41
41
  index: { type: Number, required: !0 },
42
42
  value: { required: !1 }
43
43
  },
44
- setup(s) {
44
+ setup(r) {
45
45
  return () => {
46
46
  var n, t;
47
- const e = s.column;
47
+ const e = r.column;
48
48
  if (e != null && e.customRender) {
49
- const o = e.customRender({ text: s.value, record: s.record, index: s.index });
50
- return typeof o == "string" || typeof o == "number" ? de("span", String(o)) : o;
49
+ const l = e.customRender({ text: r.value, record: r.record, index: r.index });
50
+ return typeof l == "string" || typeof l == "number" ? ve("span", String(l)) : l;
51
51
  }
52
52
  if (e != null && e.valueEnum) {
53
- const o = ((t = (n = e.valueEnum) == null ? void 0 : n[s.value]) == null ? void 0 : t.text) ?? s.value;
54
- return de("span", o == null ? "" : String(o));
53
+ const l = ((t = (n = e.valueEnum) == null ? void 0 : n[r.value]) == null ? void 0 : t.text) ?? r.value;
54
+ return ve("span", l == null ? "" : String(l));
55
55
  }
56
- return de("span", s.value == null ? "" : String(s.value));
56
+ return ve("span", r.value == null ? "" : String(r.value));
57
57
  };
58
58
  }
59
- }), qe = ne({
59
+ }), qe = te({
60
60
  name: "EcpProTableBodyCellRenderer",
61
61
  props: {
62
62
  slotRender: { type: Function, required: !0 },
@@ -67,80 +67,80 @@ const je = ne({
67
67
  customRender: { type: Function, required: !1 },
68
68
  valueEnum: { type: Object, required: !1 }
69
69
  },
70
- setup(s) {
70
+ setup(r) {
71
71
  return () => {
72
- const e = s.slotRender, n = e == null ? void 0 : e({ column: s.column, record: s.record, index: s.index, value: s.value });
73
- if (((a) => a == null ? [] : Array.isArray(a) ? a.filter((f) => f != null && f !== !1 && !f.isComment) : [a])(n).length > 0)
72
+ const e = r.slotRender, n = e == null ? void 0 : e({ column: r.column, record: r.record, index: r.index, value: r.value });
73
+ if (((s) => s == null ? [] : Array.isArray(s) ? s.filter((u) => u != null && u !== !1 && !u.isComment) : [s])(n).length > 0)
74
74
  return n;
75
- const r = { ...s.column };
76
- return s.customRender && (r.customRender = s.customRender), s.valueEnum && (r.valueEnum = s.valueEnum), de(je, { props: { column: r, record: s.record, index: s.index, value: s.value } });
75
+ const a = { ...r.column };
76
+ return r.customRender && (a.customRender = r.customRender), r.valueEnum && (a.valueEnum = r.valueEnum), ve(je, { props: { column: a, record: r.record, index: r.index, value: r.value } });
77
77
  };
78
78
  }
79
- }), nt = /* @__PURE__ */ ne({
79
+ }), ot = /* @__PURE__ */ te({
80
80
  __name: "TableColumnGroup",
81
81
  props: {
82
82
  column: null,
83
83
  effectiveProps: null,
84
84
  getColumnWidth: null
85
85
  },
86
- setup(s) {
87
- const e = s, n = he();
88
- return { __sfc: !0, props: e, $scopedSlots: n, shouldShowColumn: (o) => o.ifShow === !1 ? !1 : typeof o.ifShow == "function" ? o.ifShow({ column: o }) : !0, DefaultCellRenderer: je, BodyCellRenderer: qe };
86
+ setup(r) {
87
+ const e = r, n = we();
88
+ return { __sfc: !0, props: e, $scopedSlots: n, shouldShowColumn: (l) => l.ifShow === !1 ? !1 : typeof l.ifShow == "function" ? l.ifShow({ column: l }) : !0, DefaultCellRenderer: je, BodyCellRenderer: qe };
89
89
  }
90
90
  });
91
- function se(s, e, n, t, o, r, a, f) {
92
- var m = typeof s == "function" ? s.options : s;
93
- e && (m.render = e, m.staticRenderFns = n, m._compiled = !0), t && (m.functional = !0), r && (m._scopeId = "data-v-" + r);
94
- var _;
95
- if (a ? (_ = function(x) {
96
- x = x || // cached call
91
+ function re(r, e, n, t, l, a, s, u) {
92
+ var d = typeof r == "function" ? r.options : r;
93
+ e && (d.render = e, d.staticRenderFns = n, d._compiled = !0), t && (d.functional = !0), a && (d._scopeId = "data-v-" + a);
94
+ var v;
95
+ if (s ? (v = function(y) {
96
+ y = y || // cached call
97
97
  this.$vnode && this.$vnode.ssrContext || // stateful
98
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !x && typeof __VUE_SSR_CONTEXT__ < "u" && (x = __VUE_SSR_CONTEXT__), o && o.call(this, x), x && x._registeredComponents && x._registeredComponents.add(a);
99
- }, m._ssrRegister = _) : o && (_ = f ? function() {
100
- o.call(
98
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !y && typeof __VUE_SSR_CONTEXT__ < "u" && (y = __VUE_SSR_CONTEXT__), l && l.call(this, y), y && y._registeredComponents && y._registeredComponents.add(s);
99
+ }, d._ssrRegister = v) : l && (v = u ? function() {
100
+ l.call(
101
101
  this,
102
- (m.functional ? this.parent : this).$root.$options.shadowRoot
102
+ (d.functional ? this.parent : this).$root.$options.shadowRoot
103
103
  );
104
- } : o), _)
105
- if (m.functional) {
106
- m._injectStyles = _;
107
- var z = m.render;
108
- m.render = function(p, v) {
109
- return _.call(v), z(p, v);
104
+ } : l), v)
105
+ if (d.functional) {
106
+ d._injectStyles = v;
107
+ var B = d.render;
108
+ d.render = function(p, _) {
109
+ return v.call(_), B(p, _);
110
110
  };
111
111
  } else {
112
- var S = m.beforeCreate;
113
- m.beforeCreate = S ? [].concat(S, _) : [_];
112
+ var b = d.beforeCreate;
113
+ d.beforeCreate = b ? [].concat(b, v) : [v];
114
114
  }
115
115
  return {
116
- exports: s,
117
- options: m
116
+ exports: r,
117
+ options: d
118
118
  };
119
119
  }
120
- var ot = function() {
120
+ var at = function() {
121
121
  var e = this, n = e._self._c, t = e._self._setupProxy;
122
- return e.column.children && e.column.children.length > 0 ? n("el-table-column", { attrs: { label: e.column.title, align: e.column.align || "left", fixed: e.column.fixed } }, [e._l(e.column.children, function(o) {
123
- return [t.shouldShowColumn(o) ? n("TableColumnGroup", { key: o.key || o.dataIndex || o.title, attrs: { column: o, "effective-props": e.effectiveProps, "get-column-width": e.getColumnWidth } }) : e._e()];
124
- })], 2) : n("el-table-column", { attrs: { prop: e.column.dataIndex, label: e.column.title, "min-width": e.getColumnWidth(e.column), fixed: e.column.fixed, align: e.column.align || "left", sortable: e.column.sortable, formatter: e.column.formatter, "show-overflow-tooltip": e.column.ellipsis !== !1 && e.effectiveProps.ellipsis !== !1 }, scopedSlots: e._u([{ key: "default", fn: function(o) {
125
- return [e.column.dataIndex && t.$scopedSlots[e.column.dataIndex] ? e._t(e.column.dataIndex, null, { row: o.row, column: e.column, index: o.$index, value: o.row[e.column.dataIndex] }) : t.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": t.$scopedSlots.bodyCell, column: e.column, record: o.row, index: o.$index, value: o.row[e.column.dataIndex], "custom-render": e.column.customRender, "value-enum": e.column.valueEnum } }) : n(t.DefaultCellRenderer, { attrs: { column: e.column, record: o.row, index: o.$index, value: o.row[e.column.dataIndex] } })];
122
+ return e.column.children && e.column.children.length > 0 ? n("el-table-column", { attrs: { label: e.column.title, align: e.column.align || "left", fixed: e.column.fixed } }, [e._l(e.column.children, function(l) {
123
+ return [t.shouldShowColumn(l) ? n("TableColumnGroup", { key: l.key || l.dataIndex || l.title, attrs: { column: l, "effective-props": e.effectiveProps, "get-column-width": e.getColumnWidth } }) : e._e()];
124
+ })], 2) : n("el-table-column", { attrs: { prop: e.column.dataIndex, label: e.column.title, "min-width": e.getColumnWidth(e.column), fixed: e.column.fixed, align: e.column.align || "left", sortable: e.column.sortable, formatter: e.column.formatter, "show-overflow-tooltip": e.column.ellipsis !== !1 && e.effectiveProps.ellipsis !== !1 }, scopedSlots: e._u([{ key: "default", fn: function(l) {
125
+ return [e.column.dataIndex && t.$scopedSlots[e.column.dataIndex] ? e._t(e.column.dataIndex, null, { row: l.row, column: e.column, index: l.$index, value: l.row[e.column.dataIndex] }) : t.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": t.$scopedSlots.bodyCell, column: e.column, record: l.row, index: l.$index, value: l.row[e.column.dataIndex], "custom-render": e.column.customRender, "value-enum": e.column.valueEnum } }) : n(t.DefaultCellRenderer, { attrs: { column: e.column, record: l.row, index: l.$index, value: l.row[e.column.dataIndex] } })];
126
126
  } }, { key: "header", fn: function() {
127
127
  return [e.column.dataIndex && t.$scopedSlots[`header-${e.column.dataIndex}`] ? e._t(`header-${e.column.dataIndex}`, null, { column: e.column }) : t.$scopedSlots.headerCell ? e._t("headerCell", null, { column: e.column }) : [n("span", [e._v(e._s(e.column.title))]), e.column.helpMessage ? n("el-tooltip", { staticClass: "ecp-pro-table__col-help", attrs: { placement: "top", effect: "dark" }, scopedSlots: e._u([{ key: "content", fn: function() {
128
- return [Array.isArray(e.column.helpMessage) ? n("span", e._l(e.column.helpMessage, function(o, r) {
129
- return n("div", { key: r }, [e._v(e._s(o))]);
128
+ return [Array.isArray(e.column.helpMessage) ? n("span", e._l(e.column.helpMessage, function(l, a) {
129
+ return n("div", { key: a }, [e._v(e._s(l))]);
130
130
  }), 0) : n("span", [e._v(e._s(e.column.helpMessage))])];
131
131
  }, proxy: !0 }], null, !1, 347236738) }, [n("i", { staticClass: "el-icon-question" })]) : e._e()]];
132
132
  }, proxy: !0 }], null, !0) });
133
- }, lt = [], at = /* @__PURE__ */ se(
134
- nt,
133
+ }, st = [], rt = /* @__PURE__ */ re(
135
134
  ot,
136
- lt,
135
+ at,
136
+ st,
137
137
  !1,
138
138
  null,
139
139
  null,
140
140
  null,
141
141
  null
142
142
  );
143
- const st = at.exports, rt = /* @__PURE__ */ ne({
143
+ const it = rt.exports, ct = /* @__PURE__ */ te({
144
144
  __name: "ProTable",
145
145
  props: {
146
146
  columns: null,
@@ -184,425 +184,425 @@ const st = at.exports, rt = /* @__PURE__ */ ne({
184
184
  load: null
185
185
  },
186
186
  emits: ["register", "fetch-success", "fetch-error", "selection-change", "row-click", "row-dblclick", "sort-change", "expand-change"],
187
- setup(s, { expose: e, emit: n }) {
188
- const t = s, o = he(), r = D(), a = D(), f = D(0), m = D(t.loading ?? !1), _ = D([]), z = w(() => {
189
- const l = _.value;
190
- if (!k.value || !l.length)
191
- return l;
192
- const { page: c, pageSize: b } = E.value, C = (c - 1) * b;
193
- return l.slice(C, C + b);
194
- }), S = D({}), x = D([]), p = D({}), v = D([]), B = D(null), { mergeSettings: V } = Re(), F = w(() => V("ProTable", { ...t, ...p.value })), A = w(() => {
195
- const l = F.value.pagination;
196
- return l && typeof l == "object" ? {
197
- pageSize: l.pageSize ?? 10,
198
- pageSizes: l.pageSizes ?? [10, 20, 50, 100]
187
+ setup(r, { expose: e, emit: n }) {
188
+ const t = r, l = we(), a = D(), s = D(), u = D(0), d = D(t.loading ?? !1), v = D([]), B = w(() => {
189
+ const o = v.value;
190
+ if (!S.value || !o.length)
191
+ return o;
192
+ const { page: c, pageSize: x } = E.value, k = (c - 1) * x;
193
+ return o.slice(k, k + x);
194
+ }), b = D({}), y = D([]), p = D({}), _ = D([]), A = D(null), { mergeSettings: O } = Be(), P = w(() => O("ProTable", { ...t, ...p.value })), T = w(() => {
195
+ const o = P.value.pagination;
196
+ return o && typeof o == "object" ? {
197
+ pageSize: o.pageSize ?? 10,
198
+ pageSizes: o.pageSizes ?? [10, 20, 50, 100]
199
199
  } : { pageSize: 10, pageSizes: [10, 20, 50, 100] };
200
200
  }), E = D({
201
201
  page: 1,
202
- pageSize: A.value.pageSize,
203
- pageSizes: A.value.pageSizes,
202
+ pageSize: T.value.pageSize,
203
+ pageSizes: T.value.pageSizes,
204
204
  total: 0
205
- }), N = w(() => !!F.value.title || !!o.tableTitle || !!o.toolbar), k = w(() => B.value !== null ? B.value : !!t.pagination && typeof t.pagination == "object"), u = w(() => F.value.pagination && typeof F.value.pagination == "object" ? !!F.value.pagination.small : !1), W = w(() => F.value.pagination && typeof F.value.pagination == "object" ? !!F.value.pagination.background : !1), y = w(() => F.value.rowKey || "id"), j = w(() => new Set(v.value.map((l) => l[y.value]))), q = w(() => (console.log(x.value), x.value.filter((l) => !l.hideInTable && !l.defaultHidden))), X = w(() => {
206
- const l = /* @__PURE__ */ new Map(), c = (b) => {
207
- for (const C of b)
208
- C.children && C.children.length > 0 ? c(C.children) : C.dataIndex && l.set(C.dataIndex, C);
205
+ }), N = w(() => !!P.value.title || !!l.tableTitle || !!l.toolbar), S = w(() => A.value !== null ? A.value : !!t.pagination && typeof t.pagination == "object"), f = w(() => P.value.pagination && typeof P.value.pagination == "object" ? !!P.value.pagination.small : !1), W = w(() => P.value.pagination && typeof P.value.pagination == "object" ? !!P.value.pagination.background : !1), g = w(() => P.value.rowKey || "id"), K = w(() => new Set(_.value.map((o) => o[g.value]))), q = w(() => y.value.filter((o) => !o.hideInTable && !o.defaultHidden)), Q = w(() => {
206
+ const o = /* @__PURE__ */ new Map(), c = (x) => {
207
+ for (const k of x)
208
+ k.children && k.children.length > 0 ? c(k.children) : k.dataIndex && o.set(k.dataIndex, k);
209
209
  };
210
- return c(q.value), l;
211
- }), G = w(() => Array.from(X.value.values())), ee = w(() => {
212
- var c, b;
213
- let l = 0;
214
- return F.value.rowSelection && (l += Number(F.value.rowSelection.width) || 48), F.value.showIndexColumn && (l += Number((c = F.value.indexColumnProps) == null ? void 0 : c.width) || 60), F.value.actionColumn && (l += Number((b = F.value.actionColumn) == null ? void 0 : b.width) || 150), l;
215
- }), Z = (l) => typeof l == "number" && l > 0, Y = w(() => G.value.filter((c) => I(c) && Z(c.width)).reduce((c, b) => c + (typeof b.width == "number" ? b.width : 0), 0)), te = w(() => G.value.filter((c) => I(c) && typeof c.width == "string").reduce((c, b) => c + (Number(g(b)) || 80), 0)), U = (l) => l == null ? null : typeof l == "number" ? l : parseInt(String(l).replace(/px$/i, ""), 10) || null, le = (l) => {
216
- if (!F.value.spanMethod)
210
+ return c(q.value), o;
211
+ }), J = w(() => Array.from(Q.value.values())), Y = w(() => {
212
+ var c, x;
213
+ let o = 0;
214
+ return P.value.rowSelection && (o += Number(P.value.rowSelection.width) || 48), P.value.showIndexColumn && (o += Number((c = P.value.indexColumnProps) == null ? void 0 : c.width) || 60), P.value.actionColumn && (o += Number((x = P.value.actionColumn) == null ? void 0 : x.width) || 150), o;
215
+ }), Z = (o) => typeof o == "number" && o > 0, I = w(() => J.value.filter((c) => h(c) && Z(c.width)).reduce((c, x) => c + (typeof x.width == "number" ? x.width : 0), 0)), V = w(() => J.value.filter((c) => h(c) && typeof c.width == "string").reduce((c, x) => c + (Number(i(x)) || 80), 0)), j = (o) => o == null ? null : typeof o == "number" ? o : parseInt(String(o).replace(/px$/i, ""), 10) || null, C = (o) => {
216
+ if (!P.value.spanMethod)
217
217
  return [1, 1];
218
- const c = X.value.get(l.column.property);
219
- return F.value.spanMethod({
220
- ...l,
221
- column: c ? { ...c, ...l.column } : { ...l.column, dataIndex: l.column.property, title: l.column.label }
218
+ const c = Q.value.get(o.column.property);
219
+ return P.value.spanMethod({
220
+ ...o,
221
+ column: c ? { ...c, ...o.column } : { ...o.column, dataIndex: o.column.property, title: o.column.label }
222
222
  });
223
- }, g = (l) => {
224
- const c = l.width;
225
- if (Z(c) && Y.value > 0 && f.value > 0 && typeof c == "number") {
226
- const b = f.value - ee.value - te.value;
227
- let C = Math.floor(b * c / Y.value);
228
- const H = U(l.minWidth) ?? 60, O = U(l.maxWidth);
229
- return C = Math.max(H, C), O != null && (C = Math.min(O, C)), C;
223
+ }, i = (o) => {
224
+ const c = o.width;
225
+ if (Z(c) && I.value > 0 && u.value > 0 && typeof c == "number") {
226
+ const x = u.value - Y.value - V.value;
227
+ let k = Math.floor(x * c / I.value);
228
+ const U = j(o.minWidth) ?? 60, L = j(o.maxWidth);
229
+ return k = Math.max(U, k), L != null && (k = Math.min(L, k)), k;
230
230
  }
231
231
  if (typeof c == "string") {
232
- const b = U(c) ?? 80, C = U(l.minWidth), H = U(l.maxWidth);
233
- let O = b;
234
- return C != null && (O = Math.max(C, O)), H != null && (O = Math.min(H, O)), O;
232
+ const x = j(c) ?? 80, k = j(o.minWidth), U = j(o.maxWidth);
233
+ let L = x;
234
+ return k != null && (L = Math.max(k, L)), U != null && (L = Math.min(U, L)), L;
235
235
  }
236
- return l.minWidth;
237
- }, I = (l) => l.ifShow === !1 ? !1 : typeof l.ifShow == "function" ? l.ifShow({ column: l }) : !0, $ = w(() => {
236
+ return o.minWidth;
237
+ }, h = (o) => o.ifShow === !1 ? !1 : typeof o.ifShow == "function" ? o.ifShow({ column: o }) : !0, R = w(() => {
238
238
  var c;
239
- const l = (c = F.value.rowSelection) == null ? void 0 : c.getCheckboxProps;
240
- return l ? z.value.filter((b) => {
241
- var C;
242
- return !((C = l(b)) != null && C.disabled);
243
- }) : z.value;
244
- }), i = w(() => $.value.length > 0), h = w(() => $.value.length === 0 ? !1 : $.value.every((l) => j.value.has(l[y.value]))), M = w(() => {
245
- const l = $.value.filter((c) => j.value.has(c[y.value])).length;
246
- return l > 0 && l < $.value.length;
247
- }), K = (l) => j.value.has(l[y.value]), L = (l) => {
248
- var c, b, C;
249
- return ((C = (b = (c = F.value.rowSelection) == null ? void 0 : c.getCheckboxProps) == null ? void 0 : b.call(c, l)) == null ? void 0 : C.disabled) ?? !1;
250
- }, Q = (l) => {
251
- var c, b, C;
252
- return ((C = (b = (c = F.value.rowSelection) == null ? void 0 : c.getRadioProps) == null ? void 0 : b.call(c, l)) == null ? void 0 : C.disabled) ?? !1;
239
+ const o = (c = P.value.rowSelection) == null ? void 0 : c.getCheckboxProps;
240
+ return o ? B.value.filter((x) => {
241
+ var k;
242
+ return !((k = o(x)) != null && k.disabled);
243
+ }) : B.value;
244
+ }), z = w(() => R.value.length > 0), H = w(() => R.value.length === 0 ? !1 : R.value.every((o) => K.value.has(o[g.value]))), G = w(() => {
245
+ const o = R.value.filter((c) => K.value.has(c[g.value])).length;
246
+ return o > 0 && o < R.value.length;
247
+ }), ne = (o) => K.value.has(o[g.value]), le = (o) => {
248
+ var c, x, k;
249
+ return ((k = (x = (c = P.value.rowSelection) == null ? void 0 : c.getCheckboxProps) == null ? void 0 : x.call(c, o)) == null ? void 0 : k.disabled) ?? !1;
250
+ }, X = (o) => {
251
+ var c, x, k;
252
+ return ((k = (x = (c = P.value.rowSelection) == null ? void 0 : c.getRadioProps) == null ? void 0 : x.call(c, o)) == null ? void 0 : k.disabled) ?? !1;
253
253
  }, ae = () => {
254
- const l = v.value.map((c) => c[y.value]);
255
- n("selection-change", { keys: l, rows: v.value });
256
- }, _e = (l, c) => {
257
- const b = l[y.value];
258
- c ? v.value = [...v.value.filter((C) => C[y.value] !== b), l] : v.value = v.value.filter((C) => C[y.value] !== b), ae();
259
- }, ge = (l) => {
260
- v.value = [l], ae();
261
- }, be = (l) => {
262
- if (l) {
263
- const c = new Set(v.value.map((C) => C[y.value])), b = $.value.filter((C) => !c.has(C[y.value]));
264
- v.value = [...v.value, ...b];
254
+ const o = _.value.map((c) => c[g.value]);
255
+ n("selection-change", { keys: o, rows: _.value });
256
+ }, de = (o, c) => {
257
+ const x = o[g.value];
258
+ c ? _.value = [..._.value.filter((k) => k[g.value] !== x), o] : _.value = _.value.filter((k) => k[g.value] !== x), ae();
259
+ }, ie = (o) => {
260
+ _.value = [o], ae();
261
+ }, fe = (o) => {
262
+ if (o) {
263
+ const c = new Set(_.value.map((k) => k[g.value])), x = R.value.filter((k) => !c.has(k[g.value]));
264
+ _.value = [..._.value, ...x];
265
265
  } else {
266
- const c = new Set(z.value.map((b) => b[y.value]));
267
- v.value = v.value.filter((b) => !c.has(b[y.value]));
266
+ const c = new Set(B.value.map((x) => x[g.value]));
267
+ _.value = _.value.filter((x) => !c.has(x[g.value]));
268
268
  }
269
269
  ae();
270
- }, re = async (l) => {
270
+ }, oe = async (o) => {
271
271
  if (!t.api) {
272
272
  if (t.dataSource)
273
273
  return;
274
- _.value = [];
274
+ v.value = [];
275
275
  return;
276
276
  }
277
- m.value = !0;
277
+ d.value = !0;
278
278
  try {
279
- const c = F.value.fetchSetting ?? {}, b = c.pageField ?? "page", C = c.sizeField ?? "pageSize", H = c.listField ?? "list", O = c.totalField ?? "total", oe = {
280
- [b]: (l == null ? void 0 : l.page) ?? E.value.page,
281
- [C]: (l == null ? void 0 : l.pageSize) ?? E.value.pageSize,
279
+ const c = P.value.fetchSetting ?? {}, x = c.pageField ?? "page", k = c.sizeField ?? "pageSize", U = c.listField ?? "list", L = c.totalField ?? "total", se = {
280
+ [x]: (o == null ? void 0 : o.page) ?? E.value.page,
281
+ [k]: (o == null ? void 0 : o.pageSize) ?? E.value.pageSize,
282
282
  ...t.searchInfo,
283
- ...l == null ? void 0 : l.searchInfo
283
+ ...o == null ? void 0 : o.searchInfo
284
284
  };
285
- (l == null ? void 0 : l.page) != null && (E.value.page = l.page), (l == null ? void 0 : l.pageSize) != null && (E.value.pageSize = l.pageSize);
286
- const ie = t.beforeFetch ? t.beforeFetch(oe) : oe, $e = await t.api(ie);
287
- S.value = $e || {};
288
- const Fe = t.afterFetch ? t.afterFetch($e) : $e, ze = Fe[H] ?? Fe.items ?? Fe.list ?? [], Ee = Fe[O] ?? 0;
289
- _.value = ze, E.value.total = Ee, n("fetch-success", { items: ze, total: Ee });
285
+ (o == null ? void 0 : o.page) != null && (E.value.page = o.page), (o == null ? void 0 : o.pageSize) != null && (E.value.pageSize = o.pageSize);
286
+ const ce = t.beforeFetch ? t.beforeFetch(se) : se, Me = await t.api(ce);
287
+ b.value = Me || {};
288
+ const Re = t.afterFetch ? t.afterFetch(Me) : Me, ze = Re[U] ?? Re.items ?? Re.list ?? [], Ee = Re[L] ?? 0;
289
+ v.value = ze, E.value.total = Ee, n("fetch-success", { items: ze, total: Ee });
290
290
  } catch (c) {
291
- _.value = [], n("fetch-error", c);
291
+ v.value = [], n("fetch-error", c);
292
292
  } finally {
293
- m.value = !1;
293
+ d.value = !1;
294
294
  }
295
- }, ye = () => re(void 0), we = (l) => {
296
- F.value.clearSelectOnPageChange && (v.value = []), E.value.pageSize = l, E.value.page = 1, re(void 0);
297
- }, xe = (l) => {
298
- F.value.clearSelectOnPageChange && (v.value = []), E.value.page = l, re(void 0);
299
- }, Ce = (l, c, b) => n("row-click", l, b), Pe = (l, c, b) => n("row-dblclick", l, b), Se = ({ prop: l, order: c }) => n("sort-change", { prop: l, order: c }), ve = (l, c) => n("expand-change", l, c), ce = {
300
- setProps: (l) => {
301
- p.value = { ...p.value, ...l };
295
+ }, be = () => oe(void 0), ue = (o) => {
296
+ P.value.clearSelectOnPageChange && (_.value = []), E.value.pageSize = o, E.value.page = 1, oe(void 0);
297
+ }, Ce = (o) => {
298
+ P.value.clearSelectOnPageChange && (_.value = []), E.value.page = o, oe(void 0);
299
+ }, xe = (o, c, x) => n("row-click", o, x), Pe = (o, c, x) => n("row-dblclick", o, x), Se = ({ prop: o, order: c }) => n("sort-change", { prop: o, order: c }), ye = (o, c) => n("expand-change", o, c), pe = {
300
+ setProps: (o) => {
301
+ p.value = { ...p.value, ...o };
302
302
  },
303
- reload: (l) => re(l),
303
+ reload: (o) => oe(o),
304
304
  redoHeight: () => {
305
- var l, c;
306
- (c = (l = r.value) == null ? void 0 : l.doLayout) == null || c.call(l);
305
+ var o, c;
306
+ (c = (o = a.value) == null ? void 0 : o.doLayout) == null || c.call(o);
307
307
  },
308
- setLoading: (l) => {
309
- m.value = l;
308
+ setLoading: (o) => {
309
+ d.value = o;
310
310
  },
311
311
  /** 返回全量数据(API 模式为服务端返回的当前页数据,本地模式为原始全量数据) */
312
- getDataSource: () => _.value,
313
- getRawDataSource: () => S.value,
312
+ getDataSource: () => v.value,
313
+ getRawDataSource: () => b.value,
314
314
  /** 设置本地全量数据,同时同步 total */
315
- setTableData: (l) => {
316
- _.value = l ?? [], t.pagination !== !1 && (E.value.total = (l ?? []).length);
315
+ setTableData: (o) => {
316
+ v.value = o ?? [], t.pagination !== !1 && (E.value.total = (o ?? []).length);
317
317
  },
318
- getColumns: () => x.value,
319
- setColumns: (l) => {
320
- if (Array.isArray(l) && l.length > 0 && typeof l[0] == "string") {
321
- const c = l, b = (t.columns ?? []).filter((H) => c.includes(H.key ?? H.dataIndex)), C = c.map((H) => b.find((O) => (O.key ?? O.dataIndex) === H)).filter(Boolean);
322
- C.length && (x.value = C);
318
+ getColumns: () => y.value,
319
+ setColumns: (o) => {
320
+ if (Array.isArray(o) && o.length > 0 && typeof o[0] == "string") {
321
+ const c = o, x = (t.columns ?? []).filter((U) => c.includes(U.key ?? U.dataIndex)), k = c.map((U) => x.find((L) => (L.key ?? L.dataIndex) === U)).filter(Boolean);
322
+ k.length && (y.value = k);
323
323
  } else
324
- x.value = l ?? [];
324
+ y.value = o ?? [];
325
325
  },
326
- setPagination: (l) => {
327
- l != null && l.page && (E.value.page = l.page), l != null && l.pageSize && (E.value.pageSize = l.pageSize), (l == null ? void 0 : l.total) !== void 0 && (E.value.total = l.total);
326
+ setPagination: (o) => {
327
+ o != null && o.page && (E.value.page = o.page), o != null && o.pageSize && (E.value.pageSize = o.pageSize), (o == null ? void 0 : o.total) !== void 0 && (E.value.total = o.total);
328
328
  },
329
- getSelectRowKeys: () => v.value.map((l) => l[y.value]),
330
- getSelectRows: () => v.value,
329
+ getSelectRowKeys: () => _.value.map((o) => o[g.value]),
330
+ getSelectRows: () => _.value,
331
331
  clearSelectedRowKeys: () => {
332
- v.value = [], ae();
332
+ _.value = [], ae();
333
333
  },
334
- setSelectedRowKeys: (l) => {
335
- const c = new Set(l), b = _.value.filter((C) => c.has(C[y.value]));
336
- l.forEach((C) => {
337
- b.some((H) => H[y.value] === C) || b.push({ [y.value]: C });
338
- }), v.value = b, ae();
334
+ setSelectedRowKeys: (o) => {
335
+ const c = new Set(o), x = v.value.filter((k) => c.has(k[g.value]));
336
+ o.forEach((k) => {
337
+ x.some((U) => U[g.value] === k) || x.push({ [g.value]: k });
338
+ }), _.value = x, ae();
339
339
  },
340
- deleteSelectRowByKey: (l) => {
341
- v.value = v.value.filter((c) => c[y.value] !== l), ae();
340
+ deleteSelectRowByKey: (o) => {
341
+ _.value = _.value.filter((c) => c[g.value] !== o), ae();
342
342
  },
343
343
  /** index 为当前页索引,自动转换为全量索引 */
344
- updateTableData: (l, c, b) => {
345
- const { page: C, pageSize: H } = E.value, O = (C - 1) * H + l;
346
- O < 0 || O >= _.value.length || (_.value = [..._.value], _.value[O] = { ..._.value[O], [c]: b });
344
+ updateTableData: (o, c, x) => {
345
+ const { page: k, pageSize: U } = E.value, L = (k - 1) * U + o;
346
+ L < 0 || L >= v.value.length || (v.value = [...v.value], v.value[L] = { ...v.value[L], [c]: x });
347
347
  },
348
- updateTableDataRecord: (l, c) => {
349
- const b = _.value.findIndex((C) => C[y.value] === l);
350
- if (!(b < 0))
351
- return _.value = [..._.value], _.value[b] = { ..._.value[b], ...c }, _.value[b];
348
+ updateTableDataRecord: (o, c) => {
349
+ const x = v.value.findIndex((k) => k[g.value] === o);
350
+ if (!(x < 0))
351
+ return v.value = [...v.value], v.value[x] = { ...v.value[x], ...c }, v.value[x];
352
352
  },
353
- deleteTableDataRecord: (l) => {
354
- const c = Array.isArray(l) ? l : [l], b = new Set(c);
355
- _.value = _.value.filter((C) => !b.has(C[y.value])), t.pagination !== !1 && (E.value.total = _.value.length);
353
+ deleteTableDataRecord: (o) => {
354
+ const c = Array.isArray(o) ? o : [o], x = new Set(c);
355
+ v.value = v.value.filter((k) => !x.has(k[g.value])), t.pagination !== !1 && (E.value.total = v.value.length);
356
356
  },
357
- insertTableDataRecord: (l, c) => {
358
- const b = [..._.value];
359
- return c == null || c >= b.length ? b.push(l) : b.splice(c, 0, l), _.value = b, t.pagination !== !1 && (E.value.total = _.value.length), l;
357
+ insertTableDataRecord: (o, c) => {
358
+ const x = [...v.value];
359
+ return c == null || c >= x.length ? x.push(o) : x.splice(c, 0, o), v.value = x, t.pagination !== !1 && (E.value.total = v.value.length), o;
360
360
  },
361
- getPaginationRef: () => k.value ? { page: E.value.page, pageSize: Number(E.value.pageSize) || 10, total: E.value.total } : !1,
362
- getShowPagination: () => k.value,
363
- setShowPagination: (l) => {
364
- B.value = l;
361
+ getPaginationRef: () => S.value ? { page: E.value.page, pageSize: Number(E.value.pageSize) || 10, total: E.value.total } : !1,
362
+ getShowPagination: () => S.value,
363
+ setShowPagination: (o) => {
364
+ A.value = o;
365
365
  },
366
- getRowSelection: () => F.value.rowSelection,
366
+ getRowSelection: () => P.value.rowSelection,
367
367
  expandAll: () => {
368
- var C;
369
- const l = ((C = F.value.treeProps) == null ? void 0 : C.children) ?? "children", c = (H) => {
370
- const O = [];
371
- return H.forEach((oe) => {
372
- O.push(oe);
373
- const ie = oe[l];
374
- Array.isArray(ie) && ie.length > 0 && O.push(...c(ie));
375
- }), O;
368
+ var k;
369
+ const o = ((k = P.value.treeProps) == null ? void 0 : k.children) ?? "children", c = (U) => {
370
+ const L = [];
371
+ return U.forEach((se) => {
372
+ L.push(se);
373
+ const ce = se[o];
374
+ Array.isArray(ce) && ce.length > 0 && L.push(...c(ce));
375
+ }), L;
376
376
  };
377
- c(_.value).forEach((H) => {
378
- var O, oe;
379
- return (oe = (O = r.value) == null ? void 0 : O.toggleRowExpansion) == null ? void 0 : oe.call(O, H, !0);
377
+ c(v.value).forEach((U) => {
378
+ var L, se;
379
+ return (se = (L = a.value) == null ? void 0 : L.toggleRowExpansion) == null ? void 0 : se.call(L, U, !0);
380
380
  });
381
381
  },
382
382
  collapseAll: () => {
383
- var C;
384
- const l = ((C = F.value.treeProps) == null ? void 0 : C.children) ?? "children", c = (H) => {
385
- const O = [];
386
- return H.forEach((oe) => {
387
- O.push(oe);
388
- const ie = oe[l];
389
- Array.isArray(ie) && ie.length > 0 && O.push(...c(ie));
390
- }), O;
383
+ var k;
384
+ const o = ((k = P.value.treeProps) == null ? void 0 : k.children) ?? "children", c = (U) => {
385
+ const L = [];
386
+ return U.forEach((se) => {
387
+ L.push(se);
388
+ const ce = se[o];
389
+ Array.isArray(ce) && ce.length > 0 && L.push(...c(ce));
390
+ }), L;
391
391
  };
392
- c(_.value).forEach((H) => {
393
- var O, oe;
394
- return (oe = (O = r.value) == null ? void 0 : O.toggleRowExpansion) == null ? void 0 : oe.call(O, H, !1);
392
+ c(v.value).forEach((U) => {
393
+ var L, se;
394
+ return (se = (L = a.value) == null ? void 0 : L.toggleRowExpansion) == null ? void 0 : se.call(L, U, !1);
395
395
  });
396
396
  }
397
397
  };
398
- e(ce);
399
- const ue = () => {
400
- const l = (c, b = "") => c.map((C, H) => {
401
- const O = `${C.dataIndex}`;
398
+ e(pe);
399
+ const me = () => {
400
+ const o = (c, x = "") => c.map((k, U) => {
401
+ const L = `${k.dataIndex}`;
402
402
  return {
403
- ...C,
404
- dataIndex: O,
405
- children: C.children ? l(C.children, O) : void 0
403
+ ...k,
404
+ dataIndex: L,
405
+ children: k.children ? o(k.children, L) : void 0
406
406
  };
407
407
  });
408
- x.value = l(t.columns ?? []);
409
- }, d = () => {
410
- t.api && F.value.immediate !== !1 ? re(void 0) : t.dataSource && (_.value = [...t.dataSource], !t.api && t.pagination !== !1 && (E.value.total = t.dataSource.length));
411
- }, P = () => {
412
- a.value && (f.value = a.value.offsetWidth || 0);
408
+ y.value = o(t.columns ?? []);
409
+ }, m = () => {
410
+ t.api && P.value.immediate !== !1 ? oe(void 0) : t.dataSource && (v.value = [...t.dataSource], !t.api && t.pagination !== !1 && (E.value.total = t.dataSource.length));
411
+ }, F = () => {
412
+ s.value && (u.value = s.value.offsetWidth || 0);
413
413
  };
414
- let R = null, T = null;
415
- return me(() => {
416
- ue(), n("register", ce), d(), typeof window < "u" && (window.addEventListener("resize", P), R = new ResizeObserver(P), Le(() => {
417
- P(), T = a.value, T && (R == null || R.observe(T));
414
+ let M = null, $ = null;
415
+ return ge(() => {
416
+ me(), n("register", pe), m(), typeof window < "u" && (window.addEventListener("resize", F), M = new ResizeObserver(F), Ke(() => {
417
+ F(), $ = s.value, $ && (M == null || M.observe($));
418
418
  }));
419
- }), Be(() => {
420
- typeof window < "u" && (window.removeEventListener("resize", P), R && T && (R.unobserve(T), T = null));
421
- }), J(() => t.columns, ue, { deep: !0 }), J(() => t.dataSource, () => {
422
- !t.api && t.dataSource && (_.value = [...t.dataSource], t.pagination !== !1 && (E.value.total = t.dataSource.length));
423
- }, { deep: !0 }), J(() => t.loading, (l) => {
424
- m.value = l ?? !1;
425
- }), { __sfc: !0, props: t, emit: n, slots: o, tableRef: r, tableWrapRef: a, containerWidth: f, loading: m, localFullData: _, innerData: z, rawDataSource: S, innerColumns: x, innerProps: p, selectedRows: v, showPaginationRef: B, mergeSettings: V, effectiveProps: F, defaultPagination: A, pagination: E, showTitleBar: N, showPagination: k, paginationSmall: u, paginationBackground: W, rowKeyField: y, selectedKeysSet: j, displayColumns: q, flatColumnsMap: X, allFlatColumns: G, fixedColumnsWidth: ee, isRatioWidth: Z, totalRatio: Y, fixedDataColumnsWidth: te, parseWidthPx: U, spanMethodAdapter: le, getColumnWidth: g, shouldShowColumn: I, selectableRows: $, hasSelectableRows: i, isAllCurrentPageSelected: h, isIndeterminate: M, isRowSelected: K, getCheckboxDisabled: L, getRadioDisabled: Q, emitSelectionChange: ae, handleCheckboxChange: _e, handleRadioSelect: ge, handleSelectAll: be, fetchData: re, handleReload: ye, handleSizeChange: we, handleCurrentChange: xe, handleRowClick: Ce, handleRowDblclick: Pe, handleSortChange: Se, handleExpandChange: ve, tableAction: ce, syncColumns: ue, loadData: d, updateContainerWidth: P, resizeObserver: R, observedEl: T, TableColumnGroup: st, BodyCellRenderer: qe };
419
+ }), Fe(() => {
420
+ typeof window < "u" && (window.removeEventListener("resize", F), M && $ && (M.unobserve($), $ = null));
421
+ }), ee(() => t.columns, me, { deep: !0 }), ee(() => t.dataSource, () => {
422
+ !t.api && t.dataSource && (v.value = [...t.dataSource], t.pagination !== !1 && (E.value.total = t.dataSource.length));
423
+ }, { deep: !0 }), ee(() => t.loading, (o) => {
424
+ d.value = o ?? !1;
425
+ }), { __sfc: !0, props: t, emit: n, slots: l, tableRef: a, tableWrapRef: s, containerWidth: u, loading: d, localFullData: v, innerData: B, rawDataSource: b, innerColumns: y, innerProps: p, selectedRows: _, showPaginationRef: A, mergeSettings: O, effectiveProps: P, defaultPagination: T, pagination: E, showTitleBar: N, showPagination: S, paginationSmall: f, paginationBackground: W, rowKeyField: g, selectedKeysSet: K, displayColumns: q, flatColumnsMap: Q, allFlatColumns: J, fixedColumnsWidth: Y, isRatioWidth: Z, totalRatio: I, fixedDataColumnsWidth: V, parseWidthPx: j, spanMethodAdapter: C, getColumnWidth: i, shouldShowColumn: h, selectableRows: R, hasSelectableRows: z, isAllCurrentPageSelected: H, isIndeterminate: G, isRowSelected: ne, getCheckboxDisabled: le, getRadioDisabled: X, emitSelectionChange: ae, handleCheckboxChange: de, handleRadioSelect: ie, handleSelectAll: fe, fetchData: oe, handleReload: be, handleSizeChange: ue, handleCurrentChange: Ce, handleRowClick: xe, handleRowDblclick: Pe, handleSortChange: Se, handleExpandChange: ye, tableAction: pe, syncColumns: me, loadData: m, updateContainerWidth: F, resizeObserver: M, observedEl: $, TableColumnGroup: it, BodyCellRenderer: qe };
426
426
  }
427
427
  });
428
- var it = function() {
429
- var o, r, a, f;
428
+ var ut = function() {
429
+ var l, a, s, u;
430
430
  var e = this, n = e._self._c, t = e._self._setupProxy;
431
- return n("div", { staticClass: "ecp-pro-table" }, [t.showTitleBar ? n("div", { staticClass: "ecp-pro-table__header" }, [n("div", { staticClass: "ecp-pro-table__title-wrapper" }, [n("span", { staticClass: "ecp-pro-table__title" }, [e._v(e._s(t.effectiveProps.title))]), t.effectiveProps.titleHelpMessage ? n("el-tooltip", { staticClass: "ecp-pro-table__help", attrs: { placement: "top" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.titleHelpMessage) ? n("span", e._l(t.effectiveProps.titleHelpMessage, function(m, _) {
432
- return n("div", { key: _ }, [e._v(e._s(m))]);
431
+ return n("div", { staticClass: "ecp-pro-table" }, [t.showTitleBar ? n("div", { staticClass: "ecp-pro-table__header" }, [n("div", { staticClass: "ecp-pro-table__title-wrapper" }, [n("span", { staticClass: "ecp-pro-table__title" }, [e._v(e._s(t.effectiveProps.title))]), t.effectiveProps.titleHelpMessage ? n("el-tooltip", { staticClass: "ecp-pro-table__help", attrs: { placement: "top" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.titleHelpMessage) ? n("span", e._l(t.effectiveProps.titleHelpMessage, function(d, v) {
432
+ return n("div", { key: v }, [e._v(e._s(d))]);
433
433
  }), 0) : n("span", [e._v(e._s(t.effectiveProps.titleHelpMessage))])]), n("i", { staticClass: "el-icon-question" })], 2) : e._e()], 1), n("div", { staticClass: "ecp-pro-table__toolbar" }, [e._t("tableTitle"), e._t("toolbar"), e._t("toolbar-right", function() {
434
- var m;
435
- return [((m = t.effectiveProps.tableSetting) == null ? void 0 : m.redo) !== !1 ? n("el-button", { attrs: { type: "text", icon: "el-icon-refresh", size: "small" }, on: { click: t.handleReload } }, [e._v(" 刷新 ")]) : e._e()];
436
- })], 2)]) : e._e(), n("div", { directives: [{ name: "loading", rawName: "v-loading", value: t.loading, expression: "loading" }], ref: "tableWrapRef", staticClass: "ecp-pro-table__body" }, [n("el-table", e._b({ ref: "tableRef", attrs: { data: t.innerData, "row-key": t.effectiveProps.rowKey, border: t.effectiveProps.bordered, stripe: t.effectiveProps.striped, size: t.effectiveProps.size, "max-height": t.effectiveProps.maxHeight, height: t.effectiveProps.height, "default-sort": t.effectiveProps.defaultSort, "span-method": t.spanMethodAdapter, "tree-props": t.effectiveProps.treeProps, "default-expand-all": t.effectiveProps.defaultExpandAll, "expand-row-keys": t.effectiveProps.expandRowKeys || [], lazy: t.effectiveProps.lazy, load: t.effectiveProps.load, "row-class-name": t.effectiveProps.rowClassName }, on: { "row-click": t.handleRowClick, "row-dblclick": t.handleRowDblclick, "sort-change": t.handleSortChange, "expand-change": t.handleExpandChange } }, "el-table", t.effectiveProps.tableProps, !1), [t.effectiveProps.rowSelection ? n("el-table-column", { attrs: { width: t.effectiveProps.rowSelection.width || 48, fixed: t.effectiveProps.rowSelection.fixed, align: "center" }, scopedSlots: e._u([{ key: "header", fn: function(m) {
434
+ var d;
435
+ return [((d = t.effectiveProps.tableSetting) == null ? void 0 : d.redo) !== !1 ? n("el-button", { attrs: { type: "text", icon: "el-icon-refresh", size: "small" }, on: { click: t.handleReload } }, [e._v(" 刷新 ")]) : e._e()];
436
+ })], 2)]) : e._e(), n("div", { directives: [{ name: "loading", rawName: "v-loading", value: t.loading, expression: "loading" }], ref: "tableWrapRef", staticClass: "ecp-pro-table__body" }, [n("el-table", e._b({ ref: "tableRef", attrs: { data: t.innerData, "row-key": t.effectiveProps.rowKey, border: t.effectiveProps.bordered, stripe: t.effectiveProps.striped, size: t.effectiveProps.size, "max-height": t.effectiveProps.maxHeight, height: t.effectiveProps.height, "default-sort": t.effectiveProps.defaultSort, "span-method": t.spanMethodAdapter, "tree-props": t.effectiveProps.treeProps, "default-expand-all": t.effectiveProps.defaultExpandAll, "expand-row-keys": t.effectiveProps.expandRowKeys || [], lazy: t.effectiveProps.lazy, load: t.effectiveProps.load, "row-class-name": t.effectiveProps.rowClassName }, on: { "row-click": t.handleRowClick, "row-dblclick": t.handleRowDblclick, "sort-change": t.handleSortChange, "expand-change": t.handleExpandChange } }, "el-table", t.effectiveProps.tableProps, !1), [t.effectiveProps.rowSelection ? n("el-table-column", { attrs: { width: t.effectiveProps.rowSelection.width || 48, fixed: t.effectiveProps.rowSelection.fixed, align: "center" }, scopedSlots: e._u([{ key: "header", fn: function(d) {
437
437
  return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isAllCurrentPageSelected, indeterminate: t.isIndeterminate, disabled: !t.hasSelectableRows }, on: { change: t.handleSelectAll } }) : n("span")];
438
- } }, { key: "default", fn: function(m) {
439
- var _;
440
- return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isRowSelected(m.row), disabled: t.getCheckboxDisabled(m.row) }, on: { change: (z) => t.handleCheckboxChange(m.row, z) }, nativeOn: { click: function(z) {
441
- z.stopPropagation();
442
- } } }) : n("el-radio", { attrs: { value: (_ = t.selectedRows[0]) == null ? void 0 : _[t.rowKeyField], label: m.row[t.rowKeyField], disabled: t.getRadioDisabled(m.row) }, on: { change: function(z) {
443
- return t.handleRadioSelect(m.row);
444
- } }, nativeOn: { click: function(z) {
445
- z.stopPropagation();
438
+ } }, { key: "default", fn: function(d) {
439
+ var v;
440
+ return [t.effectiveProps.rowSelection.type !== "radio" ? n("el-checkbox", { attrs: { value: t.isRowSelected(d.row), disabled: t.getCheckboxDisabled(d.row) }, on: { change: (B) => t.handleCheckboxChange(d.row, B) }, nativeOn: { click: function(B) {
441
+ B.stopPropagation();
442
+ } } }) : n("el-radio", { attrs: { value: (v = t.selectedRows[0]) == null ? void 0 : v[t.rowKeyField], label: d.row[t.rowKeyField], disabled: t.getRadioDisabled(d.row) }, on: { change: function(B) {
443
+ return t.handleRadioSelect(d.row);
444
+ } }, nativeOn: { click: function(B) {
445
+ B.stopPropagation();
446
446
  } } }, [n("span")])];
447
- } }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? n("el-table-column", { attrs: { type: "index", label: ((o = t.effectiveProps.indexColumnProps) == null ? void 0 : o.title) || "序号", width: ((r = t.effectiveProps.indexColumnProps) == null ? void 0 : r.width) || 60, fixed: (a = t.effectiveProps.indexColumnProps) == null ? void 0 : a.fixed, align: ((f = t.effectiveProps.indexColumnProps) == null ? void 0 : f.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(m) {
448
- return [t.shouldShowColumn(m) ? n(t.TableColumnGroup, { key: m.key || m.dataIndex || m.title, attrs: { column: m, "effective-props": t.effectiveProps, "get-column-width": t.getColumnWidth } }) : e._e()];
449
- }), t.effectiveProps.actionColumn ? n("el-table-column", { attrs: { label: t.effectiveProps.actionColumn.title || "操作", width: t.effectiveProps.actionColumn.width || 150, fixed: t.effectiveProps.actionColumn.fixed || "right", align: t.effectiveProps.actionColumn.align || "center" }, scopedSlots: e._u([{ key: "default", fn: function(m) {
450
- return [e.$scopedSlots.action ? e._t("action", null, { record: m.row, column: t.effectiveProps.actionColumn, index: m.$index }) : e.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: t.effectiveProps.actionColumn, record: m.row, index: m.$index, value: void 0, "custom-render": t.effectiveProps.actionColumn.customRender, "value-enum": t.effectiveProps.actionColumn.valueEnum } }) : e._e()];
447
+ } }], null, !1, 983730649) }) : e._e(), t.effectiveProps.showIndexColumn ? n("el-table-column", { attrs: { type: "index", label: ((l = t.effectiveProps.indexColumnProps) == null ? void 0 : l.title) || "序号", width: ((a = t.effectiveProps.indexColumnProps) == null ? void 0 : a.width) || 60, fixed: (s = t.effectiveProps.indexColumnProps) == null ? void 0 : s.fixed, align: ((u = t.effectiveProps.indexColumnProps) == null ? void 0 : u.align) || "center" } }) : e._e(), e._l(t.displayColumns, function(d) {
448
+ return [t.shouldShowColumn(d) ? n(t.TableColumnGroup, { key: d.key || d.dataIndex || d.title, attrs: { column: d, "effective-props": t.effectiveProps, "get-column-width": t.getColumnWidth } }) : e._e()];
449
+ }), t.effectiveProps.actionColumn ? n("el-table-column", { attrs: { label: t.effectiveProps.actionColumn.title || "操作", width: t.effectiveProps.actionColumn.width || 150, fixed: t.effectiveProps.actionColumn.fixed || "right", align: t.effectiveProps.actionColumn.align || "center" }, scopedSlots: e._u([{ key: "default", fn: function(d) {
450
+ return [e.$scopedSlots.action ? e._t("action", null, { record: d.row, column: t.effectiveProps.actionColumn, index: d.$index }) : e.$scopedSlots.bodyCell ? n(t.BodyCellRenderer, { attrs: { "slot-render": e.$scopedSlots.bodyCell, column: t.effectiveProps.actionColumn, record: d.row, index: d.$index, value: void 0, "custom-render": t.effectiveProps.actionColumn.customRender, "value-enum": t.effectiveProps.actionColumn.valueEnum } }) : e._e()];
451
451
  } }], null, !0) }) : e._e()], 2)], 1), t.showPagination ? n("div", { staticClass: "ecp-pro-table__pagination" }, [n("el-pagination", e._b({ attrs: { "current-page": t.pagination.page, "page-sizes": t.pagination.pageSizes, "page-size": t.pagination.pageSize, total: t.pagination.total, small: t.paginationSmall, background: t.paginationBackground, layout: (t.effectiveProps.pagination && typeof t.effectiveProps.pagination == "object" ? t.effectiveProps.pagination.layout : null) || "total, sizes, prev, pager, next, jumper" }, on: { "size-change": t.handleSizeChange, "current-change": t.handleCurrentChange } }, "el-pagination", t.effectiveProps.pagination && typeof t.effectiveProps.pagination == "object" && t.effectiveProps.pagination.props || {}, !1))], 1) : e._e()]);
452
- }, ct = [], ut = /* @__PURE__ */ se(
453
- rt,
454
- it,
452
+ }, dt = [], ft = /* @__PURE__ */ re(
455
453
  ct,
454
+ ut,
455
+ dt,
456
456
  !1,
457
457
  null,
458
- "3d780f58",
458
+ "d48fd076",
459
459
  null,
460
460
  null
461
461
  );
462
- const He = ut.exports, Oe = (s) => Array.isArray(s) ? s.length > 0 : s != null && String(s).trim() !== "", Ne = (s) => Array.isArray(s) ? s.map((e) => String(e)).join(", ") : s == null ? "" : typeof s == "object" ? JSON.stringify(s) : String(s), De = (s, e) => {
463
- if (!s)
462
+ const He = ft.exports, Ve = (r) => Array.isArray(r) ? r.length > 0 : r != null && String(r).trim() !== "", Oe = (r) => Array.isArray(r) ? r.map((e) => String(e)).join(", ") : r == null ? "" : typeof r == "object" ? JSON.stringify(r) : String(r), De = (r, e) => {
463
+ if (!r)
464
464
  return null;
465
- if (s === !0)
465
+ if (r === !0)
466
466
  return {
467
- content: Ne(e),
467
+ content: Oe(e),
468
468
  placement: "top",
469
469
  effect: "dark",
470
- disabled: !Oe(e)
470
+ disabled: !Ve(e)
471
471
  };
472
- if (typeof s == "string")
472
+ if (typeof r == "string")
473
473
  return {
474
- content: s,
474
+ content: r,
475
475
  placement: "top",
476
476
  effect: "dark"
477
477
  };
478
- const n = { ...s };
479
- return Object.prototype.hasOwnProperty.call(n, "content") || (n.content = Ne(e)), Object.prototype.hasOwnProperty.call(n, "placement") || (n.placement = "top"), Object.prototype.hasOwnProperty.call(n, "effect") || (n.effect = "dark"), Object.prototype.hasOwnProperty.call(n, "disabled") || (n.disabled = !Oe(n.content)), n;
480
- }, dt = /* @__PURE__ */ ne({
478
+ const n = { ...r };
479
+ return Object.prototype.hasOwnProperty.call(n, "content") || (n.content = Oe(e)), Object.prototype.hasOwnProperty.call(n, "placement") || (n.placement = "top"), Object.prototype.hasOwnProperty.call(n, "effect") || (n.effect = "dark"), Object.prototype.hasOwnProperty.call(n, "disabled") || (n.disabled = !Ve(n.content)), n;
480
+ }, pt = /* @__PURE__ */ te({
481
481
  __name: "TableAction",
482
482
  props: {
483
483
  actions: { default: () => [] },
484
484
  dropDownActions: { default: () => [] },
485
485
  stopButtonPropagation: { type: Boolean, default: !1 }
486
486
  },
487
- setup(s) {
488
- const e = s, n = (p) => De(p) || {}, t = (p) => p.type ? p.type : p.color === "error" ? "danger" : p.color === "success" ? "success" : p.color === "warning" ? "warning" : "text", o = (p) => p.filter((v) => {
489
- const { ifShow: B } = v;
490
- return typeof B == "boolean" ? B : typeof B == "function" ? B(v) : !0;
491
- }), r = w(() => o(e.actions || [])), a = w(() => o(e.dropDownActions || [])), f = (p, v) => {
492
- var B;
493
- e.stopButtonPropagation && v.stopPropagation(), (B = p.onClick) == null || B.call(p, v);
494
- }, m = (p, v) => {
495
- f(p, v);
496
- }, _ = (p, v, B) => {
497
- var V, F, A, E;
498
- e.stopButtonPropagation && B.stopPropagation(), p.popConfirm && (v === "confirm" ? (F = (V = p.popConfirm).confirm) == null || F.call(V) : (E = (A = p.popConfirm).cancel) == null || E.call(A));
487
+ setup(r) {
488
+ const e = r, n = (p) => De(p) || {}, t = (p) => p.type ? p.type : p.color === "error" ? "danger" : p.color === "success" ? "success" : p.color === "warning" ? "warning" : "text", l = (p) => p.filter((_) => {
489
+ const { ifShow: A } = _;
490
+ return typeof A == "boolean" ? A : typeof A == "function" ? A(_) : !0;
491
+ }), a = w(() => l(e.actions || [])), s = w(() => l(e.dropDownActions || [])), u = (p, _) => {
492
+ var A;
493
+ e.stopButtonPropagation && _.stopPropagation(), (A = p.onClick) == null || A.call(p, _);
494
+ }, d = (p, _) => {
495
+ u(p, _);
496
+ }, v = (p, _, A) => {
497
+ var O, P, T, E;
498
+ e.stopButtonPropagation && A.stopPropagation(), p.popConfirm && (_ === "confirm" ? (P = (O = p.popConfirm).confirm) == null || P.call(O) : (E = (T = p.popConfirm).cancel) == null || E.call(T));
499
499
  };
500
- return { __sfc: !0, props: e, normalizeTooltip: n, getButtonType: t, filterVisible: o, visibleActions: r, visibleDropDownActions: a, handleClick: f, handleActionClick: m, handlePopConfirm: _, handlePopConfirmConfirm: (p, v) => {
501
- _(p, "confirm", v);
502
- }, handlePopConfirmCancel: (p, v) => {
503
- _(p, "cancel", v);
500
+ return { __sfc: !0, props: e, normalizeTooltip: n, getButtonType: t, filterVisible: l, visibleActions: a, visibleDropDownActions: s, handleClick: u, handleActionClick: d, handlePopConfirm: v, handlePopConfirmConfirm: (p, _) => {
501
+ v(p, "confirm", _);
502
+ }, handlePopConfirmCancel: (p, _) => {
503
+ v(p, "cancel", _);
504
504
  }, handleDropdownCommand: (p) => {
505
- var V;
506
- const v = Number(p), B = a.value[v];
507
- if (!(!B || B.disabled)) {
508
- if (B.popConfirm) {
509
- const F = B.popConfirm.title, A = B.popConfirm.okText || "确定", E = B.popConfirm.cancelText || "取消";
510
- tt.confirm(F, "提示", {
511
- confirmButtonText: A,
505
+ var O;
506
+ const _ = Number(p), A = s.value[_];
507
+ if (!(!A || A.disabled)) {
508
+ if (A.popConfirm) {
509
+ const P = A.popConfirm.title, T = A.popConfirm.okText || "确定", E = A.popConfirm.cancelText || "取消";
510
+ lt.confirm(P, "提示", {
511
+ confirmButtonText: T,
512
512
  cancelButtonText: E,
513
513
  type: "warning"
514
514
  }).then(() => {
515
- var N, k;
516
- return (k = (N = B.popConfirm) == null ? void 0 : N.confirm) == null ? void 0 : k.call(N);
515
+ var N, S;
516
+ return (S = (N = A.popConfirm) == null ? void 0 : N.confirm) == null ? void 0 : S.call(N);
517
517
  }).catch(() => {
518
- var N, k;
519
- return (k = (N = B.popConfirm) == null ? void 0 : N.cancel) == null ? void 0 : k.call(N);
518
+ var N, S;
519
+ return (S = (N = A.popConfirm) == null ? void 0 : N.cancel) == null ? void 0 : S.call(N);
520
520
  });
521
521
  return;
522
522
  }
523
- (V = B.onClick) == null || V.call(B, {});
523
+ (O = A.onClick) == null || O.call(A, {});
524
524
  }
525
525
  } };
526
526
  }
527
527
  });
528
- var ft = function() {
528
+ var mt = function() {
529
529
  var e = this, n = e._self._c, t = e._self._setupProxy;
530
- return n("div", { staticClass: "ecp-table-action" }, [e._l(t.visibleActions, function(o, r) {
531
- return n("span", { key: `action-${r}`, staticClass: "ecp-table-action__item" }, [o.popConfirm ? n("el-popconfirm", { attrs: { title: o.popConfirm.title, "confirm-button-text": o.popConfirm.okText || "确定", "cancel-button-text": o.popConfirm.cancelText || "取消" }, on: { confirm: function(a) {
532
- return t.handlePopConfirmConfirm(o, a);
533
- }, cancel: function(a) {
534
- return t.handlePopConfirmCancel(o, a);
535
- } } }, [n("span", { attrs: { slot: "reference" }, slot: "reference" }, [n(o.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", o.tooltip ? t.normalizeTooltip(o.tooltip) : {}, !1), [n("el-button", e._b({ attrs: { type: t.getButtonType(o), size: "small", disabled: o.disabled }, on: { click: function(a) {
536
- return t.handleActionClick(o, a);
537
- } } }, "el-button", o.props, !1), [o.icon ? n("i", { class: ["ecp-table-action__icon", o.icon] }) : e._e(), n("span", [e._v(e._s(o.label))])])], 1)], 1)]) : n(o.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", o.tooltip ? t.normalizeTooltip(o.tooltip) : {}, !1), [n("el-button", e._b({ attrs: { type: t.getButtonType(o), size: "small", disabled: o.disabled }, on: { click: function(a) {
538
- return t.handleActionClick(o, a);
539
- } } }, "el-button", o.props, !1), [o.icon ? n("i", { class: ["ecp-table-action__icon", o.icon] }) : e._e(), n("span", [e._v(e._s(o.label))])])], 1), o.divider ? n("el-divider", { attrs: { direction: "vertical" } }) : e._e()], 1);
540
- }), t.visibleDropDownActions.length ? n("el-dropdown", { attrs: { trigger: "click" }, on: { command: t.handleDropdownCommand } }, [n("span", { staticClass: "ecp-table-action__more" }, [n("el-button", { attrs: { type: "text", size: "small" } }, [e._v(" 更多"), n("i", { staticClass: "el-icon-arrow-down el-icon--right" })])], 1), n("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, e._l(t.visibleDropDownActions, function(o, r) {
541
- return n("el-dropdown-item", { key: `dropdown-${r}`, attrs: { command: r, disabled: o.disabled, divided: !!o.divider } }, [n("span", { staticClass: "ecp-table-action__dropdown-item" }, [o.icon ? n("i", { class: ["ecp-table-action__icon", o.icon] }) : e._e(), n("span", [e._v(e._s(o.label))])])]);
530
+ return n("div", { staticClass: "ecp-table-action" }, [e._l(t.visibleActions, function(l, a) {
531
+ return n("span", { key: `action-${a}`, staticClass: "ecp-table-action__item" }, [l.popConfirm ? n("el-popconfirm", { attrs: { title: l.popConfirm.title, "confirm-button-text": l.popConfirm.okText || "确定", "cancel-button-text": l.popConfirm.cancelText || "取消" }, on: { confirm: function(s) {
532
+ return t.handlePopConfirmConfirm(l, s);
533
+ }, cancel: function(s) {
534
+ return t.handlePopConfirmCancel(l, s);
535
+ } } }, [n("span", { attrs: { slot: "reference" }, slot: "reference" }, [n(l.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", l.tooltip ? t.normalizeTooltip(l.tooltip) : {}, !1), [n("el-button", e._b({ attrs: { type: t.getButtonType(l), size: "small", disabled: l.disabled }, on: { click: function(s) {
536
+ return t.handleActionClick(l, s);
537
+ } } }, "el-button", l.props, !1), [l.icon ? n("i", { class: ["ecp-table-action__icon", l.icon] }) : e._e(), n("span", [e._v(e._s(l.label))])])], 1)], 1)]) : n(l.tooltip ? "el-tooltip" : "span", e._b({ tag: "component" }, "component", l.tooltip ? t.normalizeTooltip(l.tooltip) : {}, !1), [n("el-button", e._b({ attrs: { type: t.getButtonType(l), size: "small", disabled: l.disabled }, on: { click: function(s) {
538
+ return t.handleActionClick(l, s);
539
+ } } }, "el-button", l.props, !1), [l.icon ? n("i", { class: ["ecp-table-action__icon", l.icon] }) : e._e(), n("span", [e._v(e._s(l.label))])])], 1), l.divider ? n("el-divider", { attrs: { direction: "vertical" } }) : e._e()], 1);
540
+ }), t.visibleDropDownActions.length ? n("el-dropdown", { attrs: { trigger: "click" }, on: { command: t.handleDropdownCommand } }, [n("span", { staticClass: "ecp-table-action__more" }, [n("el-button", { attrs: { type: "text", size: "small" } }, [e._v(" 更多"), n("i", { staticClass: "el-icon-arrow-down el-icon--right" })])], 1), n("el-dropdown-menu", { attrs: { slot: "dropdown" }, slot: "dropdown" }, e._l(t.visibleDropDownActions, function(l, a) {
541
+ return n("el-dropdown-item", { key: `dropdown-${a}`, attrs: { command: a, disabled: l.disabled, divided: !!l.divider } }, [n("span", { staticClass: "ecp-table-action__dropdown-item" }, [l.icon ? n("i", { class: ["ecp-table-action__icon", l.icon] }) : e._e(), n("span", [e._v(e._s(l.label))])])]);
542
542
  }), 1)], 1) : e._e()], 2);
543
- }, pt = [], mt = /* @__PURE__ */ se(
544
- dt,
545
- ft,
543
+ }, vt = [], ht = /* @__PURE__ */ re(
546
544
  pt,
545
+ mt,
546
+ vt,
547
547
  !1,
548
548
  null,
549
549
  "45a58e7c",
550
550
  null,
551
551
  null
552
552
  );
553
- const Ge = mt.exports;
554
- function un(s) {
555
- const e = D(null), n = () => s ? pe(s) : void 0, t = () => {
556
- const a = pe(e);
557
- if (!a)
553
+ const Ge = ht.exports;
554
+ function hn(r) {
555
+ const e = D(null), n = () => r ? _e(r) : void 0, t = () => {
556
+ const s = _e(e);
557
+ if (!s)
558
558
  throw new Error("ProTable instance has not been registered");
559
- return a;
560
- }, o = (a) => {
561
- e.value = a;
562
- const f = n();
563
- f && Object.keys(f).length > 0 && a.setProps(f);
559
+ return s;
560
+ }, l = (s) => {
561
+ e.value = s;
562
+ const u = n();
563
+ u && Object.keys(u).length > 0 && s.setProps(u);
564
564
  };
565
- return s && J(
565
+ return r && ee(
566
566
  () => n(),
567
- (a) => {
568
- a && e.value && e.value.setProps(a);
567
+ (s) => {
568
+ s && e.value && e.value.setProps(s);
569
569
  },
570
570
  { deep: !0 }
571
- ), [o, {
572
- setProps: (a) => t().setProps(a),
573
- reload: (a) => t().reload(a),
571
+ ), [l, {
572
+ setProps: (s) => t().setProps(s),
573
+ reload: (s) => t().reload(s),
574
574
  redoHeight: () => t().redoHeight(),
575
- setLoading: (a) => t().setLoading(a),
575
+ setLoading: (s) => t().setLoading(s),
576
576
  getDataSource: () => t().getDataSource(),
577
577
  getRawDataSource: () => t().getRawDataSource(),
578
- setTableData: (a) => t().setTableData(a),
578
+ setTableData: (s) => t().setTableData(s),
579
579
  getColumns: () => t().getColumns(),
580
- setColumns: (a) => t().setColumns(a),
581
- setPagination: (a) => t().setPagination(a),
580
+ setColumns: (s) => t().setColumns(s),
581
+ setPagination: (s) => t().setPagination(s),
582
582
  getSelectRowKeys: () => t().getSelectRowKeys(),
583
583
  getSelectRows: () => t().getSelectRows(),
584
584
  clearSelectedRowKeys: () => t().clearSelectedRowKeys(),
585
- setSelectedRowKeys: (a) => t().setSelectedRowKeys(a),
586
- deleteSelectRowByKey: (a) => t().deleteSelectRowByKey(a),
587
- updateTableData: (a, f, m) => t().updateTableData(a, f, m),
588
- updateTableDataRecord: (a, f) => t().updateTableDataRecord(a, f),
589
- deleteTableDataRecord: (a) => t().deleteTableDataRecord(a),
590
- insertTableDataRecord: (a, f) => t().insertTableDataRecord(a, f),
585
+ setSelectedRowKeys: (s) => t().setSelectedRowKeys(s),
586
+ deleteSelectRowByKey: (s) => t().deleteSelectRowByKey(s),
587
+ updateTableData: (s, u, d) => t().updateTableData(s, u, d),
588
+ updateTableDataRecord: (s, u) => t().updateTableDataRecord(s, u),
589
+ deleteTableDataRecord: (s) => t().deleteTableDataRecord(s),
590
+ insertTableDataRecord: (s, u) => t().insertTableDataRecord(s, u),
591
591
  getPaginationRef: () => t().getPaginationRef(),
592
592
  getShowPagination: () => t().getShowPagination(),
593
- setShowPagination: (a) => t().setShowPagination(a),
593
+ setShowPagination: (s) => t().setShowPagination(s),
594
594
  getRowSelection: () => t().getRowSelection(),
595
595
  expandAll: () => {
596
- var a, f;
597
- return (f = (a = t()).expandAll) == null ? void 0 : f.call(a);
596
+ var s, u;
597
+ return (u = (s = t()).expandAll) == null ? void 0 : u.call(s);
598
598
  },
599
599
  collapseAll: () => {
600
- var a, f;
601
- return (f = (a = t()).collapseAll) == null ? void 0 : f.call(a);
600
+ var s, u;
601
+ return (u = (s = t()).collapseAll) == null ? void 0 : u.call(s);
602
602
  }
603
603
  }];
604
604
  }
605
- const vt = /* @__PURE__ */ ne({
605
+ const _t = /* @__PURE__ */ te({
606
606
  __name: "ApiSelect",
607
607
  props: {
608
608
  value: null,
@@ -618,158 +618,158 @@ const vt = /* @__PURE__ */ ne({
618
618
  multiple: { type: Boolean }
619
619
  },
620
620
  emits: ["input", "change"],
621
- setup(s, { expose: e }) {
622
- const n = s, t = D(!1), o = D([]), r = D([]), a = (S) => S == null ? "null" : JSON.stringify(f(S)), f = (S) => Array.isArray(S) ? S.map(f) : S !== null && typeof S == "object" ? Object.keys(S).sort().reduce((x, p) => (x[p] = f(S[p]), x), {}) : S, m = D(a(n.params ?? null)), _ = (S) => {
623
- n.lazy && S && (a(n.params ?? null) !== m.value || o.value.length === 0) && z();
624
- }, z = async () => {
621
+ setup(r, { expose: e }) {
622
+ const n = r, t = D(!1), l = D([]), a = D([]), s = (b) => b == null ? "null" : JSON.stringify(u(b)), u = (b) => Array.isArray(b) ? b.map(u) : b !== null && typeof b == "object" ? Object.keys(b).sort().reduce((y, p) => (y[p] = u(b[p]), y), {}) : b, d = D(s(n.params ?? null)), v = (b) => {
623
+ n.lazy && b && (s(n.params ?? null) !== d.value || l.value.length === 0) && B();
624
+ }, B = async () => {
625
625
  if (n.api) {
626
626
  t.value = !0;
627
627
  try {
628
- const S = await n.api(n.params), x = Array.isArray(S) ? S : (S == null ? void 0 : S.list) ?? (S == null ? void 0 : S.data) ?? [];
629
- r.value = x;
630
- const p = n.labelField ?? "label", v = n.valueField ?? "value";
631
- o.value = x.map((B) => {
632
- const V = B;
628
+ const b = await n.api(n.params), y = Array.isArray(b) ? b : (b == null ? void 0 : b.list) ?? (b == null ? void 0 : b.data) ?? [];
629
+ a.value = y;
630
+ const p = n.labelField ?? "label", _ = n.valueField ?? "value";
631
+ l.value = y.map((A) => {
632
+ const O = A;
633
633
  return {
634
- label: String(V[p] ?? V.label ?? ""),
635
- value: V[v] ?? V.value
634
+ label: String(O[p] ?? O.label ?? ""),
635
+ value: O[_] ?? O.value
636
636
  };
637
- }), m.value = a(n.params ?? null);
637
+ }), d.value = s(n.params ?? null);
638
638
  } finally {
639
639
  t.value = !1;
640
640
  }
641
641
  }
642
642
  };
643
643
  return e({
644
- options: o,
645
- rawOptions: r,
644
+ options: l,
645
+ rawOptions: a,
646
646
  loading: t,
647
- fetchOptions: z
648
- }), me(() => {
649
- n.lazy || z();
650
- }), J(
647
+ fetchOptions: B
648
+ }), ge(() => {
649
+ n.lazy || B();
650
+ }), ee(
651
651
  () => n.api,
652
652
  () => {
653
- n.lazy ? (o.value = [], r.value = []) : z();
653
+ n.lazy ? (l.value = [], a.value = []) : B();
654
654
  },
655
655
  { deep: !0 }
656
- ), J(() => n.params, () => {
657
- a(n.params ?? null) !== m.value && (n.lazy ? (o.value = [], r.value = []) : z());
658
- }, { deep: !0 }), { __sfc: !0, props: n, loading: t, options: o, rawOptions: r, sortStringify: a, sortKeys: f, lastFetchedParamsKey: m, onVisibleChange: _, fetchOptions: z };
656
+ ), ee(() => n.params, () => {
657
+ s(n.params ?? null) !== d.value && (n.lazy ? (l.value = [], a.value = []) : B());
658
+ }, { deep: !0 }), { __sfc: !0, props: n, loading: t, options: l, rawOptions: a, sortStringify: s, sortKeys: u, lastFetchedParamsKey: d, onVisibleChange: v, fetchOptions: B };
659
659
  }
660
660
  });
661
- var ht = function() {
661
+ var gt = function() {
662
662
  var e = this, n = e._self._c, t = e._self._setupProxy;
663
- return n("el-select", e._b({ on: { input: function(o) {
664
- return e.$emit("input", o);
665
- }, change: function(o) {
666
- return e.$emit("change", o);
667
- }, "visible-change": t.onVisibleChange } }, "el-select", { ...e.$attrs, value: e.value, placeholder: e.placeholder, disabled: e.disabled, loading: t.loading, clearable: e.clearable, filterable: e.filterable, multiple: e.multiple }, !1), e._l(t.options, function(o) {
668
- return n("el-option", { key: String(o.value), attrs: { label: o.label, value: o.value } });
663
+ return n("el-select", e._b({ on: { input: function(l) {
664
+ return e.$emit("input", l);
665
+ }, change: function(l) {
666
+ return e.$emit("change", l);
667
+ }, "visible-change": t.onVisibleChange } }, "el-select", { ...e.$attrs, value: e.value, placeholder: e.placeholder, disabled: e.disabled, loading: t.loading, clearable: e.clearable, filterable: e.filterable, multiple: e.multiple }, !1), e._l(t.options, function(l) {
668
+ return n("el-option", { key: String(l.value), attrs: { label: l.label, value: l.value } });
669
669
  }), 1);
670
- }, _t = [], gt = /* @__PURE__ */ se(
671
- vt,
672
- ht,
670
+ }, bt = [], yt = /* @__PURE__ */ re(
673
671
  _t,
672
+ gt,
673
+ bt,
674
674
  !1,
675
675
  null,
676
676
  null,
677
677
  null,
678
678
  null
679
679
  );
680
- const bt = gt.exports;
681
- function Ve(s) {
682
- const e = s.trim();
680
+ const Ue = yt.exports;
681
+ function Ne(r) {
682
+ const e = r.trim();
683
683
  if (!e)
684
684
  return "";
685
685
  let n = 0, t = "";
686
686
  e[0] === "-" && (t = "-", n = 1);
687
- let o = !1;
687
+ let l = !1;
688
688
  for (; n < e.length; n++) {
689
- const r = e[n];
690
- if (r >= "0" && r <= "9") {
691
- t += r;
689
+ const a = e[n];
690
+ if (a >= "0" && a <= "9") {
691
+ t += a;
692
692
  continue;
693
693
  }
694
- r === "." && !o && (o = !0, (t === "" || t === "-") && (t += "0"), t += ".");
694
+ a === "." && !l && (l = !0, (t === "" || t === "-") && (t += "0"), t += ".");
695
695
  }
696
696
  return t;
697
697
  }
698
- function Ae(s) {
699
- return s.replace(/,/g, "").trim();
698
+ function Te(r) {
699
+ return r.replace(/,/g, "").trim();
700
700
  }
701
- function yt(s, e, n) {
702
- if (!s || s === "-")
703
- return s;
704
- const t = s[0] === "-";
705
- let o = t ? s.slice(1) : s;
706
- const r = o.indexOf(".");
707
- if (r === -1) {
708
- const z = Math.max(0, e);
709
- return o = z > 0 ? o.slice(0, z) : o, t ? "-" + o : o;
701
+ function wt(r, e, n) {
702
+ if (!r || r === "-")
703
+ return r;
704
+ const t = r[0] === "-";
705
+ let l = t ? r.slice(1) : r;
706
+ const a = l.indexOf(".");
707
+ if (a === -1) {
708
+ const B = Math.max(0, e);
709
+ return l = B > 0 ? l.slice(0, B) : l, t ? "-" + l : l;
710
710
  }
711
- let a = o.slice(0, r);
712
- e > 0 && (a = a.slice(0, e));
713
- const f = o.slice(r + 1), m = f === "" && o.endsWith(".");
711
+ let s = l.slice(0, a);
712
+ e > 0 && (s = s.slice(0, e));
713
+ const u = l.slice(a + 1), d = u === "" && l.endsWith(".");
714
714
  if (n <= 0)
715
- return t ? "-" + a : a;
716
- if (m)
717
- return (t ? "-" : "") + a + ".";
718
- const _ = f.slice(0, n);
719
- return (t ? "-" : "") + a + "." + _;
715
+ return t ? "-" + s : s;
716
+ if (d)
717
+ return (t ? "-" : "") + s + ".";
718
+ const v = u.slice(0, n);
719
+ return (t ? "-" : "") + s + "." + v;
720
720
  }
721
- function wt(s, e) {
722
- const n = Math.pow(10, s) - 1;
721
+ function Ct(r, e) {
722
+ const n = Math.pow(10, r) - 1;
723
723
  return e <= 0 ? n : n + (1 - Math.pow(10, -e));
724
724
  }
725
- function We(s, e, n) {
726
- const t = wt(e, n), o = s < 0 ? -1 : 1;
727
- return Math.abs(s) <= t ? s : o * t;
725
+ function We(r, e, n) {
726
+ const t = Ct(e, n), l = r < 0 ? -1 : 1;
727
+ return Math.abs(r) <= t ? r : l * t;
728
728
  }
729
- function xt(s, e, n) {
729
+ function xt(r, e, n) {
730
730
  if (e <= 0)
731
731
  switch (n) {
732
732
  case "floor":
733
- return Math.floor(s);
733
+ return Math.floor(r);
734
734
  case "ceil":
735
- return Math.ceil(s);
735
+ return Math.ceil(r);
736
736
  default:
737
- return Math.round(s);
737
+ return Math.round(r);
738
738
  }
739
- const t = Math.pow(10, e), o = s * t;
740
- let r;
739
+ const t = Math.pow(10, e), l = r * t;
740
+ let a;
741
741
  switch (n) {
742
742
  case "floor":
743
- r = Math.floor(o);
743
+ a = Math.floor(l);
744
744
  break;
745
745
  case "ceil":
746
- r = Math.ceil(o);
746
+ a = Math.ceil(l);
747
747
  break;
748
748
  default:
749
- r = Math.round(o);
749
+ a = Math.round(l);
750
750
  }
751
- return r / t;
751
+ return a / t;
752
752
  }
753
- function ke(s, e, n, t) {
754
- let o = We(s, e, n);
755
- return o = xt(o, n, t), o = We(o, e, n), o;
753
+ function ke(r, e, n, t) {
754
+ let l = We(r, e, n);
755
+ return l = xt(l, n, t), l = We(l, e, n), l;
756
756
  }
757
- function Ct(s, e) {
758
- return Number.isNaN(s) || !Number.isFinite(s) ? "" : s.toFixed(Math.max(0, e));
757
+ function Pt(r, e) {
758
+ return Number.isNaN(r) || !Number.isFinite(r) ? "" : r.toFixed(Math.max(0, e));
759
759
  }
760
- function Ke(s, e) {
761
- if (Number.isNaN(s) || !Number.isFinite(s))
760
+ function Le(r, e) {
761
+ if (Number.isNaN(r) || !Number.isFinite(r))
762
762
  return "";
763
- const n = s.toFixed(Math.max(0, e)), t = n.startsWith("-"), o = t ? n.slice(1) : n, [r, a] = o.split("."), f = r.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
764
- return e <= 0 || a === void 0 ? (t ? "-" : "") + f : (t ? "-" : "") + f + "." + a;
763
+ const n = r.toFixed(Math.max(0, e)), t = n.startsWith("-"), l = t ? n.slice(1) : n, [a, s] = l.split("."), u = a.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
764
+ return e <= 0 || s === void 0 ? (t ? "-" : "") + u : (t ? "-" : "") + u + "." + s;
765
765
  }
766
- function Pt(s, e) {
767
- if (Number.isNaN(s) || !Number.isFinite(s))
766
+ function St(r, e) {
767
+ if (Number.isNaN(r) || !Number.isFinite(r))
768
768
  return "";
769
- let n = s.toFixed(Math.max(0, e));
769
+ let n = r.toFixed(Math.max(0, e));
770
770
  return n = n.replace(/(\.\d*?)0+$/, "$1"), n = n.replace(/\.$/, ""), n;
771
771
  }
772
- const St = /* @__PURE__ */ ne({
772
+ const Rt = /* @__PURE__ */ te({
773
773
  __name: "FormattedNumberInput",
774
774
  props: {
775
775
  value: null,
@@ -781,94 +781,94 @@ const St = /* @__PURE__ */ ne({
781
781
  inputLimit: { type: Boolean, default: !0 }
782
782
  },
783
783
  emits: ["input"],
784
- setup(s, { emit: e }) {
785
- const n = s, t = D(!1), o = D(""), r = () => Math.max(0, Math.floor(n.integerDigits ?? 6)), a = () => Math.max(0, Math.floor(n.decimalPlaces ?? 6));
786
- function f(p) {
784
+ setup(r, { emit: e }) {
785
+ const n = r, t = D(!1), l = D(""), a = () => Math.max(0, Math.floor(n.integerDigits ?? 6)), s = () => Math.max(0, Math.floor(n.decimalPlaces ?? 6));
786
+ function u(p) {
787
787
  if (p == null || p === "")
788
788
  return null;
789
789
  if (typeof p == "number")
790
790
  return Number.isFinite(p) ? p : null;
791
- const v = Ae(String(p));
792
- if (v === "" || v === "-")
791
+ const _ = Te(String(p));
792
+ if (_ === "" || _ === "-")
793
793
  return null;
794
- const B = Number(v);
795
- return Number.isFinite(B) ? B : null;
794
+ const A = Number(_);
795
+ return Number.isFinite(A) ? A : null;
796
796
  }
797
- function m() {
797
+ function d() {
798
798
  if (t.value)
799
799
  return;
800
- const p = f(n.value);
800
+ const p = u(n.value);
801
801
  if (p === null) {
802
- o.value = "";
802
+ l.value = "";
803
803
  return;
804
804
  }
805
- o.value = Ke(
806
- ke(p, r(), a(), n.rounding),
807
- a()
805
+ l.value = Le(
806
+ ke(p, a(), s(), n.rounding),
807
+ s()
808
808
  );
809
809
  }
810
- J(
810
+ ee(
811
811
  () => [n.value, n.integerDigits, n.decimalPlaces, n.rounding],
812
- () => m(),
812
+ () => d(),
813
813
  { immediate: !0, deep: !0 }
814
814
  );
815
- function _(p) {
816
- e("input", Ct(p, a()));
815
+ function v(p) {
816
+ e("input", Pt(p, s()));
817
817
  }
818
- function z(p) {
819
- let v = Ve(p);
820
- if (n.inputLimit !== !1 && (v = yt(v, r(), a())), o.value = v, v === "" || v === "-")
818
+ function B(p) {
819
+ let _ = Ne(p);
820
+ if (n.inputLimit !== !1 && (_ = wt(_, a(), s())), l.value = _, _ === "" || _ === "-")
821
821
  return;
822
- const B = Number(v);
823
- if (!Number.isFinite(B))
822
+ const A = Number(_);
823
+ if (!Number.isFinite(A))
824
824
  return;
825
- const V = ke(B, r(), a(), n.rounding);
826
- _(V);
825
+ const O = ke(A, a(), s(), n.rounding);
826
+ v(O);
827
827
  }
828
- function S() {
828
+ function b() {
829
829
  t.value = !0;
830
- const p = Ae(o.value), v = f(p === "" ? n.value : p);
831
- if (v === null) {
832
- o.value = "";
830
+ const p = Te(l.value), _ = u(p === "" ? n.value : p);
831
+ if (_ === null) {
832
+ l.value = "";
833
833
  return;
834
834
  }
835
- o.value = Pt(
836
- ke(v, r(), a(), n.rounding),
837
- a()
835
+ l.value = St(
836
+ ke(_, a(), s(), n.rounding),
837
+ s()
838
838
  );
839
839
  }
840
- function x() {
840
+ function y() {
841
841
  t.value = !1;
842
- const p = Ae(o.value);
842
+ const p = Te(l.value);
843
843
  if (p === "" || p === "-") {
844
- o.value = "", e("input", void 0);
844
+ l.value = "", e("input", void 0);
845
845
  return;
846
846
  }
847
- const v = Number(Ve(p));
848
- if (!Number.isFinite(v)) {
849
- o.value = "", e("input", void 0);
847
+ const _ = Number(Ne(p));
848
+ if (!Number.isFinite(_)) {
849
+ l.value = "", e("input", void 0);
850
850
  return;
851
851
  }
852
- const B = ke(v, r(), a(), n.rounding);
853
- o.value = Ke(B, a()), _(B);
852
+ const A = ke(_, a(), s(), n.rounding);
853
+ l.value = Le(A, s()), v(A);
854
854
  }
855
- return { __sfc: !0, props: n, emit: e, focused: t, displayText: o, intN: r, decM: a, parseExternalToNumber: f, syncDisplayFromValue: m, emitStoredValue: _, onInput: z, onFocus: S, onBlur: x };
855
+ return { __sfc: !0, props: n, emit: e, focused: t, displayText: l, intN: a, decM: s, parseExternalToNumber: u, syncDisplayFromValue: d, emitStoredValue: v, onInput: B, onFocus: b, onBlur: y };
856
856
  }
857
857
  });
858
- var Ft = function() {
858
+ var kt = function() {
859
859
  var e = this, n = e._self._c, t = e._self._setupProxy;
860
860
  return n("el-input", e._b({ attrs: { value: t.displayText, placeholder: e.placeholder, disabled: e.disabled }, on: { input: t.onInput, focus: t.onFocus, blur: t.onBlur } }, "el-input", e.$attrs, !1));
861
- }, kt = [], Bt = /* @__PURE__ */ se(
862
- St,
863
- Ft,
861
+ }, Ft = [], Bt = /* @__PURE__ */ re(
862
+ Rt,
864
863
  kt,
864
+ Ft,
865
865
  !1,
866
866
  null,
867
867
  null,
868
868
  null,
869
869
  null
870
870
  );
871
- const Me = Bt.exports, Rt = /* @__PURE__ */ ne({
871
+ const Ae = Bt.exports, At = /* @__PURE__ */ te({
872
872
  __name: "TreeSelect",
873
873
  props: {
874
874
  value: null,
@@ -885,107 +885,107 @@ const Me = Bt.exports, Rt = /* @__PURE__ */ ne({
885
885
  clearable: { type: Boolean }
886
886
  },
887
887
  emits: ["input"],
888
- setup(s, { emit: e }) {
889
- const n = s, t = D(), o = D(), r = D(!1), a = D(!1), f = D(""), m = D([]), _ = D({}), z = w(() => ({
888
+ setup(r, { emit: e }) {
889
+ const n = r, t = D(), l = D(), a = D(!1), s = D(!1), u = D(""), d = D([]), v = D({}), B = w(() => ({
890
890
  label: n.labelField,
891
891
  children: n.childrenField
892
892
  }));
893
- function S(y) {
894
- const j = n.labelField ?? "label", q = n.valueField ?? "value", X = n.childrenField ?? "children", G = y[X], ee = {};
895
- return ee[n.labelField ?? "label"] = y[j] ?? y.label, ee[n.valueField ?? "value"] = y[q] ?? y.value, Array.isArray(G) && G.length && (ee[n.childrenField ?? "children"] = G.map((Z) => S(Z))), ee;
893
+ function b(g) {
894
+ const K = n.labelField ?? "label", q = n.valueField ?? "value", Q = n.childrenField ?? "children", J = g[Q], Y = {};
895
+ return Y[n.labelField ?? "label"] = g[K] ?? g.label, Y[n.valueField ?? "value"] = g[q] ?? g.value, Array.isArray(J) && J.length && (Y[n.childrenField ?? "children"] = J.map((Z) => b(Z))), Y;
896
896
  }
897
- function x(y, j = "") {
898
- const q = {}, X = n.labelField ?? "label", G = n.valueField ?? "value", ee = n.childrenField ?? "children";
899
- for (const Z of y) {
900
- const Y = String(Z[X] ?? Z.label ?? ""), te = Z[G] ?? Z.value;
901
- te != null && (q[String(te)] = j ? j + " / " + Y : Y);
902
- const U = Z[ee] ?? Z.children;
903
- Array.isArray(U) && U.length && Object.assign(q, x(U, Y));
897
+ function y(g, K = "") {
898
+ const q = {}, Q = n.labelField ?? "label", J = n.valueField ?? "value", Y = n.childrenField ?? "children";
899
+ for (const Z of g) {
900
+ const I = String(Z[Q] ?? Z.label ?? ""), V = Z[J] ?? Z.value;
901
+ V != null && (q[String(V)] = K ? K + " / " + I : I);
902
+ const j = Z[Y] ?? Z.children;
903
+ Array.isArray(j) && j.length && Object.assign(q, y(j, I));
904
904
  }
905
905
  return q;
906
906
  }
907
907
  function p() {
908
- const y = n.treeData;
909
- return Array.isArray(y) && y.length > 0;
908
+ const g = n.treeData;
909
+ return Array.isArray(g) && g.length > 0;
910
910
  }
911
- function v(y) {
912
- m.value = y, _.value = x(y);
911
+ function _(g) {
912
+ d.value = g, v.value = y(g);
913
913
  }
914
- function B() {
915
- const y = n.treeData;
916
- if (!Array.isArray(y) || y.length === 0)
914
+ function A() {
915
+ const g = n.treeData;
916
+ if (!Array.isArray(g) || g.length === 0)
917
917
  return;
918
- const j = y.map((q) => S(q));
919
- v(j);
918
+ const K = g.map((q) => b(q));
919
+ _(K);
920
920
  }
921
- const V = w(() => n.value == null || n.value === "" ? "" : _.value[String(n.value)] ?? String(n.value)), F = (y, j) => {
922
- if (!y)
921
+ const O = w(() => n.value == null || n.value === "" ? "" : v.value[String(n.value)] ?? String(n.value)), P = (g, K) => {
922
+ if (!g)
923
923
  return !0;
924
924
  const q = n.labelField ?? "label";
925
- return String(j[q] ?? j.label ?? "").toLowerCase().includes(y.toLowerCase());
925
+ return String(K[q] ?? K.label ?? "").toLowerCase().includes(g.toLowerCase());
926
926
  };
927
- J(f, (y) => {
928
- var j;
929
- (j = o.value) == null || j.filter(y);
927
+ ee(u, (g) => {
928
+ var K;
929
+ (K = l.value) == null || K.filter(g);
930
930
  });
931
- let A = null;
931
+ let T = null;
932
932
  function E() {
933
- n.disabled || (r.value = !0, n.lazy && !p() && W(), Le(() => {
934
- A = (y) => {
935
- t.value && !t.value.contains(y.target) && N();
936
- }, document.addEventListener("click", A);
933
+ n.disabled || (a.value = !0, n.lazy && !p() && W(), Ke(() => {
934
+ T = (g) => {
935
+ t.value && !t.value.contains(g.target) && N();
936
+ }, document.addEventListener("click", T);
937
937
  }));
938
938
  }
939
939
  function N() {
940
- r.value = !1, f.value = "", A && (document.removeEventListener("click", A), A = null);
940
+ a.value = !1, u.value = "", T && (document.removeEventListener("click", T), T = null);
941
941
  }
942
- function k() {
942
+ function S() {
943
943
  e("input", void 0);
944
944
  }
945
- function u(y) {
946
- const j = n.valueField ?? "value", q = y[j] ?? y.value;
945
+ function f(g) {
946
+ const K = n.valueField ?? "value", q = g[K] ?? g.value;
947
947
  e("input", q), N();
948
948
  }
949
949
  async function W() {
950
950
  if (!(!n.api || p())) {
951
- a.value = !0;
951
+ s.value = !0;
952
952
  try {
953
- const y = await n.api(n.params), j = Array.isArray(y) ? y : (y == null ? void 0 : y.list) ?? (y == null ? void 0 : y.data) ?? [];
954
- m.value = j.map((q) => S(q)), _.value = x(m.value);
953
+ const g = await n.api(n.params), K = Array.isArray(g) ? g : (g == null ? void 0 : g.list) ?? (g == null ? void 0 : g.data) ?? [];
954
+ d.value = K.map((q) => b(q)), v.value = y(d.value);
955
955
  } finally {
956
- a.value = !1;
956
+ s.value = !1;
957
957
  }
958
958
  }
959
959
  }
960
- return me(() => {
961
- p() ? B() : n.lazy || W();
962
- }), J(() => n.treeData, () => {
963
- p() ? B() : (m.value = [], _.value = {}, !n.lazy && n.api && W());
964
- }, { deep: !0 }), J(() => n.api, () => {
965
- p() || (n.lazy ? (m.value = [], _.value = {}) : W());
966
- }, { deep: !0 }), J(() => n.params, () => {
967
- p() || (n.lazy ? (m.value = [], _.value = {}) : W());
968
- }, { deep: !0 }), { __sfc: !0, props: n, emit: e, rootRef: t, treeRef: o, dropdownVisible: r, loading: a, filterText: f, treeData: m, flatLabelMap: _, treeProps: z, normalizeNode: S, buildFlatLabelMap: x, hasTreeDataProp: p, applyTreeData: v, syncFromTreeDataProp: B, displayText: V, filterNodeMethod: F, clickOutsideHandler: A, openDropdown: E, closeDropdown: N, clearValue: k, onNodeClick: u, fetchData: W };
960
+ return ge(() => {
961
+ p() ? A() : n.lazy || W();
962
+ }), ee(() => n.treeData, () => {
963
+ p() ? A() : (d.value = [], v.value = {}, !n.lazy && n.api && W());
964
+ }, { deep: !0 }), ee(() => n.api, () => {
965
+ p() || (n.lazy ? (d.value = [], v.value = {}) : W());
966
+ }, { deep: !0 }), ee(() => n.params, () => {
967
+ p() || (n.lazy ? (d.value = [], v.value = {}) : W());
968
+ }, { deep: !0 }), { __sfc: !0, props: n, emit: e, rootRef: t, treeRef: l, dropdownVisible: a, loading: s, filterText: u, treeData: d, flatLabelMap: v, treeProps: B, normalizeNode: b, buildFlatLabelMap: y, hasTreeDataProp: p, applyTreeData: _, syncFromTreeDataProp: A, displayText: O, filterNodeMethod: P, clickOutsideHandler: T, openDropdown: E, closeDropdown: N, clearValue: S, onNodeClick: f, fetchData: W };
969
969
  }
970
970
  });
971
971
  var Mt = function() {
972
972
  var e = this, n = e._self._c, t = e._self._setupProxy;
973
- return n("div", { ref: "rootRef", staticClass: "ecp-tree-select" }, [n("el-input", { staticClass: "ecp-tree-select__input", attrs: { value: t.displayText, placeholder: e.placeholder, disabled: e.disabled, clearable: e.clearable, readonly: "", "suffix-icon": "el-icon-arrow-down" }, on: { focus: t.openDropdown, clear: t.clearValue } }), n("transition", { attrs: { name: "el-zoom-in-top" } }, [n("div", { directives: [{ name: "show", rawName: "v-show", value: t.dropdownVisible, expression: "dropdownVisible" }], staticClass: "ecp-tree-select__dropdown" }, [e.filterable ? n("div", { staticClass: "ecp-tree-select__filter-inner" }, [n("el-input", { attrs: { size: "small", placeholder: "搜索节点", "prefix-icon": "el-icon-search", clearable: "" }, nativeOn: { click: function(o) {
974
- o.stopPropagation();
975
- } }, model: { value: t.filterText, callback: function(o) {
976
- t.filterText = o;
973
+ return n("div", { ref: "rootRef", staticClass: "ecp-tree-select" }, [n("el-input", { staticClass: "ecp-tree-select__input", attrs: { value: t.displayText, placeholder: e.placeholder, disabled: e.disabled, clearable: e.clearable, readonly: "", "suffix-icon": "el-icon-arrow-down" }, on: { focus: t.openDropdown, clear: t.clearValue } }), n("transition", { attrs: { name: "el-zoom-in-top" } }, [n("div", { directives: [{ name: "show", rawName: "v-show", value: t.dropdownVisible, expression: "dropdownVisible" }], staticClass: "ecp-tree-select__dropdown" }, [e.filterable ? n("div", { staticClass: "ecp-tree-select__filter-inner" }, [n("el-input", { attrs: { size: "small", placeholder: "搜索节点", "prefix-icon": "el-icon-search", clearable: "" }, nativeOn: { click: function(l) {
974
+ l.stopPropagation();
975
+ } }, model: { value: t.filterText, callback: function(l) {
976
+ t.filterText = l;
977
977
  }, expression: "filterText" } })], 1) : e._e(), n("el-tree", { directives: [{ name: "show", rawName: "v-show", value: !t.loading, expression: "!loading" }], ref: "treeRef", attrs: { data: t.treeData, props: t.treeProps, "node-key": e.valueField, "filter-node-method": e.filterable ? t.filterNodeMethod : void 0, "highlight-current": !0, "default-expand-all": "" }, on: { "node-click": t.onNodeClick } }), t.loading ? n("div", { staticClass: "ecp-tree-select__loading" }, [n("i", { staticClass: "el-icon-loading" }), e._v(" 加载中... ")]) : e._e()], 1)])], 1);
978
- }, $t = [], At = /* @__PURE__ */ se(
979
- Rt,
978
+ }, Tt = [], $t = /* @__PURE__ */ re(
979
+ At,
980
980
  Mt,
981
- $t,
981
+ Tt,
982
982
  !1,
983
983
  null,
984
984
  "f30bba11",
985
985
  null,
986
986
  null
987
987
  );
988
- const Tt = At.exports, Dt = /* @__PURE__ */ ne({
988
+ const Je = $t.exports, Dt = /* @__PURE__ */ te({
989
989
  __name: "ProFormItem",
990
990
  props: {
991
991
  schema: null,
@@ -998,8 +998,8 @@ const Tt = At.exports, Dt = /* @__PURE__ */ ne({
998
998
  customComponents: null,
999
999
  registerFieldInstance: null
1000
1000
  },
1001
- setup(s) {
1002
- const e = s, n = /* @__PURE__ */ new Set([
1001
+ setup(r) {
1002
+ const e = r, n = /* @__PURE__ */ new Set([
1003
1003
  "input",
1004
1004
  "select",
1005
1005
  "api-select",
@@ -1013,104 +1013,104 @@ const Tt = At.exports, Dt = /* @__PURE__ */ ne({
1013
1013
  "checkbox",
1014
1014
  "radio"
1015
1015
  ]), t = D(null);
1016
- me(() => {
1017
- var u;
1018
- e.schema.component === "api-select" && ((u = e.registerFieldInstance) == null || u.call(e, e.schema.field, t.value));
1019
- }), Be(() => {
1020
- var u;
1021
- e.schema.component === "api-select" && ((u = e.registerFieldInstance) == null || u.call(e, e.schema.field, null));
1016
+ ge(() => {
1017
+ var f;
1018
+ e.schema.component === "api-select" && ((f = e.registerFieldInstance) == null || f.call(e, e.schema.field, t.value));
1019
+ }), Fe(() => {
1020
+ var f;
1021
+ e.schema.component === "api-select" && ((f = e.registerFieldInstance) == null || f.call(e, e.schema.field, null));
1022
1022
  });
1023
- const o = he(), r = w(() => ({
1023
+ const l = we(), a = w(() => ({
1024
1024
  schema: e.schema,
1025
1025
  values: e.formModel,
1026
1026
  model: e.formModel,
1027
1027
  field: e.schema.field
1028
- })), a = w(() => {
1029
- const u = e.schema.ifShow;
1030
- return u === void 0 ? !0 : typeof u == "boolean" ? u : u(r.value);
1031
- }), f = w(() => {
1032
- const u = e.schema.show;
1033
- return u === void 0 ? !0 : typeof u == "boolean" ? u : u(r.value);
1034
- }), m = w(() => {
1028
+ })), s = w(() => {
1029
+ const f = e.schema.ifShow;
1030
+ return f === void 0 ? !0 : typeof f == "boolean" ? f : f(a.value);
1031
+ }), u = w(() => {
1032
+ const f = e.schema.show;
1033
+ return f === void 0 ? !0 : typeof f == "boolean" ? f : f(a.value);
1034
+ }), d = w(() => {
1035
1035
  if (e.formDisabled)
1036
1036
  return !0;
1037
- const u = e.schema.dynamicDisabled;
1038
- return u === void 0 ? !1 : typeof u == "boolean" ? u : u(r.value);
1039
- }), _ = w(() => {
1040
- const u = e.schema.dynamicRules;
1041
- return u ? Array.isArray(u) ? u : u(r.value) : e.schema.rules;
1042
- }), z = w(() => {
1043
- const u = e.schema.componentProps;
1044
- if (!u)
1037
+ const f = e.schema.dynamicDisabled;
1038
+ return f === void 0 ? !1 : typeof f == "boolean" ? f : f(a.value);
1039
+ }), v = w(() => {
1040
+ const f = e.schema.dynamicRules;
1041
+ return f ? Array.isArray(f) ? f : f(a.value) : e.schema.rules;
1042
+ }), B = w(() => {
1043
+ const f = e.schema.componentProps;
1044
+ if (!f)
1045
1045
  return { props: {}, listeners: {} };
1046
- const W = typeof u == "function" ? u({
1047
- ...r.value,
1046
+ const W = typeof f == "function" ? f({
1047
+ ...a.value,
1048
1048
  formActionType: e.formActionType
1049
- }) : { ...u }, y = {}, j = {};
1050
- for (const [q, X] of Object.entries(W))
1051
- if (q.length > 2 && /^on[A-Za-z]/.test(q) && typeof X == "function") {
1052
- const G = q.slice(2).charAt(0).toLowerCase() + q.slice(3);
1053
- j[G] = X;
1049
+ }) : { ...f }, g = {}, K = {};
1050
+ for (const [q, Q] of Object.entries(W))
1051
+ if (q.length > 2 && /^on[A-Za-z]/.test(q) && typeof Q == "function") {
1052
+ const J = q.slice(2).charAt(0).toLowerCase() + q.slice(3);
1053
+ K[J] = Q;
1054
1054
  } else
1055
- y[q] = X;
1056
- return { props: y, listeners: j };
1057
- }), S = w(() => z.value.props), x = w(() => z.value.listeners), p = w(() => e.schema.colon ?? e.colon ?? !1), v = w(() => {
1058
- const u = e.schema.tooltip;
1059
- if (!u)
1055
+ g[q] = Q;
1056
+ return { props: g, listeners: K };
1057
+ }), b = w(() => B.value.props), y = w(() => B.value.listeners), p = w(() => e.schema.colon ?? e.colon ?? !1), _ = w(() => {
1058
+ const f = e.schema.tooltip;
1059
+ if (!f)
1060
1060
  return null;
1061
- const W = typeof u == "function" ? u(r.value) : u;
1061
+ const W = typeof f == "function" ? f(a.value) : f;
1062
1062
  return De(W, e.formModel[e.schema.field]);
1063
- }), B = w(() => v.value ? "el-tooltip" : "span"), V = w(() => v.value || {}), F = w(() => !!o.default), A = (u) => {
1064
- const W = u == null ? void 0 : u.options;
1063
+ }), A = w(() => _.value ? "el-tooltip" : "span"), O = w(() => _.value || {}), P = w(() => !!l.default), T = (f) => {
1064
+ const W = f == null ? void 0 : f.options;
1065
1065
  return Array.isArray(W) ? W : void 0;
1066
1066
  }, E = w(() => {
1067
- const u = e.schema.component;
1068
- return u == null ? null : typeof u == "string" ? n.has(u) ? null : e.customComponents && e.customComponents[u] || u : u;
1069
- }), N = (u) => {
1067
+ const f = e.schema.component;
1068
+ return f == null ? null : typeof f == "string" ? n.has(f) ? null : e.customComponents && e.customComponents[f] || f : f;
1069
+ }), N = (f) => {
1070
1070
  var W;
1071
- (W = e.onFieldChange) == null || W.call(e, e.schema.field, u);
1072
- }, k = w(() => {
1073
- const u = e.schema.render;
1074
- return u ? {
1071
+ (W = e.onFieldChange) == null || W.call(e, e.schema.field, f);
1072
+ }, S = w(() => {
1073
+ const f = e.schema.render;
1074
+ return f ? {
1075
1075
  render() {
1076
- const W = u(r.value);
1077
- return Array.isArray(W) ? de("span", W) : W;
1076
+ const W = f(a.value);
1077
+ return Array.isArray(W) ? ve("span", W) : W;
1078
1078
  }
1079
1079
  } : null;
1080
1080
  });
1081
- return { __sfc: !0, BUILT_IN_COMPONENTS: n, props: e, apiSelectRef: t, slots: o, renderParams: r, shouldRender: a, shouldShow: f, effectiveDisabled: m, effectiveRules: _, effectiveComponentPropsAndListeners: z, effectiveComponentProps: S, effectiveComponentListeners: x, showColon: p, normalizedTooltip: v, fieldWrapperComponent: B, fieldWrapperProps: V, hasSlot: F, getOptions: A, resolvedCustomComponent: E, setFieldValue: N, renderComponent: k, ApiSelect: bt, FormattedNumberInput: Me, TreeSelect: Tt };
1081
+ return { __sfc: !0, BUILT_IN_COMPONENTS: n, props: e, apiSelectRef: t, slots: l, renderParams: a, shouldRender: s, shouldShow: u, effectiveDisabled: d, effectiveRules: v, effectiveComponentPropsAndListeners: B, effectiveComponentProps: b, effectiveComponentListeners: y, showColon: p, normalizedTooltip: _, fieldWrapperComponent: A, fieldWrapperProps: O, hasSlot: P, getOptions: T, resolvedCustomComponent: E, setFieldValue: N, renderComponent: S, ApiSelect: Ue, FormattedNumberInput: Ae, TreeSelect: Je };
1082
1082
  }
1083
1083
  });
1084
1084
  var zt = function() {
1085
1085
  var e = this, n = e._self._c, t = e._self._setupProxy;
1086
- return t.shouldRender ? n("el-form-item", { directives: [{ name: "show", rawName: "v-show", value: t.shouldShow, expression: "shouldShow" }], attrs: { prop: e.schema.field, required: e.schema.required, rules: t.effectiveRules, "label-width": e.schema.labelWidth } }, [n("template", { slot: "label" }, [n("span", [e._v(" " + e._s(e.schema.label)), t.showColon ? n("span", { staticClass: "ecp-pro-form-item__colon" }, [e._v(":")]) : e._e()]), e.schema.helpMessage ? n("el-tooltip", e._b({ attrs: { placement: "top", effect: "light" } }, "el-tooltip", e.schema.helpComponentProps || {}, !1), [n("template", { slot: "content" }, [Array.isArray(e.schema.helpMessage) ? e._l(e.schema.helpMessage, function(o, r) {
1087
- return n("div", { key: r, staticClass: "ecp-pro-form-item__help-item" }, [e._v(" " + e._s(o) + " ")]);
1088
- }) : n("span", [e._v(e._s(e.schema.helpMessage))])], 2), n("i", { staticClass: "el-icon-question ecp-pro-form-item__help-icon" })], 2) : e._e()], 1), e.schema.render ? [n(t.renderComponent, { tag: "component" })] : t.hasSlot ? e._t("default", null, { model: e.formModel, schema: e.schema, field: e.schema.field, values: e.formModel }) : [n(t.fieldWrapperComponent, e._b({ tag: "component" }, "component", t.fieldWrapperProps, !1), [t.resolvedCustomComponent ? n(t.resolvedCustomComponent, e._g(e._b({ tag: "component", attrs: { value: e.formModel[e.schema.field], placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请输入${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, on: { input: t.setFieldValue } }, "component", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "input" || !e.schema.component ? n("el-input", e._g(e._b({ attrs: { placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请输入${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(o) {
1089
- e.$set(e.formModel, e.schema.field, o);
1090
- }, expression: "formModel[schema.field]" } }, "el-input", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "input-number" ? n("el-input-number", e._g(e._b({ attrs: { placeholder: e.schema.placeholder, disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(o) {
1091
- e.$set(e.formModel, e.schema.field, o);
1092
- }, expression: "formModel[schema.field]" } }, "el-input-number", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "formatted-number" ? n(t.FormattedNumberInput, e._g(e._b({ attrs: { value: e.formModel[e.schema.field], placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请输入${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, on: { input: t.setFieldValue } }, "FormattedNumberInput", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "select" ? n("el-select", e._g(e._b({ staticClass: "ecp-pro-form-item__select", attrs: { placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请选择${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(o) {
1093
- e.$set(e.formModel, e.schema.field, o);
1094
- }, expression: "formModel[schema.field]" } }, "el-select", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(o) {
1095
- return n("el-option", { key: String(o.value), attrs: { label: o.label, value: o.value } });
1096
- }), 1) : e.schema.component === "api-select" ? n(t.ApiSelect, e._g(e._b({ ref: "apiSelectRef", attrs: { value: e.formModel[e.schema.field], placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请选择${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, on: { input: t.setFieldValue } }, "ApiSelect", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "tree-select" ? n(t.TreeSelect, e._g(e._b({ attrs: { value: e.formModel[e.schema.field], placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请选择${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, on: { input: t.setFieldValue } }, "TreeSelect", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "date-picker" ? n("el-date-picker", e._g(e._b({ attrs: { placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请选择${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(o) {
1097
- e.$set(e.formModel, e.schema.field, o);
1098
- }, expression: "formModel[schema.field]" } }, "el-date-picker", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "date-range" ? n("el-date-picker", e._g(e._b({ attrs: { type: "daterange", "range-separator": "至", "start-placeholder": "开始日期", "end-placeholder": "结束日期", "value-format": "yyyy-MM-dd", disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(o) {
1099
- e.$set(e.formModel, e.schema.field, o);
1100
- }, expression: "formModel[schema.field]" } }, "el-date-picker", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "switch" ? n("el-switch", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(o) {
1101
- e.$set(e.formModel, e.schema.field, o);
1102
- }, expression: "formModel[schema.field]" } }, "el-switch", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "cascader" ? n("el-cascader", e._g(e._b({ attrs: { placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请选择${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(o) {
1103
- e.$set(e.formModel, e.schema.field, o);
1104
- }, expression: "formModel[schema.field]" } }, "el-cascader", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "checkbox" ? n("el-checkbox-group", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(o) {
1105
- e.$set(e.formModel, e.schema.field, o);
1106
- }, expression: "formModel[schema.field]" } }, "el-checkbox-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(o) {
1107
- return n("el-checkbox", { key: String(o.value), attrs: { label: o.value } }, [e._v(" " + e._s(o.label) + " ")]);
1108
- }), 1) : e.schema.component === "radio" ? n("el-radio-group", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(o) {
1109
- e.$set(e.formModel, e.schema.field, o);
1110
- }, expression: "formModel[schema.field]" } }, "el-radio-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(o) {
1111
- return n("el-radio", { key: String(o.value), attrs: { label: o.value } }, [e._v(" " + e._s(o.label) + " ")]);
1086
+ return t.shouldRender ? n("el-form-item", { directives: [{ name: "show", rawName: "v-show", value: t.shouldShow, expression: "shouldShow" }], attrs: { prop: e.schema.field, required: e.schema.required, rules: t.effectiveRules, "label-width": e.schema.labelWidth } }, [n("template", { slot: "label" }, [n("span", [e._v(" " + e._s(e.schema.label)), t.showColon ? n("span", { staticClass: "ecp-pro-form-item__colon" }, [e._v(":")]) : e._e()]), e.schema.helpMessage ? n("el-tooltip", e._b({ attrs: { placement: "top", effect: "light" } }, "el-tooltip", e.schema.helpComponentProps || {}, !1), [n("template", { slot: "content" }, [Array.isArray(e.schema.helpMessage) ? e._l(e.schema.helpMessage, function(l, a) {
1087
+ return n("div", { key: a, staticClass: "ecp-pro-form-item__help-item" }, [e._v(" " + e._s(l) + " ")]);
1088
+ }) : n("span", [e._v(e._s(e.schema.helpMessage))])], 2), n("i", { staticClass: "el-icon-question ecp-pro-form-item__help-icon" })], 2) : e._e()], 1), e.schema.render ? [n(t.renderComponent, { tag: "component" })] : t.hasSlot ? e._t("default", null, { model: e.formModel, schema: e.schema, field: e.schema.field, values: e.formModel }) : [n(t.fieldWrapperComponent, e._b({ tag: "component" }, "component", t.fieldWrapperProps, !1), [t.resolvedCustomComponent ? n(t.resolvedCustomComponent, e._g(e._b({ tag: "component", attrs: { value: e.formModel[e.schema.field], placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请输入${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, on: { input: t.setFieldValue } }, "component", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "input" || !e.schema.component ? n("el-input", e._g(e._b({ attrs: { placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请输入${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(l) {
1089
+ e.$set(e.formModel, e.schema.field, l);
1090
+ }, expression: "formModel[schema.field]" } }, "el-input", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "input-number" ? n("el-input-number", e._g(e._b({ attrs: { placeholder: e.schema.placeholder, disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(l) {
1091
+ e.$set(e.formModel, e.schema.field, l);
1092
+ }, expression: "formModel[schema.field]" } }, "el-input-number", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "formatted-number" ? n(t.FormattedNumberInput, e._g(e._b({ attrs: { value: e.formModel[e.schema.field], placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请输入${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, on: { input: t.setFieldValue } }, "FormattedNumberInput", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "select" ? n("el-select", e._g(e._b({ staticClass: "ecp-pro-form-item__select", attrs: { placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请选择${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(l) {
1093
+ e.$set(e.formModel, e.schema.field, l);
1094
+ }, expression: "formModel[schema.field]" } }, "el-select", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(l) {
1095
+ return n("el-option", { key: String(l.value), attrs: { label: l.label, value: l.value } });
1096
+ }), 1) : e.schema.component === "api-select" ? n(t.ApiSelect, e._g(e._b({ ref: "apiSelectRef", attrs: { value: e.formModel[e.schema.field], placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请选择${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, on: { input: t.setFieldValue } }, "ApiSelect", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "tree-select" ? n(t.TreeSelect, e._g(e._b({ attrs: { value: e.formModel[e.schema.field], placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请选择${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, on: { input: t.setFieldValue } }, "TreeSelect", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "date-picker" ? n("el-date-picker", e._g(e._b({ attrs: { placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请选择${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(l) {
1097
+ e.$set(e.formModel, e.schema.field, l);
1098
+ }, expression: "formModel[schema.field]" } }, "el-date-picker", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "date-range" ? n("el-date-picker", e._g(e._b({ attrs: { type: "daterange", "range-separator": "至", "start-placeholder": "开始日期", "end-placeholder": "结束日期", "value-format": "yyyy-MM-dd", disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(l) {
1099
+ e.$set(e.formModel, e.schema.field, l);
1100
+ }, expression: "formModel[schema.field]" } }, "el-date-picker", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "switch" ? n("el-switch", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(l) {
1101
+ e.$set(e.formModel, e.schema.field, l);
1102
+ }, expression: "formModel[schema.field]" } }, "el-switch", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "cascader" ? n("el-cascader", e._g(e._b({ attrs: { placeholder: e.schema.placeholder || (e.autoPlaceholder ? `请选择${e.schema.label}` : void 0), disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(l) {
1103
+ e.$set(e.formModel, e.schema.field, l);
1104
+ }, expression: "formModel[schema.field]" } }, "el-cascader", t.effectiveComponentProps, !1), t.effectiveComponentListeners)) : e.schema.component === "checkbox" ? n("el-checkbox-group", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(l) {
1105
+ e.$set(e.formModel, e.schema.field, l);
1106
+ }, expression: "formModel[schema.field]" } }, "el-checkbox-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(l) {
1107
+ return n("el-checkbox", { key: String(l.value), attrs: { label: l.value } }, [e._v(" " + e._s(l.label) + " ")]);
1108
+ }), 1) : e.schema.component === "radio" ? n("el-radio-group", e._g(e._b({ attrs: { disabled: t.effectiveDisabled }, model: { value: e.formModel[e.schema.field], callback: function(l) {
1109
+ e.$set(e.formModel, e.schema.field, l);
1110
+ }, expression: "formModel[schema.field]" } }, "el-radio-group", t.effectiveComponentProps, !1), t.effectiveComponentListeners), e._l(t.getOptions(t.effectiveComponentProps) || [], function(l) {
1111
+ return n("el-radio", { key: String(l.value), attrs: { label: l.value } }, [e._v(" " + e._s(l.label) + " ")]);
1112
1112
  }), 1) : e._e()], 1)]], 2) : e._e();
1113
- }, Et = [], It = /* @__PURE__ */ se(
1113
+ }, Et = [], It = /* @__PURE__ */ re(
1114
1114
  Dt,
1115
1115
  zt,
1116
1116
  Et,
@@ -1120,7 +1120,7 @@ var zt = function() {
1120
1120
  null,
1121
1121
  null
1122
1122
  );
1123
- const Ue = It.exports, Ot = /* @__PURE__ */ ne({
1123
+ const Ze = It.exports, Vt = /* @__PURE__ */ te({
1124
1124
  __name: "FormActions",
1125
1125
  props: {
1126
1126
  showActionButtonGroup: { type: Boolean, default: !0 },
@@ -1137,28 +1137,28 @@ const Ue = It.exports, Ot = /* @__PURE__ */ ne({
1137
1137
  actionColOptions: null
1138
1138
  },
1139
1139
  emits: ["submit", "reset", "toggle"],
1140
- setup(s) {
1140
+ setup(r) {
1141
1141
  return { __sfc: !0 };
1142
1142
  }
1143
1143
  });
1144
- var Nt = function() {
1144
+ var Ot = function() {
1145
1145
  var e = this, n = e._self._c;
1146
1146
  return e._self._setupProxy, n("div", { staticClass: "ecp-form-actions" }, [e._t("submitBefore"), e.showSubmitButton ? n("el-button", { attrs: { type: "primary", icon: e.submitButtonIcon, loading: e.submitLoading }, on: { click: function(t) {
1147
1147
  return e.$emit("submit");
1148
1148
  } } }, [e._v(" " + e._s(e.submitButtonText) + " ")]) : e._e(), e._t("resetBefore"), e.showResetButton ? n("el-button", { attrs: { icon: e.resetButtonIcon }, on: { click: function(t) {
1149
1149
  return e.$emit("reset");
1150
1150
  } } }, [e._v(" " + e._s(e.resetButtonText) + " ")]) : e._e(), e._t("actions")], 2);
1151
- }, Vt = [], Wt = /* @__PURE__ */ se(
1151
+ }, Nt = [], Wt = /* @__PURE__ */ re(
1152
+ Vt,
1152
1153
  Ot,
1153
1154
  Nt,
1154
- Vt,
1155
1155
  !1,
1156
1156
  null,
1157
1157
  "489c88d2",
1158
1158
  null,
1159
1159
  null
1160
1160
  );
1161
- const Je = Wt.exports, Kt = /* @__PURE__ */ ne({
1161
+ const Xe = Wt.exports, Lt = /* @__PURE__ */ te({
1162
1162
  __name: "ProForm",
1163
1163
  props: {
1164
1164
  schemas: null,
@@ -1191,193 +1191,193 @@ const Je = Wt.exports, Kt = /* @__PURE__ */ ne({
1191
1191
  components: null
1192
1192
  },
1193
1193
  emits: ["submit", "reset", "register", "update:modelValue"],
1194
- setup(s, { expose: e, emit: n }) {
1195
- const t = s, o = he(), r = D(), a = D(), f = D(!1), m = D(!0), _ = D({}), z = D({}), S = D([]), x = D({}), p = D(/* @__PURE__ */ new Map()), v = { xl: 1920, lg: 1200, md: 992, sm: 768 }, B = (d, P, R) => {
1196
- const T = R ?? (typeof window < "u" ? window.innerWidth : 1920), l = d ?? {}, c = P ?? {}, b = c.span ?? 8;
1197
- return T >= v.xl ? l.xl ?? c.xl ?? l.lg ?? c.lg ?? l.md ?? c.md ?? l.sm ?? c.sm ?? l.xs ?? c.xs ?? l.span ?? b : T >= v.lg ? l.lg ?? c.lg ?? l.md ?? c.md ?? l.sm ?? c.sm ?? l.xs ?? c.xs ?? l.span ?? b : T >= v.md ? l.md ?? c.md ?? l.sm ?? c.sm ?? l.xs ?? c.xs ?? l.span ?? b : T >= v.sm ? l.sm ?? c.sm ?? l.xs ?? c.xs ?? l.span ?? b : l.xs ?? c.xs ?? l.span ?? b;
1198
- }, { getSetting: V } = Re(), F = w(() => ({ ...V("ProForm"), ...t, ...x.value })), A = w(() => F.value.modelValue), E = w(() => A.value !== void 0), N = w(() => E.value ? A.value ?? {} : _.value), k = w(() => ({
1199
- ...V("ProForm").components ?? {},
1200
- ...F.value.components ?? {},
1201
- ...x.value.components ?? {}
1202
- })), u = w(() => F.value.actionColOptions ?? { span: 24 }), W = D(typeof window < "u" ? window.innerWidth : 1920), y = (d, P, R, T) => {
1203
- let l = 24, c = 1, b = 0;
1204
- for (const C of d) {
1205
- const H = B(C.colProps, P, T);
1206
- if (H > l) {
1207
- if (c++, c > R)
1194
+ setup(r, { expose: e, emit: n }) {
1195
+ const t = r, l = we(), a = D(), s = D(), u = D(!1), d = D(!0), v = D({}), B = D({}), b = D([]), y = D({}), p = D(/* @__PURE__ */ new Map()), _ = { xl: 1920, lg: 1200, md: 992, sm: 768 }, A = (m, F, M) => {
1196
+ const $ = M ?? (typeof window < "u" ? window.innerWidth : 1920), o = m ?? {}, c = F ?? {}, x = c.span ?? 8;
1197
+ return $ >= _.xl ? o.xl ?? c.xl ?? o.lg ?? c.lg ?? o.md ?? c.md ?? o.sm ?? c.sm ?? o.xs ?? c.xs ?? o.span ?? x : $ >= _.lg ? o.lg ?? c.lg ?? o.md ?? c.md ?? o.sm ?? c.sm ?? o.xs ?? c.xs ?? o.span ?? x : $ >= _.md ? o.md ?? c.md ?? o.sm ?? c.sm ?? o.xs ?? c.xs ?? o.span ?? x : $ >= _.sm ? o.sm ?? c.sm ?? o.xs ?? c.xs ?? o.span ?? x : o.xs ?? c.xs ?? o.span ?? x;
1198
+ }, { getSetting: O } = Be(), P = w(() => ({ ...O("ProForm"), ...t, ...y.value })), T = w(() => P.value.modelValue), E = w(() => T.value !== void 0), N = w(() => E.value ? T.value ?? {} : v.value), S = w(() => ({
1199
+ ...O("ProForm").components ?? {},
1200
+ ...P.value.components ?? {},
1201
+ ...y.value.components ?? {}
1202
+ })), f = w(() => P.value.actionColOptions ?? { span: 24 }), W = D(typeof window < "u" ? window.innerWidth : 1920), g = (m, F, M, $) => {
1203
+ let o = 24, c = 1, x = 0;
1204
+ for (const k of m) {
1205
+ const U = A(k.colProps, F, $);
1206
+ if (U > o) {
1207
+ if (c++, c > M)
1208
1208
  break;
1209
- l = 24 - H;
1209
+ o = 24 - U;
1210
1210
  } else
1211
- l -= H;
1212
- b++;
1211
+ o -= U;
1212
+ x++;
1213
1213
  }
1214
- return b;
1215
- }, j = w(() => {
1216
- const d = S.value.filter((l) => G(l));
1217
- if (!F.value.showAdvancedButton)
1214
+ return x;
1215
+ }, K = w(() => {
1216
+ const m = b.value.filter((o) => J(o));
1217
+ if (!P.value.showAdvancedButton)
1218
1218
  return !1;
1219
- const P = F.value.alwaysShowLines ?? 1, R = F.value.baseColProps, T = y(d, R, P, W.value);
1220
- return d.length > T;
1221
- }), q = w(() => F.value.formListeners ?? {}), X = w(() => {
1222
- const d = S.value.filter((l) => G(l));
1223
- if (!F.value.showAdvancedButton || !m.value)
1224
- return d;
1225
- const P = F.value.alwaysShowLines ?? 1, R = F.value.baseColProps, T = y(d, R, P, W.value);
1226
- return d.slice(0, T);
1227
- }), G = (d) => {
1228
- let P = !0, R = !0;
1229
- return typeof d.ifShow == "function" && (P = d.ifShow({ schema: d, values: N.value, model: N.value, field: d.field })), typeof d.ifShow == "boolean" && (P = d.ifShow), typeof d.show == "function" && (R = d.show({ schema: d, values: N.value, model: N.value, field: d.field })), typeof d.show == "boolean" && (R = d.show), P && R;
1230
- }, ee = (d) => d.colProps ?? F.value.baseColProps ?? {}, Z = (d) => d.slot || d.field, Y = (d, P = !0) => {
1231
- const R = P ? { ...d ?? {} } : {}, T = F.value.initialValues ?? t.initialValues;
1232
- return S.value.forEach((l) => {
1233
- if (!(P && Object.prototype.hasOwnProperty.call(R, l.field))) {
1234
- if (l.defaultValue !== void 0) {
1235
- R[l.field] = l.defaultValue;
1219
+ const F = P.value.alwaysShowLines ?? 1, M = P.value.baseColProps, $ = g(m, M, F, W.value);
1220
+ return m.length > $;
1221
+ }), q = w(() => P.value.formListeners ?? {}), Q = w(() => {
1222
+ const m = b.value.filter((o) => J(o));
1223
+ if (!P.value.showAdvancedButton || !d.value)
1224
+ return m;
1225
+ const F = P.value.alwaysShowLines ?? 1, M = P.value.baseColProps, $ = g(m, M, F, W.value);
1226
+ return m.slice(0, $);
1227
+ }), J = (m) => {
1228
+ let F = !0, M = !0;
1229
+ return typeof m.ifShow == "function" && (F = m.ifShow({ schema: m, values: N.value, model: N.value, field: m.field })), typeof m.ifShow == "boolean" && (F = m.ifShow), typeof m.show == "function" && (M = m.show({ schema: m, values: N.value, model: N.value, field: m.field })), typeof m.show == "boolean" && (M = m.show), F && M;
1230
+ }, Y = (m) => m.colProps ?? P.value.baseColProps ?? {}, Z = (m) => m.slot || m.field, I = (m, F = !0) => {
1231
+ const M = F ? { ...m ?? {} } : {}, $ = P.value.initialValues ?? t.initialValues;
1232
+ return b.value.forEach((o) => {
1233
+ if (!(F && Object.prototype.hasOwnProperty.call(M, o.field))) {
1234
+ if (o.defaultValue !== void 0) {
1235
+ M[o.field] = o.defaultValue;
1236
1236
  return;
1237
1237
  }
1238
- T && Object.prototype.hasOwnProperty.call(T, l.field) && (R[l.field] = T[l.field]);
1238
+ $ && Object.prototype.hasOwnProperty.call($, o.field) && (M[o.field] = $[o.field]);
1239
1239
  }
1240
- }), R;
1241
- }, te = (d, P = !0) => {
1242
- _.value = d, P && n("update:modelValue", d);
1243
- }, U = (d) => {
1244
- const P = Y({ ...N.value, ...d });
1245
- return te(P), P;
1246
- }, le = () => {
1247
- const d = {};
1248
- S.value.forEach((P) => {
1249
- var R;
1250
- (R = P.rules) != null && R.length && (d[P.field] = P.rules);
1251
- }), te(Y(N.value), !1), z.value = d;
1252
- }, g = (d) => {
1253
- const P = { ...d };
1254
- return S.value.forEach((R) => {
1255
- const T = R.ifShow;
1256
- if (T === void 0)
1240
+ }), M;
1241
+ }, V = (m, F = !0) => {
1242
+ v.value = m, F && n("update:modelValue", m);
1243
+ }, j = (m) => {
1244
+ const F = I({ ...N.value, ...m });
1245
+ return V(F), F;
1246
+ }, C = () => {
1247
+ const m = {};
1248
+ b.value.forEach((F) => {
1249
+ var M;
1250
+ (M = F.rules) != null && M.length && (m[F.field] = F.rules);
1251
+ }), V(I(N.value), !1), B.value = m;
1252
+ }, i = (m) => {
1253
+ const F = { ...m };
1254
+ return b.value.forEach((M) => {
1255
+ const $ = M.ifShow;
1256
+ if ($ === void 0)
1257
1257
  return;
1258
- (typeof T == "boolean" ? T : T({ schema: R, values: d, model: d, field: R.field })) || delete P[R.field];
1259
- }), P;
1260
- }, I = (d) => {
1261
- const P = g(d), R = x.value.fieldMapToTime;
1262
- if (!(R != null && R.length))
1263
- return P;
1264
- const T = { ...P };
1265
- return R.forEach(([l, [c, b]]) => {
1266
- const C = T[l];
1267
- Array.isArray(C) && C.length === 2 && (delete T[l], T[c] = C[0], T[b] = C[1]);
1268
- }), T;
1269
- }, $ = async () => {
1270
- var d;
1258
+ (typeof $ == "boolean" ? $ : $({ schema: M, values: m, model: m, field: M.field })) || delete F[M.field];
1259
+ }), F;
1260
+ }, h = (m) => {
1261
+ const F = i(m), M = y.value.fieldMapToTime;
1262
+ if (!(M != null && M.length))
1263
+ return F;
1264
+ const $ = { ...F };
1265
+ return M.forEach(([o, [c, x]]) => {
1266
+ const k = $[o];
1267
+ Array.isArray(k) && k.length === 2 && (delete $[o], $[c] = k[0], $[x] = k[1]);
1268
+ }), $;
1269
+ }, R = async () => {
1270
+ var m;
1271
1271
  try {
1272
- await ((d = r.value) == null ? void 0 : d.validate()), F.value.submitFunc ? await F.value.submitFunc() : (f.value = !0, n("submit", I({ ...N.value })));
1273
- } catch (P) {
1274
- console.error("Form validation failed:", P);
1272
+ await ((m = a.value) == null ? void 0 : m.validate()), P.value.submitFunc ? await P.value.submitFunc() : (u.value = !0, n("submit", h({ ...N.value })));
1273
+ } catch (F) {
1274
+ console.error("Form validation failed:", F);
1275
1275
  } finally {
1276
- f.value = !1;
1276
+ u.value = !1;
1277
1277
  }
1278
- }, i = async () => {
1279
- var d;
1280
- F.value.resetFunc ? await F.value.resetFunc() : ((d = r.value) == null || d.resetFields(), le(), n("reset"), F.value.submitOnReset && await $());
1281
- }, h = (d) => (U(d), Promise.resolve()), M = () => I({ ...N.value }), K = async () => {
1282
- var d;
1283
- (d = r.value) == null || d.resetFields(), te(Y(void 0, !1));
1284
- }, L = (d, P) => {
1285
- U({ [d]: P });
1286
- }, Q = (d) => {
1287
- var P;
1288
- return ((P = r.value) == null ? void 0 : P.validate(d)) ?? Promise.resolve();
1289
- }, ae = (d) => r.value ? d != null && d.length ? Promise.all(d.map((P) => new Promise((R, T) => {
1290
- r.value.validateField(P, (l) => l ? R(void 0) : T(new Error("Validation failed")));
1291
- }))) : r.value.validate() : Promise.resolve(), _e = async (d, P) => {
1292
- var T;
1293
- const R = (T = a.value) == null ? void 0 : T.querySelector(`[data-field="${d}"]`);
1294
- return R && R.scrollIntoView({ behavior: (P == null ? void 0 : P.behavior) ?? "smooth", block: (P == null ? void 0 : P.block) ?? "nearest" }), Promise.resolve();
1295
- }, ge = (d) => {
1296
- var P;
1297
- (P = r.value) == null || P.clearValidate(d);
1298
- }, be = async (d) => {
1299
- (Array.isArray(d) ? d : [d]).forEach((R) => {
1300
- const T = S.value.findIndex((l) => l.field === R.field);
1301
- T >= 0 && (S.value[T] = { ...S.value[T], ...R });
1278
+ }, z = async () => {
1279
+ var m;
1280
+ P.value.resetFunc ? await P.value.resetFunc() : ((m = a.value) == null || m.resetFields(), C(), n("reset"), P.value.submitOnReset && await R());
1281
+ }, H = (m) => (j(m), Promise.resolve()), G = () => h({ ...N.value }), ne = async () => {
1282
+ var m;
1283
+ (m = a.value) == null || m.resetFields(), V(I(void 0, !1));
1284
+ }, le = (m, F) => {
1285
+ j({ [m]: F });
1286
+ }, X = (m) => {
1287
+ var F;
1288
+ return ((F = a.value) == null ? void 0 : F.validate(m)) ?? Promise.resolve();
1289
+ }, ae = (m) => a.value ? m != null && m.length ? Promise.all(m.map((F) => new Promise((M, $) => {
1290
+ a.value.validateField(F, (o) => o ? M(void 0) : $(new Error("Validation failed")));
1291
+ }))) : a.value.validate() : Promise.resolve(), de = async (m, F) => {
1292
+ var $;
1293
+ const M = ($ = s.value) == null ? void 0 : $.querySelector(`[data-field="${m}"]`);
1294
+ return M && M.scrollIntoView({ behavior: (F == null ? void 0 : F.behavior) ?? "smooth", block: (F == null ? void 0 : F.block) ?? "nearest" }), Promise.resolve();
1295
+ }, ie = (m) => {
1296
+ var F;
1297
+ (F = a.value) == null || F.clearValidate(m);
1298
+ }, fe = async (m) => {
1299
+ (Array.isArray(m) ? m : [m]).forEach((M) => {
1300
+ const $ = b.value.findIndex((o) => o.field === M.field);
1301
+ $ >= 0 && (b.value[$] = { ...b.value[$], ...M });
1302
1302
  });
1303
- }, re = async (d, P, R) => {
1304
- if (R)
1305
- S.value.unshift(d);
1306
- else if (P) {
1307
- const T = S.value.findIndex((l) => l.field === P);
1308
- S.value.splice(T + 1, 0, d);
1303
+ }, oe = async (m, F, M) => {
1304
+ if (M)
1305
+ b.value.unshift(m);
1306
+ else if (F) {
1307
+ const $ = b.value.findIndex((o) => o.field === F);
1308
+ b.value.splice($ + 1, 0, m);
1309
1309
  } else
1310
- S.value.push(d);
1311
- le();
1312
- }, ye = async (d) => {
1313
- const P = Array.isArray(d) ? d : [d];
1314
- S.value = S.value.filter((R) => !P.includes(R.field));
1315
- }, we = async (d) => {
1316
- x.value = { ...x.value, ...d }, d.schemas && (S.value = [...d.schemas], le());
1317
- }, xe = (d, P) => {
1318
- P ? p.value.set(d, P) : p.value.delete(d);
1319
- }, Ce = (d) => p.value.get(d) ?? null;
1320
- function Pe(d, P = !1) {
1321
- const R = p.value.get(d);
1322
- if (!R)
1310
+ b.value.push(m);
1311
+ C();
1312
+ }, be = async (m) => {
1313
+ const F = Array.isArray(m) ? m : [m];
1314
+ b.value = b.value.filter((M) => !F.includes(M.field));
1315
+ }, ue = async (m) => {
1316
+ y.value = { ...y.value, ...m }, m.schemas && (b.value = [...m.schemas], C());
1317
+ }, Ce = (m, F) => {
1318
+ F ? p.value.set(m, F) : p.value.delete(m);
1319
+ }, xe = (m) => p.value.get(m) ?? null;
1320
+ function Pe(m, F = !1) {
1321
+ const M = p.value.get(m);
1322
+ if (!M)
1323
1323
  return [];
1324
- const T = R;
1325
- return P ? (T == null ? void 0 : T.rawOptions) ?? [] : (T == null ? void 0 : T.options) ?? [];
1324
+ const $ = M;
1325
+ return F ? ($ == null ? void 0 : $.rawOptions) ?? [] : ($ == null ? void 0 : $.options) ?? [];
1326
1326
  }
1327
- const Se = (d) => {
1328
- const P = p.value.get(d);
1329
- if (!P)
1327
+ const Se = (m) => {
1328
+ const F = p.value.get(m);
1329
+ if (!F)
1330
1330
  return !1;
1331
- const R = P;
1332
- return (R == null ? void 0 : R.loading) ?? !1;
1333
- }, ve = {
1334
- getFieldsValue: M,
1335
- setFieldsValue: h,
1336
- resetFields: K,
1337
- validate: Q,
1331
+ const M = F;
1332
+ return (M == null ? void 0 : M.loading) ?? !1;
1333
+ }, ye = {
1334
+ getFieldsValue: G,
1335
+ setFieldsValue: H,
1336
+ resetFields: ne,
1337
+ validate: X,
1338
1338
  validateFields: ae,
1339
- submit: $,
1340
- scrollToField: _e,
1341
- clearValidate: ge,
1342
- updateSchema: be,
1343
- appendSchemaByField: re,
1344
- removeSchemaByField: ye,
1345
- setProps: we,
1346
- getComponentInstance: Ce,
1339
+ submit: R,
1340
+ scrollToField: de,
1341
+ clearValidate: ie,
1342
+ updateSchema: fe,
1343
+ appendSchemaByField: oe,
1344
+ removeSchemaByField: be,
1345
+ setProps: ue,
1346
+ getComponentInstance: xe,
1347
1347
  getFieldOptions: Pe,
1348
1348
  isFieldLoading: Se
1349
1349
  };
1350
1350
  e({
1351
- ...ve,
1352
- registerFieldInstance: xe
1351
+ ...ye,
1352
+ registerFieldInstance: Ce
1353
1353
  });
1354
- const ce = () => {
1355
- S.value = [...t.schemas ?? []], le();
1356
- }, ue = () => {
1354
+ const pe = () => {
1355
+ b.value = [...t.schemas ?? []], C();
1356
+ }, me = () => {
1357
1357
  typeof window < "u" && (W.value = window.innerWidth);
1358
1358
  };
1359
- return me(() => {
1360
- ce(), n("register", ve), typeof window < "u" && window.addEventListener("resize", ue);
1361
- }), Be(() => {
1362
- typeof window < "u" && window.removeEventListener("resize", ue);
1363
- }), J(() => A.value, (d) => {
1364
- !E.value || d === void 0 || te(Y(d), !1);
1365
- }, { deep: !0, immediate: !0 }), J(() => [t.schemas, t.initialValues], ce, { deep: !0 }), { __sfc: !0, props: t, emit: n, slots: o, formRef: r, formWrapRef: a, submitLoading: f, collapsed: m, formModel: _, formRules: z, innerSchemas: S, innerProps: x, fieldInstanceMap: p, BREAKPOINTS: v, getEffectiveSpan: B, getComponentSetting: V, effectiveProps: F, controlledModelValue: A, isControlled: E, currentFormModel: N, formCustomComponents: k, effectiveActionColOptions: u, windowWidth: W, getVisibleSchemaCount: y, hasMoreFields: j, formListeners: q, displaySchemas: X, shouldShow: G, getColProps: ee, getSlotName: Z, resolveSchemaModel: Y, applyFormModel: te, updateFormModel: U, initForm: le, filterByIfShow: g, processFieldMapToTime: I, handleSubmit: $, handleReset: i, setFieldsValue: h, getFieldsValue: M, resetFields: K, handleFieldChange: L, validate: Q, validateFields: ae, scrollToField: _e, clearValidate: ge, updateSchema: be, appendSchemaByField: re, removeSchemaByField: ye, setProps: we, registerFieldInstance: xe, getComponentInstance: Ce, getFieldOptions: Pe, isFieldLoading: Se, formActionRef: ve, syncSchemas: ce, handleResize: ue, ProFormItem: Ue, FormActions: Je };
1359
+ return ge(() => {
1360
+ pe(), n("register", ye), typeof window < "u" && window.addEventListener("resize", me);
1361
+ }), Fe(() => {
1362
+ typeof window < "u" && window.removeEventListener("resize", me);
1363
+ }), ee(() => T.value, (m) => {
1364
+ !E.value || m === void 0 || V(I(m), !1);
1365
+ }, { deep: !0, immediate: !0 }), ee(() => [t.schemas, t.initialValues], pe, { deep: !0 }), { __sfc: !0, props: t, emit: n, slots: l, formRef: a, formWrapRef: s, submitLoading: u, collapsed: d, formModel: v, formRules: B, innerSchemas: b, innerProps: y, fieldInstanceMap: p, BREAKPOINTS: _, getEffectiveSpan: A, getComponentSetting: O, effectiveProps: P, controlledModelValue: T, isControlled: E, currentFormModel: N, formCustomComponents: S, effectiveActionColOptions: f, windowWidth: W, getVisibleSchemaCount: g, hasMoreFields: K, formListeners: q, displaySchemas: Q, shouldShow: J, getColProps: Y, getSlotName: Z, resolveSchemaModel: I, applyFormModel: V, updateFormModel: j, initForm: C, filterByIfShow: i, processFieldMapToTime: h, handleSubmit: R, handleReset: z, setFieldsValue: H, getFieldsValue: G, resetFields: ne, handleFieldChange: le, validate: X, validateFields: ae, scrollToField: de, clearValidate: ie, updateSchema: fe, appendSchemaByField: oe, removeSchemaByField: be, setProps: ue, registerFieldInstance: Ce, getComponentInstance: xe, getFieldOptions: Pe, isFieldLoading: Se, formActionRef: ye, syncSchemas: pe, handleResize: me, ProFormItem: Ze, FormActions: Xe };
1366
1366
  }
1367
1367
  });
1368
- var Lt = function() {
1368
+ var Kt = function() {
1369
1369
  var e = this, n = e._self._c, t = e._self._setupProxy;
1370
- return n("div", { ref: "formWrapRef", staticClass: "ecp-pro-form" }, [n("el-form", e._g(e._b({ ref: "formRef", staticClass: "ecp-pro-form", attrs: { model: t.currentFormModel, rules: t.formRules, "label-width": t.effectiveProps.labelWidth, "label-position": t.effectiveProps.labelPosition, size: t.effectiveProps.size, disabled: t.effectiveProps.disabled } }, "el-form", e.$attrs, !1), t.formListeners), [e._t("formHeader"), n("el-row", { style: t.effectiveProps.baseRowStyle, attrs: { gutter: t.effectiveProps.gutter } }, [e._l(t.displaySchemas, function(o) {
1371
- var r, a;
1372
- return [t.shouldShow(o) ? n("el-col", e._b({ key: o.field, attrs: { offset: ((r = o.colProps) == null ? void 0 : r.offset) ?? ((a = t.effectiveProps.baseColProps) == null ? void 0 : a.offset) ?? 0, "data-field": o.field } }, "el-col", t.getColProps(o), !1), [n(t.ProFormItem, { attrs: { schema: o, "form-model": t.currentFormModel, "form-disabled": t.effectiveProps.disabled, "auto-placeholder": t.effectiveProps.autoSetPlaceholder, "form-action-type": t.formActionRef, colon: t.effectiveProps.colon, "custom-components": t.formCustomComponents, "on-field-change": t.handleFieldChange, "register-field-instance": t.registerFieldInstance } }, [t.slots[t.getSlotName(o)] ? [e._t(t.getSlotName(o), null, { model: t.currentFormModel, schema: o, field: o.field, values: t.currentFormModel })] : e._e()], 2)], 1) : e._e()];
1373
- }), t.effectiveProps.showActionButtonGroup ? n("el-col", e._b({ staticClass: "ecp-pro-form_col" }, "el-col", t.hasMoreFields ? { span: 24 } : t.effectiveProps.actionColOptions || { span: 6 }, !1), [n(t.FormActions, { attrs: { "show-action-button-group": t.effectiveProps.showActionButtonGroup, "show-submit-button": t.effectiveProps.showSubmitButton, "show-reset-button": t.effectiveProps.showResetButton, "submit-button-text": t.effectiveProps.submitButtonText, "reset-button-text": t.effectiveProps.resetButtonText, "submit-button-icon": t.effectiveProps.submitButtonIcon, "reset-button-icon": t.effectiveProps.resetButtonIcon, "submit-loading": t.submitLoading, "show-advanced-button": t.effectiveProps.showAdvancedButton, "has-more-fields": t.hasMoreFields, collapsed: t.collapsed, "action-col-options": t.effectiveActionColOptions }, on: { submit: t.handleSubmit, reset: t.handleReset, toggle: function(o) {
1370
+ return n("div", { ref: "formWrapRef", staticClass: "ecp-pro-form" }, [n("el-form", e._g(e._b({ ref: "formRef", staticClass: "ecp-pro-form", attrs: { model: t.currentFormModel, rules: t.formRules, "label-width": t.effectiveProps.labelWidth, "label-position": t.effectiveProps.labelPosition, size: t.effectiveProps.size, disabled: t.effectiveProps.disabled } }, "el-form", e.$attrs, !1), t.formListeners), [e._t("formHeader"), n("el-row", { style: t.effectiveProps.baseRowStyle, attrs: { gutter: t.effectiveProps.gutter } }, [e._l(t.displaySchemas, function(l) {
1371
+ var a, s;
1372
+ return [t.shouldShow(l) ? n("el-col", e._b({ key: l.field, attrs: { offset: ((a = l.colProps) == null ? void 0 : a.offset) ?? ((s = t.effectiveProps.baseColProps) == null ? void 0 : s.offset) ?? 0, "data-field": l.field } }, "el-col", t.getColProps(l), !1), [n(t.ProFormItem, { attrs: { schema: l, "form-model": t.currentFormModel, "form-disabled": t.effectiveProps.disabled, "auto-placeholder": t.effectiveProps.autoSetPlaceholder, "form-action-type": t.formActionRef, colon: t.effectiveProps.colon, "custom-components": t.formCustomComponents, "on-field-change": t.handleFieldChange, "register-field-instance": t.registerFieldInstance } }, [t.slots[t.getSlotName(l)] ? [e._t(t.getSlotName(l), null, { model: t.currentFormModel, schema: l, field: l.field, values: t.currentFormModel })] : e._e()], 2)], 1) : e._e()];
1373
+ }), t.effectiveProps.showActionButtonGroup ? n("el-col", e._b({ staticClass: "ecp-pro-form_col" }, "el-col", t.hasMoreFields ? { span: 24 } : t.effectiveProps.actionColOptions || { span: 6 }, !1), [n(t.FormActions, { attrs: { "show-action-button-group": t.effectiveProps.showActionButtonGroup, "show-submit-button": t.effectiveProps.showSubmitButton, "show-reset-button": t.effectiveProps.showResetButton, "submit-button-text": t.effectiveProps.submitButtonText, "reset-button-text": t.effectiveProps.resetButtonText, "submit-button-icon": t.effectiveProps.submitButtonIcon, "reset-button-icon": t.effectiveProps.resetButtonIcon, "submit-loading": t.submitLoading, "show-advanced-button": t.effectiveProps.showAdvancedButton, "has-more-fields": t.hasMoreFields, collapsed: t.collapsed, "action-col-options": t.effectiveActionColOptions }, on: { submit: t.handleSubmit, reset: t.handleReset, toggle: function(l) {
1374
1374
  t.collapsed = !t.collapsed;
1375
- } } }, [n("template", { slot: "submitBefore" }, [e._t("submitBefore")], 2), n("template", { slot: "resetBefore" }, [e._t("resetBefore")], 2), n("template", { slot: "advanceBefore" }, [e._t("advanceBefore")], 2), n("template", { slot: "advanceAfter" }, [e._t("advanceAfter")], 2), n("template", { slot: "actions" }, [e._t("actions")], 2)], 2)], 1) : e._e()], 2), t.effectiveProps.showAdvancedButton && t.hasMoreFields ? n("el-button", { staticClass: "ecp-form-actions__advance", attrs: { type: "text" }, on: { click: function(o) {
1375
+ } } }, [n("template", { slot: "submitBefore" }, [e._t("submitBefore")], 2), n("template", { slot: "resetBefore" }, [e._t("resetBefore")], 2), n("template", { slot: "advanceBefore" }, [e._t("advanceBefore")], 2), n("template", { slot: "advanceAfter" }, [e._t("advanceAfter")], 2), n("template", { slot: "actions" }, [e._t("actions")], 2)], 2)], 1) : e._e()], 2), t.effectiveProps.showAdvancedButton && t.hasMoreFields ? n("el-button", { staticClass: "ecp-form-actions__advance", attrs: { type: "text" }, on: { click: function(l) {
1376
1376
  t.collapsed = !t.collapsed;
1377
1377
  } } }, [n("i", { staticClass: "el-icon-d-arrow-left", class: t.collapsed ? "down" : "up" }), e._v(" " + e._s(t.collapsed ? "展开" : "收起") + " ")]) : e._e(), e._t("formFooter")], 2)], 1);
1378
- }, jt = [], qt = /* @__PURE__ */ se(
1379
- Kt,
1378
+ }, jt = [], qt = /* @__PURE__ */ re(
1380
1379
  Lt,
1380
+ Kt,
1381
1381
  jt,
1382
1382
  !1,
1383
1383
  null,
@@ -1385,87 +1385,87 @@ var Lt = function() {
1385
1385
  null,
1386
1386
  null
1387
1387
  );
1388
- const Xe = qt.exports;
1389
- function dn(s) {
1390
- const e = D(null), n = D(s ? pe(s) : void 0), t = () => s ? pe(s) : void 0, o = (k) => {
1391
- e.value = k;
1392
- const u = t();
1393
- u && Object.keys(u).length > 0 && k.setProps(u);
1388
+ const Qe = qt.exports;
1389
+ function _n(r) {
1390
+ const e = D(null), n = D(r ? _e(r) : void 0), t = () => r ? _e(r) : void 0, l = (S) => {
1391
+ e.value = S;
1392
+ const f = t();
1393
+ f && Object.keys(f).length > 0 && S.setProps(f);
1394
1394
  };
1395
- s && J(
1395
+ r && ee(
1396
1396
  () => t(),
1397
- (k) => {
1398
- n.value = k, k && e.value && e.value.setProps(k);
1397
+ (S) => {
1398
+ n.value = S, S && e.value && e.value.setProps(S);
1399
1399
  },
1400
1400
  { deep: !0 }
1401
1401
  );
1402
- const r = () => {
1403
- var k;
1404
- return ((k = e.value) == null ? void 0 : k.getFieldsValue()) ?? {};
1405
- }, a = async (k) => {
1406
- var u;
1407
- await ((u = e.value) == null ? void 0 : u.setFieldsValue(k));
1408
- }, f = async () => {
1409
- var k;
1410
- await ((k = e.value) == null ? void 0 : k.resetFields());
1411
- }, m = (k) => {
1412
- var u;
1413
- return ((u = e.value) == null ? void 0 : u.validate(k)) ?? Promise.resolve();
1414
- }, _ = (k) => {
1415
- var u;
1416
- return ((u = e.value) == null ? void 0 : u.validateFields(k)) ?? Promise.resolve();
1417
- }, z = () => {
1418
- var k;
1419
- return ((k = e.value) == null ? void 0 : k.submit()) ?? Promise.resolve();
1420
- }, S = (k, u) => {
1402
+ const a = () => {
1403
+ var S;
1404
+ return ((S = e.value) == null ? void 0 : S.getFieldsValue()) ?? {};
1405
+ }, s = async (S) => {
1406
+ var f;
1407
+ await ((f = e.value) == null ? void 0 : f.setFieldsValue(S));
1408
+ }, u = async () => {
1409
+ var S;
1410
+ await ((S = e.value) == null ? void 0 : S.resetFields());
1411
+ }, d = (S) => {
1412
+ var f;
1413
+ return ((f = e.value) == null ? void 0 : f.validate(S)) ?? Promise.resolve();
1414
+ }, v = (S) => {
1415
+ var f;
1416
+ return ((f = e.value) == null ? void 0 : f.validateFields(S)) ?? Promise.resolve();
1417
+ }, B = () => {
1418
+ var S;
1419
+ return ((S = e.value) == null ? void 0 : S.submit()) ?? Promise.resolve();
1420
+ }, b = (S, f) => {
1421
1421
  var W;
1422
- return ((W = e.value) == null ? void 0 : W.scrollToField(k, u)) ?? Promise.resolve();
1423
- }, x = (k) => {
1424
- var u;
1425
- (u = e.value) == null || u.clearValidate(k);
1426
- }, p = (k) => {
1427
- var u;
1428
- return ((u = e.value) == null ? void 0 : u.updateSchema(k)) ?? Promise.resolve();
1429
- }, v = (k, u, W) => {
1430
- var y;
1431
- return ((y = e.value) == null ? void 0 : y.appendSchemaByField(k, u, W)) ?? Promise.resolve();
1432
- }, B = (k) => {
1433
- var u;
1434
- return ((u = e.value) == null ? void 0 : u.removeSchemaByField(k)) ?? Promise.resolve();
1435
- }, V = async (k) => {
1436
- var u;
1437
- n.value = { ...n.value, ...k }, await ((u = e.value) == null ? void 0 : u.setProps(k));
1438
- }, F = (k) => {
1439
- var u;
1440
- return ((u = e.value) == null ? void 0 : u.getComponentInstance(k)) ?? null;
1422
+ return ((W = e.value) == null ? void 0 : W.scrollToField(S, f)) ?? Promise.resolve();
1423
+ }, y = (S) => {
1424
+ var f;
1425
+ (f = e.value) == null || f.clearValidate(S);
1426
+ }, p = (S) => {
1427
+ var f;
1428
+ return ((f = e.value) == null ? void 0 : f.updateSchema(S)) ?? Promise.resolve();
1429
+ }, _ = (S, f, W) => {
1430
+ var g;
1431
+ return ((g = e.value) == null ? void 0 : g.appendSchemaByField(S, f, W)) ?? Promise.resolve();
1432
+ }, A = (S) => {
1433
+ var f;
1434
+ return ((f = e.value) == null ? void 0 : f.removeSchemaByField(S)) ?? Promise.resolve();
1435
+ }, O = async (S) => {
1436
+ var f;
1437
+ n.value = { ...n.value, ...S }, await ((f = e.value) == null ? void 0 : f.setProps(S));
1438
+ }, P = (S) => {
1439
+ var f;
1440
+ return ((f = e.value) == null ? void 0 : f.getComponentInstance(S)) ?? null;
1441
1441
  };
1442
- function A(k, u = !1) {
1443
- return e.value ? u ? e.value.getFieldOptions(k, !0) : e.value.getFieldOptions(k) : [];
1442
+ function T(S, f = !1) {
1443
+ return e.value ? f ? e.value.getFieldOptions(S, !0) : e.value.getFieldOptions(S) : [];
1444
1444
  }
1445
- return [o, {
1446
- register: o,
1445
+ return [l, {
1446
+ register: l,
1447
1447
  formAction: e,
1448
- getFieldsValue: r,
1449
- setFieldsValue: a,
1450
- resetFields: f,
1451
- validate: m,
1452
- validateFields: _,
1453
- submit: z,
1454
- scrollToField: S,
1455
- clearValidate: x,
1448
+ getFieldsValue: a,
1449
+ setFieldsValue: s,
1450
+ resetFields: u,
1451
+ validate: d,
1452
+ validateFields: v,
1453
+ submit: B,
1454
+ scrollToField: b,
1455
+ clearValidate: y,
1456
1456
  updateSchema: p,
1457
- appendSchemaByField: v,
1458
- removeSchemaByField: B,
1459
- setProps: V,
1460
- getComponentInstance: F,
1461
- getFieldOptions: A,
1462
- isFieldLoading: (k) => {
1463
- var u;
1464
- return ((u = e.value) == null ? void 0 : u.isFieldLoading(k)) ?? !1;
1457
+ appendSchemaByField: _,
1458
+ removeSchemaByField: A,
1459
+ setProps: O,
1460
+ getComponentInstance: P,
1461
+ getFieldOptions: T,
1462
+ isFieldLoading: (S) => {
1463
+ var f;
1464
+ return ((f = e.value) == null ? void 0 : f.isFieldLoading(S)) ?? !1;
1465
1465
  }
1466
1466
  }];
1467
1467
  }
1468
- const Ht = /* @__PURE__ */ ne({
1468
+ const Ht = /* @__PURE__ */ te({
1469
1469
  __name: "ProDescriptions",
1470
1470
  props: {
1471
1471
  title: null,
@@ -1480,8 +1480,8 @@ const Ht = /* @__PURE__ */ ne({
1480
1480
  collapseOptions: { default: () => ({ canExpand: !1, defaultExpand: !0, expandButtonText: "展开", collapseButtonText: "收起", visibleRows: 1 }) }
1481
1481
  },
1482
1482
  emits: ["register"],
1483
- setup(s, { expose: e, emit: n }) {
1484
- const t = s, o = D({}), r = D({}), a = D([]), f = D(typeof window < "u" ? window.innerWidth : 1920), m = D(!0), _ = ne({
1483
+ setup(r, { expose: e, emit: n }) {
1484
+ const t = r, l = D({}), a = D({}), s = D([]), u = D(typeof window < "u" ? window.innerWidth : 1920), d = D(!0), v = te({
1485
1485
  name: "EcpDescriptionValueRenderer",
1486
1486
  props: {
1487
1487
  schema: { type: Object, required: !0 },
@@ -1489,117 +1489,117 @@ const Ht = /* @__PURE__ */ ne({
1489
1489
  record: { type: Object, required: !0 },
1490
1490
  emptyText: { type: String, default: "-" }
1491
1491
  },
1492
- setup(g) {
1492
+ setup(i) {
1493
1493
  return () => {
1494
- const I = g.schema, $ = g.record, i = g.value, h = (M) => {
1495
- const K = z(I, M === g.emptyText ? i : M, $), L = de("span", M);
1496
- return K ? de("el-tooltip", { props: K }, [L]) : L;
1494
+ const h = i.schema, R = i.record, z = i.value, H = (G) => {
1495
+ const ne = B(h, G === i.emptyText ? z : G, R), le = ve("span", G);
1496
+ return ne ? ve("el-tooltip", { props: ne }, [le]) : le;
1497
1497
  };
1498
- if (I.render) {
1499
- const M = I.render(i, $);
1500
- return M == null || M === "" ? h(g.emptyText) : typeof M == "string" || typeof M == "number" ? h(String(M)) : M;
1498
+ if (h.render) {
1499
+ const G = h.render(z, R);
1500
+ return G == null || G === "" ? H(i.emptyText) : typeof G == "string" || typeof G == "number" ? H(String(G)) : G;
1501
1501
  }
1502
- return Array.isArray(i) ? h(i.length ? i.join(", ") : g.emptyText) : i == null || i === "" ? h(g.emptyText) : h(typeof i == "object" ? JSON.stringify(i) : String(i));
1502
+ return Array.isArray(z) ? H(z.length ? z.join(", ") : i.emptyText) : z == null || z === "" ? H(i.emptyText) : H(typeof z == "object" ? JSON.stringify(z) : String(z));
1503
1503
  };
1504
1504
  }
1505
- }), z = (g, I, $) => {
1506
- const i = g.tooltip;
1507
- if (!i)
1505
+ }), B = (i, h, R) => {
1506
+ const z = i.tooltip;
1507
+ if (!z)
1508
1508
  return null;
1509
- const h = typeof i == "function" ? i({ value: I, record: $, schema: g }) : i;
1510
- return De(h, I);
1511
- }, { mergeSettings: S } = Re(), x = w(() => S("ProDescriptions", { ...t, ...o.value })), p = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, v = (g, I) => {
1512
- if (typeof g == "number")
1513
- return Math.max(1, g);
1514
- const $ = g ?? {};
1515
- return I >= p.xxl ? $.xxl ?? $.xl ?? $.lg ?? $.md ?? $.sm ?? $.xs ?? 3 : I >= p.xl ? $.xl ?? $.lg ?? $.md ?? $.sm ?? $.xs ?? 3 : I >= p.lg ? $.lg ?? $.md ?? $.sm ?? $.xs ?? 3 : I >= p.md ? $.md ?? $.sm ?? $.xs ?? 3 : I >= p.sm ? $.sm ?? $.xs ?? 2 : $.xs ?? 1;
1516
- }, B = w(() => v(x.value.column, f.value)), V = w(() => x.value.data ?? r.value ?? {}), F = w(() => (a.value.length ? a.value : x.value.schema ?? []).filter((g) => g.dataIndex || g.field ? typeof g.show == "function" ? g.show(V.value) : g.show !== !1 : !1).map((g) => ({
1517
- ...g,
1518
- dataIndex: g.dataIndex || g.field || ""
1519
- }))), A = w(() => {
1520
- const g = [];
1521
- let I = { items: [] }, $ = 0;
1522
- const i = B.value;
1523
- return F.value.forEach((h, M) => {
1524
- const K = F.value.length - M, L = Math.max(1, Math.min(h.span ?? 1, i)), Q = K === 1 ? i - $ || i : L;
1525
- $ + Q > i && (g.push(I), I = { items: [] }, $ = 0);
1526
- const ae = K === 1 && $ < i ? Math.max(1, i - $) : Q;
1527
- I.items.push({ ...h, _span: ae }), $ += ae, $ >= i && (g.push(I), I = { items: [] }, $ = 0);
1528
- }), I.items.length > 0 && g.push(I), g;
1509
+ const H = typeof z == "function" ? z({ value: h, record: R, schema: i }) : z;
1510
+ return De(H, h);
1511
+ }, { mergeSettings: b } = Be(), y = w(() => b("ProDescriptions", { ...t, ...l.value })), p = { xxl: 1920, xl: 1200, lg: 992, md: 768, sm: 576 }, _ = (i, h) => {
1512
+ if (typeof i == "number")
1513
+ return Math.max(1, i);
1514
+ const R = i ?? {};
1515
+ return h >= p.xxl ? R.xxl ?? R.xl ?? R.lg ?? R.md ?? R.sm ?? R.xs ?? 3 : h >= p.xl ? R.xl ?? R.lg ?? R.md ?? R.sm ?? R.xs ?? 3 : h >= p.lg ? R.lg ?? R.md ?? R.sm ?? R.xs ?? 3 : h >= p.md ? R.md ?? R.sm ?? R.xs ?? 3 : h >= p.sm ? R.sm ?? R.xs ?? 2 : R.xs ?? 1;
1516
+ }, A = w(() => _(y.value.column, u.value)), O = w(() => y.value.data ?? a.value ?? {}), P = w(() => (s.value.length ? s.value : y.value.schema ?? []).filter((i) => i.dataIndex || i.field ? typeof i.show == "function" ? i.show(O.value) : i.show !== !1 : !1).map((i) => ({
1517
+ ...i,
1518
+ dataIndex: i.dataIndex || i.field || ""
1519
+ }))), T = w(() => {
1520
+ const i = [];
1521
+ let h = { items: [] }, R = 0;
1522
+ const z = A.value;
1523
+ return P.value.forEach((H, G) => {
1524
+ const ne = P.value.length - G, le = Math.max(1, Math.min(H.span ?? 1, z)), X = ne === 1 ? z - R || z : le;
1525
+ R + X > z && (i.push(h), h = { items: [] }, R = 0);
1526
+ const ae = ne === 1 && R < z ? Math.max(1, z - R) : X;
1527
+ h.items.push({ ...H, _span: ae }), R += ae, R >= z && (i.push(h), h = { items: [] }, R = 0);
1528
+ }), h.items.length > 0 && i.push(h), i;
1529
1529
  }), E = w(() => {
1530
- var I;
1531
- if (!N.value || m.value)
1532
- return A.value;
1533
- const g = Math.max(1, ((I = x.value.collapseOptions) == null ? void 0 : I.visibleRows) ?? 1);
1534
- return A.value.slice(0, g);
1530
+ var h;
1531
+ if (!N.value || d.value)
1532
+ return T.value;
1533
+ const i = Math.max(1, ((h = y.value.collapseOptions) == null ? void 0 : h.visibleRows) ?? 1);
1534
+ return T.value.slice(0, i);
1535
1535
  }), N = w(() => {
1536
- var I, $;
1537
- const g = Math.max(1, ((I = x.value.collapseOptions) == null ? void 0 : I.visibleRows) ?? 1);
1538
- return !!x.value.useCollapse && !!(($ = x.value.collapseOptions) != null && $.canExpand) && A.value.length > g;
1539
- }), k = w(() => !!x.value.title || !!x.value.helpMessage || N.value), u = w(() => {
1540
- var g, I;
1536
+ var h, R;
1537
+ const i = Math.max(1, ((h = y.value.collapseOptions) == null ? void 0 : h.visibleRows) ?? 1);
1538
+ return !!y.value.useCollapse && !!((R = y.value.collapseOptions) != null && R.canExpand) && T.value.length > i;
1539
+ }), S = w(() => !!y.value.title || !!y.value.helpMessage || N.value), f = w(() => {
1540
+ var i, h;
1541
1541
  return {
1542
- expand: ((g = x.value.collapseOptions) == null ? void 0 : g.expandButtonText) ?? "展开",
1543
- collapse: ((I = x.value.collapseOptions) == null ? void 0 : I.collapseButtonText) ?? "收起"
1542
+ expand: ((i = y.value.collapseOptions) == null ? void 0 : i.expandButtonText) ?? "展开",
1543
+ collapse: ((h = y.value.collapseOptions) == null ? void 0 : h.collapseButtonText) ?? "收起"
1544
1544
  };
1545
1545
  }), W = w(() => ({
1546
- gridTemplateColumns: `repeat(${B.value}, minmax(0, 1fr))`
1547
- })), y = (g) => ({
1548
- gridColumn: `span ${g._span}`
1549
- }), j = (g) => ({
1550
- minWidth: g.labelMinWidth ? `${g.labelMinWidth}px` : void 0,
1551
- ...g.labelStyle ?? {}
1552
- }), q = (g) => ({
1553
- minWidth: g.contentMinWidth ? `${g.contentMinWidth}px` : void 0,
1554
- ...g.contentStyle ?? {}
1555
- }), X = (g) => V.value[g.dataIndex], G = () => {
1556
- a.value = [...x.value.schema ?? []];
1557
- }, ee = () => {
1558
- r.value = { ...x.value.data ?? {} };
1559
- }, Z = async (g) => {
1560
- o.value = { ...o.value, ...g }, g.schema && (a.value = [...g.schema]), g.data && (r.value = { ...g.data });
1561
- }, Y = async (g) => {
1562
- r.value = { ...r.value, ...g }, o.value = { ...o.value, data: r.value };
1563
- }, te = () => ({ ...x.value.data ?? r.value ?? {} }), U = {
1546
+ gridTemplateColumns: `repeat(${A.value}, minmax(0, 1fr))`
1547
+ })), g = (i) => ({
1548
+ gridColumn: `span ${i._span}`
1549
+ }), K = (i) => ({
1550
+ minWidth: i.labelMinWidth ? `${i.labelMinWidth}px` : void 0,
1551
+ ...i.labelStyle ?? {}
1552
+ }), q = (i) => ({
1553
+ minWidth: i.contentMinWidth ? `${i.contentMinWidth}px` : void 0,
1554
+ ...i.contentStyle ?? {}
1555
+ }), Q = (i) => O.value[i.dataIndex], J = () => {
1556
+ s.value = [...y.value.schema ?? []];
1557
+ }, Y = () => {
1558
+ a.value = { ...y.value.data ?? {} };
1559
+ }, Z = async (i) => {
1560
+ l.value = { ...l.value, ...i }, i.schema && (s.value = [...i.schema]), i.data && (a.value = { ...i.data });
1561
+ }, I = async (i) => {
1562
+ a.value = { ...a.value, ...i }, l.value = { ...l.value, data: a.value };
1563
+ }, V = () => ({ ...y.value.data ?? a.value ?? {} }), j = {
1564
1564
  setProps: Z,
1565
- setData: Y,
1566
- getData: te
1565
+ setData: I,
1566
+ getData: V
1567
1567
  };
1568
- e(U);
1569
- const le = () => {
1570
- typeof window < "u" && (f.value = window.innerWidth);
1568
+ e(j);
1569
+ const C = () => {
1570
+ typeof window < "u" && (u.value = window.innerWidth);
1571
1571
  };
1572
- return me(() => {
1573
- var g;
1574
- G(), ee(), m.value = ((g = x.value.collapseOptions) == null ? void 0 : g.defaultExpand) !== !1, n("register", U), typeof window < "u" && window.addEventListener("resize", le);
1575
- }), Be(() => {
1576
- typeof window < "u" && window.removeEventListener("resize", le);
1577
- }), J(() => x.value.schema, G, { deep: !0 }), J(() => x.value.data, ee, { deep: !0 }), J(() => {
1578
- var g;
1579
- return (g = x.value.collapseOptions) == null ? void 0 : g.defaultExpand;
1580
- }, (g) => {
1581
- g !== void 0 && (m.value = g);
1582
- }), { __sfc: !0, props: t, emit: n, innerProps: o, innerData: r, innerSchema: a, windowWidth: f, expanded: m, DescriptionValueRenderer: _, normalizeTooltip: z, mergeSettings: S, effectiveProps: x, breakpoints: p, resolveColumn: v, currentColumn: B, effectiveData: V, visibleSchema: F, normalizedRows: A, renderedRows: E, showCollapseButton: N, showHeader: k, collapseButtonText: u, bodyStyle: W, getItemStyle: y, getLabelStyle: j, getContentStyle: q, getItemValue: X, syncSchema: G, syncData: ee, setProps: Z, setData: Y, getData: te, descriptionAction: U, updateWindowWidth: le };
1572
+ return ge(() => {
1573
+ var i;
1574
+ J(), Y(), d.value = ((i = y.value.collapseOptions) == null ? void 0 : i.defaultExpand) !== !1, n("register", j), typeof window < "u" && window.addEventListener("resize", C);
1575
+ }), Fe(() => {
1576
+ typeof window < "u" && window.removeEventListener("resize", C);
1577
+ }), ee(() => y.value.schema, J, { deep: !0 }), ee(() => y.value.data, Y, { deep: !0 }), ee(() => {
1578
+ var i;
1579
+ return (i = y.value.collapseOptions) == null ? void 0 : i.defaultExpand;
1580
+ }, (i) => {
1581
+ i !== void 0 && (d.value = i);
1582
+ }), { __sfc: !0, props: t, emit: n, innerProps: l, innerData: a, innerSchema: s, windowWidth: u, expanded: d, DescriptionValueRenderer: v, normalizeTooltip: B, mergeSettings: b, effectiveProps: y, breakpoints: p, resolveColumn: _, currentColumn: A, effectiveData: O, visibleSchema: P, normalizedRows: T, renderedRows: E, showCollapseButton: N, showHeader: S, collapseButtonText: f, bodyStyle: W, getItemStyle: g, getLabelStyle: K, getContentStyle: q, getItemValue: Q, syncSchema: J, syncData: Y, setProps: Z, setData: I, getData: V, descriptionAction: j, updateWindowWidth: C };
1583
1583
  }
1584
1584
  });
1585
1585
  var Gt = function() {
1586
- var o;
1586
+ var l;
1587
1587
  var e = this, n = e._self._c, t = e._self._setupProxy;
1588
- return n("div", { staticClass: "ecp-pro-descriptions" }, [t.showHeader ? n("div", { staticClass: "ecp-pro-descriptions__header" }, [n("div", { staticClass: "ecp-pro-descriptions__title-wrap" }, [t.effectiveProps.title ? n("span", { staticClass: "ecp-pro-descriptions__title" }, [e._v(e._s(t.effectiveProps.title))]) : e._e(), t.effectiveProps.helpMessage ? n("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.helpMessage) ? n("span", e._l(t.effectiveProps.helpMessage, function(r, a) {
1589
- return n("div", { key: a }, [e._v(e._s(r))]);
1590
- }), 0) : n("span", [e._v(e._s(t.effectiveProps.helpMessage))])]), n("i", { staticClass: "el-icon-question ecp-pro-descriptions__help" })], 2) : e._e(), (o = t.effectiveProps.collapseOptions) != null && o.helpMessage ? n("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.collapseOptions.helpMessage) ? n("span", e._l(t.effectiveProps.collapseOptions.helpMessage, function(r, a) {
1591
- return n("div", { key: `collapse-${a}` }, [e._v(e._s(r))]);
1592
- }), 0) : n("span", [e._v(e._s(t.effectiveProps.collapseOptions.helpMessage))])]), n("i", { staticClass: "el-icon-info ecp-pro-descriptions__help" })], 2) : e._e()], 1), t.showCollapseButton ? n("el-button", { staticClass: "ecp-pro-descriptions__toggle", attrs: { type: "text" }, on: { click: function(r) {
1588
+ return n("div", { staticClass: "ecp-pro-descriptions" }, [t.showHeader ? n("div", { staticClass: "ecp-pro-descriptions__header" }, [n("div", { staticClass: "ecp-pro-descriptions__title-wrap" }, [t.effectiveProps.title ? n("span", { staticClass: "ecp-pro-descriptions__title" }, [e._v(e._s(t.effectiveProps.title))]) : e._e(), t.effectiveProps.helpMessage ? n("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.helpMessage) ? n("span", e._l(t.effectiveProps.helpMessage, function(a, s) {
1589
+ return n("div", { key: s }, [e._v(e._s(a))]);
1590
+ }), 0) : n("span", [e._v(e._s(t.effectiveProps.helpMessage))])]), n("i", { staticClass: "el-icon-question ecp-pro-descriptions__help" })], 2) : e._e(), (l = t.effectiveProps.collapseOptions) != null && l.helpMessage ? n("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.collapseOptions.helpMessage) ? n("span", e._l(t.effectiveProps.collapseOptions.helpMessage, function(a, s) {
1591
+ return n("div", { key: `collapse-${s}` }, [e._v(e._s(a))]);
1592
+ }), 0) : n("span", [e._v(e._s(t.effectiveProps.collapseOptions.helpMessage))])]), n("i", { staticClass: "el-icon-info ecp-pro-descriptions__help" })], 2) : e._e()], 1), t.showCollapseButton ? n("el-button", { staticClass: "ecp-pro-descriptions__toggle", attrs: { type: "text" }, on: { click: function(a) {
1593
1593
  t.expanded = !t.expanded;
1594
1594
  } } }, [e._v(" " + e._s(t.expanded ? t.collapseButtonText.collapse : t.collapseButtonText.expand) + " "), n("i", { staticClass: "el-icon-arrow-down", class: t.expanded ? "is-expanded" : "" })]) : e._e()], 1) : e._e(), n("div", e._b({ staticClass: "ecp-pro-descriptions__body", class: [
1595
1595
  `is-${t.effectiveProps.size}`,
1596
1596
  { "is-bordered": t.effectiveProps.bordered, "is-collapsed": t.showCollapseButton && !t.expanded }
1597
- ], style: t.bodyStyle }, "div", e.$attrs, !1), [e._l(t.renderedRows, function(r, a) {
1598
- return [e._l(r.items, function(f) {
1599
- return [n("div", { key: `${a}-${f.dataIndex || f.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(f) }, [n("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(f) }, [e._v(" " + e._s(f.label) + " ")]), n("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(f) }, [e.$scopedSlots[f.slot || f.dataIndex] ? e._t(f.slot || f.dataIndex, null, { value: t.getItemValue(f), record: t.effectiveData, schema: f }) : n(t.DescriptionValueRenderer, { attrs: { schema: f, value: t.getItemValue(f), record: t.effectiveData, "empty-text": t.effectiveProps.emptyText || "-" } })], 2)])];
1597
+ ], style: t.bodyStyle }, "div", e.$attrs, !1), [e._l(t.renderedRows, function(a, s) {
1598
+ return [e._l(a.items, function(u) {
1599
+ return [n("div", { key: `${s}-${u.dataIndex || u.field}`, staticClass: "ecp-pro-descriptions__item", style: t.getItemStyle(u) }, [n("div", { staticClass: "ecp-pro-descriptions__label", style: t.getLabelStyle(u) }, [e._v(" " + e._s(u.label) + " ")]), n("div", { staticClass: "ecp-pro-descriptions__content", style: t.getContentStyle(u) }, [e.$scopedSlots[u.slot || u.dataIndex] ? e._t(u.slot || u.dataIndex, null, { value: t.getItemValue(u), record: t.effectiveData, schema: u }) : n(t.DescriptionValueRenderer, { attrs: { schema: u, value: t.getItemValue(u), record: t.effectiveData, "empty-text": t.effectiveProps.emptyText || "-" } })], 2)])];
1600
1600
  })];
1601
1601
  })], 2)]);
1602
- }, Ut = [], Jt = /* @__PURE__ */ se(
1602
+ }, Ut = [], Jt = /* @__PURE__ */ re(
1603
1603
  Ht,
1604
1604
  Gt,
1605
1605
  Ut,
@@ -1609,31 +1609,31 @@ var Gt = function() {
1609
1609
  null,
1610
1610
  null
1611
1611
  );
1612
- const Ze = Jt.exports;
1613
- function fn(s) {
1614
- const e = D(null), n = () => s ? pe(s) : void 0, t = () => {
1615
- const a = pe(e);
1616
- if (!a)
1612
+ const Ye = Jt.exports;
1613
+ function gn(r) {
1614
+ const e = D(null), n = () => r ? _e(r) : void 0, t = () => {
1615
+ const s = _e(e);
1616
+ if (!s)
1617
1617
  throw new Error("ProDescriptions instance has not been registered");
1618
- return a;
1619
- }, o = (a) => {
1620
- e.value = a;
1621
- const f = n();
1622
- f && Object.keys(f).length > 0 && a.setProps(f);
1618
+ return s;
1619
+ }, l = (s) => {
1620
+ e.value = s;
1621
+ const u = n();
1622
+ u && Object.keys(u).length > 0 && s.setProps(u);
1623
1623
  };
1624
- return s && J(
1624
+ return r && ee(
1625
1625
  () => n(),
1626
- (a) => {
1627
- a && e.value && e.value.setProps(a);
1626
+ (s) => {
1627
+ s && e.value && e.value.setProps(s);
1628
1628
  },
1629
1629
  { deep: !0 }
1630
- ), [o, {
1631
- setProps: (a) => t().setProps(a),
1632
- setData: (a) => t().setData(a),
1630
+ ), [l, {
1631
+ setProps: (s) => t().setProps(s),
1632
+ setData: (s) => t().setData(s),
1633
1633
  getData: () => t().getData()
1634
1634
  }];
1635
1635
  }
1636
- const Xt = /* @__PURE__ */ ne({
1636
+ const Zt = /* @__PURE__ */ te({
1637
1637
  __name: "CollapseContainer",
1638
1638
  props: {
1639
1639
  title: null,
@@ -1654,36 +1654,36 @@ const Xt = /* @__PURE__ */ ne({
1654
1654
  contentStyle: { default: () => ({}) }
1655
1655
  },
1656
1656
  emits: ["update:expanded", "change", "collapse", "expand"],
1657
- setup(s, { expose: e, emit: n }) {
1658
- const t = s, o = he(), { mergeSettings: r } = Re(), a = D(t.expanded ?? t.defaultExpand), f = w(() => r("CollapseContainer", { ...t })), m = w(() => f.value.canExpand ?? f.value.canExpan ?? !0), _ = w(() => f.value.expanded !== void 0), z = w(() => _.value ? !!f.value.expanded : a.value), S = w(() => !!o.title || !!o.action || !!f.value.title || !!f.value.helpMessage || m.value), x = w(() => m.value), p = w(() => {
1659
- const A = f.value.wrapperProps ?? {}, E = A.class, N = A.style, k = { ...A };
1660
- return delete k.class, delete k.style, {
1661
- ...k,
1657
+ setup(r, { expose: e, emit: n }) {
1658
+ const t = r, l = we(), { mergeSettings: a } = Be(), s = D(t.expanded ?? t.defaultExpand), u = w(() => a("CollapseContainer", { ...t })), d = w(() => u.value.canExpand ?? u.value.canExpan ?? !0), v = w(() => u.value.expanded !== void 0), B = w(() => v.value ? !!u.value.expanded : s.value), b = w(() => !!l.title || !!l.action || !!u.value.title || !!u.value.helpMessage || d.value), y = w(() => d.value), p = w(() => {
1659
+ const T = u.value.wrapperProps ?? {}, E = T.class, N = T.style, S = { ...T };
1660
+ return delete S.class, delete S.style, {
1661
+ ...S,
1662
1662
  class: E,
1663
1663
  style: N
1664
1664
  };
1665
- }), v = () => {
1666
- !f.value.triggerWindowResize || typeof window > "u" || window.setTimeout(() => {
1665
+ }), _ = () => {
1666
+ !u.value.triggerWindowResize || typeof window > "u" || window.setTimeout(() => {
1667
1667
  window.dispatchEvent(new Event("resize"));
1668
1668
  }, 220);
1669
- }, B = (A) => {
1670
- _.value || (a.value = A), n("update:expanded", A), n("change", A), n(A ? "expand" : "collapse"), v();
1671
- }, V = () => {
1672
- m.value && B(!z.value);
1673
- }, F = () => {
1674
- x.value && V();
1669
+ }, A = (T) => {
1670
+ v.value || (s.value = T), n("update:expanded", T), n("change", T), n(T ? "expand" : "collapse"), _();
1671
+ }, O = () => {
1672
+ d.value && A(!B.value);
1673
+ }, P = () => {
1674
+ y.value && O();
1675
1675
  };
1676
- return J(() => t.expanded, (A) => {
1677
- A !== void 0 && (a.value = A);
1678
- }), J(() => t.defaultExpand, (A) => {
1679
- t.expanded === void 0 && (a.value = A);
1676
+ return ee(() => t.expanded, (T) => {
1677
+ T !== void 0 && (s.value = T);
1678
+ }), ee(() => t.defaultExpand, (T) => {
1679
+ t.expanded === void 0 && (s.value = T);
1680
1680
  }), e({
1681
- setExpanded: B,
1682
- toggleExpand: V
1683
- }), { __sfc: !0, props: t, emit: n, slots: o, mergeSettings: r, innerExpanded: a, effectiveProps: f, resolvedCanExpan: m, isControlled: _, mergedExpanded: z, showHeader: S, canToggleByHeader: x, wrapperProps: p, triggerWindowResize: v, setExpanded: B, toggleExpand: V, handleHeaderClick: F };
1681
+ setExpanded: A,
1682
+ toggleExpand: O
1683
+ }), { __sfc: !0, props: t, emit: n, slots: l, mergeSettings: a, innerExpanded: s, effectiveProps: u, resolvedCanExpan: d, isControlled: v, mergedExpanded: B, showHeader: b, canToggleByHeader: y, wrapperProps: p, triggerWindowResize: _, setExpanded: A, toggleExpand: O, handleHeaderClick: P };
1684
1684
  }
1685
1685
  });
1686
- var Zt = function() {
1686
+ var Xt = function() {
1687
1687
  var e = this, n = e._self._c, t = e._self._setupProxy;
1688
1688
  return n("div", e._b({ directives: [{ name: "loading", rawName: "v-loading", value: t.effectiveProps.loading, expression: "effectiveProps.loading" }], staticClass: "ecp-collapse-container", class: {
1689
1689
  "is-expanded": t.mergedExpanded,
@@ -1691,16 +1691,16 @@ var Zt = function() {
1691
1691
  "is-header-clickable": t.canToggleByHeader
1692
1692
  } }, "div", t.wrapperProps, !1), [t.showHeader ? n("div", { staticClass: "ecp-collapse-container__header", class: t.effectiveProps.headerClass, style: t.effectiveProps.headerStyle }, [n("div", { staticClass: "ecp-collapse-container__header-main", on: { click: t.handleHeaderClick } }, [e.$slots.title || t.effectiveProps.title ? n("div", { staticClass: "ecp-collapse-container__title-wrap" }, [e._t("title", function() {
1693
1693
  return [n("span", { staticClass: "ecp-collapse-container__title" }, [e._v(e._s(t.effectiveProps.title))])];
1694
- }), t.effectiveProps.helpMessage ? n("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.helpMessage) ? n("span", e._l(t.effectiveProps.helpMessage, function(o, r) {
1695
- return n("div", { key: r }, [e._v(e._s(o))]);
1696
- }), 0) : n("span", [e._v(e._s(t.effectiveProps.helpMessage))])]), n("i", { staticClass: "el-icon-question ecp-collapse-container__help" })], 2) : e._e()], 2) : e._e()]), e.$slots.action || t.resolvedCanExpan ? n("div", { staticClass: "ecp-collapse-container__header-extra", on: { click: function(o) {
1697
- o.stopPropagation();
1698
- } } }, [e._t("action"), t.resolvedCanExpan ? n("el-button", { staticClass: "ecp-collapse-container__toggle", attrs: { type: "text" }, on: { click: function(o) {
1699
- return o.stopPropagation(), t.toggleExpand.apply(null, arguments);
1694
+ }), t.effectiveProps.helpMessage ? n("el-tooltip", { attrs: { placement: "top", effect: "dark" } }, [n("template", { slot: "content" }, [Array.isArray(t.effectiveProps.helpMessage) ? n("span", e._l(t.effectiveProps.helpMessage, function(l, a) {
1695
+ return n("div", { key: a }, [e._v(e._s(l))]);
1696
+ }), 0) : n("span", [e._v(e._s(t.effectiveProps.helpMessage))])]), n("i", { staticClass: "el-icon-question ecp-collapse-container__help" })], 2) : e._e()], 2) : e._e()]), e.$slots.action || t.resolvedCanExpan ? n("div", { staticClass: "ecp-collapse-container__header-extra", on: { click: function(l) {
1697
+ l.stopPropagation();
1698
+ } } }, [e._t("action"), t.resolvedCanExpan ? n("el-button", { staticClass: "ecp-collapse-container__toggle", attrs: { type: "text" }, on: { click: function(l) {
1699
+ return l.stopPropagation(), t.toggleExpand.apply(null, arguments);
1700
1700
  } } }, [e._v(" " + e._s(t.mergedExpanded ? t.effectiveProps.collapseButtonText : t.effectiveProps.expandButtonText) + " "), n("i", { staticClass: "el-icon-arrow-down", class: { "is-expanded": t.mergedExpanded } })]) : e._e()], 2) : e._e()]) : e._e(), n("el-collapse-transition", [n("div", { directives: [{ name: "show", rawName: "v-show", value: t.mergedExpanded, expression: "mergedExpanded" }], staticClass: "ecp-collapse-container__body", class: t.effectiveProps.contentClass, style: t.effectiveProps.contentStyle }, [e._t("default")], 2)])], 1);
1701
- }, Qt = [], Yt = /* @__PURE__ */ se(
1702
- Xt,
1701
+ }, Qt = [], Yt = /* @__PURE__ */ re(
1703
1702
  Zt,
1703
+ Xt,
1704
1704
  Qt,
1705
1705
  !1,
1706
1706
  null,
@@ -1708,314 +1708,490 @@ var Zt = function() {
1708
1708
  null,
1709
1709
  null
1710
1710
  );
1711
- const Qe = Yt.exports, en = {
1711
+ const et = Yt.exports;
1712
+ function en(r) {
1713
+ const { props: e, emit: n, emitAddRow: t, emitRemoveRow: l } = r, a = D(null), s = (C) => {
1714
+ a.value = C;
1715
+ }, u = D(null), d = w(() => e.modelValue), v = w(() => d.value !== void 0), B = w(() => v.value ? d.value ?? [] : []), b = w(() => ({ rows: B.value })), y = w(() => B.value.map((C, i) => ({ ...C, _index: i })));
1716
+ function p(C) {
1717
+ return `r-${C._index}`;
1718
+ }
1719
+ function _() {
1720
+ return JSON.parse(JSON.stringify(B.value));
1721
+ }
1722
+ function A() {
1723
+ const C = {};
1724
+ for (const i of e.columns)
1725
+ if (i.children && i.children.length > 0)
1726
+ for (const h of i.children)
1727
+ C[h.key] = "";
1728
+ else
1729
+ C[i.key] = "";
1730
+ return C;
1731
+ }
1732
+ function O(C) {
1733
+ n("update:modelValue", C);
1734
+ }
1735
+ function P(C) {
1736
+ return B.value[C._index] ?? {};
1737
+ }
1738
+ function T(C, i, h) {
1739
+ if (h) {
1740
+ const R = P(C)[i.key];
1741
+ return R && typeof R == "object" ? R[h] ?? "" : P(C)[h] ?? "";
1742
+ }
1743
+ return P(C)[i.key] ?? "";
1744
+ }
1745
+ function E(C, i, h, R) {
1746
+ const z = _(), H = { ...z[C._index] };
1747
+ if (h) {
1748
+ const G = H[i.key];
1749
+ if (G && typeof G == "object") {
1750
+ const ne = { ...G };
1751
+ ne[h] = R, H[i.key] = ne;
1752
+ } else
1753
+ H[h] = R;
1754
+ } else
1755
+ H[i.key] = R;
1756
+ z[C._index] = H, O(z);
1757
+ }
1758
+ function N() {
1759
+ t == null || t();
1760
+ const C = _();
1761
+ C.push(A()), O(C);
1762
+ }
1763
+ function S(C) {
1764
+ if (!f.value)
1765
+ return;
1766
+ l == null || l(C);
1767
+ const i = _();
1768
+ i.splice(C, 1), O(i);
1769
+ }
1770
+ const f = w(() => B.value.length > (e.minRows ?? 0));
1771
+ function W(C, i, h) {
1772
+ return h ? `rows.${C._index}.${h}` : `rows.${C._index}.${i.key}`;
1773
+ }
1774
+ const g = {};
1775
+ function K(C) {
1776
+ return JSON.stringify(C.map((i) => {
1777
+ if (i == null || typeof i != "object")
1778
+ return String(i);
1779
+ const h = i;
1780
+ return {
1781
+ required: h.required,
1782
+ type: h.type,
1783
+ message: h.message,
1784
+ pattern: String(h.pattern ?? ""),
1785
+ min: h.min,
1786
+ max: h.max,
1787
+ trigger: Array.isArray(h.trigger) ? [...h.trigger] : h.trigger,
1788
+ hasValidator: typeof h.validator == "function",
1789
+ hasAsyncValidator: typeof h.asyncValidator == "function"
1790
+ };
1791
+ }));
1792
+ }
1793
+ const q = w(() => {
1794
+ const C = (z) => [
1795
+ { required: !0, message: `请输入${z}`, trigger: "change" }
1796
+ ];
1797
+ let i = !1;
1798
+ const h = {};
1799
+ B.value.forEach((z, H) => {
1800
+ for (const G of e.columns) {
1801
+ const ne = (le, X, ae) => {
1802
+ const de = `rows.${H}.${le}`;
1803
+ let ie = [];
1804
+ "dynamicRules" in X && X.dynamicRules !== void 0 ? ie = typeof X.dynamicRules == "function" ? X.dynamicRules({ row: z, value: ae, column: X }) : X.dynamicRules : "rules" in X && X.rules !== void 0 ? ie = X.rules : X.required && (ie = C(X.title));
1805
+ const fe = K(ie), oe = g[de], ue = (oe == null ? void 0 : oe.__sig) === fe && oe ? oe : ie;
1806
+ ue.__sig = fe, h[de] = ue, ue !== oe && (i = !0);
1807
+ };
1808
+ if (G.children && G.children.length > 0)
1809
+ for (const le of G.children) {
1810
+ const X = T({ _index: H }, G, le.key);
1811
+ ne(le.key, le, X);
1812
+ }
1813
+ else {
1814
+ const le = T({ _index: H }, G);
1815
+ ne(G.key, G, le);
1816
+ }
1817
+ }
1818
+ });
1819
+ const R = e.rules || {};
1820
+ for (const z of Object.keys(R)) {
1821
+ const H = R[z];
1822
+ h[z] = H, H !== g[z] && (i = !0);
1823
+ }
1824
+ return (i || Object.keys(h).length !== Object.keys(g).length) && (Object.keys(g).forEach((z) => {
1825
+ delete g[z];
1826
+ }), Object.assign(g, h)), g;
1827
+ });
1828
+ function Q() {
1829
+ return new Promise((C) => {
1830
+ const i = u.value;
1831
+ if (!i || typeof i.validate != "function") {
1832
+ C(!0);
1833
+ return;
1834
+ }
1835
+ i.validate((h) => C(h));
1836
+ });
1837
+ }
1838
+ function J(C) {
1839
+ var i, h;
1840
+ (h = (i = u.value) == null ? void 0 : i.clearValidate) == null || h.call(i, C);
1841
+ }
1842
+ function Y(C) {
1843
+ return C.component === "formatted-number" ? "ecp-formatted-number-input" : "el-input";
1844
+ }
1845
+ function Z(C) {
1846
+ const i = C.componentProps || {}, h = {};
1847
+ for (const [R, z] of Object.entries(i))
1848
+ /^on[A-Za-z]/.test(R) && typeof z == "function" || (h[R] = z);
1849
+ return C.component === "formatted-number" ? { integerDigits: 5, decimalPlaces: 6, rounding: "round", inputLimit: !0, ...h } : h;
1850
+ }
1851
+ function I(C, i, h) {
1852
+ return (R) => E(C.row, i, h, R);
1853
+ }
1854
+ const V = w(() => {
1855
+ const C = [];
1856
+ for (const i of e.columns)
1857
+ if (i.children && i.children.length > 0)
1858
+ for (const h of i.children)
1859
+ C.push(`${i.key}.${h.key}`);
1860
+ else
1861
+ i.hideInTable || C.push(i.key);
1862
+ return C;
1863
+ });
1864
+ return {
1865
+ // 注册
1866
+ register: s,
1867
+ // el-form 绑定(formModelRef 包装了数组,满足 el-form :model Object 类型要求)
1868
+ formModelRef: b,
1869
+ currentModelValue: B,
1870
+ mergedRules: q,
1871
+ // el-table 绑定
1872
+ tableRows: y,
1873
+ rowKeyFn: p,
1874
+ spanMethodAdapter: ({
1875
+ rowIndex: C,
1876
+ column: i,
1877
+ columnIndex: h,
1878
+ row: R
1879
+ }) => {
1880
+ if (!e.spanMethod)
1881
+ return;
1882
+ const z = V.value[h];
1883
+ return e.spanMethod({
1884
+ row: R,
1885
+ column: { ...i, property: z ?? i.property },
1886
+ rowIndex: C,
1887
+ columnIndex: h
1888
+ });
1889
+ },
1890
+ allLeafColumnKeys: V,
1891
+ // ref
1892
+ formRef: u,
1893
+ getFormRef: () => u.value,
1894
+ // 单元格渲染
1895
+ cellComponent: Y,
1896
+ cellBind: Z,
1897
+ slotUpdateHandler: I,
1898
+ getCellProp: W,
1899
+ // 单元格值读写
1900
+ getCellValue: T,
1901
+ setCellValue: E,
1902
+ // 行操作
1903
+ handleAddRow: N,
1904
+ handleRemoveRow: S,
1905
+ // el-form 实例方法
1906
+ validate: Q,
1907
+ clearValidate: J
1908
+ };
1909
+ }
1910
+ const tn = /* @__PURE__ */ te({
1911
+ __name: "CellEditor",
1912
+ props: {
1913
+ col: null,
1914
+ value: null,
1915
+ row: null,
1916
+ size: null,
1917
+ placeholder: null
1918
+ },
1919
+ emits: ["update"],
1920
+ setup(r, { emit: e }) {
1921
+ const n = r, t = w(() => {
1922
+ const v = (typeof n.col.componentProps == "function" ? {} : n.col.componentProps ?? {}).options;
1923
+ return Array.isArray(v) ? v : [];
1924
+ }), l = w(() => {
1925
+ const d = {
1926
+ input: "el-input",
1927
+ "input-number": "el-input-number",
1928
+ "date-picker": "el-date-picker",
1929
+ switch: "el-switch",
1930
+ cascader: "el-cascader"
1931
+ };
1932
+ return n.col.component === "formatted-number" ? Ae : d[n.col.component] || "el-input";
1933
+ }), a = w(() => {
1934
+ let d = {}, v = {};
1935
+ const B = n.col.componentProps;
1936
+ typeof B == "function" ? v = B({ row: n.row ?? {}, value: n.value, column: n.col }) : d = B ?? {};
1937
+ const b = { size: n.size };
1938
+ for (const [y, p] of Object.entries({ ...d, ...v }))
1939
+ /^on[A-Za-z]/.test(y) && typeof p == "function" || (b[y] = p);
1940
+ if (n.col.component === "formatted-number")
1941
+ return { integerDigits: 5, decimalPlaces: 6, rounding: "round", inputLimit: !0, ...b };
1942
+ if (["select", "checkbox", "radio"].includes(n.col.component)) {
1943
+ const { options: y, ...p } = b;
1944
+ return p;
1945
+ }
1946
+ return b;
1947
+ }), s = w(() => {
1948
+ let d = {}, v = {};
1949
+ const B = n.col.componentProps;
1950
+ typeof B == "function" ? v = B({ row: n.row ?? {}, value: n.value, column: n.col }) : d = B ?? {};
1951
+ const b = {};
1952
+ for (const [y, p] of Object.entries({ ...d, ...v }))
1953
+ if (/^on[A-Za-z]/.test(y) && typeof p == "function") {
1954
+ const _ = y[2].toLowerCase() + y.slice(3);
1955
+ b[_] = p;
1956
+ }
1957
+ return b;
1958
+ });
1959
+ return { __sfc: !0, props: n, emit: e, options: t, cellComp: l, cellBind: a, cellEvents: s, mergedEvents: (d) => {
1960
+ const v = s.value[d];
1961
+ return {
1962
+ ...s.value,
1963
+ [d]: (B) => {
1964
+ v && v(B), e("update", B);
1965
+ }
1966
+ };
1967
+ }, ApiSelect: Ue, TreeSelect: Je };
1968
+ }
1969
+ });
1970
+ var nn = function() {
1971
+ var e = this, n = e._self._c, t = e._self._setupProxy;
1972
+ return e.col.component === "select" ? n("el-select", e._g(e._b({ attrs: { value: e.value, placeholder: e.placeholder } }, "el-select", t.cellBind, !1), t.mergedEvents("change")), e._l(t.options, function(l) {
1973
+ return n("el-option", { key: String(l.value), attrs: { label: l.label, value: l.value } });
1974
+ }), 1) : e.col.component === "checkbox" ? n("el-checkbox-group", e._g(e._b({ attrs: { value: e.value } }, "el-checkbox-group", t.cellBind, !1), t.mergedEvents("change")), e._l(t.options, function(l) {
1975
+ return n("el-checkbox", { key: String(l.value), attrs: { label: l.value } }, [e._v(e._s(l.label))]);
1976
+ }), 1) : e.col.component === "radio" ? n("el-radio-group", e._g(e._b({ attrs: { value: e.value } }, "el-radio-group", t.cellBind, !1), t.mergedEvents("change")), e._l(t.options, function(l) {
1977
+ return n("el-radio", { key: String(l.value), attrs: { label: l.value } }, [e._v(e._s(l.label))]);
1978
+ }), 1) : e.col.component === "date-range" ? n("el-date-picker", e._g(e._b({ attrs: { value: e.value, type: "daterange", "range-separator": "至", "start-placeholder": "开始日期", "end-placeholder": "结束日期", "value-format": "yyyy-MM-dd", placeholder: e.placeholder } }, "el-date-picker", t.cellBind, !1), t.mergedEvents("change"))) : e.col.component === "api-select" ? n(t.ApiSelect, e._g(e._b({ attrs: { value: e.value, placeholder: e.placeholder } }, "ApiSelect", t.cellBind, !1), t.mergedEvents("change"))) : e.col.component === "tree-select" ? n(t.TreeSelect, e._g(e._b({ attrs: { value: e.value, placeholder: e.placeholder } }, "TreeSelect", t.cellBind, !1), t.mergedEvents("change"))) : n(t.cellComp, e._g(e._b({ tag: "component", attrs: { value: e.value, placeholder: e.placeholder } }, "component", t.cellBind, !1), t.mergedEvents("input")));
1979
+ }, ln = [], on = /* @__PURE__ */ re(
1980
+ tn,
1981
+ nn,
1982
+ ln,
1983
+ !1,
1984
+ null,
1985
+ null,
1986
+ null,
1987
+ null
1988
+ );
1989
+ const an = on.exports, sn = {
1712
1990
  name: "ProTableForm",
1713
1991
  model: {
1714
1992
  prop: "modelValue",
1715
1993
  event: "update:modelValue"
1716
1994
  }
1717
- }, tn = /* @__PURE__ */ ne({
1718
- ...en,
1995
+ }, rn = /* @__PURE__ */ te({
1996
+ ...sn,
1719
1997
  props: {
1720
- modelValue: { default: () => ({}) },
1998
+ modelValue: { default: () => [] },
1721
1999
  columns: null,
1722
- fixedRows: null,
1723
- competitorsKey: { default: "competitors" },
1724
- competitorNameKey: { default: "name" },
1725
- firstColumnTitle: { default: "维度/友商" },
1726
- competitorNamePlaceholder: { default: "请输入友商名称" },
1727
2000
  metricPlaceholder: { default: "请输入" },
1728
- addCompetitorText: { default: "+新增友商" },
1729
- minCompetitors: { default: 0 },
2001
+ minRows: { default: 0 },
1730
2002
  rules: null,
1731
2003
  labelWidth: { default: "0" },
1732
2004
  bordered: { type: Boolean, default: !0 },
1733
- firstColMinWidth: { default: 160 },
1734
- actionWidth: { default: 120 },
1735
- showFirstColumn: { type: Boolean, default: !0 },
1736
- showActionColumn: { type: Boolean, default: !0 },
1737
- actionColumn: null
2005
+ spanMethod: null,
2006
+ formSize: null,
2007
+ labelPosition: null,
2008
+ disabled: { type: Boolean },
2009
+ stripe: { type: Boolean, default: !1 },
2010
+ size: { default: "medium" },
2011
+ maxHeight: null,
2012
+ height: null,
2013
+ rowClassName: null,
2014
+ expandRowKeys: null,
2015
+ defaultExpandAll: { type: Boolean, default: !1 },
2016
+ onRowClick: null,
2017
+ onRowDblclick: null,
2018
+ onSortChange: null,
2019
+ onExpandChange: null,
2020
+ tableProps: null,
2021
+ formProps: null
1738
2022
  },
1739
- emits: ["update:modelValue"],
1740
- setup(s, { expose: e, emit: n }) {
1741
- const t = s, o = D(null), r = () => t.competitorsKey ?? "competitors", a = () => t.competitorNameKey ?? "name", f = w(() => t.fixedRows.length > 0 ? !0 : t.showFirstColumn !== !1), m = w(() => "left"), _ = w(() => {
1742
- const i = t.actionColumn;
1743
- return {
1744
- width: (i == null ? void 0 : i.width) ?? t.actionWidth,
1745
- minWidth: i == null ? void 0 : i.minWidth,
1746
- align: (i == null ? void 0 : i.align) ?? "center",
1747
- fixed: (i == null ? void 0 : i.fixed) === void 0 ? "right" : i.fixed
1748
- };
1749
- });
1750
- function z(i) {
1751
- return i._type === "fixed" ? `f-${i.rowKey}` : `c-${i._index}`;
1752
- }
1753
- const S = w(() => {
1754
- const i = [];
1755
- t.fixedRows.forEach((K) => {
1756
- i.push({
1757
- _type: "fixed",
1758
- rowKey: K.rowKey,
1759
- rowLabel: K.label
1760
- });
1761
- });
1762
- const h = t.modelValue;
1763
- return ((h && typeof h == "object" ? h[r()] : void 0) ?? []).forEach((K, L) => {
1764
- i.push({ _type: "competitor", _index: L });
1765
- }), i;
1766
- }), x = w(() => {
1767
- const i = t.modelValue;
1768
- return ((i && typeof i == "object" ? i[r()] : void 0) ?? []).length > t.minCompetitors;
1769
- });
1770
- function p() {
1771
- const i = t.modelValue;
1772
- return !i || typeof i != "object" ? {} : JSON.parse(JSON.stringify(i));
1773
- }
1774
- function v(i) {
1775
- const h = t.modelValue;
1776
- if (!h || typeof h != "object") {
1777
- const L = {};
1778
- for (const Q of t.columns)
1779
- L[Q.key] = "";
1780
- return L;
2023
+ emits: ["update:modelValue", "add-row", "remove-row", "register"],
2024
+ setup(r, { expose: e, emit: n }) {
2025
+ const t = r, l = te({
2026
+ name: "RenderCell",
2027
+ props: {
2028
+ renderFn: { type: Function, required: !0 },
2029
+ renderParams: { type: Object, required: !0 }
2030
+ },
2031
+ setup(I) {
2032
+ return () => {
2033
+ const V = I.renderFn(I.renderParams);
2034
+ return Array.isArray(V), V;
2035
+ };
1781
2036
  }
1782
- const M = h[i];
1783
- if (M && typeof M == "object" && !Array.isArray(M))
1784
- return M;
1785
- const K = {};
1786
- for (const L of t.columns)
1787
- K[L.key] = "";
1788
- return K;
1789
- }
1790
- function B(i) {
1791
- n("update:modelValue", i);
1792
- }
1793
- function V(i, h) {
1794
- return v(i)[h] ?? "";
1795
- }
1796
- function F(i, h, M) {
1797
- const K = p(), L = { ...K[i] || {} };
1798
- L[h] = M, K[i] = L, B(K);
1799
- }
1800
- function A() {
1801
- const i = t.modelValue;
1802
- if (!i || typeof i != "object")
1803
- return [];
1804
- const h = i[r()];
1805
- return Array.isArray(h) ? h : [];
1806
- }
1807
- function E(i) {
1808
- const h = A()[i], M = a();
1809
- return h ? String(h[M] ?? "") : "";
1810
- }
1811
- function N(i, h) {
1812
- const M = p(), K = [...A()], L = { ...K[i] || {} };
1813
- L[a()] = h, K[i] = L, M[r()] = K, B(M);
1814
- }
1815
- function k(i, h) {
1816
- const M = A()[i];
1817
- return M ? M[h] ?? "" : "";
1818
- }
1819
- function u(i, h, M) {
1820
- const K = p(), L = [...A()], Q = { ...L[i] || {} };
1821
- Q[h] = M, L[i] = Q, K[r()] = L, B(K);
1822
- }
1823
- function W(i, h) {
1824
- return i._type === "fixed" ? V(i.rowKey, h.key) : k(i._index, h.key);
1825
- }
1826
- function y(i, h, M) {
1827
- i._type === "fixed" ? F(i.rowKey, h.key, M) : u(i._index, h.key, M);
1828
- }
1829
- function j(i, h) {
1830
- return (M) => y(i.row, h, M);
1831
- }
1832
- function q() {
1833
- const i = { [a()]: "" };
1834
- for (const h of t.columns)
1835
- i[h.key] = "";
1836
- return i;
1837
- }
1838
- function X() {
1839
- const i = p(), h = [...A()];
1840
- h.push(q()), i[r()] = h, B(i);
1841
- }
1842
- function G(i) {
1843
- if (!x.value)
1844
- return;
1845
- const h = p(), M = [...A()];
1846
- M.splice(i, 1), h[r()] = M, B(h);
1847
- }
1848
- function ee(i, h) {
1849
- return `${i}.${h}`;
1850
- }
1851
- function Z(i) {
1852
- return `${r()}.${i}.${a()}`;
2037
+ });
2038
+ function a(I, V, j, C) {
2039
+ const i = C !== void 0 ? T(V, j, C) : T(V, j), h = I.render({ row: V, value: i, column: I });
2040
+ return { isText: d(h), value: h };
1853
2041
  }
1854
- function Y(i, h) {
1855
- return `${r()}.${i}.${h}`;
2042
+ const s = /* @__PURE__ */ new WeakMap();
2043
+ function u(I, V, j, C) {
2044
+ s.has(V) || s.set(V, /* @__PURE__ */ new Map());
2045
+ const i = s.get(V), h = j.key + (C ? "." + C : "");
2046
+ return i.has(h) || i.set(h, a(I, V, j, C)), i.get(h);
1856
2047
  }
1857
- function te(i) {
1858
- return i.component === "formatted-number" ? Me : "el-input";
2048
+ function d(I) {
2049
+ return I === null || typeof I in { string: 1, number: 1, boolean: 1, bigint: 1, symbol: 1 };
1859
2050
  }
1860
- function U(i) {
1861
- const h = i.componentProps || {};
1862
- return i.component === "formatted-number" ? {
1863
- integerDigits: 5,
1864
- decimalPlaces: 6,
1865
- rounding: "round",
1866
- inputLimit: !0,
1867
- ...h
1868
- } : { ...h };
2051
+ const {
2052
+ formModelRef: v,
2053
+ currentModelValue: B,
2054
+ mergedRules: b,
2055
+ tableRows: y,
2056
+ rowKeyFn: p,
2057
+ spanMethodAdapter: _,
2058
+ formRef: A,
2059
+ slotUpdateHandler: O,
2060
+ getCellProp: P,
2061
+ getCellValue: T,
2062
+ setCellValue: E,
2063
+ handleAddRow: N,
2064
+ handleRemoveRow: S,
2065
+ validate: f,
2066
+ clearValidate: W
2067
+ } = en({
2068
+ props: t,
2069
+ emit: n,
2070
+ emitAddRow: () => n("add-row"),
2071
+ emitRemoveRow: (I) => n("remove-row", I)
2072
+ });
2073
+ function g(I, V, j) {
2074
+ var C;
2075
+ (C = t.onRowClick) == null || C.call(t, I, j);
1869
2076
  }
1870
- function le(i) {
1871
- const h = i.row;
1872
- if (h._type === "fixed")
1873
- return {
1874
- row: h,
1875
- rowType: "fixed",
1876
- rowKey: h.rowKey,
1877
- rowLabel: h.rowLabel
1878
- };
1879
- const M = h._index;
1880
- return {
1881
- row: h,
1882
- rowType: "competitor",
1883
- rowIndex: M,
1884
- value: E(M),
1885
- updateValue: (K) => N(M, K)
1886
- };
2077
+ function K(I, V, j) {
2078
+ var C;
2079
+ (C = t.onRowDblclick) == null || C.call(t, I, j);
1887
2080
  }
1888
- const g = w(() => {
1889
- const i = {}, h = (K) => [{ required: !0, message: `请输入${K}`, trigger: "blur" }];
1890
- for (const K of t.fixedRows)
1891
- for (const L of t.columns)
1892
- L.rules ? i[`${K.rowKey}.${L.key}`] = L.rules : L.required && (i[`${K.rowKey}.${L.key}`] = h(L.title));
1893
- return A().forEach((K, L) => {
1894
- i[`${r()}.${L}.${a()}`] = h("友商名称");
1895
- for (const Q of t.columns)
1896
- Q.rules ? i[`${r()}.${L}.${Q.key}`] = Q.rules : Q.required && (i[`${r()}.${L}.${Q.key}`] = h(Q.title));
1897
- }), { ...i, ...t.rules || {} };
1898
- });
1899
- function I() {
1900
- return new Promise((i) => {
1901
- const h = o.value;
1902
- if (!h || typeof h.validate != "function") {
1903
- i(!0);
1904
- return;
1905
- }
1906
- h.validate((M) => {
1907
- i(M);
1908
- });
1909
- });
2081
+ function q(I) {
2082
+ var V;
2083
+ (V = t.onSortChange) == null || V.call(t, I);
1910
2084
  }
1911
- function $(i) {
1912
- var h, M;
1913
- (M = (h = o.value) == null ? void 0 : h.clearValidate) == null || M.call(h, i);
2085
+ function Q(I, V) {
2086
+ var j;
2087
+ (j = t.onExpandChange) == null || j.call(t, I, V);
1914
2088
  }
1915
- return e({
1916
- validate: I,
1917
- clearValidate: $,
1918
- addCompetitor: X,
1919
- removeCompetitor: G
1920
- }), { __sfc: !0, props: t, emit: n, formRef: o, ck: r, nk: a, showFirstColumnComputed: f, firstColumnFixed: m, actionColumnBind: _, rowKeyFn: z, tableRows: S, canDeleteCompetitor: x, cloneModel: p, ensureFixedBlock: v, emitNext: B, getFixedMetric: V, setFixedMetric: F, competitorList: A, getCompetitorName: E, setCompetitorName: N, getCompetitorMetric: k, setCompetitorMetric: u, getCellValue: W, setCellValue: y, slotUpdateHandler: j, emptyCompetitorRow: q, addCompetitor: X, removeCompetitor: G, fixedMetricProp: ee, competitorNameProp: Z, competitorMetricProp: Y, cellComponent: te, cellBind: U, firstColumnScope: le, mergedRules: g, validate: I, clearValidate: $ };
2089
+ const J = w(() => t.columns.map((I, V) => ({
2090
+ ...I,
2091
+ _key: I.key || `__col-${V}`
2092
+ }))), Y = D(null), Z = {
2093
+ validate: f,
2094
+ clearValidate: W,
2095
+ addRow: N,
2096
+ removeRow: S,
2097
+ getRows: () => [...B.value],
2098
+ getRowCount: () => B.value.length,
2099
+ getTable: () => Y.value,
2100
+ getModelValue: () => [...B.value],
2101
+ setModelValue: (I) => n("update:modelValue", I),
2102
+ getFormRef: () => A.value
2103
+ };
2104
+ return e(Z), n("register", Z), { __sfc: !0, RenderCell: l, execRenderOnce: a, _renderCache: s, getRender: u, isPrimitive: d, props: t, emit: n, formModelRef: v, currentModelValue: B, mergedRules: b, tableRows: y, rowKeyFn: p, spanMethodAdapter: _, formRef: A, slotUpdateHandler: O, getCellProp: P, getCellValue: T, setCellValue: E, handleAddRow: N, handleRemoveRow: S, validate: f, clearValidate: W, handleTableRowClick: g, handleTableRowDblclick: K, handleTableSortChange: q, handleTableExpandChange: Q, flatColumns: J, tableRef: Y, action: Z, CellEditor: an };
1921
2105
  }
1922
2106
  });
1923
- var nn = function() {
2107
+ var cn = function() {
1924
2108
  var e = this, n = e._self._c, t = e._self._setupProxy;
1925
- return n("div", { staticClass: "ecp-pro-table-form" }, [n("el-form", { ref: "formRef", staticClass: "ecp-pro-table-form__form", attrs: { model: e.modelValue, rules: t.mergedRules, "label-width": e.labelWidth } }, [n("el-table", { staticClass: "ecp-pro-table-form__table", attrs: { data: t.tableRows, border: e.bordered, "row-key": t.rowKeyFn, "header-cell-class-name": "ecp-pro-table-form__header-cell" } }, [t.showFirstColumnComputed ? n("el-table-column", { attrs: { "min-width": e.firstColMinWidth, fixed: t.firstColumnFixed }, scopedSlots: e._u([{ key: "header", fn: function() {
1926
- return [e._t("firstColumnHeader", function() {
1927
- return [n("span", { staticClass: "ecp-pro-table-form__th-text" }, [n("span", { staticClass: "ecp-pro-table-form__req" }, [e._v("*")]), e._v(e._s(e.firstColumnTitle) + " ")])];
1928
- })];
1929
- }, proxy: !0 }, { key: "default", fn: function(o) {
1930
- return [e._t("firstColumn", function() {
1931
- return [o.row._type === "fixed" ? [n("span", { staticClass: "ecp-pro-table-form__fixed-label" }, [e._v(e._s(o.row.rowLabel))])] : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.competitorNameProp(o.row._index) } }, [n("el-input", { attrs: { value: t.getCompetitorName(o.row._index), placeholder: e.competitorNamePlaceholder }, on: { input: function(r) {
1932
- return t.setCompetitorName(o.row._index, r);
2109
+ return n("div", e._b({ staticClass: "ecp-pro-table-form" }, "div", e.$attrs, !1), [n("el-form", e._b({ ref: "formRef", staticClass: "ecp-pro-table-form__form", attrs: { model: t.formModelRef, rules: t.mergedRules, "validate-on-rule-change": !1, "label-width": e.labelWidth, size: e.formSize, "label-position": e.labelPosition, disabled: e.disabled } }, "el-form", e.formProps, !1), [n("el-table", e._b({ ref: "tableRef", staticClass: "ecp-pro-table-form__table", attrs: { data: t.tableRows, border: e.bordered, stripe: e.stripe, size: e.size, "max-height": e.maxHeight, height: e.height, "row-key": t.rowKeyFn, "row-class-name": e.rowClassName, "default-expand-all": e.defaultExpandAll, "span-method": t.spanMethodAdapter, "header-cell-class-name": "ecp-pro-table-form__header-cell" }, on: { "row-click": t.handleTableRowClick, "row-dblclick": t.handleTableRowDblclick, "sort-change": t.handleTableSortChange, "expand-change": t.handleTableExpandChange } }, "el-table", e.tableProps, !1), [e._l(t.flatColumns, function(l) {
2110
+ return [l.children && l.children.length > 0 ? n("el-table-column", { key: "col-" + l._key, attrs: { label: l.title, "min-width": l.minWidth || l.width || 120, width: l.width, align: l.align || "center", "header-align": l.headerAlign, fixed: l.fixed, "cell-style": l.cellStyle, "header-cell-style": l.headerCellStyle, "cell-class-name": l.cellClassName, "header-cell-class-name": l.headerCellClassName, sortable: l.sortable, resizable: l.resizable !== !1 }, scopedSlots: e._u([{ key: "header", fn: function() {
2111
+ return [e._t(`header-${l.key}`, function() {
2112
+ return [n("span", { staticClass: "ecp-pro-table-form__th-text" }, [l.required ? n("span", { staticClass: "ecp-pro-table-form__req" }, [e._v("*")]) : e._e(), e._v(e._s(l.title) + " ")])];
2113
+ }, { column: l })];
2114
+ }, proxy: !0 }], null, !0) }, [e._l(l.children, function(a) {
2115
+ return [a.hideInTable ? e._e() : n("el-table-column", { key: "col-" + l.key + "-" + a.key, attrs: { label: a.title, "min-width": a.minWidth || a.width || 120, width: a.width, align: a.align || "center", "header-align": a.headerAlign, fixed: a.fixed, "cell-style": a.cellStyle, "header-cell-style": a.headerCellStyle, "cell-class-name": a.cellClassName, "header-cell-class-name": a.headerCellClassName, sortable: a.sortable, resizable: a.resizable !== !1 }, scopedSlots: e._u([{ key: "header", fn: function() {
2116
+ return [e._t(`header-${a.key}`, function() {
2117
+ return [n("span", { staticClass: "ecp-pro-table-form__th-text" }, [a.required ? n("span", { staticClass: "ecp-pro-table-form__req" }, [e._v("*")]) : e._e(), e._v(e._s(a.title) + " ")])];
2118
+ }, { column: a })];
2119
+ }, proxy: !0 }, { key: "default", fn: function(s) {
2120
+ return [a.render ? [n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(s.row, l, a.key), rules: t.mergedRules[t.getCellProp(s.row, l, a.key)] } }, [t.getRender(a, s.row, l, a.key).isText ? [n("span", [e._v(e._s(t.getRender(a, s.row, l, a.key).value))])] : [n(t.RenderCell, { attrs: { "render-fn": a.render, "render-params": { row: s.row, col: l, childKey: a.key } } })]], 2)] : a.component === "slot" && a.slotName ? [n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(s.row, l, a.key), rules: t.mergedRules[t.getCellProp(s.row, l, a.key)] } }, [e._t(`cell-${a.slotName}`, null, { column: a, row: s.row, index: s.$index, value: t.getCellValue(s.row, l, a.key), updateValue: t.slotUpdateHandler(s, l, a.key) })], 2)] : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(s.row, l, a.key), rules: t.mergedRules[t.getCellProp(s.row, l, a.key)] } }, [n(t.CellEditor, { attrs: { col: a, value: t.getCellValue(s.row, l, a.key), row: s.row, size: e.size, placeholder: l.placeholder || e.metricPlaceholder }, on: { update: function(u) {
2121
+ return t.setCellValue(s.row, l, a.key, u);
2122
+ } } })], 1)];
2123
+ } }], null, !0) })];
2124
+ })], 2) : l.hideInTable ? e._e() : n("el-table-column", { key: "leaf-" + l._key, attrs: { label: l.title, "min-width": l.minWidth || l.width || 120, width: l.width, align: l.align || "center", "header-align": l.headerAlign, fixed: l.fixed, "cell-style": l.cellStyle, "header-cell-style": l.headerCellStyle, "cell-class-name": l.cellClassName, "header-cell-class-name": l.headerCellClassName, sortable: l.sortable, resizable: l.resizable !== !1 }, scopedSlots: e._u([{ key: "header", fn: function() {
2125
+ return [e._t(`header-${l.key}`, function() {
2126
+ return [n("span", { staticClass: "ecp-pro-table-form__th-text" }, [l.required ? n("span", { staticClass: "ecp-pro-table-form__req" }, [e._v("*")]) : e._e(), e._v(e._s(l.title) + " ")])];
2127
+ }, { column: l })];
2128
+ }, proxy: !0 }, { key: "default", fn: function(a) {
2129
+ return [l.render ? [n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(a.row, l), rules: t.mergedRules[t.getCellProp(a.row, l)] } }, [t.getRender(l, a.row, l).isText ? [n("span", [e._v(e._s(t.getRender(l, a.row, l).value))])] : [n(t.RenderCell, { attrs: { "render-fn": l.render, "render-params": { row: a.row, col: l } } })]], 2)] : l.component === "slot" && l.slotName ? [n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(a.row, l), rules: t.mergedRules[t.getCellProp(a.row, l)] } }, [e._t(`cell-${l.slotName}`, null, { column: l, row: a.row, index: a.$index, value: t.getCellValue(a.row, l), updateValue: t.slotUpdateHandler(a, l) })], 2)] : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.getCellProp(a.row, l), rules: t.mergedRules[t.getCellProp(a.row, l)] } }, [n(t.CellEditor, { attrs: { col: l, value: t.getCellValue(a.row, l), row: a.row, size: e.size, placeholder: l.placeholder || e.metricPlaceholder }, on: { update: function(s) {
2130
+ return t.setCellValue(a.row, l, void 0, s);
1933
2131
  } } })], 1)];
1934
- }, null, t.firstColumnScope(o))];
1935
- } }], null, !0) }) : e._e(), e._l(e.columns, function(o) {
1936
- return n("el-table-column", { key: o.key, attrs: { "min-width": o.minWidth || o.width || 120, width: o.width }, scopedSlots: e._u([{ key: "header", fn: function() {
1937
- return [e._t("header-" + o.key, function() {
1938
- return [n("span", { staticClass: "ecp-pro-table-form__th-text" }, [o.required ? n("span", { staticClass: "ecp-pro-table-form__req" }, [e._v("*")]) : e._e(), e._v(e._s(o.title) + " ")])];
1939
- }, { column: o })];
1940
- }, proxy: !0 }, { key: "default", fn: function(r) {
1941
- return [o.component === "slot" && o.slotName ? [r.row._type === "fixed" ? n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.fixedMetricProp(r.row.rowKey, o.key) } }, [e._t("cell-" + o.slotName, null, { column: o, row: r.row, value: t.getCellValue(r.row, o), updateValue: t.slotUpdateHandler(r, o) })], 2) : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.competitorMetricProp(r.row._index, o.key) } }, [e._t("cell-" + o.slotName, null, { column: o, row: r.row, value: t.getCellValue(r.row, o), updateValue: t.slotUpdateHandler(r, o) })], 2)] : [r.row._type === "fixed" ? n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.fixedMetricProp(r.row.rowKey, o.key) } }, [n(t.cellComponent(o), e._b({ tag: "component", attrs: { value: t.getFixedMetric(r.row.rowKey, o.key), placeholder: o.placeholder || e.metricPlaceholder }, on: { input: function(a) {
1942
- return t.setFixedMetric(r.row.rowKey, o.key, a);
1943
- } } }, "component", t.cellBind(o), !1))], 1) : n("el-form-item", { staticClass: "ecp-pro-table-form__cell-item", attrs: { prop: t.competitorMetricProp(r.row._index, o.key) } }, [n(t.cellComponent(o), e._b({ tag: "component", attrs: { value: t.getCompetitorMetric(r.row._index, o.key), placeholder: o.placeholder || e.metricPlaceholder }, on: { input: function(a) {
1944
- return t.setCompetitorMetric(r.row._index, o.key, a);
1945
- } } }, "component", t.cellBind(o), !1))], 1)]];
1946
- } }], null, !0) });
1947
- }), e.showActionColumn ? n("el-table-column", e._b({ scopedSlots: e._u([{ key: "header", fn: function() {
1948
- return [e._t("actionHeader", function() {
1949
- var o;
1950
- return [(o = e.actionColumn) != null && o.title ? n("span", { staticClass: "ecp-pro-table-form__action-title" }, [e._v(e._s(e.actionColumn.title))]) : e._e(), n("el-button", { staticClass: "ecp-pro-table-form__add-btn", attrs: { type: "text" }, on: { click: t.addCompetitor } }, [e._v(" " + e._s(e.addCompetitorText) + " ")])];
1951
- })];
1952
- }, proxy: !0 }, { key: "default", fn: function(o) {
1953
- return [e._t("action", function() {
1954
- return [o.row._type === "competitor" ? n("el-button", { staticClass: "ecp-pro-table-form__del-btn", attrs: { type: "text", disabled: !t.canDeleteCompetitor }, on: { click: function(r) {
1955
- return t.removeCompetitor(o.row._index);
1956
- } } }, [e._v(" 删除 ")]) : n("el-button", { staticClass: "ecp-pro-table-form__del-btn", attrs: { type: "text", disabled: "" } }, [e._v(" 删除 ")])];
1957
- }, { row: o.row, canDelete: t.canDeleteCompetitor, addCompetitor: t.addCompetitor, removeCompetitor: t.removeCompetitor })];
1958
- } }], null, !0) }, "el-table-column", t.actionColumnBind, !1)) : e._e()], 2)], 1)], 1);
1959
- }, on = [], ln = /* @__PURE__ */ se(
1960
- tn,
1961
- nn,
1962
- on,
2132
+ } }], null, !0) })];
2133
+ }), e._t("action", null, { addRow: t.handleAddRow, removeRow: t.handleRemoveRow })], 2)], 1)], 1);
2134
+ }, un = [], dn = /* @__PURE__ */ re(
2135
+ rn,
2136
+ cn,
2137
+ un,
1963
2138
  !1,
1964
2139
  null,
1965
- "44aa7592",
2140
+ "3dfcfb4e",
1966
2141
  null,
1967
2142
  null
1968
2143
  );
1969
- const Ye = ln.exports, an = [
2144
+ const tt = dn.exports, fn = [
1970
2145
  { name: "ProTable", component: He },
1971
2146
  { name: "TableAction", component: Ge },
1972
- { name: "ProForm", component: Xe },
1973
- { name: "ProFormItem", component: Ue },
1974
- { name: "FormActions", component: Je },
1975
- { name: "FormattedNumberInput", component: Me },
1976
- { name: "ProDescriptions", component: Ze },
1977
- { name: "CollapseContainer", component: Qe },
1978
- { name: "ProTableForm", component: Ye }
2147
+ { name: "ProForm", component: Qe },
2148
+ { name: "ProFormItem", component: Ze },
2149
+ { name: "FormActions", component: Xe },
2150
+ { name: "FormattedNumberInput", component: Ae },
2151
+ { name: "ProDescriptions", component: Ye },
2152
+ { name: "CollapseContainer", component: et },
2153
+ { name: "ProTableForm", component: tt }
1979
2154
  ];
1980
- function sn(s) {
1981
- an.forEach(({ name: e, component: n }) => {
1982
- s.component(e, n);
2155
+ function pn(r) {
2156
+ fn.forEach(({ name: e, component: n }) => {
2157
+ r.component(e, n);
1983
2158
  });
1984
2159
  }
1985
- const pn = {
1986
- install: sn,
2160
+ const bn = {
2161
+ install: pn,
1987
2162
  ProTable: He,
1988
- ProForm: Xe,
1989
- ProDescriptions: Ze,
1990
- CollapseContainer: Qe,
2163
+ ProForm: Qe,
2164
+ ProDescriptions: Ye,
2165
+ CollapseContainer: et,
1991
2166
  TableAction: Ge,
1992
- FormattedNumberInput: Me,
1993
- ProTableForm: Ye
2167
+ FormattedNumberInput: Ae,
2168
+ ProTableForm: tt
1994
2169
  };
1995
2170
  export {
1996
- Qe as CollapseContainer,
1997
- Je as FormActions,
1998
- Me as FormattedNumberInput,
1999
- Ze as ProDescriptions,
2000
- Xe as ProForm,
2001
- Ue as ProFormItem,
2171
+ et as CollapseContainer,
2172
+ Xe as FormActions,
2173
+ Ae as FormattedNumberInput,
2174
+ Ye as ProDescriptions,
2175
+ Qe as ProForm,
2176
+ Ze as ProFormItem,
2002
2177
  He as ProTable,
2003
- Ye as ProTableForm,
2178
+ tt as ProTableForm,
2004
2179
  Ge as TableAction,
2005
- yt as applyNumericInputDigitLimits,
2180
+ wt as applyNumericInputDigitLimits,
2006
2181
  We as clampByIntegerDigits,
2007
- pn as default,
2008
- Ke as formatWithThousands,
2009
- sn as install,
2182
+ bn as default,
2183
+ Le as formatWithThousands,
2184
+ pn as install,
2010
2185
  ke as normalizeNumericValue,
2011
- Pt as numberToEditString,
2186
+ St as numberToEditString,
2012
2187
  xt as roundToDecimals,
2013
- Ve as sanitizeNumericInput,
2014
- Ae as stripNumberGrouping,
2015
- Ct as toFixedDecimalString,
2016
- Re as useComponentSetting,
2017
- fn as useDescription,
2018
- dn as useForm,
2019
- un as useProTable
2188
+ Ne as sanitizeNumericInput,
2189
+ Te as stripNumberGrouping,
2190
+ Pt as toFixedDecimalString,
2191
+ Be as useComponentSetting,
2192
+ gn as useDescription,
2193
+ _n as useForm,
2194
+ hn as useProTable,
2195
+ en as useProTableForm
2020
2196
  };
2021
2197
  //# sourceMappingURL=element-component-pro.es.js.map