@es-plus/vue2 1.0.2 → 1.0.4

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.
Files changed (29) hide show
  1. package/dist/components/es-crud-page/es-crud-page.vue.d.ts +66 -24
  2. package/dist/components/es-crud-page/es-crud-page.vue.d.ts.map +1 -1
  3. package/dist/components/es-dialog/component.vue.d.ts +143 -44
  4. package/dist/components/es-dialog/component.vue.d.ts.map +1 -1
  5. package/dist/components/es-dialog/render-jsx.vue.d.ts +19 -5
  6. package/dist/components/es-dialog/render-jsx.vue.d.ts.map +1 -1
  7. package/dist/components/es-form/es-form.vue.d.ts +156 -60
  8. package/dist/components/es-form/es-form.vue.d.ts.map +1 -1
  9. package/dist/components/es-table/column-item.vue.d.ts +11 -5
  10. package/dist/components/es-table/column-item.vue.d.ts.map +1 -1
  11. package/dist/components/es-table/component.vue.d.ts +214 -93
  12. package/dist/components/es-table/component.vue.d.ts.map +1 -1
  13. package/dist/components/es-table/table-btns.vue.d.ts +44 -20
  14. package/dist/components/es-table/table-btns.vue.d.ts.map +1 -1
  15. package/dist/composables/use-form-layout.d.ts +9 -9
  16. package/dist/composables/use-table-resize.d.ts +1 -1
  17. package/dist/composables/use-table-resize.d.ts.map +1 -1
  18. package/dist/composables/use-table-selection.d.ts +9 -3
  19. package/dist/composables/use-table-selection.d.ts.map +1 -1
  20. package/dist/es-plus-vue2.js +877 -853
  21. package/dist/es-plus-vue2.js.map +1 -1
  22. package/dist/es-plus-vue2.umd.cjs +1 -1
  23. package/dist/es-plus-vue2.umd.cjs.map +1 -1
  24. package/dist/index.d.ts +3 -3
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/style.css +1 -1
  27. package/dist/vue-compat.d.ts +28 -10
  28. package/dist/vue-compat.d.ts.map +1 -1
  29. package/package.json +82 -87
@@ -1,8 +1,9 @@
1
- import { getNestedValue as G, setNestedValue as J, resolveFormLayProps as Ce, getRowColsAlgorithm as lt, configFormField as it, formatConfigOut as ct, getEveryFormQueryField as ut, queryTableListMethod as dt, getGlobalConfig as pe, getButtonPosition as Ze, createSelectionState as ft, restoreSelectionForPage as pt, clearAllSelection as mt, applySelectionChange as gt, isObject as fe, getCallback as yt, findValueByKey as ht, configureEsPlus as vt } from "@es-plus/core";
2
- import { configureEsPlus as kn } from "@es-plus/core";
3
- import { ref as z, computed as B, watch as ce, defineComponent as se, getCurrentInstance as Ee, inject as ae, nextTick as Fe, h as le, onMounted as De, onBeforeUnmount as bt, provide as tt, reactive as $e, onUpdated as _t, Vue2 as Ct } from "vue-demi";
4
- import { MessageBox as Ge } from "element-ui";
5
- function _e(n) {
1
+ import { getNestedValue as X, setNestedValue as W, resolveFormLayProps as Le, getRowColsAlgorithm as pt, configFormField as mt, formatConfigOut as gt, getEveryFormQueryField as yt, queryTableListMethod as ht, getGlobalConfig as pe, getButtonPosition as Ye, createSelectionState as vt, restoreSelectionForPage as bt, clearAllSelection as _t, applySelectionChange as Ct, isObject as fe, findValueByKey as St, configureEsPlus as Bt } from "@es-plus/core";
2
+ import { configureEsPlus as Pn } from "@es-plus/core";
3
+ import { ref as z, computed as B, watch as ue, defineComponent as ae, getCurrentInstance as qe, inject as ie, nextTick as Fe, h as ce, onMounted as Ne, onBeforeUnmount as kt, provide as ot, reactive as Te, onUpdated as Ft } from "@vue/composition-api";
4
+ import xt from "vue";
5
+ import { MessageBox as Xe } from "element-ui";
6
+ function Se(n) {
6
7
  if (Array.isArray(n)) return n;
7
8
  if (typeof n == "function") {
8
9
  const e = n();
@@ -10,30 +11,30 @@ function _e(n) {
10
11
  }
11
12
  return [];
12
13
  }
13
- function Y(n) {
14
+ function ee(n) {
14
15
  const e = { ...n.attrs || {} };
15
16
  return typeof e.disabled == "function" && (e.disabled = e.disabled()), e;
16
17
  }
17
18
  function te(n, e) {
18
19
  const o = n.on || {}, t = {};
19
- for (const [a, l] of Object.entries(o))
20
- typeof l == "function" && (t[a] = l);
20
+ for (const [i, l] of Object.entries(o))
21
+ typeof l == "function" && (t[i] = l);
21
22
  return typeof t.input != "function" && (t.input = e), t;
22
23
  }
23
- function St() {
24
+ function It() {
24
25
  return { formInputComponents: (e) => {
25
- var k;
26
+ var F;
26
27
  const o = /* @__PURE__ */ new Map([
27
28
  // ─────────────────────────────────────────────────────────────────
28
29
  // Input - 文本输入
29
30
  // ─────────────────────────────────────────────────────────────────
30
31
  [
31
32
  "Input",
32
- (d, g, { row: r }) => {
33
- const f = Y(r), p = G(g, r.prop), b = te(r, (h) => J(g, r.prop, h));
33
+ (d, g, { row: a }) => {
34
+ const f = ee(a), p = X(g, a.prop), b = te(a, (y) => W(g, a.prop, y));
34
35
  return d("el-input", {
35
36
  attrs: f,
36
- props: { value: p, ...r.props },
37
+ props: { value: p, ...a.props },
37
38
  on: b
38
39
  });
39
40
  }
@@ -43,11 +44,11 @@ function St() {
43
44
  // ─────────────────────────────────────────────────────────────────
44
45
  [
45
46
  "InputNumber",
46
- (d, g, { row: r }) => {
47
- const f = Y(r), p = G(g, r.prop), b = te(r, (h) => J(g, r.prop, h));
47
+ (d, g, { row: a }) => {
48
+ const f = ee(a), p = X(g, a.prop), b = te(a, (y) => W(g, a.prop, y));
48
49
  return d("el-input-number", {
49
50
  attrs: f,
50
- props: { value: p, ...r.props },
51
+ props: { value: p, ...a.props },
51
52
  on: b
52
53
  });
53
54
  }
@@ -57,14 +58,14 @@ function St() {
57
58
  // ─────────────────────────────────────────────────────────────────
58
59
  [
59
60
  "Select",
60
- (d, g, { row: r }) => {
61
- const f = Y(r), p = G(g, r.prop), b = _e(r.dataOptions), h = te(r, (_) => J(g, r.prop, _));
61
+ (d, g, { row: a }) => {
62
+ const f = ee(a), p = X(g, a.prop), b = Se(a.dataOptions), y = te(a, (_) => W(g, a.prop, _));
62
63
  return d(
63
64
  "el-select",
64
65
  {
65
66
  attrs: f,
66
- props: { value: p, ...r.props },
67
- on: h
67
+ props: { value: p, ...a.props },
68
+ on: y
68
69
  },
69
70
  b.map(
70
71
  (_, T) => d("el-option", {
@@ -81,11 +82,11 @@ function St() {
81
82
  // ─────────────────────────────────────────────────────────────────
82
83
  [
83
84
  "datePicker",
84
- (d, g, { row: r }) => {
85
- const f = Y(r), p = G(g, r.prop), b = te(r, (h) => J(g, r.prop, h));
85
+ (d, g, { row: a }) => {
86
+ const f = ee(a), p = X(g, a.prop), b = te(a, (y) => W(g, a.prop, y));
86
87
  return d("el-date-picker", {
87
88
  attrs: f,
88
- props: { value: p, ...r.props },
89
+ props: { value: p, ...a.props },
89
90
  on: b
90
91
  });
91
92
  }
@@ -95,11 +96,11 @@ function St() {
95
96
  // ─────────────────────────────────────────────────────────────────
96
97
  [
97
98
  "timePicker",
98
- (d, g, { row: r }) => {
99
- const f = Y(r), p = G(g, r.prop), b = te(r, (h) => J(g, r.prop, h));
99
+ (d, g, { row: a }) => {
100
+ const f = ee(a), p = X(g, a.prop), b = te(a, (y) => W(g, a.prop, y));
100
101
  return d("el-time-picker", {
101
102
  attrs: f,
102
- props: { value: p, ...r.props },
103
+ props: { value: p, ...a.props },
103
104
  on: b
104
105
  });
105
106
  }
@@ -109,11 +110,11 @@ function St() {
109
110
  // ─────────────────────────────────────────────────────────────────
110
111
  [
111
112
  "Slider",
112
- (d, g, { row: r }) => {
113
- const f = Y(r), p = G(g, r.prop), b = te(r, (h) => J(g, r.prop, h));
113
+ (d, g, { row: a }) => {
114
+ const f = ee(a), p = X(g, a.prop), b = te(a, (y) => W(g, a.prop, y));
114
115
  return d("el-slider", {
115
116
  attrs: f,
116
- props: { value: p, ...r.props },
117
+ props: { value: p, ...a.props },
117
118
  on: b
118
119
  });
119
120
  }
@@ -125,14 +126,14 @@ function St() {
125
126
  // ─────────────────────────────────────────────────────────────────
126
127
  [
127
128
  "ColorPicker",
128
- (d, g, { row: r }) => {
129
- const f = Y(r), p = G(g, r.prop), b = r.on || {}, h = {};
129
+ (d, g, { row: a }) => {
130
+ const f = ee(a), p = X(g, a.prop), b = a.on || {}, y = {};
130
131
  for (const [_, T] of Object.entries(b))
131
- typeof T == "function" && (h[_] = T);
132
- return typeof h.change != "function" && (h.change = (_) => J(g, r.prop, _)), d("el-color-picker", {
132
+ typeof T == "function" && (y[_] = T);
133
+ return typeof y.change != "function" && (y.change = (_) => W(g, a.prop, _)), d("el-color-picker", {
133
134
  attrs: f,
134
- props: { value: p, ...r.props },
135
- on: h
135
+ props: { value: p, ...a.props },
136
+ on: y
136
137
  });
137
138
  }
138
139
  ],
@@ -142,16 +143,16 @@ function St() {
142
143
  // ─────────────────────────────────────────────────────────────────
143
144
  [
144
145
  "Transfer",
145
- (d, g, { row: r }) => {
146
- const f = Y(r), p = G(g, r.prop), b = _e(r.dataOptions), h = te(r, (_) => J(g, r.prop, _));
146
+ (d, g, { row: a }) => {
147
+ const f = ee(a), p = X(g, a.prop), b = Se(a.dataOptions), y = te(a, (_) => W(g, a.prop, _));
147
148
  return d("el-transfer", {
148
149
  attrs: f,
149
150
  props: {
150
151
  value: p,
151
152
  data: b.map((_) => ({ key: _.value, label: _.label, disabled: _.disabled })),
152
- ...r.props
153
+ ...a.props
153
154
  },
154
- on: h
155
+ on: y
155
156
  });
156
157
  }
157
158
  ],
@@ -160,8 +161,8 @@ function St() {
160
161
  // ─────────────────────────────────────────────────────────────────
161
162
  [
162
163
  "Cascader",
163
- (d, g, { row: r }) => {
164
- const f = Y(r), p = G(g, r.prop), b = _e(r.dataOptions), h = te(r, (_) => J(g, r.prop, _));
164
+ (d, g, { row: a }) => {
165
+ const f = ee(a), p = X(g, a.prop), b = Se(a.dataOptions), y = te(a, (_) => W(g, a.prop, _));
165
166
  return d("el-cascader", {
166
167
  // key 强制 dataOptions 变化时重渲染,Element UI 内部 cache 否则不刷新
167
168
  key: JSON.stringify(b),
@@ -169,9 +170,9 @@ function St() {
169
170
  props: {
170
171
  value: p,
171
172
  options: b,
172
- ...r.props
173
+ ...a.props
173
174
  },
174
- on: h
175
+ on: y
175
176
  });
176
177
  }
177
178
  ],
@@ -180,14 +181,14 @@ function St() {
180
181
  // ─────────────────────────────────────────────────────────────────
181
182
  [
182
183
  "Radio",
183
- (d, g, { row: r }) => {
184
- const f = Y(r), p = G(g, r.prop), b = _e(r.dataOptions), h = te(r, (_) => J(g, r.prop, _));
184
+ (d, g, { row: a }) => {
185
+ const f = ee(a), p = X(g, a.prop), b = Se(a.dataOptions), y = te(a, (_) => W(g, a.prop, _));
185
186
  return d(
186
187
  "el-radio-group",
187
188
  {
188
189
  attrs: f,
189
- props: { value: p, ...r.props },
190
- on: h
190
+ props: { value: p, ...a.props },
191
+ on: y
191
192
  },
192
193
  b.map(
193
194
  (_, T) => d(
@@ -208,14 +209,14 @@ function St() {
208
209
  // ─────────────────────────────────────────────────────────────────
209
210
  [
210
211
  "Checkbox",
211
- (d, g, { row: r }) => {
212
- const f = Y(r), p = G(g, r.prop), b = _e(r.dataOptions), h = te(r, (_) => J(g, r.prop, _));
212
+ (d, g, { row: a }) => {
213
+ const f = ee(a), p = X(g, a.prop), b = Se(a.dataOptions), y = te(a, (_) => W(g, a.prop, _));
213
214
  return d(
214
215
  "el-checkbox-group",
215
216
  {
216
217
  attrs: f,
217
- props: { value: p, ...r.props },
218
- on: h
218
+ props: { value: p, ...a.props },
219
+ on: y
219
220
  },
220
221
  b.map(
221
222
  (_, T) => d(
@@ -235,11 +236,11 @@ function St() {
235
236
  // ─────────────────────────────────────────────────────────────────
236
237
  [
237
238
  "Switch",
238
- (d, g, { row: r }) => {
239
- const f = Y(r), p = G(g, r.prop), b = te(r, (h) => J(g, r.prop, h));
239
+ (d, g, { row: a }) => {
240
+ const f = ee(a), p = X(g, a.prop), b = te(a, (y) => W(g, a.prop, y));
240
241
  return d("el-switch", {
241
242
  attrs: f,
242
- props: { value: p, ...r.props },
243
+ props: { value: p, ...a.props },
243
244
  on: b
244
245
  });
245
246
  }
@@ -249,11 +250,11 @@ function St() {
249
250
  // ─────────────────────────────────────────────────────────────────
250
251
  [
251
252
  "Rate",
252
- (d, g, { row: r }) => {
253
- const f = Y(r), p = G(g, r.prop), b = te(r, (h) => J(g, r.prop, h));
253
+ (d, g, { row: a }) => {
254
+ const f = ee(a), p = X(g, a.prop), b = te(a, (y) => W(g, a.prop, y));
254
255
  return d("el-rate", {
255
256
  attrs: f,
256
- props: { value: p, ...r.props },
257
+ props: { value: p, ...a.props },
257
258
  on: b
258
259
  });
259
260
  }
@@ -263,24 +264,24 @@ function St() {
263
264
  // ─────────────────────────────────────────────────────────────────
264
265
  [
265
266
  "Upload",
266
- (d, g, { row: r }) => {
267
- const f = r.prop, p = Y(r), b = r.props || {}, h = r.on || {}, _ = G(g, f) || [], T = typeof r.httpRequest == "function", D = r.triggerRender, M = r.fileRender, W = D ? D(d) : d("el-button", { props: { size: "mini", type: "primary" } }, ["选择文件"]), U = (s, u, y) => {
268
- var R, x;
269
- const I = (s == null ? void 0 : s.link) || (s == null ? void 0 : s.url) || ((R = s == null ? void 0 : s.data) == null ? void 0 : R.link) || ((x = s == null ? void 0 : s.data) == null ? void 0 : x.url);
270
- I && (u.url = I), u.status = "success", u.response = s, typeof h.success == "function" && h.success(s, u, y), J(g, f, [...y]);
271
- }, V = (s, u, y) => {
272
- u.status = "fail", u.error = s, typeof h.error == "function" && h.error(s, u, y), J(g, f, [...y]);
273
- }, Q = T ? (s) => {
274
- const u = r.httpRequest;
267
+ (d, g, { row: a }) => {
268
+ const f = a.prop, p = ee(a), b = a.props || {}, y = a.on || {}, _ = X(g, f) || [], T = typeof a.httpRequest == "function", E = a.triggerRender, N = a.fileRender, M = E ? E(d) : d("el-button", { props: { size: "mini", type: "primary" } }, ["选择文件"]), V = (s, u, h) => {
269
+ var A, x;
270
+ const w = (s == null ? void 0 : s.link) || (s == null ? void 0 : s.url) || ((A = s == null ? void 0 : s.data) == null ? void 0 : A.link) || ((x = s == null ? void 0 : s.data) == null ? void 0 : x.url);
271
+ w && (u.url = w), u.status = "success", u.response = s, typeof y.success == "function" && y.success(s, u, h), W(g, f, [...h]);
272
+ }, U = (s, u, h) => {
273
+ u.status = "fail", u.error = s, typeof y.error == "function" && y.error(s, u, h), W(g, f, [...h]);
274
+ }, K = T ? (s) => {
275
+ const u = a.httpRequest;
275
276
  u({
276
277
  file: s.file,
277
278
  filename: s.file.name,
278
279
  onProgress: s.onProgress
279
- }).then((y) => {
280
- const I = (y == null ? void 0 : y.data) || y;
281
- s.onSuccess(I);
282
- }).catch((y) => s.onError(y));
283
- } : void 0, H = {
280
+ }).then((h) => {
281
+ const w = (h == null ? void 0 : h.data) || h;
282
+ s.onSuccess(w);
283
+ }).catch((h) => s.onError(h));
284
+ } : void 0, J = {
284
285
  preview: "onPreview",
285
286
  change: "onChange",
286
287
  success: "onSuccess",
@@ -288,14 +289,14 @@ function St() {
288
289
  progress: "onProgress",
289
290
  remove: "onRemove",
290
291
  exceed: "onExceed"
291
- }, K = {};
292
- for (const [s, u] of Object.entries(h)) {
292
+ }, O = {};
293
+ for (const [s, u] of Object.entries(y)) {
293
294
  if (typeof u != "function" || s === "success" || s === "error" || s === "remove") continue;
294
- const y = H[s];
295
- y && (K[y] = u);
295
+ const h = J[s];
296
+ h && (O[h] = u);
296
297
  }
297
- return K.onSuccess = U, K.onError = V, K.onRemove = (s, u) => {
298
- typeof h.remove == "function" && h.remove(s, u), J(g, f, [...u]);
298
+ return O.onSuccess = V, O.onError = U, O.onRemove = (s, u) => {
299
+ typeof y.remove == "function" && y.remove(s, u), W(g, f, [...u]);
299
300
  }, d(
300
301
  "el-upload",
301
302
  {
@@ -309,27 +310,27 @@ function St() {
309
310
  fileList: _,
310
311
  // 自定义上传时禁用 auto-upload,由 httpRequest 接管
311
312
  autoUpload: T ? !1 : b.autoUpload !== !1,
312
- httpRequest: Q,
313
+ httpRequest: K,
313
314
  // 把 row.on.* 转换为 onXxx prop(覆盖在 userProps 之上:
314
315
  // 若用户已直接在 props 里给了 onPreview,这里仍以 row.on 为优先权来源)
315
- ...K
316
+ ...O
316
317
  },
317
318
  // Vue 2 的 scopedSlots 用于自定义文件项渲染
318
- scopedSlots: M ? {
319
- file: ({ file: s }) => M(d, s, () => {
320
- const u = _.filter((y) => y !== s);
321
- J(g, f, u);
319
+ scopedSlots: N ? {
320
+ file: ({ file: s }) => N(d, s, () => {
321
+ const u = _.filter((h) => h !== s);
322
+ W(g, f, u);
322
323
  })
323
324
  } : void 0
324
325
  },
325
- [W]
326
+ [M]
326
327
  );
327
328
  }
328
329
  ]
329
- ]), t = (k = e.formtype) != null ? k : "";
330
+ ]), t = (F = e.formtype) != null ? F : "";
330
331
  if (!t) return () => null;
331
- const a = o.get(t);
332
- if (a) return a;
332
+ const i = o.get(t);
333
+ if (i) return i;
333
334
  const l = t[0] ? t[0] === t[0].toLowerCase() ? t[0].toUpperCase() + t.slice(1) : t[0].toLowerCase() + t.slice(1) : t, c = o.get(l);
334
335
  if (c) return c;
335
336
  const S = t.toLowerCase();
@@ -338,13 +339,13 @@ function St() {
338
339
  return () => null;
339
340
  } };
340
341
  }
341
- function Bt(n) {
342
+ function Ot(n) {
342
343
  const e = z(!1), o = B(() => {
343
- var h;
344
- const f = Ce(n.layoutFormProps);
344
+ var y;
345
+ const f = Le(n.layoutFormProps);
345
346
  if (!f || !Object.keys(f).length) return !1;
346
347
  const p = f.isBtnHiden, b = f.isBtnHidden;
347
- return !!((h = p != null ? p : b) != null && h);
348
+ return !!((y = p != null ? p : b) != null && y);
348
349
  }), t = B(() => {
349
350
  var p;
350
351
  return {
@@ -352,44 +353,44 @@ function Bt(n) {
352
353
  gutter: 20,
353
354
  ...((p = n.layoutFormProps) == null ? void 0 : p.rowLayProps) || {}
354
355
  };
355
- }), a = B(() => Ce(n.layoutFormProps)), l = B(() => {
356
+ }), i = B(() => Le(n.layoutFormProps)), l = B(() => {
356
357
  var f;
357
358
  return (f = n.layoutFormProps) == null ? void 0 : f.setOptions;
358
359
  }), c = B(
359
- () => lt(n.formItemList || [])
360
+ () => pt(n.formItemList || [])
360
361
  ), S = () => {
361
- var h;
362
- const f = Ce(n.layoutFormProps);
362
+ var y;
363
+ const f = Le(n.layoutFormProps);
363
364
  if (!f || !Object.keys(f).length) return 0;
364
365
  const p = f.minfoldRows, b = f.minFoldRows;
365
- return Number((h = p != null ? p : b) != null ? h : 0) || 0;
366
- }, k = B(() => {
366
+ return Number((y = p != null ? p : b) != null ? y : 0) || 0;
367
+ }, F = B(() => {
367
368
  const f = S();
368
369
  return f > 0 && f < c.value.rowNum;
369
370
  }), d = B(() => {
370
- var D;
371
- const { rowNum: f, columnRow: p } = c.value, b = p[f - 1] || [], h = Number((D = Ce(n.layoutFormProps)) == null ? void 0 : D.btnColSpan) || 0, T = 24 - b.reduce(
372
- (M, W) => {
373
- var U;
374
- return M + (((U = n.formItemList[W]) == null ? void 0 : U.span) || 24);
371
+ var E;
372
+ const { rowNum: f, columnRow: p } = c.value, b = p[f - 1] || [], y = Number((E = Le(n.layoutFormProps)) == null ? void 0 : E.btnColSpan) || 0, T = 24 - b.reduce(
373
+ (N, M) => {
374
+ var V;
375
+ return N + (((V = n.formItemList[M]) == null ? void 0 : V.span) || 24);
375
376
  },
376
377
  0
377
378
  );
378
- return !e.value && h <= T ? T : 24;
379
+ return !e.value && y <= T ? T : 24;
379
380
  }), g = B(() => {
380
- var b, h;
381
+ var b, y;
381
382
  const f = S(), { columnNodeIndex: p } = c.value;
382
383
  if (e.value) {
383
- const _ = (h = (b = p[f - 1]) != null ? b : p[p.length - 1]) != null ? h : 9999;
384
- return (n.formItemList || []).map((T, D) => ({
384
+ const _ = (y = (b = p[f - 1]) != null ? b : p[p.length - 1]) != null ? y : 9999;
385
+ return (n.formItemList || []).map((T, E) => ({
385
386
  ...T,
386
- isFold: D > _
387
+ isFold: E > _
387
388
  }));
388
389
  }
389
390
  return (n.formItemList || []).map((_) => ({ ..._, isFold: !1 }));
390
391
  });
391
- return ce(
392
- k,
392
+ return ue(
393
+ F,
393
394
  (f) => {
394
395
  e.value = f;
395
396
  },
@@ -398,10 +399,10 @@ function Bt(n) {
398
399
  folded: e,
399
400
  isBtnHidden: o,
400
401
  rowLayout: t,
401
- formLayout: a,
402
+ formLayout: i,
402
403
  getSetOptionsStatus: l,
403
404
  getRowColsAlgorithm: c,
404
- isFold: k,
405
+ isFold: F,
405
406
  getBtnColSpan: d,
406
407
  formItem: g,
407
408
  changeFolded: () => {
@@ -409,15 +410,15 @@ function Bt(n) {
409
410
  }
410
411
  };
411
412
  }
412
- function Ft(n) {
413
+ function Rt(n) {
413
414
  return {
414
- queryTableListMethod: (l, c = {}) => dt(l, c, n),
415
- getEveryFormQueryField: (l, c) => ut(l, n, c),
416
- formatConfigOut: (l, c, S = {}, k) => ct(l, c, S, k),
417
- configFormField: (l = {}, c) => it(l, c)
415
+ queryTableListMethod: (l, c = {}) => ht(l, c, n),
416
+ getEveryFormQueryField: (l, c) => yt(l, n, c),
417
+ formatConfigOut: (l, c, S = {}, F) => gt(l, c, S, F),
418
+ configFormField: (l = {}, c) => mt(l, c)
418
419
  };
419
420
  }
420
- const kt = {
421
+ const wt = {
421
422
  large: "medium",
422
423
  default: "small",
423
424
  small: "mini",
@@ -425,13 +426,13 @@ const kt = {
425
426
  medium: "medium",
426
427
  mini: "mini"
427
428
  };
428
- function Le(n) {
429
+ function ze(n) {
429
430
  if (n == null || n === "") return;
430
431
  const e = String(n).trim();
431
432
  if (e)
432
- return kt[e];
433
+ return wt[e];
433
434
  }
434
- const xt = se({
435
+ const Pt = ae({
435
436
  name: "RenderDomForm",
436
437
  functional: !0,
437
438
  props: {
@@ -441,12 +442,12 @@ const xt = se({
441
442
  model: { type: Object, default: () => ({}) }
442
443
  },
443
444
  render(n, e) {
444
- const { row: o, index: t, model: a, render: l } = e.props;
445
+ const { row: o, index: t, model: i, render: l } = e.props;
445
446
  if (typeof l != "function") return null;
446
- const S = l(n, a || {}, { row: o || {}, index: t });
447
+ const S = l(n, i || {}, { row: o || {}, index: t });
447
448
  return typeof S == "string" ? n("span", S) : S;
448
449
  }
449
- }), It = se({
450
+ }), Ht = ae({
450
451
  name: "RenderBtn",
451
452
  functional: !0,
452
453
  props: {
@@ -456,14 +457,14 @@ const xt = se({
456
457
  render: { type: Function, default: void 0 }
457
458
  },
458
459
  render(n, e) {
459
- const { formItemList: o, formModel: t, row: a, render: l } = e.props;
460
+ const { formItemList: o, formModel: t, row: i, render: l } = e.props;
460
461
  if (typeof l != "function") return null;
461
- const c = l(a, t, o, n) || "";
462
+ const c = l(i, t, o, n) || "";
462
463
  return typeof c == "string" ? n("span", c) : c;
463
464
  }
464
- }), Rt = se({
465
+ }), $t = ae({
465
466
  name: "EsForm",
466
- components: { RenderDomForm: xt, RenderBtn: It },
467
+ components: { RenderDomForm: Pt, RenderBtn: Ht },
467
468
  props: {
468
469
  /** 表单 model 数据 */
469
470
  model: { type: Object, default: () => ({}) },
@@ -483,260 +484,263 @@ const xt = se({
483
484
  fieldFieldOutput: { type: Function, default: void 0 }
484
485
  },
485
486
  setup(n, e) {
486
- var Oe, we, Pe, be;
487
- const o = Ee(), t = () => {
487
+ var _e, ye, we, Pe, He;
488
+ const o = qe(), t = () => {
488
489
  const m = o == null ? void 0 : o.proxy;
489
490
  return (m == null ? void 0 : m.$refs) || {};
490
- }, a = B(() => {
491
- var $, L;
492
- const m = o == null ? void 0 : o.proxy, v = (L = ($ = m == null ? void 0 : m.$vnode) == null ? void 0 : $.data) == null ? void 0 : L.model;
491
+ }, i = B(() => {
492
+ var L, H;
493
+ const m = o == null ? void 0 : o.proxy, v = (H = (L = m == null ? void 0 : m.$vnode) == null ? void 0 : L.data) == null ? void 0 : H.model;
493
494
  return v && typeof v == "object" && typeof v.callback != "function" ? v : n.model;
494
- }), l = (we = (Oe = ae("$esPlusForm", null)) != null ? Oe : pe().EsForm) != null ? we : {}, c = (be = (Pe = ae("$EsPlus", null)) != null ? Pe : pe()) != null ? be : {}, S = (m) => {
495
+ }), l = (ye = (_e = ie("$esPlusForm", null)) != null ? _e : pe().EsForm) != null ? ye : {}, c = (Pe = (we = ie("$EsPlus", null)) != null ? we : pe()) != null ? Pe : {}, S = (m) => {
495
496
  if (!m) return !0;
496
497
  const v = c.permission;
497
498
  return typeof v == "function" ? v(m) : !0;
498
- }, k = (m) => m.labelKey && typeof c.t == "function" ? c.t(m.labelKey) : m.label, d = ae("getTableInstantce", null), g = B(() => {
499
+ }, F = (m) => m.labelKey && typeof c.t == "function" ? c.t(m.labelKey) : m.label, d = ie("getTableInstantce", null), g = B(() => {
499
500
  if (d)
500
501
  return typeof d == "function" ? d() : d;
501
502
  const m = o == null ? void 0 : o.proxy, v = m == null ? void 0 : m.getTableInstantce;
502
503
  return typeof v == "function" ? v() : v;
503
- }), r = B(() => {
504
+ }), a = B(() => {
504
505
  const m = g.value;
505
506
  return !!(m && Object.keys(m).length);
506
507
  }), f = (m) => m ? m.startsWith("el-icon-") ? m : `el-icon-${m.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase()}` : void 0, p = (m) => {
507
- const { icon: v, ...$ } = m;
508
- if ($.size !== void 0) {
509
- const L = Le($.size);
510
- L !== void 0 && ($.size = L);
508
+ const { icon: v, ...L } = m;
509
+ if (L.size !== void 0) {
510
+ const H = ze(L.size);
511
+ H !== void 0 && (L.size = H);
511
512
  } else
512
- $.size = "mini";
513
- return $;
513
+ L.size = "mini";
514
+ return L;
514
515
  }, b = (m) => {
515
516
  const v = m.disabled;
516
517
  return typeof v == "function" ? !!v() : !!v;
517
- }, h = z({}), _ = z(n.formItemList || []), { formInputComponents: T } = St(), D = (l == null ? void 0 : l.$httpRequest) || void 0, M = n.fieldFieldOutput || (l == null ? void 0 : l.fieldFieldOutput), { getEveryFormQueryField: W } = Ft(D), U = z(Ce(n.layoutFormProps)), V = B(() => {
518
+ }, y = z({}), _ = z(n.formItemList || []), { formInputComponents: T } = It(), E = (l == null ? void 0 : l.$httpRequest) || void 0, N = n.fieldFieldOutput || (l == null ? void 0 : l.fieldFieldOutput), { getEveryFormQueryField: M } = Rt(E), V = z(
519
+ ((He = n.layoutFormProps) == null ? void 0 : He.fromLayProps) || {}
520
+ ), U = B(() => {
518
521
  const v = {
519
522
  size: "mini",
520
- ...U.value || {},
521
- model: a.value,
523
+ ...V.value || {},
524
+ model: i.value,
522
525
  rules: n.rules,
523
526
  validateOnRuleChange: !1
524
- }, $ = Le(v.size);
525
- return $ !== void 0 && (v.size = $), (v.labelWidth === void 0 || v.labelWidth === "" || v.labelWidth === null) && (v.labelWidth = "auto"), v;
526
- }), Q = z(/* @__PURE__ */ new Set());
527
- ce(
527
+ }, L = ze(v.size);
528
+ return L !== void 0 && (v.size = L), (v.labelWidth === void 0 || v.labelWidth === "" || v.labelWidth === null) && (v.labelWidth = "auto"), v;
529
+ }), K = z(/* @__PURE__ */ new Set());
530
+ ue(
528
531
  () => n.formItemList,
529
532
  async (m) => {
530
- const v = Array.isArray(m) ? m : [], $ = v.filter(
531
- (F) => F && F.isInitRun !== !1 && !Q.value.has(F.prop)
533
+ const v = Array.isArray(m) ? m : [], L = v.filter(
534
+ (k) => k && k.isInitRun !== !1 && !K.value.has(k.prop)
532
535
  );
533
- if (!$.length) {
534
- _.value = v.map((F) => {
536
+ if (!L.length) {
537
+ _.value = v.map((k) => {
535
538
  var q;
536
- if (!F) return null;
537
- const A = _.value.find((X) => X && X.prop === F.prop);
538
- return (q = A == null ? void 0 : A.dataOptions) != null && q.length ? { ...F, dataOptions: A.dataOptions } : F;
539
- }).filter((F) => !!F);
539
+ if (!k) return null;
540
+ const $ = _.value.find((Z) => Z && Z.prop === k.prop);
541
+ return (q = $ == null ? void 0 : $.dataOptions) != null && q.length ? { ...k, dataOptions: $.dataOptions } : k;
542
+ }).filter((k) => !!k);
540
543
  return;
541
544
  }
542
- const L = await W($, M);
543
- $.forEach((F) => Q.value.add(F.prop)), _.value = v.map((F) => {
544
- var X;
545
- if (!F) return null;
546
- const A = L.find((ee) => ee && ee.prop === F.prop), q = _.value.find((ee) => ee && ee.prop === F.prop);
547
- return A ? {
548
- ...F,
549
- dataOptions: A.listData
550
- } : (X = q == null ? void 0 : q.dataOptions) != null && X.length ? { ...F, dataOptions: q.dataOptions } : F;
551
- }).filter((F) => !!F);
545
+ const H = await M(L, N);
546
+ L.forEach((k) => K.value.add(k.prop)), _.value = v.map((k) => {
547
+ var Z;
548
+ if (!k) return null;
549
+ const $ = H.find((G) => G && G.prop === k.prop), q = _.value.find((G) => G && G.prop === k.prop);
550
+ return $ ? {
551
+ ...k,
552
+ dataOptions: $.listData
553
+ } : (Z = q == null ? void 0 : q.dataOptions) != null && Z.length ? { ...k, dataOptions: q.dataOptions } : k;
554
+ }).filter((k) => !!k);
552
555
  },
553
556
  { immediate: !0, deep: !0 }
554
557
  );
555
- const H = B(() => {
556
- const v = (_.value || []).map((A) => A ? { ...A, dataOptions: A.dataOptions || [] } : null).filter((A) => {
557
- if (!A) return !1;
558
- const q = A.isHiden, X = A.isHidden, ee = typeof q == "function" ? q : typeof X == "function" ? X : null;
559
- return ee ? !ee(a.value, A, V.value) : !0;
560
- }), L = v.filter((A) => !A.span).length;
561
- let F = 6;
562
- if (L > 0) {
563
- const A = v.reduce((X, ee) => X + (ee.span || 0), 0), q = 24 - (A % 24 || (A ? 24 : 0));
564
- A === 0 ? L === 1 ? F = 24 : L === 2 ? F = 12 : L === 3 ? F = 8 : F = 6 : (F = q >= L ? Math.floor(q / L) : 6, F > 12 && (F = 12), F < 4 && (F = 6));
558
+ const J = B(() => {
559
+ const v = (_.value || []).map(($) => $ ? { ...$, dataOptions: $.dataOptions || [] } : null).filter(($) => {
560
+ if (!$) return !1;
561
+ const q = $.isHiden, Z = $.isHidden, G = typeof q == "function" ? q : typeof Z == "function" ? Z : null;
562
+ return G ? !G(i.value, $, U.value) : !0;
563
+ }), H = v.filter(($) => !$.span).length;
564
+ let k = 6;
565
+ if (H > 0) {
566
+ const $ = v.reduce((Z, G) => Z + (G.span || 0), 0), q = 24 - ($ % 24 || ($ ? 24 : 0));
567
+ $ === 0 ? H === 1 ? k = 24 : H === 2 ? k = 12 : H === 3 ? k = 8 : k = 6 : (k = q >= H ? Math.floor(q / H) : 6, k > 12 && (k = 12), k < 4 && (k = 6));
565
568
  }
566
- return v.map((A) => ({ ...A, span: A.span || F }));
567
- }), K = Bt({
569
+ return v.map(($) => ({ ...$, span: $.span || k }));
570
+ }), O = Ot({
568
571
  layoutFormProps: n.layoutFormProps,
569
572
  get formItemList() {
570
- return H.value;
573
+ return J.value;
571
574
  }
572
575
  }), {
573
576
  folded: s,
574
577
  isBtnHidden: u,
575
- rowLayout: y,
576
- formLayout: I,
577
- getRowColsAlgorithm: R,
578
+ rowLayout: h,
579
+ formLayout: w,
580
+ getRowColsAlgorithm: A,
578
581
  isFold: x,
579
- getBtnColSpan: j,
580
- formItem: Z,
581
- changeFolded: E
582
- } = K;
583
- ce(
584
- I,
582
+ getBtnColSpan: D,
583
+ formItem: Q,
584
+ changeFolded: j
585
+ } = O;
586
+ ue(
587
+ w,
585
588
  (m) => {
586
- U.value = m;
589
+ V.value = m;
587
590
  },
588
591
  { immediate: !0 }
589
592
  );
590
593
  const ne = B(() => ({
591
594
  colRightBtn: n.configBtn.filter((m) => m.direction === "right" || !m.direction),
592
595
  colLeftBtn: n.configBtn.filter((m) => m.direction === "left")
593
- })), oe = B(() => typeof n.renderBtn == "function"), de = (m) => {
594
- var L, F;
595
- const v = t().formRef, $ = (L = g.value) == null ? void 0 : L.httpRequestInstance;
596
- (F = m.click) == null || F.call(m, a.value, v, $);
597
- }, he = (m, v, $) => {
598
- var F, A, q;
599
- const L = g.value;
600
- $ === "query" ? r.value && ((F = L == null ? void 0 : L.httpRequestInstance) == null || F.call(L, m)) : $ === "rest" && v && (r.value && ((A = L == null ? void 0 : L.httpRequestInstance) == null || A.call(L, m)), (q = v.resetFields) == null || q.call(v));
601
- }, Te = (m) => {
602
- var $, L, F;
596
+ })), oe = B(() => typeof n.renderBtn == "function"), le = (m) => {
597
+ var H, k;
598
+ const v = t().formRef, L = (H = g.value) == null ? void 0 : H.httpRequestInstance;
599
+ (k = m.click) == null || k.call(m, i.value, v, L);
600
+ }, be = (m, v, L) => {
601
+ var k, $, q;
602
+ const H = g.value;
603
+ L === "query" ? a.value && ((k = H == null ? void 0 : H.httpRequestInstance) == null || k.call(H, m)) : L === "rest" && v && (a.value && (($ = H == null ? void 0 : H.httpRequestInstance) == null || $.call(H, m)), (q = v.resetFields) == null || q.call(v));
604
+ }, De = (m) => {
605
+ var L, H, k;
603
606
  const v = t().formRef;
604
607
  if (m.triggerEvent && ["query", "rest"].includes(m.key || ""))
605
- he(a.value, v, m.key);
608
+ be(i.value, v, m.key);
606
609
  else {
607
- m.key === "rest" && v && (($ = v.resetFields) == null || $.call(v));
608
- const A = (L = g.value) == null ? void 0 : L.httpRequestInstance;
609
- (F = m.click) == null || F.call(m, a.value, v, A);
610
+ m.key === "rest" && v && ((L = v.resetFields) == null || L.call(v));
611
+ const $ = (H = g.value) == null ? void 0 : H.httpRequestInstance;
612
+ (k = m.click) == null || k.call(m, i.value, v, $);
610
613
  }
611
- }, ze = (m) => {
612
- if (r.value) {
613
- const { style: v, ...$ } = m;
614
- return { style: { marginBottom: "10px", ...v || {} }, ...$ };
614
+ }, je = (m) => {
615
+ if (a.value) {
616
+ const { style: v, ...L } = m;
617
+ return { style: { marginBottom: "10px", ...v || {} }, ...L };
615
618
  }
616
619
  return m;
617
- }, re = () => t().formRef, ke = () => {
618
- const m = re();
620
+ }, de = () => t().formRef, xe = () => {
621
+ const m = de();
619
622
  return m ? new Promise((v) => {
620
623
  try {
621
- const $ = m.validate((L) => {
622
- v(!!L);
624
+ const L = m.validate((H) => {
625
+ v(!!H);
623
626
  });
624
- $ && typeof $.then == "function" && $.then(v).catch(() => v(!1));
625
- } catch ($) {
627
+ L && typeof L.then == "function" && L.then(v).catch(() => v(!1));
628
+ } catch (L) {
626
629
  v(!1);
627
630
  }
628
631
  }) : Promise.resolve(!1);
629
- }, xe = () => {
632
+ }, Ie = () => {
630
633
  var m;
631
- return (m = re()) == null ? void 0 : m.resetFields();
632
- }, ve = (m) => {
634
+ return (m = de()) == null ? void 0 : m.resetFields();
635
+ }, ge = (m) => {
633
636
  var v;
634
- return (v = re()) == null ? void 0 : v.clearValidate(m);
635
- }, Ie = (m) => {
637
+ return (v = de()) == null ? void 0 : v.clearValidate(m);
638
+ }, Oe = (m) => {
636
639
  var v;
637
- return (v = re()) == null ? void 0 : v.validateField(m);
640
+ return (v = de()) == null ? void 0 : v.validateField(m);
638
641
  }, Re = async (m) => {
639
- const $ = H.value.filter((F) => F && m.includes(F.prop));
640
- if (!$.length) return;
641
- (await W($, M)).forEach((F) => {
642
- if (!F) return;
643
- const A = _.value.findIndex((q) => q && q.prop === F.prop);
644
- A !== -1 && (_.value[A] = {
645
- ..._.value[A],
646
- dataOptions: F.listData
642
+ const L = J.value.filter((k) => k && m.includes(k.prop));
643
+ if (!L.length) return;
644
+ (await M(L, N)).forEach((k) => {
645
+ if (!k) return;
646
+ const $ = _.value.findIndex((q) => q && q.prop === k.prop);
647
+ $ !== -1 && (_.value[$] = {
648
+ ..._.value[$],
649
+ dataOptions: k.listData
647
650
  });
648
651
  });
649
652
  };
650
653
  return Fe(() => {
651
- h.value = t().formRef;
654
+ y.value = t().formRef;
652
655
  const m = o == null ? void 0 : o.proxy, v = m == null ? void 0 : m.bodyFormInstance;
653
- v == null || v(h.value);
656
+ v == null || v(y.value);
654
657
  }), typeof e.expose == "function" && e.expose({
655
658
  formItmeRequestInstance: Re,
656
- getFormRef: re,
657
- validate: ke,
658
- resetFields: xe,
659
- clearValidate: ve,
660
- validateField: Ie
659
+ getFormRef: de,
660
+ validate: xe,
661
+ resetFields: Ie,
662
+ clearValidate: ge,
663
+ validateField: Oe
661
664
  }), {
662
665
  // 模板使用
663
- formProps: V,
664
- rowLayout: y,
665
- formItem: Z,
666
+ formProps: U,
667
+ rowLayout: h,
668
+ formItem: Q,
666
669
  isBtnHidden: u,
667
670
  isFold: x,
668
671
  folded: s,
669
- getBtnColSpan: j,
672
+ getBtnColSpan: D,
670
673
  isRenderBtn: oe,
671
674
  colRightLeftList: ne,
672
- configBtn: B(() => n.configBtn),
673
675
  formInputComponents: T,
674
- formInstance: h,
675
- model: a,
676
- btnColSpanRow: B(() => n.btnColSpanRow),
677
- renderBtn: B(() => n.renderBtn),
678
- getRowColsAlgorithm: R,
679
- changeFolded: E,
676
+ formInstance: y,
677
+ // 注意:不要在 setup return 中暴露与 props 同名的 key(configBtn / model /
678
+ // btnColSpanRow / renderBtn)——Vue 2 已自动把 props 挂到 vm 实例,
679
+ // 重复暴露会在 @vue/composition-api 下触发 "already declared as a prop" 警告。
680
+ // 模板中的 :model 引用 resolvedModel(用于解析 v-model 兼容),其它 props 直接使用名称。
681
+ resolvedModel: i,
682
+ getRowColsAlgorithm: A,
683
+ changeFolded: j,
680
684
  // 方法
681
685
  checkPermission: S,
682
- translateLabel: k,
686
+ translateLabel: F,
683
687
  getCompIcon: f,
684
688
  filterOptions: p,
685
689
  resolveDisabled: b,
686
- handleBtnClick: de,
687
- clickBtn: Te,
688
- initFormItemOptions: ze,
690
+ handleBtnClick: le,
691
+ clickBtn: De,
692
+ initFormItemOptions: je,
689
693
  noop: () => {
690
694
  },
691
695
  // expose 公开方法(供 $refs.<esForm>.validate() 直接调用,不经过 ctx.expose)
692
696
  formItmeRequestInstance: Re,
693
- getFormRef: re,
694
- validate: ke,
695
- resetFields: xe,
696
- clearValidate: ve,
697
- validateField: Ie
697
+ getFormRef: de,
698
+ validate: xe,
699
+ resetFields: Ie,
700
+ clearValidate: ge,
701
+ validateField: Oe
698
702
  };
699
703
  }
700
704
  });
701
- function me(n, e, o, t, a, l, c, S) {
702
- var k = typeof n == "function" ? n.options : n;
703
- return e && (k.render = e, k.staticRenderFns = o, k._compiled = !0), l && (k._scopeId = "data-v-" + l), {
705
+ function me(n, e, o, t, i, l, c, S) {
706
+ var F = typeof n == "function" ? n.options : n;
707
+ return e && (F.render = e, F.staticRenderFns = o, F._compiled = !0), l && (F._scopeId = "data-v-" + l), {
704
708
  exports: n,
705
- options: k
709
+ options: F
706
710
  };
707
711
  }
708
- var Ot = function() {
712
+ var Lt = function() {
709
713
  var e = this, o = e._self._c;
710
- return e._self._setupProxy, o("el-form", e._b({ ref: "formRef", staticClass: "es-form" }, "el-form", e.formProps, !1), [o("div", { staticClass: "flex-center" }, [o("el-row", e._b({}, "el-row", e.rowLayout, !1), [e._l(e.formItem, function(t, a) {
711
- return [o("el-col", { directives: [{ name: "show", rawName: "v-show", value: !t.isFold, expression: "!item.isFold" }], key: t.prop || a, attrs: { span: t.span } }, [o("el-form-item", e._b({ attrs: { label: e.translateLabel(t), prop: t.prop }, nativeOn: { click: function(l) {
714
+ return e._self._setupProxy, o("el-form", e._b({ ref: "formRef", staticClass: "es-form" }, "el-form", e.formProps, !1), [o("div", { staticClass: "flex-center" }, [o("el-row", e._b({}, "el-row", e.rowLayout, !1), [e._l(e.formItem, function(t, i) {
715
+ return [o("el-col", { directives: [{ name: "show", rawName: "v-show", value: !t.isFold, expression: "!item.isFold" }], key: t.prop || i, attrs: { span: t.span } }, [o("el-form-item", e._b({ attrs: { label: e.translateLabel(t), prop: t.prop }, nativeOn: { click: function(l) {
712
716
  return l.stopPropagation(), e.noop.apply(null, arguments);
713
- } } }, "el-form-item", e.initFormItemOptions(t.formItemOptions || {}), !1), [t.formtype ? [o("render-dom-form", { attrs: { row: t, render: e.formInputComponents(t), index: a, model: e.model } })] : t.render ? [o("render-dom-form", { attrs: { row: t, render: t.render, index: a, model: e.model } })] : e._e()], 2)], 1)];
714
- }), e.isBtnHidden ? e._e() : [e.isRenderBtn ? o("render-btn", { attrs: { row: { isFold: e.isFold, folded: e.folded, getBtnColSpan: e.getBtnColSpan, getRowColsAlgorithm: e.getRowColsAlgorithm, changeFolded: e.changeFolded, refsForm: e.formInstance }, "form-model": e.model, "form-item-list": e.formItem, render: e.renderBtn } }) : o("el-col", { attrs: { span: e.btnColSpanRow ? 24 : e.getBtnColSpan } }, [e.btnColSpanRow && e.configBtn.length ? o("div", { staticClass: "buttonOperate leftRightBtn" }, [o("div", { staticClass: "btn-left" }, [o("el-form-item", { staticClass: "btn-formItem", attrs: { "label-width": "0px" } }, [e._l(e.colRightLeftList.colLeftBtn, function(t, a) {
715
- return [e.checkPermission(t.permissionValue) ? o("el-button", e._b({ key: t.key || a, attrs: { icon: e.getCompIcon(t.icon), disabled: e.resolveDisabled(t) }, on: { click: function(l) {
717
+ } } }, "el-form-item", e.initFormItemOptions(t.formItemOptions || {}), !1), [t.formtype ? [o("render-dom-form", { attrs: { row: t, render: e.formInputComponents(t), index: i, model: e.resolvedModel } })] : t.render ? [o("render-dom-form", { attrs: { row: t, render: t.render, index: i, model: e.resolvedModel } })] : e._e()], 2)], 1)];
718
+ }), e.isBtnHidden ? e._e() : [e.isRenderBtn ? o("render-btn", { attrs: { row: { isFold: e.isFold, folded: e.folded, getBtnColSpan: e.getBtnColSpan, getRowColsAlgorithm: e.getRowColsAlgorithm, changeFolded: e.changeFolded, refsForm: e.formInstance }, "form-model": e.resolvedModel, "form-item-list": e.formItem, render: e.renderBtn } }) : o("el-col", { attrs: { span: e.btnColSpanRow ? 24 : e.getBtnColSpan } }, [e.btnColSpanRow && e.configBtn.length ? o("div", { staticClass: "buttonOperate leftRightBtn" }, [o("div", { staticClass: "btn-left" }, [o("el-form-item", { staticClass: "btn-formItem", attrs: { "label-width": "0px" } }, [e._l(e.colRightLeftList.colLeftBtn, function(t, i) {
719
+ return [e.checkPermission(t.permissionValue) ? o("el-button", e._b({ key: t.key || i, attrs: { icon: e.getCompIcon(t.icon), disabled: e.resolveDisabled(t) }, on: { click: function(l) {
716
720
  return e.handleBtnClick(t);
717
721
  } } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")]) : e._e()];
718
- })], 2)], 1), o("div", { staticClass: "btn-right" }, [o("el-form-item", { staticClass: "btn-formItem", attrs: { "label-width": "0px" } }, [e._l(e.colRightLeftList.colRightBtn, function(t, a) {
719
- return [e.checkPermission(t.permissionValue) ? o("el-button", e._b({ key: t.key || a, attrs: { icon: e.getCompIcon(t.icon), disabled: e.resolveDisabled(t) }, on: { click: function(l) {
722
+ })], 2)], 1), o("div", { staticClass: "btn-right" }, [o("el-form-item", { staticClass: "btn-formItem", attrs: { "label-width": "0px" } }, [e._l(e.colRightLeftList.colRightBtn, function(t, i) {
723
+ return [e.checkPermission(t.permissionValue) ? o("el-button", e._b({ key: t.key || i, attrs: { icon: e.getCompIcon(t.icon), disabled: e.resolveDisabled(t) }, on: { click: function(l) {
720
724
  return e.clickBtn(t);
721
725
  } } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")]) : e._e()];
722
- }), e.isFold ? o("el-button", { staticStyle: { "padding-left": "0", border: "none" }, attrs: { type: "text", icon: e.folded ? "el-icon-arrow-down" : "el-icon-arrow-up" }, on: { click: e.changeFolded } }, [e._v(" " + e._s(e.folded ? "展开" : "收起") + " ")]) : e._e()], 2)], 1)]) : e._e(), !e.btnColSpanRow && e.configBtn.length ? o("el-form-item", { staticClass: "btn-formItem", class: { formItemCols: e.btnColSpanRow ? !0 : e.getBtnColSpan === 24 }, attrs: { label: " ", "label-width": e.formProps.labelBtnWidth ? e.formProps.labelBtnWidth : e.formProps.labelWidth } }, [o("div", { staticClass: "buttonOperate", style: { "text-align": e.getBtnColSpan === 24 ? "right" : "left" } }, [e._l(e.configBtn, function(t, a) {
723
- return [e.checkPermission(t.permissionValue) ? o("el-button", e._b({ key: t.key || a, attrs: { icon: e.getCompIcon(t.icon), disabled: e.resolveDisabled(t) }, on: { click: function(l) {
726
+ }), e.isFold ? o("el-button", { staticStyle: { "padding-left": "0", border: "none" }, attrs: { type: "text", icon: e.folded ? "el-icon-arrow-down" : "el-icon-arrow-up" }, on: { click: e.changeFolded } }, [e._v(" " + e._s(e.folded ? "展开" : "收起") + " ")]) : e._e()], 2)], 1)]) : e._e(), !e.btnColSpanRow && e.configBtn.length ? o("el-form-item", { staticClass: "btn-formItem", class: { formItemCols: e.btnColSpanRow ? !0 : e.getBtnColSpan === 24 }, attrs: { label: " ", "label-width": e.formProps.labelBtnWidth ? e.formProps.labelBtnWidth : e.formProps.labelWidth } }, [o("div", { staticClass: "buttonOperate", style: { "text-align": e.getBtnColSpan === 24 ? "right" : "left" } }, [e._l(e.configBtn, function(t, i) {
727
+ return [e.checkPermission(t.permissionValue) ? o("el-button", e._b({ key: t.key || i, attrs: { icon: e.getCompIcon(t.icon), disabled: e.resolveDisabled(t) }, on: { click: function(l) {
724
728
  return e.handleBtnClick(t);
725
729
  } } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")]) : e._e()];
726
730
  }), e.isFold ? o("el-button", { staticStyle: { "padding-left": "0", border: "none" }, attrs: { type: "text", icon: e.folded ? "el-icon-arrow-down" : "el-icon-arrow-up" }, on: { click: e.changeFolded } }, [e._v(" " + e._s(e.folded ? "展开" : "收起") + " ")]) : e._e()], 2)]) : e._e()], 1)]], 2)], 1)]);
727
- }, wt = [], Pt = /* @__PURE__ */ me(
728
- Rt,
729
- Ot,
730
- wt,
731
+ }, At = [], Tt = /* @__PURE__ */ me(
732
+ $t,
733
+ Lt,
734
+ At,
731
735
  !1,
732
736
  null,
733
- "78a7096a"
737
+ "4a462026"
734
738
  );
735
- const ye = Pt.exports;
736
- ye.install = function(n) {
737
- n.component(ye.name || "EsForm", ye);
739
+ const ve = Tt.exports;
740
+ ve.install = function(n) {
741
+ n.component(ve.name || "EsForm", ve);
738
742
  };
739
- const Ht = se({
743
+ const zt = ae({
740
744
  name: "RenderDomTb",
741
745
  props: {
742
746
  row: { type: Object, default: () => ({}) },
@@ -746,20 +750,20 @@ const Ht = se({
746
750
  },
747
751
  setup(n) {
748
752
  return () => {
749
- const { row: e, index: o, dataKey: t, render: a } = n;
750
- if (!e) return le("span", "-");
753
+ const { row: e, index: o, dataKey: t, render: i } = n;
754
+ if (!e) return ce("span", "-");
751
755
  const l = t ? e[t] : null;
752
756
  try {
753
- const c = a(le, { value: l, row: e, index: o });
754
- return typeof c == "string" ? le("span", c) : c;
757
+ const c = i(ce, { value: l, row: e, index: o });
758
+ return typeof c == "string" ? ce("span", c) : c;
755
759
  } catch (c) {
756
- return le("span", "-");
760
+ return ce("span", "-");
757
761
  }
758
762
  };
759
763
  }
760
- }), $t = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), Lt = se({
764
+ }), Et = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), Dt = ae({
761
765
  name: "EsTableColumnItem",
762
- components: { RenderDomTb: Ht },
766
+ components: { RenderDomTb: zt },
763
767
  props: {
764
768
  cols: {
765
769
  type: Object,
@@ -768,46 +772,46 @@ const Ht = se({
768
772
  },
769
773
  setup() {
770
774
  var o, t;
771
- const n = (t = (o = ae("$EsPlus", null)) != null ? o : pe()) != null ? t : {};
775
+ const n = (t = (o = ie("$EsPlus", null)) != null ? o : pe()) != null ? t : {};
772
776
  return {
773
- columnBindAttr: (a) => {
777
+ columnBindAttr: (i) => {
774
778
  const l = {};
775
- for (const c in a)
779
+ for (const c in i)
776
780
  if (!(c === "groups" || c === "scopedSlots" || c === "render"))
777
781
  if (c.includes("-")) {
778
782
  const S = c.split("-");
779
- let k = S[0];
783
+ let F = S[0];
780
784
  for (let d = 1; d < S.length; d++)
781
- k += $t(S[d]);
782
- l[k] = a[c];
783
- } else c === "key" ? (l.prop = a[c], l[c] = a[c]) : c === "label" && a.labelKey && typeof n.t == "function" ? l.label = n.t(a.labelKey) : l[c] = a[c];
785
+ F += Et(S[d]);
786
+ l[F] = i[c];
787
+ } else c === "key" ? (l.prop = i[c], l[c] = i[c]) : c === "label" && i.labelKey && typeof n.t == "function" ? l.label = n.t(i.labelKey) : l[c] = i[c];
784
788
  return l.align || (l.align = "center"), l;
785
789
  }
786
790
  };
787
791
  }
788
792
  });
789
- var At = function() {
793
+ var jt = function() {
790
794
  var e = this, o = e._self._c;
791
- return e._self._setupProxy, e.cols.groups && Array.isArray(e.cols.groups) ? o("el-table-column", e._b({}, "el-table-column", e.columnBindAttr(e.cols), !1), e._l(e.cols.groups, function(t, a) {
792
- return o("el-table-column", e._b({ key: t.prop || t.key || a, scopedSlots: e._u([t.render && typeof t.render == "function" ? { key: "default", fn: function(l) {
795
+ return e._self._setupProxy, e.cols.groups && Array.isArray(e.cols.groups) ? o("el-table-column", e._b({}, "el-table-column", e.columnBindAttr(e.cols), !1), e._l(e.cols.groups, function(t, i) {
796
+ return o("el-table-column", e._b({ key: t.prop || t.key || i, scopedSlots: e._u([t.render && typeof t.render == "function" ? { key: "default", fn: function(l) {
793
797
  return [l && l.row ? o("render-dom-tb", { attrs: { row: l.row, index: l.$index, "data-key": t.key, render: t.render } }) : o("span", [e._v("-")])];
794
798
  } } : t.scopedSlots && t.scopedSlots.customRender ? { key: "default", fn: function(l) {
795
799
  return [l && l.row ? e._t(t.scopedSlots.customRender, null, null, Object.assign({}, t, { row: l.row, column: l.column, scope: l })) : o("span", [e._v("-")])];
796
- } } : null], null, !0) }, "el-table-column", e.columnBindAttr(Object.assign({}, t, { columnIndex: a })), !1));
800
+ } } : null], null, !0) }, "el-table-column", e.columnBindAttr(Object.assign({}, t, { columnIndex: i })), !1));
797
801
  }), 1) : e.cols.render && typeof e.cols.render == "function" ? o("el-table-column", e._b({ scopedSlots: e._u([{ key: "default", fn: function(t) {
798
802
  return [t && t.row ? o("render-dom-tb", { attrs: { row: t.row, index: t.$index, "data-key": e.cols.key, render: e.cols.render } }) : o("span", [e._v("-")])];
799
803
  } }]) }, "el-table-column", e.columnBindAttr(e.cols), !1)) : e.cols.scopedSlots && e.cols.scopedSlots.customRender ? o("el-table-column", e._b({ scopedSlots: e._u([{ key: "default", fn: function(t) {
800
804
  return [t && t.row ? e._t(e.cols.scopedSlots.customRender, null, null, Object.assign({}, e.cols, { row: t.row, column: t.column, scope: t })) : o("span", [e._v("-")])];
801
805
  } }], null, !0) }, "el-table-column", e.columnBindAttr(e.cols), !1)) : e.cols.ellipsis && typeof e.cols.ellipsis == "boolean" ? o("el-table-column", e._b({ attrs: { "show-overflow-tooltip": "" } }, "el-table-column", e.columnBindAttr(e.cols), !1)) : o("el-table-column", e._b({}, "el-table-column", e.columnBindAttr(e.cols), !1));
802
- }, Tt = [], zt = /* @__PURE__ */ me(
803
- Lt,
804
- At,
805
- Tt,
806
+ }, qt = [], Nt = /* @__PURE__ */ me(
807
+ Dt,
808
+ jt,
809
+ qt,
806
810
  !1,
807
811
  null,
808
812
  null
809
813
  );
810
- const Et = zt.exports, nt = (n) => n ? n.startsWith("el-icon-") ? n : `el-icon-${n.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase()}` : void 0, Dt = se({
814
+ const Mt = Nt.exports, st = (n) => n ? n.startsWith("el-icon-") ? n : `el-icon-${n.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase()}` : void 0, Vt = ae({
811
815
  name: "RenderDomTbBtn",
812
816
  props: {
813
817
  render: { type: Function, required: !0 }
@@ -822,9 +826,9 @@ const Et = zt.exports, nt = (n) => n ? n.startsWith("el-icon-") ? n : `el-icon-$
822
826
  }
823
827
  };
824
828
  }
825
- }), jt = se({
829
+ }), Kt = ae({
826
830
  name: "EsTableBtns",
827
- components: { RenderDom: Dt },
831
+ components: { RenderDom: Vt },
828
832
  props: {
829
833
  leftText: { type: String, default: "" },
830
834
  btnConfig: {
@@ -837,21 +841,21 @@ const Et = zt.exports, nt = (n) => n ? n.startsWith("el-icon-") ? n : `el-icon-$
837
841
  }
838
842
  },
839
843
  setup(n) {
840
- var r, f;
841
- const e = (f = (r = ae("$EsPlus", null)) != null ? r : pe()) != null ? f : {}, o = (p, b) => {
844
+ var a, f;
845
+ const e = (f = (a = ie("$EsPlus", null)) != null ? a : pe()) != null ? f : {}, o = (p, b) => {
842
846
  if (!b) return !0;
843
- const h = e.permission;
844
- return typeof h == "function" ? h(b) : !0;
847
+ const y = e.permission;
848
+ return typeof y == "function" ? y(b) : !0;
845
849
  }, t = (p) => p.map((b) => {
846
- const h = { ...b };
847
- return o([], b.permissionValue) ? typeof b.isHide == "function" ? h.isHide = b.isHide() : h.isHide = b.isHide || !1 : h.isHide = !0, h;
848
- }), a = B(() => t(
849
- (n.btnConfig || []).filter((p) => Ze(p) === "left")
850
+ const y = { ...b };
851
+ return o([], b.permissionValue) ? typeof b.isHide == "function" ? y.isHide = b.isHide() : y.isHide = b.isHide || !1 : y.isHide = !0, y;
852
+ }), i = B(() => t(
853
+ (n.btnConfig || []).filter((p) => Ye(p) === "left")
850
854
  ).filter((p) => !p.isHide)), l = B(() => t(
851
- (n.btnConfig || []).filter((p) => Ze(p) === "right")
852
- ).filter((p) => !p.isHide)), c = B(() => !!n.leftText || a.value.length > 0 || l.value.length > 0);
855
+ (n.btnConfig || []).filter((p) => Ye(p) === "right")
856
+ ).filter((p) => !p.isHide)), c = B(() => !!n.leftText || i.value.length > 0 || l.value.length > 0);
853
857
  return {
854
- processedBtnLeft: a,
858
+ processedBtnLeft: i,
855
859
  processedBtnRight: l,
856
860
  showContainer: c,
857
861
  getDisabledState: (p) => typeof p.disabled == "function" ? p.disabled() : p.disabled || !1,
@@ -859,52 +863,52 @@ const Et = zt.exports, nt = (n) => n ? n.startsWith("el-icon-") ? n : `el-icon-$
859
863
  display: "inline-block",
860
864
  marginLeft: p !== 0 ? "8px" : "0px"
861
865
  }),
862
- getCompIcon: nt,
866
+ getCompIcon: st,
863
867
  filterOptions: (p) => {
864
868
  const {
865
869
  render: b,
866
- click: h,
870
+ click: y,
867
871
  icon: _,
868
872
  permissionValue: T,
869
- code: D,
870
- isHide: M,
871
- name: W,
872
- size: U,
873
- ...V
873
+ code: E,
874
+ isHide: N,
875
+ name: M,
876
+ size: V,
877
+ ...U
874
878
  } = p;
875
- return V;
879
+ return U;
876
880
  },
877
- resolveBtnSize: (p) => Le(p.size) || "mini"
881
+ resolveBtnSize: (p) => ze(p.size) || "mini"
878
882
  };
879
883
  }
880
884
  });
881
- var qt = function() {
885
+ var Wt = function() {
882
886
  var e = this, o = e._self._c;
883
- return e._self._setupProxy, e.showContainer ? o("div", { staticClass: "flex-float btns" }, [o("div", { staticClass: "left-text" }, [e._v(" " + e._s(e.leftText) + " ")]), o("div", { staticClass: "btn-container_block" }, [o("div", { staticClass: "btn-left" }, [e._l(e.processedBtnLeft, function(t, a) {
884
- return [t.isHide ? e._e() : o("div", { key: t.name || a, style: e.buttonContainerStyle(a) }, [t.render && typeof t.render == "function" ? o("render-dom", { attrs: { render: t.render } }) : o("el-button", e._b({ attrs: { type: t.type || "", size: e.resolveBtnSize(t), icon: e.getCompIcon(t.icon), loading: t.loading || !1, disabled: e.getDisabledState(t) }, on: { click: () => t.click && t.click(e.instance) } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")])], 1)];
885
- })], 2), o("div", { staticClass: "btn-right" }, [e._l(e.processedBtnRight, function(t, a) {
886
- return [t.isHide ? e._e() : o("div", { key: t.name || a, style: e.buttonContainerStyle(a) }, [t.render && typeof t.render == "function" ? o("render-dom", { attrs: { render: t.render } }) : o("el-button", e._b({ attrs: { type: t.type || "", size: e.resolveBtnSize(t), icon: e.getCompIcon(t.icon), loading: t.loading || !1, disabled: e.getDisabledState(t) }, on: { click: () => t.click && t.click(e.instance) } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")])], 1)];
887
+ return e._self._setupProxy, e.showContainer ? o("div", { staticClass: "flex-float btns" }, [o("div", { staticClass: "left-text" }, [e._v(" " + e._s(e.leftText) + " ")]), o("div", { staticClass: "btn-container_block" }, [o("div", { staticClass: "btn-left" }, [e._l(e.processedBtnLeft, function(t, i) {
888
+ return [t.isHide ? e._e() : o("div", { key: t.name || i, style: e.buttonContainerStyle(i) }, [t.render && typeof t.render == "function" ? o("render-dom", { attrs: { render: t.render } }) : o("el-button", e._b({ attrs: { type: t.type || "", size: e.resolveBtnSize(t), icon: e.getCompIcon(t.icon), loading: t.loading || !1, disabled: e.getDisabledState(t) }, on: { click: () => t.click && t.click(e.instance) } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")])], 1)];
889
+ })], 2), o("div", { staticClass: "btn-right" }, [e._l(e.processedBtnRight, function(t, i) {
890
+ return [t.isHide ? e._e() : o("div", { key: t.name || i, style: e.buttonContainerStyle(i) }, [t.render && typeof t.render == "function" ? o("render-dom", { attrs: { render: t.render } }) : o("el-button", e._b({ attrs: { type: t.type || "", size: e.resolveBtnSize(t), icon: e.getCompIcon(t.icon), loading: t.loading || !1, disabled: e.getDisabledState(t) }, on: { click: () => t.click && t.click(e.instance) } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")])], 1)];
887
891
  })], 2)])]) : e._e();
888
- }, Mt = [], Nt = /* @__PURE__ */ me(
889
- jt,
890
- qt,
891
- Mt,
892
+ }, Ut = [], Qt = /* @__PURE__ */ me(
893
+ Kt,
894
+ Wt,
895
+ Ut,
892
896
  !1,
893
897
  null,
894
898
  "2b641efd"
895
899
  );
896
- const Vt = Nt.exports;
897
- function Kt(n, e, o, t, a) {
898
- const l = z(400), c = z(null), S = (f) => Math.sign(f) === -1, k = () => {
899
- var h, _, T, D;
900
- const f = ((h = e.value) == null ? void 0 : h.offsetHeight) || 0, p = ((T = (_ = o.value) == null ? void 0 : _.$el) == null ? void 0 : T.offsetHeight) || 0, b = ((D = t.value) == null ? void 0 : D.offsetHeight) || 0;
900
+ const Jt = Qt.exports;
901
+ function Zt(n, e, o, t, i) {
902
+ const l = z(400), c = z(null), S = (f) => Math.sign(f) === -1, F = () => {
903
+ var y, _, T, E;
904
+ const f = ((y = e.value) == null ? void 0 : y.offsetHeight) || 0, p = ((T = (_ = o.value) == null ? void 0 : _.$el) == null ? void 0 : T.offsetHeight) || 0, b = ((E = t.value) == null ? void 0 : E.offsetHeight) || 0;
901
905
  return Math.round(b + f + p);
902
906
  }, d = () => {
903
- var U, V, Q, H, K;
907
+ var V, U, K, J, O;
904
908
  const f = n.value;
905
909
  if (!f) return;
906
- const p = typeof a.tabHeight == "number" ? a.tabHeight : a.heightType === "height" ? ((U = f.parentElement) == null ? void 0 : U.offsetHeight) || f.offsetHeight : parseInt(a.tabHeight, 10) || 450, b = isNaN(p) ? 450 : p, h = b - k(), _ = S(h) ? k() + 300 : b, T = ((V = t.value) == null ? void 0 : V.offsetHeight) || 0, D = ((Q = e.value) == null ? void 0 : Q.offsetHeight) || 0, M = ((K = (H = o.value) == null ? void 0 : H.$el) == null ? void 0 : K.offsetHeight) || 0, W = Math.floor(_) - Math.round(T + D + M);
907
- l.value !== W && (l.value = W);
910
+ const p = typeof i.tabHeight == "number" ? i.tabHeight : i.heightType === "height" ? ((V = f.parentElement) == null ? void 0 : V.offsetHeight) || f.offsetHeight : parseInt(i.tabHeight, 10) || 450, b = isNaN(p) ? 450 : p, y = b - F(), _ = S(y) ? F() + 300 : b, T = ((U = t.value) == null ? void 0 : U.offsetHeight) || 0, E = ((K = e.value) == null ? void 0 : K.offsetHeight) || 0, N = ((O = (J = o.value) == null ? void 0 : J.$el) == null ? void 0 : O.offsetHeight) || 0, M = Math.floor(_) - Math.round(T + E + N);
911
+ l.value !== M && (l.value = M);
908
912
  }, g = () => {
909
913
  Fe(() => {
910
914
  if (!n.value || typeof ResizeObserver == "undefined") return;
@@ -913,27 +917,27 @@ function Kt(n, e, o, t, a) {
913
917
  n.value && d();
914
918
  });
915
919
  });
916
- const f = a.heightType === "height" && n.value.parentElement || n.value;
917
- c.value.observe(f), e.value && c.value.observe(e.value);
920
+ const f = i.heightType === "height" && n.value.parentElement || n.value;
921
+ c.value.observe(f), d(), e.value && c.value.observe(e.value), t.value && c.value.observe(t.value);
918
922
  });
919
- }, r = () => {
923
+ }, a = () => {
920
924
  c.value && (c.value.disconnect(), c.value = null);
921
925
  };
922
- return De(() => g()), bt(() => r()), { tableHeight: l, resizeObservers: d, startObserver: g, stopObserver: r };
926
+ return Ne(() => g()), kt(() => a()), { tableHeight: l, resizeObservers: d, startObserver: g, stopObserver: a };
923
927
  }
924
- function Wt(n) {
925
- const e = ft(), o = z([]), t = z({}), a = z(!1), l = () => {
926
- o.value = [...e.multipleSelection], t.value = { ...e.selectionsByPage }, a.value = e.isInitChange;
928
+ function Gt(n) {
929
+ const e = vt(), o = z([]), t = z({}), i = z(!1), l = () => {
930
+ o.value = [...e.multipleSelection], t.value = { ...e.selectionsByPage }, i.value = e.isInitChange;
927
931
  };
928
932
  return {
929
933
  multipleSelection: o,
930
934
  selectionsByPage: t,
931
- isInitChange: a,
935
+ isInitChange: i,
932
936
  handleSelectionChange: (d, g) => {
933
- e.isInitChange && n || (gt(e, d, g, n), l());
937
+ e.isInitChange && n || (Ct(e, d, g, n), l());
934
938
  },
935
939
  clearAllSelection: (d) => {
936
- d ? mt(e, d) : (e.multipleSelection = [], e.selectionsByPage = {}), l();
940
+ d ? _t(e, d) : (e.multipleSelection = [], e.selectionsByPage = {}), l();
937
941
  },
938
942
  initSelection: (d, g) => {
939
943
  if (e.isInitChange = !0, l(), !g) {
@@ -941,15 +945,15 @@ function Wt(n) {
941
945
  return;
942
946
  }
943
947
  n ? Fe(() => {
944
- pt(e, d, g, n), e.isInitChange = !1, l();
948
+ bt(e, d, g, n), e.isInitChange = !1, l();
945
949
  }) : Fe(() => {
946
- var r;
947
- (r = g.clearSelection) == null || r.call(g), e.isInitChange = !1, l();
950
+ var a;
951
+ (a = g.clearSelection) == null || a.call(g), e.isInitChange = !1, l();
948
952
  });
949
953
  }
950
954
  };
951
955
  }
952
- const Ye = {
956
+ const et = {
953
957
  multiSelect: !1,
954
958
  expand: !1,
955
959
  snIndex: !1,
@@ -959,7 +963,7 @@ const Ye = {
959
963
  headerCellStyle: { background: "#f5f7fa" },
960
964
  highlightCurrentRow: !0,
961
965
  cachePageSelection: !0
962
- }, Ut = /* @__PURE__ */ new Set([
966
+ }, Yt = /* @__PURE__ */ new Set([
963
967
  "multiSelect",
964
968
  "expand",
965
969
  "snIndex",
@@ -983,24 +987,24 @@ const Ye = {
983
987
  "estimatedRowHeight",
984
988
  "overscanCount",
985
989
  "rowClassName"
986
- ]), Qt = (n) => n.toLowerCase().replace(/(\s|^)[a-z]/g, (e) => e.toUpperCase()), Jt = (n) => {
990
+ ]), Xt = (n) => n.toLowerCase().replace(/(\s|^)[a-z]/g, (e) => e.toUpperCase()), en = (n) => {
987
991
  const e = {};
988
992
  for (const o in n)
989
993
  if (!(o === "groups" || o === "scopedSlots" || o === "render"))
990
994
  if (o.includes("-")) {
991
995
  const t = o.split("-");
992
- let a = t[0];
996
+ let i = t[0];
993
997
  for (let l = 1; l < t.length; l++)
994
- a += Qt(t[l]);
995
- e[a] = n[o];
998
+ i += Xt(t[l]);
999
+ e[i] = n[o];
996
1000
  } else o === "key" && (e.prop = n[o]), e[o] = n[o];
997
1001
  return e.align || (e.align = "center"), e;
998
- }, Xe = (n) => {
1002
+ }, tt = (n) => {
999
1003
  const e = ["total", "pageSize", "current", "tableData"];
1000
1004
  return fe(n) ? Object.keys(n).every((o) => e.find((t) => t === o) && n[o] && typeof n[o] == "string") : !1;
1001
- }, Zt = se({
1005
+ }, tn = ae({
1002
1006
  name: "EsTable",
1003
- components: { ColumnItem: Et, TableBtns: Vt },
1007
+ components: { ColumnItem: Mt, TableBtns: Jt },
1004
1008
  // 关闭自动 attrs 继承,避免 fallthrough 重复绑定
1005
1009
  inheritAttrs: !1,
1006
1010
  props: {
@@ -1020,7 +1024,7 @@ const Ye = {
1020
1024
  },
1021
1025
  options: {
1022
1026
  type: Object,
1023
- default: () => ({ ...Ye })
1027
+ default: () => ({ ...et })
1024
1028
  },
1025
1029
  pagination: {
1026
1030
  type: Object,
@@ -1034,33 +1038,34 @@ const Ye = {
1034
1038
  "size-change",
1035
1039
  "change-table-sort"
1036
1040
  ],
1037
- setup(n, { emit: e, slots: o, attrs: t, expose: a }) {
1038
- var qe, Me, Ne, Ve;
1039
- const l = Ee(), c = (Me = (qe = ae(
1041
+ setup(n, { emit: e, slots: o, attrs: t, expose: i }) {
1042
+ var Ve, Ke, We, Ue;
1043
+ const l = qe(), c = (Ke = (Ve = ie(
1040
1044
  "$esPlusTable",
1041
1045
  null
1042
- )) != null ? qe : pe().EsTable) != null ? Me : {}, S = (Ve = (Ne = ae("$EsPlus", null)) != null ? Ne : pe()) != null ? Ve : {}, k = (i) => {
1043
- if (!i) return !0;
1044
- const w = S.permission;
1045
- return typeof w == "function" ? w(i) : !0;
1046
+ )) != null ? Ve : pe().EsTable) != null ? Ke : {}, S = (Ue = (We = ie("$EsPlus", null)) != null ? We : pe()) != null ? Ue : {}, F = (r) => {
1047
+ if (!r) return !0;
1048
+ const R = S.permission;
1049
+ return typeof R == "function" ? R(r) : !0;
1046
1050
  };
1047
1051
  (n.options.virtual === !0 || n.options.engine === "virtual") && console.warn(
1048
1052
  "[@es-plus/vue2] 虚拟滚动 (virtual: true) 在 Vue 2 + Element UI 下不可用,已降级为普通 el-table 渲染。如需虚拟滚动请使用 Vue 3 + Element Plus 版本(@es-plus/vue3)。"
1049
1053
  );
1050
- const d = z(null), g = z(null), r = z(null), f = z(null), p = z(null), b = z(`table_${Math.random().toString(36).substring(2, 12)}`), h = z([]), _ = z([...n.columns]);
1051
- ce(
1054
+ const d = z(null), g = z(null), a = z(null), f = z(null), p = z(null), b = z(`table_${Math.random().toString(36).substring(2, 12)}`), y = z([]), _ = B(() => y.value && y.value.length ? y.value : n.dataSource), T = z([...n.columns]);
1055
+ ue(
1052
1056
  () => n.columns,
1053
- (i) => {
1054
- _.value = [...i];
1057
+ (r) => {
1058
+ T.value = [...r];
1055
1059
  },
1056
1060
  { deep: !0 }
1057
1061
  );
1058
- const T = z(!1), D = z(!1), M = z(!1), W = (i) => {
1059
- i && (p.value = i);
1060
- }, U = ae("bodyFormInstance", () => {
1061
- }), V = ae("getVisibleShow", !1), Q = B(
1062
- () => typeof V == "function" ? V() : V
1063
- ), H = z({
1062
+ const E = z(!1), N = z(!1), M = z(!1), V = () => {
1063
+ const r = l == null ? void 0 : l.proxy;
1064
+ !r || !r.$refs || (p.value = r.$refs.tableContainerEl || null, a.value = r.$refs.headBarRef || null, f.value = r.$refs.paginationRef || null);
1065
+ }, U = ie("bodyFormInstance", () => {
1066
+ }), K = ie("getVisibleShow", !1), J = B(
1067
+ () => typeof K == "function" ? K() : K
1068
+ ), O = z({
1064
1069
  pageSize: 10,
1065
1070
  current: 1,
1066
1071
  total: 0,
@@ -1068,20 +1073,20 @@ const Ye = {
1068
1073
  size: "small",
1069
1074
  isSmall: !0,
1070
1075
  ...n.pagination
1071
- }), K = z(null), s = B(() => {
1072
- const i = n.options.entryQuery;
1073
- return i && fe(i) && Object.keys(i).length ? i : {};
1074
- }), u = B(() => {
1075
- if (n.options.configTableOut && fe(n.options.configTableOut) && Object.keys(n.options.configTableOut).length && Xe(n.options.configTableOut))
1076
+ }), s = z(null), u = B(() => {
1077
+ const r = n.options.entryQuery;
1078
+ return r && fe(r) && Object.keys(r).length ? r : {};
1079
+ }), h = B(() => {
1080
+ if (n.options.configTableOut && fe(n.options.configTableOut) && Object.keys(n.options.configTableOut).length && tt(n.options.configTableOut))
1076
1081
  return n.options.configTableOut;
1077
1082
  if (c != null && c.configQueryFieldOutput && typeof c.configQueryFieldOutput == "function") {
1078
- const i = c.configQueryFieldOutput({
1083
+ const r = c.configQueryFieldOutput({
1079
1084
  total: "records",
1080
1085
  pageSize: "pageSize",
1081
1086
  current: "pageNo",
1082
1087
  tableData: "rows"
1083
1088
  });
1084
- if (Xe(i)) return i;
1089
+ if (tt(r)) return r;
1085
1090
  }
1086
1091
  return {
1087
1092
  total: "records",
@@ -1089,342 +1094,361 @@ const Ye = {
1089
1094
  current: "pageNo",
1090
1095
  tableData: "rows"
1091
1096
  };
1092
- }), y = B(() => {
1093
- const i = l == null ? void 0 : l.proxy;
1094
- if (!i || !i.$children) return {};
1095
- const w = i.$children.find((C) => {
1096
- var O;
1097
- return ((O = C == null ? void 0 : C.$options) == null ? void 0 : O.name) === "EsForm";
1097
+ }), w = B(() => {
1098
+ const r = l == null ? void 0 : l.proxy;
1099
+ if (!r || !r.$children) return {};
1100
+ const R = r.$children.find((C) => {
1101
+ var I;
1102
+ return ((I = C == null ? void 0 : C.$options) == null ? void 0 : I.name) === "EsForm";
1098
1103
  });
1099
- return w ? (K.value = w, U(w), w) : {};
1100
- }), I = B(() => {
1101
- const i = o.default;
1102
- if (typeof i == "function") {
1103
- const C = i();
1104
+ return R ? (s.value = R, U(R), R) : {};
1105
+ }), A = B(() => {
1106
+ const r = o.default;
1107
+ if (typeof r == "function") {
1108
+ const C = r();
1104
1109
  return Array.isArray(C) ? C.length > 0 : !!C;
1105
1110
  }
1106
- const w = o.default;
1107
- return Array.isArray(w) && w.length > 0;
1108
- }), R = B(
1111
+ const R = o.default;
1112
+ return Array.isArray(R) && R.length > 0;
1113
+ }), x = B(
1109
1114
  () => n.options.heightType || "auto"
1110
- ), x = B(() => typeof n.options.tabHeight == "number" ? `${n.options.tabHeight}px` : R.value === "height" && typeof n.options.height == "number" ? `${n.options.height}px` : "100%"), j = B(() => ({
1111
- [R.value]: x.value
1112
- })), Z = B(() => n.headBarClass ? {
1115
+ ), D = B(() => typeof n.options.tabHeight == "number" ? `${n.options.tabHeight}px` : x.value === "height" && typeof n.options.height == "number" ? `${n.options.height}px` : "100%"), Q = B(() => ({
1116
+ [x.value]: D.value
1117
+ })), j = B(() => n.headBarClass ? {
1113
1118
  type: typeof n.headBarClass == "string" ? "string" : "object",
1114
1119
  value: n.headBarClass
1115
- } : { type: "string", value: "" }), E = B(() => {
1116
- const i = c == null ? void 0 : c.paginationLayout;
1117
- return i ? typeof i == "function" ? i() : i : null;
1118
- }), ne = B(
1120
+ } : { type: "string", value: "" }), ne = B(() => {
1121
+ const r = j.value;
1122
+ return r.type === "object" && r.value && typeof r.value == "object" ? r.value : {};
1123
+ }), oe = B(() => {
1124
+ const r = j.value;
1125
+ return r.type === "string" ? r.value : "";
1126
+ }), le = B(() => {
1127
+ const r = c == null ? void 0 : c.paginationLayout;
1128
+ return r ? typeof r == "function" ? r() : r : null;
1129
+ }), be = B(
1119
1130
  () => {
1120
- var i;
1121
- return ((i = E.value) == null ? void 0 : i.layout) || "prev, pager, next, jumper, sizes, ->, total";
1131
+ var r;
1132
+ return ((r = le.value) == null ? void 0 : r.layout) || "prev, pager, next, jumper, sizes, ->, total";
1122
1133
  }
1123
- ), oe = B(
1134
+ ), De = B(
1124
1135
  () => {
1125
- var i;
1126
- return ((i = E.value) == null ? void 0 : i.pageSizes) || H.value.pageSizes;
1136
+ var r;
1137
+ return ((r = le.value) == null ? void 0 : r.pageSizes) || O.value.pageSizes;
1127
1138
  }
1128
- ), de = B(
1139
+ ), je = B(
1129
1140
  () => {
1130
- var i, w;
1131
- return (w = (i = E.value) == null ? void 0 : i.isSmall) != null ? w : H.value.isSmall;
1141
+ var r, R;
1142
+ return (R = (r = le.value) == null ? void 0 : r.isSmall) != null ? R : O.value.isSmall;
1132
1143
  }
1133
- ), he = B(
1144
+ ), de = B(
1134
1145
  () => {
1135
- var i, w;
1136
- return (w = (i = E.value) == null ? void 0 : i.background) != null ? w : !0;
1146
+ var r, R;
1147
+ return (R = (r = le.value) == null ? void 0 : r.background) != null ? R : !0;
1137
1148
  }
1138
- ), Te = B(() => ({
1139
- position: R.value === "height" ? "absolute" : "static",
1149
+ ), xe = B(() => ({
1150
+ position: x.value === "height" ? "absolute" : "static",
1140
1151
  bottom: "0px",
1141
1152
  left: "0px",
1142
- zIndex: 5,
1153
+ // z-index 必须高于 element-loading 蒙层(默认 2000),否则请求加载过程中分页会被蒙层遮挡。
1154
+ zIndex: 2001,
1143
1155
  background: "#fff"
1144
- })), ze = B(() => n.options.loading || T.value), re = B(
1156
+ })), Ie = B(() => n.options.loading || E.value), ge = B(
1145
1157
  () => !!n.options.actionUrl || n.options.apiParams && fe(n.options.apiParams) && Object.keys(n.options.apiParams).length > 0
1146
- ), ke = B(() => {
1147
- const i = _.value.filter((C) => !C.hidCol);
1148
- if (i.forEach((C) => {
1158
+ ), Oe = B(() => {
1159
+ const r = T.value.filter((C) => !C.hidCol);
1160
+ if (r.forEach((C) => {
1149
1161
  C.prop !== "operate" && C.key !== "operate" && (C.prop || C.key) && !C.formatter && (C.formatter = (P) => {
1150
- const O = P[C.prop] || P[C.key];
1151
- return O == null || O === "" ? C.emptyPlaceholder || "-" : O;
1152
- }), (C.prop === "operate" || C.key === "operate") && C.btns && !C.render && (C.render = (P, { row: O }) => {
1153
- var ie;
1154
- return le("div", [
1155
- (ie = C.btns) == null ? void 0 : ie.filter((N) => k(N.permissionValue)).map(
1156
- (N) => (
1162
+ const I = P[C.prop] || P[C.key];
1163
+ return I == null || I === "" ? C.emptyPlaceholder || "-" : I;
1164
+ }), (C.prop === "operate" || C.key === "operate") && C.btns && !C.render && (C.render = (P, { row: I }) => {
1165
+ var se;
1166
+ return ce("div", [
1167
+ (se = C.btns) == null ? void 0 : se.filter((Y) => F(Y.permissionValue)).map(
1168
+ (Y) => (
1157
1169
  // Element UI text 按钮:type="text" 而非 text 属性
1158
- le(
1170
+ ce(
1159
1171
  "el-button",
1160
1172
  {
1161
1173
  props: {
1162
1174
  type: "text"
1163
1175
  },
1164
1176
  attrs: {
1165
- ...N.type ? { "data-btn-type": N.type } : {}
1177
+ ...Y.type ? { "data-btn-type": Y.type } : {}
1166
1178
  },
1167
1179
  on: {
1168
1180
  click: () => {
1169
- var ue;
1170
- return (ue = N.clickEvent) == null ? void 0 : ue.call(N, O);
1181
+ var re;
1182
+ return (re = Y.clickEvent) == null ? void 0 : re.call(Y, I);
1171
1183
  }
1172
1184
  }
1173
1185
  },
1174
- N.name
1186
+ Y.name
1175
1187
  )
1176
1188
  )
1177
1189
  )
1178
1190
  ]);
1179
1191
  });
1180
- }), i.length > 0 && i.every((C) => C.width && !C.minWidth)) {
1192
+ }), r.length > 0 && r.every((C) => C.width && !C.minWidth)) {
1181
1193
  let C = -1;
1182
- for (let P = i.length - 1; P >= 0; P--) {
1183
- const O = i[P];
1184
- if (!O.fixed && O.prop !== "operate" && O.key !== "operate") {
1194
+ for (let P = r.length - 1; P >= 0; P--) {
1195
+ const I = r[P];
1196
+ if (!I.fixed && I.prop !== "operate" && I.key !== "operate") {
1185
1197
  C = P;
1186
1198
  break;
1187
1199
  }
1188
1200
  }
1189
- if (C === -1 && (C = i.length - 1), C >= 0) {
1190
- const P = i[C];
1201
+ if (C === -1 && (C = r.length - 1), C >= 0) {
1202
+ const P = r[C];
1191
1203
  P.minWidth = P.width, delete P.width;
1192
1204
  }
1193
1205
  }
1194
- return i;
1195
- }), xe = B(() => {
1196
- const i = Jt({ ...Ye, ...n.options }), { align: w, ...C } = i, P = {};
1197
- for (const O in C)
1198
- Ut.has(O) || (P[O] = C[O]);
1206
+ return r;
1207
+ }), Re = B(() => {
1208
+ const r = en({ ...et, ...n.options }), { align: R, ...C } = r, P = {};
1209
+ for (const I in C)
1210
+ Yt.has(I) || (P[I] = C[I]);
1199
1211
  if (P.size !== void 0) {
1200
- const O = Le(P.size);
1201
- O !== void 0 && (P.size = O);
1212
+ const I = ze(P.size);
1213
+ I !== void 0 && (P.size = I);
1202
1214
  }
1203
1215
  return P;
1204
- }), { tableHeight: ve, resizeObservers: Ie } = Kt(
1216
+ }), { tableHeight: _e, resizeObservers: ye } = Zt(
1205
1217
  p,
1206
- r,
1218
+ a,
1207
1219
  g,
1208
1220
  f,
1209
1221
  {
1210
- heightType: R.value,
1222
+ heightType: x.value,
1211
1223
  tabHeight: n.options.tabHeight
1212
1224
  }
1213
- ), Re = B(() => {
1214
- const i = { ...xe.value, ...t };
1215
- return n.options.rowkey && (i.rowKey = n.options.rowkey), R.value === "height" ? i.height = ve.value : R.value === "maxHeight" && (i.maxHeight = ve.value), i;
1225
+ ), we = B(() => {
1226
+ const r = { ...Re.value, ...t };
1227
+ return n.options.rowkey && (r.rowKey = n.options.rowkey), x.value === "height" ? r.height = _e.value : x.value === "maxHeight" && (r.maxHeight = _e.value), r;
1216
1228
  }), {
1217
- multipleSelection: Oe,
1218
- handleSelectionChange: we,
1219
- initSelection: Pe,
1220
- clearAllSelection: be
1221
- } = Wt(n.options.rowkey), m = (i) => {
1222
- we(i, H.value.current || 1);
1229
+ multipleSelection: Pe,
1230
+ handleSelectionChange: He,
1231
+ initSelection: m,
1232
+ clearAllSelection: v
1233
+ } = Gt(n.options.rowkey), L = (r) => {
1234
+ He(r, O.value.current || 1);
1223
1235
  };
1224
- ce(Q, async (i, w) => {
1236
+ ue(J, async (r, R) => {
1225
1237
  var C, P;
1226
- i && i !== w && (n.options.actionUrl && await F(), (P = (C = d.value) == null ? void 0 : C.doLayout) == null || P.call(C));
1227
- }), ce(
1238
+ r && r !== R && (n.options.actionUrl && await $e(), (P = (C = d.value) == null ? void 0 : C.doLayout) == null || P.call(C));
1239
+ });
1240
+ let H = JSON.stringify(n.pagination || {});
1241
+ n.pagination && Object.keys(n.pagination).length && (O.value = { ...O.value, ...n.pagination }, M.value = n.pagination.total !== void 0);
1242
+ const k = () => {
1243
+ const r = { ...O.value };
1244
+ H = JSON.stringify(r), e("update:pagination", r);
1245
+ };
1246
+ ue(
1228
1247
  () => n.pagination,
1229
- (i) => {
1230
- H.value = { ...H.value, ...i }, M.value = i.total !== void 0;
1231
- },
1232
- { deep: !0, immediate: !0 }
1233
- ), ce(
1248
+ (r) => {
1249
+ const R = JSON.stringify(r || {});
1250
+ R !== H && (H = R, O.value = { ...O.value, ...r }, M.value = r.total !== void 0);
1251
+ }
1252
+ ), ue(
1234
1253
  () => n.dataSource,
1235
- (i) => {
1236
- Pe(i, d.value);
1237
- },
1238
- { deep: !0 }
1239
- ), ce(
1240
- h,
1241
- (i) => {
1242
- Array.isArray(i) && e("update:dataSource", i);
1243
- },
1244
- { deep: !0 }
1245
- ), De(() => {
1246
- re.value && n.options.isInitRun !== !1 && F(), Fe(() => {
1247
- y.value;
1254
+ (r) => {
1255
+ m(r, d.value);
1256
+ }
1257
+ );
1258
+ let $ = null;
1259
+ ue(y, (r) => {
1260
+ Array.isArray(r) && r !== $ && ($ = r, e("update:dataSource", r));
1261
+ }), Ne(() => {
1262
+ V(), ge.value && n.options.isInitRun !== !1 && $e(), Fe(() => {
1263
+ V(), w.value, typeof requestAnimationFrame != "undefined" ? requestAnimationFrame(() => {
1264
+ V(), ye();
1265
+ }) : ye();
1248
1266
  });
1249
1267
  });
1250
- const v = (i, w) => {
1251
- const C = n.options.listenToCallBack;
1252
- if (!C) return;
1253
- const P = yt(C, i);
1254
- if (typeof P == "function")
1255
- return P(w);
1256
- }, $ = (i, w) => {
1257
- const C = u.value;
1258
- fe(C) && Object.keys(C).length && Object.entries(C).forEach(([P, O]) => {
1259
- var ue;
1260
- if (!w.includes(P)) return;
1261
- const N = (ue = i[O]) != null ? ue : ht(i, O);
1262
- P === "tableData" ? h.value = Array.isArray(N) ? N : [] : H.value[P] = typeof N == "number" ? N : parseInt(N, 10) || 0;
1263
- });
1264
- }, L = (i, w = {}) => {
1265
- var Qe, Je;
1266
- const { success: C, fail: P } = w, O = ((Qe = n.options) == null ? void 0 : Qe.apiParams) || {}, ie = ((Je = n.options) == null ? void 0 : Je.actionUrl) || O.url || "";
1267
- if (!ie || !Object.keys(O).length) return;
1268
- const N = y.value, ue = N && N.props && N.props.model ? { ...N.props.model } : s.value || {}, Ke = v("beforeRequest", {
1269
- ...ue,
1270
- ...i,
1271
- ...O.model || {}
1272
- }), st = fe(Ke) ? Ke : { ...ue, ...O.model || {}, ...i }, We = { ...O.options || {} };
1273
- O != null && O.method && (We.method = O == null ? void 0 : O.method);
1274
- const Ue = async (rt) => {
1275
- if (!T.value) {
1276
- T.value = !0;
1268
+ const q = (r, R) => {
1269
+ const C = [
1270
+ { eventName: "brcb", isReturn: !0 },
1271
+ { eventName: "qrcb", isReturn: !0 }
1272
+ ], P = C.findIndex((I) => I.eventName === r);
1273
+ if (n.options.listenToCallBack && n.options.listenToCallBack[r] && P !== -1 && C[P].isReturn)
1274
+ return n.options.listenToCallBack[r](R);
1275
+ }, Z = (r, R) => {
1276
+ const C = h.value;
1277
+ if (fe(C) && Object.keys(C).length) {
1278
+ const P = {};
1279
+ Object.entries(C).forEach(([I, se]) => {
1280
+ var Ce;
1281
+ if (!R.includes(I)) return;
1282
+ const re = (Ce = r[se]) != null ? Ce : St(r, se);
1283
+ I === "tableData" ? y.value = Array.isArray(re) ? re : [] : P[I] = typeof re == "number" ? re : parseInt(re, 10) || 0;
1284
+ }), Object.keys(P).length && (O.value = { ...O.value, ...P });
1285
+ }
1286
+ }, G = (r, R = {}) => {
1287
+ var Ze, Ge;
1288
+ const { success: C, fail: P } = R, I = ((Ze = n.options) == null ? void 0 : Ze.apiParams) || {}, se = ((Ge = n.options) == null ? void 0 : Ge.actionUrl) || I.url || "";
1289
+ if (!se || !Object.keys(I).length) return;
1290
+ const Y = w.value, re = Y && Y.props && Y.props.model ? { ...Y.props.model } : u.value || {}, Ce = q("brcb", {
1291
+ ...re,
1292
+ ...r,
1293
+ ...I.model || {}
1294
+ }), ut = fe(Ce) ? Ce : { ...re, ...I.model || {}, ...r }, Qe = { ...I.options || {} };
1295
+ I != null && I.method && (Qe.method = I == null ? void 0 : I.method);
1296
+ const Je = async (dt) => {
1297
+ if (!E.value) {
1298
+ E.value = !0;
1277
1299
  try {
1278
- const ge = await rt({
1279
- url: ie,
1280
- formParams: st,
1281
- headers: O.headers || {},
1282
- ...We,
1283
- ...i
1284
- }), at = v("afterResponse", ge) || ge;
1285
- fe(ge) && Object.keys(ge).length && typeof C == "function" && C(at);
1286
- } catch (ge) {
1287
- typeof P == "function" && P(ge);
1300
+ const he = await dt({
1301
+ url: se,
1302
+ formParams: ut,
1303
+ headers: I.headers || {},
1304
+ ...Qe,
1305
+ ...r
1306
+ }), ft = q("qrcb", he) || he;
1307
+ fe(he) && Object.keys(he).length && typeof C == "function" && C(ft);
1308
+ } catch (he) {
1309
+ typeof P == "function" && P(he);
1288
1310
  } finally {
1289
- T.value = !1;
1311
+ E.value = !1;
1290
1312
  }
1291
1313
  }
1292
1314
  };
1293
- n.options.httpRequest ? Ue(n.options.httpRequest) : c.$httpRequest && Ue(c.$httpRequest);
1294
- }, F = (i) => new Promise((w, C) => {
1295
- H.value.current = 1, L(
1315
+ n.options.httpRequest ? Je(n.options.httpRequest) : c.$httpRequest && Je(c.$httpRequest);
1316
+ }, $e = (r) => new Promise((R, C) => {
1317
+ O.value = { ...O.value, current: 1 }, G(
1296
1318
  {
1297
- ...i || {},
1298
- pageIndex: H.value.current,
1299
- pageSize: H.value.pageSize
1319
+ ...r || {},
1320
+ pageIndex: O.value.current,
1321
+ pageSize: O.value.pageSize
1300
1322
  },
1301
1323
  {
1302
1324
  success: (P) => {
1303
- $(P, ["total", "tableData"]), Object.keys(n.pagination).length && e("update:pagination", H.value), w(P);
1325
+ Z(P, ["total", "tableData"]), Object.keys(n.pagination).length && k(), R(P);
1304
1326
  },
1305
1327
  fail: (P) => {
1306
1328
  C(P);
1307
1329
  }
1308
1330
  }
1309
1331
  );
1310
- }), A = () => {
1311
- L(
1332
+ }), rt = () => {
1333
+ G(
1312
1334
  {
1313
- pageIndex: H.value.current,
1314
- pageSize: H.value.pageSize
1335
+ pageIndex: O.value.current,
1336
+ pageSize: O.value.pageSize
1315
1337
  },
1316
1338
  {
1317
- success: (i) => {
1318
- $(i, ["total", "tableData"]), e("update:pagination", H.value), e("pagination-current-change", H.value);
1339
+ success: (r) => {
1340
+ Z(r, ["total", "tableData"]), k(), e("pagination-current-change", O.value);
1319
1341
  }
1320
1342
  }
1321
1343
  );
1322
- }, q = () => {
1323
- L(
1344
+ }, at = () => {
1345
+ G(
1324
1346
  {
1325
- pageIndex: H.value.current,
1326
- pageSize: H.value.pageSize
1347
+ pageIndex: O.value.current,
1348
+ pageSize: O.value.pageSize
1327
1349
  },
1328
1350
  {
1329
- success: (i) => {
1330
- $(i, ["total", "tableData"]), e("update:pagination", H.value);
1351
+ success: (r) => {
1352
+ Z(r, ["total", "tableData"]), k();
1331
1353
  }
1332
1354
  }
1333
1355
  );
1334
- }, X = (i) => {
1335
- H.value.pageSize = i, H.value.current = 1, re.value ? q() : (e("update:pagination", H.value), e("size-change", H.value, i));
1336
- }, ee = (i) => {
1337
- H.value.current = i, re.value ? A() : (e("update:pagination", H.value), e("pagination-current-change", H.value));
1338
- }, ot = (i) => {
1339
- e("change-table-sort", i);
1356
+ }, lt = (r) => {
1357
+ O.value = { ...O.value, pageSize: r, current: 1 }, ge.value ? at() : (k(), e("size-change", O.value, r));
1358
+ }, it = (r) => {
1359
+ O.value = { ...O.value, current: r }, ge.value ? rt() : (k(), e("pagination-current-change", O.value));
1360
+ }, ct = (r) => {
1361
+ e("change-table-sort", r);
1340
1362
  };
1341
- tt("getTableInstantce", () => ({
1363
+ ot("getTableInstantce", () => ({
1342
1364
  tableRef: d,
1343
- toggleSelection: (i) => {
1344
- var w, C;
1345
- i ? i.forEach((P) => {
1346
- var O, ie;
1347
- (ie = (O = d.value) == null ? void 0 : O.toggleRowSelection) == null || ie.call(O, P);
1348
- }) : (C = (w = d.value) == null ? void 0 : w.clearSelection) == null || C.call(w);
1365
+ toggleSelection: (r) => {
1366
+ var R, C;
1367
+ r ? r.forEach((P) => {
1368
+ var I, se;
1369
+ (se = (I = d.value) == null ? void 0 : I.toggleRowSelection) == null || se.call(I, P);
1370
+ }) : (C = (R = d.value) == null ? void 0 : R.clearSelection) == null || C.call(R);
1349
1371
  },
1350
- clearAllSelection: () => be(d.value),
1372
+ clearAllSelection: () => v(d.value),
1351
1373
  refsInstance: () => d.value,
1352
- httpRequestInstance: F
1374
+ httpRequestInstance: $e
1353
1375
  }));
1354
- const je = {
1355
- httpRequestInstance: F,
1356
- getSelectionRows: () => Oe.value,
1376
+ const Me = {
1377
+ httpRequestInstance: $e,
1378
+ getSelectionRows: () => Pe.value,
1357
1379
  clearSelection: () => {
1358
- var i, w;
1359
- return (w = (i = d.value) == null ? void 0 : i.clearSelection) == null ? void 0 : w.call(i);
1380
+ var r, R;
1381
+ return (R = (r = d.value) == null ? void 0 : r.clearSelection) == null ? void 0 : R.call(r);
1360
1382
  },
1361
- clearAllSelection: () => be(d.value),
1383
+ clearAllSelection: () => v(d.value),
1362
1384
  refresh: () => {
1363
- var i, w;
1364
- return (w = (i = d.value) == null ? void 0 : i.doLayout) == null ? void 0 : w.call(i);
1385
+ var r, R;
1386
+ return (R = (r = d.value) == null ? void 0 : r.doLayout) == null ? void 0 : R.call(r);
1365
1387
  },
1366
1388
  // virtual 滚动占位(保持 API 一致,Vue 2 版本无效)
1367
- scrollToRow: (i) => {
1389
+ scrollToRow: (r) => {
1368
1390
  }
1369
1391
  };
1370
- return typeof a == "function" && a(je), {
1392
+ return typeof i == "function" && i(Me), {
1371
1393
  // refs
1372
1394
  tableRef: d,
1373
1395
  tbBtnRef: g,
1374
- headBarRef: r,
1396
+ headBarRef: a,
1375
1397
  paginationRef: f,
1376
1398
  tableId: b,
1377
- tableData: h,
1399
+ tableData: y,
1400
+ effectiveDataSource: _,
1378
1401
  // state
1379
- loadStatus: ze,
1380
- paginationConfig: H,
1381
- formInstance: K,
1402
+ loadStatus: Ie,
1403
+ paginationConfig: O,
1404
+ formInstance: s,
1382
1405
  // computeds
1383
- filteredColumns: ke,
1384
- tableBindAttrs: Re,
1385
- hasDefaultSlot: I,
1386
- heightType: R,
1387
- tabHeight: x,
1388
- slotStyles: Z,
1389
- slotState: D,
1406
+ filteredColumns: Oe,
1407
+ tableBindAttrs: we,
1408
+ hasDefaultSlot: A,
1409
+ heightType: x,
1410
+ tabHeight: D,
1411
+ slotStyles: j,
1412
+ slotStyleValue: ne,
1413
+ slotClassValue: oe,
1414
+ slotState: N,
1390
1415
  showPagination: M,
1391
- containerStyle: j,
1392
- paginationStyle: Te,
1393
- layout: ne,
1394
- paginationPageSizes: oe,
1395
- paginationIsSmall: de,
1396
- paginationBackground: he,
1416
+ containerStyle: Q,
1417
+ paginationStyle: xe,
1418
+ layout: be,
1419
+ paginationPageSizes: De,
1420
+ paginationIsSmall: je,
1421
+ paginationBackground: de,
1397
1422
  // handlers
1398
- setTableContainer: W,
1399
- handleTableSelectionChange: m,
1400
- changeTableSort: ot,
1401
- handleSizeChange: X,
1402
- handleIndexChange: ee,
1423
+ handleTableSelectionChange: L,
1424
+ changeTableSort: ct,
1425
+ handleSizeChange: lt,
1426
+ handleIndexChange: it,
1403
1427
  // exposed methods (also accessible via $refs.tableRef.xxx in Vue 2)
1404
- ...je,
1428
+ ...Me,
1405
1429
  instance: l,
1406
- resizeObservers: Ie
1430
+ resizeObservers: ye
1407
1431
  };
1408
1432
  }
1409
1433
  });
1410
- var Gt = function() {
1434
+ var nn = function() {
1411
1435
  var e = this, o = e._self._c;
1412
- return e._self._setupProxy, o("div", { ref: e.setTableContainer, staticClass: "table_component", style: e.containerStyle }, [o("div", { staticClass: "table_containers" }, [e.showHeaderBar ? o("div", { ref: "headBarRef", staticClass: "btn-slot", class: e.slotStyles.type === "string" ? e.slotStyles.value : null, style: e.slotStyles.type === "object" ? e.slotStyles.value : null }, [e.hasDefaultSlot ? o("div", { staticClass: "headerBar", style: { paddingBottom: e.hasDefaultSlot ? "10px" : "0px" } }, [e._t("default")], 2) : e._e()]) : e._e(), o("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.loadStatus, expression: "loadStatus" }], staticClass: "page-loading-con tableContainer", attrs: { "element-loading-background": "rgba(0, 0, 0, 0.03)", "element-loading-text": "努力加载中..." } }, [o("div", { staticClass: "table_inner_containers" }, [e.options.configBtn && e.options.configBtn.length || e.options.leftText ? o("table-btns", { ref: "tbBtnRef", attrs: { instance: { tableRef: e.instance, formInstance: e.formInstance }, "btn-config": e.options.configBtn, "left-text": e.options.leftText } }) : e._e(), o("el-table", e._b({ key: e.tableId, ref: "tableRef", staticClass: "el-dp_tables", staticStyle: { width: "100%" }, attrs: { id: e.tableId, data: e.dataSource }, on: { "sort-change": e.changeTableSort, "selection-change": e.handleTableSelectionChange }, scopedSlots: e._u([{ key: "empty", fn: function() {
1436
+ return e._self._setupProxy, o("div", { ref: "tableContainerEl", staticClass: "table_component", style: e.containerStyle }, [o("div", { staticClass: "table_containers" }, [e.showHeaderBar ? o("div", { ref: "headBarRef", staticClass: "btn-slot", class: e.slotClassValue, style: e.slotStyleValue }, [e.hasDefaultSlot ? o("div", { staticClass: "headerBar", style: { paddingBottom: e.hasDefaultSlot ? "10px" : "0px" } }, [e._t("default")], 2) : e._e()]) : e._e(), o("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.loadStatus, expression: "loadStatus" }], staticClass: "page-loading-con tableContainer", attrs: { "element-loading-background": "rgba(0, 0, 0, 0.03)", "element-loading-text": "努力加载中..." } }, [o("div", { staticClass: "table_inner_containers" }, [e.options.configBtn && e.options.configBtn.length || e.options.leftText ? o("table-btns", { ref: "tbBtnRef", attrs: { instance: { tableRef: e.instance, formInstance: e.formInstance }, "btn-config": e.options.configBtn, "left-text": e.options.leftText } }) : e._e(), o("el-table", e._b({ key: e.tableId, ref: "tableRef", staticClass: "el-dp_tables", staticStyle: { width: "100%" }, attrs: { id: e.tableId, data: e.effectiveDataSource }, on: { "sort-change": e.changeTableSort, "selection-change": e.handleTableSelectionChange }, scopedSlots: e._u([{ key: "empty", fn: function() {
1413
1437
  return [o("div", { staticClass: "ant-empty ant-empty-normal" }, [o("div", { staticClass: "ant-empty-image" }, [o("svg", { staticClass: "ant-empty-img-simple", attrs: { width: "64", height: "41", viewBox: "0 0 64 41", xmlns: "http://www.w3.org/2000/svg" } }, [o("g", { attrs: { transform: "translate(0 1)", fill: "none", "fill-rule": "evenodd" } }, [o("ellipse", { staticClass: "ant-empty-img-simple-ellipse", attrs: { cx: "32", cy: "33", rx: "32", ry: "7" } }), o("g", { staticClass: "ant-empty-img-simple-g", attrs: { "fill-rule": "nonzero" } }, [o("path", { attrs: { d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" } }), o("path", { staticClass: "ant-empty-img-simple-path", attrs: { d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" } })])])])]), o("div", { staticClass: "ant-empty-description" }, [e._v("暂无数据")])])];
1414
- }, proxy: !0 }]) }, "el-table", e.tableBindAttrs, !1), e._l(e.filteredColumns, function(t, a) {
1415
- return o("column-item", { key: t.prop || t.key || a, attrs: { cols: Object.assign({}, t, { columnIndex: a }) }, scopedSlots: e._u([t.scopedSlots && t.scopedSlots.customRender ? { key: t.scopedSlots.customRender, fn: function({ scope: l }) {
1438
+ }, proxy: !0 }]) }, "el-table", e.tableBindAttrs, !1), e._l(e.filteredColumns, function(t, i) {
1439
+ return o("column-item", { key: t.prop || t.key || i, attrs: { cols: Object.assign({}, t, { columnIndex: i }) }, scopedSlots: e._u([t.scopedSlots && t.scopedSlots.customRender ? { key: t.scopedSlots.customRender, fn: function({ scope: l }) {
1416
1440
  return [e._t(
1417
1441
  t.scopedSlots.customRender,
1418
1442
  null,
1419
1443
  { scope: l },
1420
1444
  Object.assign({}, t, {
1421
- columnIndex: a,
1445
+ columnIndex: i,
1422
1446
  row: l.row,
1423
1447
  column: l.column
1424
1448
  })
1425
1449
  )];
1426
1450
  } } : null], null, !0) });
1427
- }), 1)], 1), e.showPagination ? o("div", { ref: "paginationRef", staticClass: "pagination_page", style: e.paginationStyle }, [o("el-pagination", { staticStyle: { padding: "0", margin: "10px 0", "text-align": "center" }, attrs: { background: e.paginationBackground, size: e.paginationIsSmall ? "small" : e.paginationConfig.size, total: e.paginationConfig.total, "page-size": e.paginationConfig.pageSize, "page-sizes": e.paginationPageSizes, "current-page": e.paginationConfig.current, layout: e.layout }, on: { "update:pageSize": function(t) {
1451
+ }), 1)], 1)]), e.showPagination ? o("div", { ref: "paginationRef", staticClass: "pagination_page" }, [o("el-pagination", { staticStyle: { padding: "0", margin: "10px 0", "text-align": "center" }, attrs: { background: e.paginationBackground, size: e.paginationIsSmall ? "small" : e.paginationConfig.size, total: e.paginationConfig.total, "page-size": e.paginationConfig.pageSize, "page-sizes": e.paginationPageSizes, "current-page": e.paginationConfig.current, layout: e.layout }, on: { "update:pageSize": function(t) {
1428
1452
  return e.$set(e.paginationConfig, "pageSize", t);
1429
1453
  }, "update:page-size": function(t) {
1430
1454
  return e.$set(e.paginationConfig, "pageSize", t);
@@ -1432,20 +1456,20 @@ var Gt = function() {
1432
1456
  return e.$set(e.paginationConfig, "current", t);
1433
1457
  }, "update:current-page": function(t) {
1434
1458
  return e.$set(e.paginationConfig, "current", t);
1435
- }, "size-change": e.handleSizeChange, "current-change": e.handleIndexChange } })], 1) : e._e()])])]);
1436
- }, Yt = [], Xt = /* @__PURE__ */ me(
1437
- Zt,
1438
- Gt,
1439
- Yt,
1459
+ }, "size-change": e.handleSizeChange, "current-change": e.handleIndexChange } })], 1) : e._e()])]);
1460
+ }, on = [], sn = /* @__PURE__ */ me(
1461
+ tn,
1462
+ nn,
1463
+ on,
1440
1464
  !1,
1441
1465
  null,
1442
- "c0ea98f4"
1466
+ "112d9efc"
1443
1467
  );
1444
- const Se = Xt.exports;
1445
- Se.install = function(n) {
1446
- n.component(Se.name || "EsTable", Se);
1468
+ const Be = sn.exports;
1469
+ Be.install = function(n) {
1470
+ n.component(Be.name || "EsTable", Be);
1447
1471
  };
1448
- const en = se({
1472
+ const rn = ae({
1449
1473
  name: "RenderJsx",
1450
1474
  props: {
1451
1475
  refs: { type: [Function, Object], default: null },
@@ -1457,43 +1481,43 @@ const en = se({
1457
1481
  components: { type: Object, default: () => ({}) }
1458
1482
  },
1459
1483
  setup(n) {
1460
- const e = n.refs && typeof n.refs == "object" ? n.refs : $e({});
1484
+ const e = n.refs && typeof n.refs == "object" ? n.refs : Te({});
1461
1485
  let o = null;
1462
1486
  function t() {
1463
1487
  if (!o) return;
1464
- const a = o.componentInstance;
1465
- a && (e.currentRef = a);
1488
+ const i = o.componentInstance;
1489
+ i && (e.currentRef = i);
1466
1490
  }
1467
- return De(() => t()), _t(() => t()), () => {
1468
- const { instance: a } = n, l = {
1469
- ...a,
1470
- registerRef: (k, d) => {
1471
- d != null && (e[k] = d);
1491
+ return Ne(() => t()), Ft(() => t()), () => {
1492
+ const { instance: i } = n, l = {
1493
+ ...i,
1494
+ registerRef: (F, d) => {
1495
+ d != null && (e[F] = d);
1472
1496
  },
1473
1497
  getRefs: () => e
1474
- }, c = n.render, S = c && typeof c == "function" ? c(le, l, n.components || {}) : "";
1475
- return typeof S == "string" || typeof S == "number" ? (o = null, le(
1498
+ }, c = n.render, S = c && typeof c == "function" ? c(ce, l, n.components || {}) : "";
1499
+ return typeof S == "string" || typeof S == "number" ? (o = null, ce(
1476
1500
  "span",
1477
1501
  {
1478
1502
  ref: "currentRef"
1479
1503
  // Vue 2 的函数式 ref 通过 v-bind 不可直接传,用以下方式赋值
1480
1504
  },
1481
1505
  [String(S)]
1482
- )) : S && typeof S == "object" && "tag" in S ? S.componentOptions ? (o = S, S) : (o = null, le("div", [S])) : (o = null, le("div", [String(S || "")]));
1506
+ )) : S && typeof S == "object" && "tag" in S ? S.componentOptions ? (o = S, S) : (o = null, ce("div", [S])) : (o = null, ce("div", [String(S || "")]));
1483
1507
  };
1484
1508
  }
1485
- }), tn = null, nn = null;
1486
- var on = /* @__PURE__ */ me(
1487
- en,
1488
- tn,
1489
- nn,
1509
+ }), an = null, ln = null;
1510
+ var cn = /* @__PURE__ */ me(
1511
+ rn,
1512
+ an,
1513
+ ln,
1490
1514
  !1,
1491
1515
  null,
1492
1516
  null
1493
1517
  );
1494
- const sn = on.exports, rn = se({
1518
+ const un = cn.exports, dn = ae({
1495
1519
  name: "EsDialog",
1496
- components: { RenderJsx: sn },
1520
+ components: { RenderJsx: un },
1497
1521
  inheritAttrs: !1,
1498
1522
  props: {
1499
1523
  title: { type: String, default: "" },
@@ -1521,32 +1545,32 @@ const sn = on.exports, rn = se({
1521
1545
  components: { type: Object, default: () => ({}) }
1522
1546
  },
1523
1547
  emits: ["update:visible", "closed", "submit"],
1524
- setup(n, { emit: e, attrs: o, slots: t, expose: a }) {
1525
- var I, R;
1526
- const l = Ee(), c = z(null), S = $e({}), k = z(!1), d = l, g = (R = (I = ae("$EsPlus", null)) != null ? I : pe()) != null ? R : {}, r = (x) => {
1548
+ setup(n, { emit: e, attrs: o, slots: t, expose: i }) {
1549
+ var w, A;
1550
+ const l = qe(), c = z(null), S = Te({}), F = z(!1), d = l, g = (A = (w = ie("$EsPlus", null)) != null ? w : pe()) != null ? A : {}, a = (x) => {
1527
1551
  if (!x) return !0;
1528
- const j = g.permission;
1529
- return typeof j == "function" ? j(x) : !0;
1552
+ const D = g.permission;
1553
+ return typeof D == "function" ? D(x) : !0;
1530
1554
  }, f = (x) => {
1531
1555
  const {
1532
- icon: j,
1533
- click: Z,
1534
- permissionValue: E,
1556
+ icon: D,
1557
+ click: Q,
1558
+ permissionValue: j,
1535
1559
  name: ne,
1536
1560
  disabled: oe,
1537
- key: de,
1538
- ...he
1561
+ key: le,
1562
+ ...be
1539
1563
  } = x;
1540
- return he;
1564
+ return be;
1541
1565
  }, p = (x) => {
1542
- const j = x.disabled;
1543
- return typeof j == "function" ? j() : !!j;
1566
+ const D = x.disabled;
1567
+ return typeof D == "function" ? D() : !!D;
1544
1568
  }, b = () => {
1545
1569
  setTimeout(() => {
1546
- k.value && (k.value = !1);
1570
+ F.value && (F.value = !1);
1547
1571
  }, 500);
1548
- }, h = () => {
1549
- o != null && o.fullscreen || (k.value = !k.value);
1572
+ }, y = () => {
1573
+ o != null && o.fullscreen || (F.value = !F.value);
1550
1574
  }, _ = B({
1551
1575
  get: () => n.visible || !1,
1552
1576
  set: (x) => {
@@ -1554,152 +1578,152 @@ const sn = on.exports, rn = se({
1554
1578
  }
1555
1579
  }), T = () => {
1556
1580
  _.value = !1, e("closed", !1), b();
1557
- }, D = () => {
1581
+ }, E = () => {
1558
1582
  e("closed", !1), b();
1559
- }, M = () => {
1560
- }, W = (x) => {
1583
+ }, N = () => {
1584
+ }, M = (x) => {
1561
1585
  x();
1562
- }, U = B(() => ({ ...o })), V = B(() => k.value ? "dialogFull" : n.maxHeight ? "dialogShadow" : "dialogAuto"), Q = () => {
1586
+ }, V = B(() => ({ ...o })), U = B(() => F.value ? "dialogFull" : n.maxHeight ? "dialogShadow" : "dialogAuto"), K = () => {
1563
1587
  const x = typeof window != "undefined" ? window.innerHeight : 800;
1564
1588
  return Math.max(x - 135, 200);
1565
- }, H = B(() => {
1566
- const x = Q();
1567
- return k.value ? { height: x + "px" } : n.maxHeight ? {
1589
+ }, J = B(() => {
1590
+ const x = K();
1591
+ return F.value ? { height: x + "px" } : n.maxHeight ? {
1568
1592
  maxHeight: typeof n.maxHeight == "number" ? `${n.maxHeight}px` : n.maxHeight
1569
1593
  } : { maxHeight: x + "px" };
1570
- }), K = B(() => ({
1594
+ }), O = B(() => ({
1571
1595
  renderBodyRefs: S.currentRef,
1572
1596
  renderBodyRefsObject: S,
1573
1597
  lyFormInstance: c,
1574
1598
  dialogInstance: d,
1575
1599
  getRefs: () => S
1576
1600
  })), s = (x) => {
1577
- const j = x.click;
1578
- typeof j == "function" && j(S.currentRef, {
1601
+ const D = x.click;
1602
+ typeof D == "function" && D(S.currentRef, {
1579
1603
  close: T,
1580
- getRefs: (Z) => Z ? S[Z] || null : S,
1604
+ getRefs: (Q) => Q ? S[Q] || null : S,
1581
1605
  dialogInstance: d
1582
1606
  });
1583
1607
  };
1584
- tt("bodyFormInstance", (x) => {
1608
+ ot("bodyFormInstance", (x) => {
1585
1609
  c.value = x;
1586
1610
  });
1587
1611
  const u = B(() => ({
1588
1612
  ...n.components
1589
- })), y = {
1613
+ })), h = {
1590
1614
  closed: T
1591
1615
  };
1592
- return typeof a == "function" && a(y), {
1616
+ return typeof i == "function" && i(h), {
1593
1617
  // state
1594
1618
  dialogVisible: _,
1595
- isFullscreen: k,
1619
+ isFullscreen: F,
1596
1620
  lyFormInstance: c,
1597
1621
  renderBodyRefsObject: S,
1598
1622
  // computeds
1599
- filteredAttrs: U,
1600
- initDialogCls: V,
1601
- initDialogHeight: H,
1602
- getCurrentInstanceModel: K,
1623
+ filteredAttrs: V,
1624
+ initDialogCls: U,
1625
+ initDialogHeight: J,
1626
+ getCurrentInstanceModel: O,
1603
1627
  dialogComponents: u,
1604
1628
  // methods
1605
1629
  handleClose: T,
1606
- handleFullscreen: h,
1630
+ handleFullscreen: y,
1607
1631
  handleBtnClick: s,
1608
- onDialogClose: D,
1609
- onDialogClosed: M,
1610
- beforeCloseHandler: W,
1611
- checkPermission: r,
1632
+ onDialogClose: E,
1633
+ onDialogClosed: N,
1634
+ beforeCloseHandler: M,
1635
+ checkPermission: a,
1612
1636
  filterOptions: f,
1613
1637
  getDisabled: p,
1614
- getCompIcon: nt,
1638
+ getCompIcon: st,
1615
1639
  // exposed
1616
- ...y
1640
+ ...h
1617
1641
  };
1618
1642
  }
1619
1643
  });
1620
- var an = function() {
1644
+ var fn = function() {
1621
1645
  var e = this, o = e._self._c;
1622
1646
  return e._self._setupProxy, o("div", { staticClass: "dp-dialog_wrapper" }, [o("el-dialog", e._b({ class: ["dg-dialog", e.initDialogCls], attrs: { visible: e.dialogVisible, width: typeof e.width == "number" ? e.width + "px" : e.width, "show-close": !1, fullscreen: e.filteredAttrs && e.filteredAttrs.fullscreen != null ? e.filteredAttrs.fullscreen : e.isFullscreen, "append-to-body": e.appendToBody, "modal-append-to-body": e.modalAppendToBody, "close-on-click-modal": e.closeOnClickModal, "close-on-press-escape": e.closeOnPressEscape, "destroy-on-close": e.destroyOnClose, "before-close": e.beforeCloseHandler }, on: { "update:visible": function(t) {
1623
1647
  e.dialogVisible = t;
1624
1648
  }, close: e.onDialogClose, closed: e.onDialogClosed }, scopedSlots: e._u([{ key: "title", fn: function() {
1625
1649
  return [e.renderHeader && typeof e.renderHeader == "function" ? o("render-jsx", { attrs: { render: e.renderHeader, instance: e.getCurrentInstanceModel } }) : [o("div", { staticClass: "dialog-header" }, [o("span", { staticClass: "dialog-title" }, [e._v(e._s(e.title))]), o("div", { staticClass: "btns" }, [o("i", { directives: [{ name: "show", rawName: "v-show", value: !e.hiddenFullBtn, expression: "!hiddenFullBtn" }], class: e.isFullscreen ? "el-icon-copy-document" : "el-icon-full-screen", on: { click: e.handleFullscreen } }), o("i", { staticClass: "el-icon-close", on: { click: e.handleClose } })])])]];
1626
1650
  }, proxy: !0 }, e.isHiddenFooter ? null : { key: "footer", fn: function() {
1627
- return [e.$slots.footer ? e._t("footer") : o("span", { staticClass: "dialog-footer" }, [e.renderFooter && typeof e.renderFooter == "function" ? o("render-jsx", { attrs: { render: e.renderFooter, instance: e.getCurrentInstanceModel } }) : e.configBtn && e.configBtn.length ? [e._l(e.configBtn, function(t, a) {
1628
- return [e.checkPermission(t.permissionValue) ? o("el-button", e._b({ key: t.key || a, attrs: { size: "small", icon: e.getCompIcon(t.icon), disabled: e.getDisabled(t) }, on: { click: () => e.handleBtnClick(t) } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")]) : e._e()];
1651
+ return [e.$slots.footer ? e._t("footer") : o("span", { staticClass: "dialog-footer" }, [e.renderFooter && typeof e.renderFooter == "function" ? o("render-jsx", { attrs: { render: e.renderFooter, instance: e.getCurrentInstanceModel } }) : e.configBtn && e.configBtn.length ? [e._l(e.configBtn, function(t, i) {
1652
+ return [e.checkPermission(t.permissionValue) ? o("el-button", e._b({ key: t.key || i, attrs: { size: "small", icon: e.getCompIcon(t.icon), disabled: e.getDisabled(t) }, on: { click: () => e.handleBtnClick(t) } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")]) : e._e()];
1629
1653
  })] : e._e()], 2)];
1630
1654
  }, proxy: !0 }], null, !0) }, "el-dialog", e.filteredAttrs, !1), [o("div", { staticClass: "dialog_body_layouts", style: e.initDialogHeight }, [e.render && typeof e.render == "function" ? o("render-jsx", { attrs: { refs: e.renderBodyRefsObject, instance: e.getCurrentInstanceModel, render: e.render, components: e.dialogComponents } }) : e._e()], 1)])], 1);
1631
- }, ln = [], cn = /* @__PURE__ */ me(
1632
- rn,
1633
- an,
1634
- ln,
1655
+ }, pn = [], mn = /* @__PURE__ */ me(
1656
+ dn,
1657
+ fn,
1658
+ pn,
1635
1659
  !1,
1636
1660
  null,
1637
1661
  "1f2694c2"
1638
1662
  );
1639
- const Be = cn.exports, un = (n) => typeof n == "string" ? document.querySelector(n) || document.body : n instanceof HTMLElement ? n : document.body, dn = (n) => {
1663
+ const ke = mn.exports, gn = (n) => typeof n == "string" ? document.querySelector(n) || document.body : n instanceof HTMLElement ? n : document.body, yn = (n) => {
1640
1664
  const e = {}, o = {};
1641
- return Object.entries(n).forEach(([t, a]) => {
1642
- if (t.startsWith("on") && typeof a == "function" && t.length > 2) {
1665
+ return Object.entries(n).forEach(([t, i]) => {
1666
+ if (t.startsWith("on") && typeof i == "function" && t.length > 2) {
1643
1667
  const l = t.slice(2), c = l.charAt(0).toLowerCase() + l.slice(1);
1644
- e[c] = a;
1668
+ e[c] = i;
1645
1669
  } else
1646
- o[t] = a;
1670
+ o[t] = i;
1647
1671
  }), { propsData: o, events: e };
1648
- }, et = (n, e, o) => {
1649
- const { propsData: t, events: a } = dn(e), l = Ct.extend(n), c = new l({ propsData: t });
1650
- return Object.entries(a).forEach(([k, d]) => {
1651
- c.$on(k, d);
1652
- }), c.$mount(), un(o).appendChild(c.$el), c;
1672
+ }, nt = (n, e, o) => {
1673
+ const { propsData: t, events: i } = yn(e), l = xt.extend(n), c = new l({ propsData: t });
1674
+ return Object.entries(i).forEach(([F, d]) => {
1675
+ c.$on(F, d);
1676
+ }), c.$mount(), gn(o).appendChild(c.$el), c;
1653
1677
  };
1654
- function Ae(n, e = {}) {
1655
- if (n = n || Be, Object.assign({ onlyInstance: !1 }, e).onlyInstance) {
1678
+ function Ee(n, e = {}) {
1679
+ if (n = n || ke, Object.assign({ onlyInstance: !1 }, e).onlyInstance) {
1656
1680
  let t = null;
1657
- const a = () => {
1681
+ const i = () => {
1658
1682
  t && (t.visible = !1, setTimeout(() => {
1659
1683
  t && (t.$destroy(), t.$el && t.$el.parentNode && t.$el.parentNode.removeChild(t.$el), t = null);
1660
1684
  }, 300));
1661
1685
  }, l = (c) => {
1662
1686
  c.visible === void 0 && (c.visible = !0);
1663
- const S = c.onClosed, k = c.onSubmit;
1687
+ const S = c.onClosed, F = c.onSubmit;
1664
1688
  return c.onClosed = (...d) => {
1665
- S == null || S(...d), a();
1666
- }, c.onSubmit = (d = a) => {
1667
- k == null || k(d);
1668
- }, t = et(n, c, c.appendTo), t;
1689
+ S == null || S(...d), i();
1690
+ }, c.onSubmit = (d = i) => {
1691
+ F == null || F(d);
1692
+ }, t = nt(n, c, c.appendTo), t;
1669
1693
  };
1670
- return l.close = a, l;
1694
+ return l.close = i, l;
1671
1695
  } else {
1672
1696
  let t = null;
1673
- const a = () => {
1697
+ const i = () => {
1674
1698
  t && (t.visible = !1);
1675
1699
  }, l = () => {
1676
1700
  t && (t.$destroy(), t.$el && t.$el.parentNode && t.$el.parentNode.removeChild(t.$el), t = null);
1677
1701
  }, c = (S) => {
1678
1702
  if (t)
1679
- return Object.entries(S).forEach(([r, f]) => {
1680
- r.startsWith("on") || (t[r] = f);
1703
+ return Object.entries(S).forEach(([a, f]) => {
1704
+ a.startsWith("on") || (t[a] = f);
1681
1705
  }), t.visible = !0, t;
1682
- const k = {
1706
+ const F = {
1683
1707
  visible: !0,
1684
1708
  width: "50%",
1685
1709
  destroyOnClose: !0,
1686
1710
  ...S
1687
- }, d = k.onClosed, g = k.onSubmit;
1688
- return k.onClosed = () => {
1689
- d == null || d(), a();
1690
- }, k.onSubmit = (r = a) => {
1691
- g == null || g(r);
1692
- }, t = et(n, k, k.appendTo), t;
1711
+ }, d = F.onClosed, g = F.onSubmit;
1712
+ return F.onClosed = () => {
1713
+ d == null || d(), i();
1714
+ }, F.onSubmit = (a = i) => {
1715
+ g == null || g(a);
1716
+ }, t = nt(n, F, F.appendTo), t;
1693
1717
  };
1694
- return c.close = a, c.destroy = l, c;
1718
+ return c.close = i, c.destroy = l, c;
1695
1719
  }
1696
1720
  }
1697
- Be.install = function(n) {
1698
- n.component(Be.name || "EsDialog", Be), n.prototype.$useDialog = Ae;
1721
+ ke.install = function(n) {
1722
+ n.component(ke.name || "EsDialog", ke), n.prototype.$useDialog = Ee;
1699
1723
  };
1700
- const fn = se({
1724
+ const hn = ae({
1701
1725
  name: "EsCrudPage",
1702
- components: { EsForm: ye, EsTable: Se },
1726
+ components: { EsForm: ve, EsTable: Be },
1703
1727
  inheritAttrs: !1,
1704
1728
  props: {
1705
1729
  schema: { type: Object, required: !0 },
@@ -1723,8 +1747,8 @@ const fn = se({
1723
1747
  "dialog-open"
1724
1748
  ],
1725
1749
  setup(n, { emit: e, expose: o }) {
1726
- const t = z(null), a = z(null), l = z([]), c = $e({});
1727
- ce(
1750
+ const t = z(null), i = z(null), l = z([]), c = Te({});
1751
+ ue(
1728
1752
  () => n.schema.formItems,
1729
1753
  (s) => {
1730
1754
  s && s.forEach((u) => {
@@ -1738,16 +1762,16 @@ const fn = se({
1738
1762
  pageSize: 10,
1739
1763
  total: 0,
1740
1764
  ...n.schema.pagination || {}
1741
- }), k = B(() => {
1742
- var I, R;
1765
+ }), F = B(() => {
1766
+ var w, A;
1743
1767
  if (n.schema.dialogs) return n.schema.dialogs;
1744
- if (!((I = n.schema.dialogFormItems) != null && I.length)) return {};
1768
+ if (!((w = n.schema.dialogFormItems) != null && w.length)) return {};
1745
1769
  const s = {
1746
- width: ((R = n.schema.dialogOptions) == null ? void 0 : R.width) || "600px",
1770
+ width: ((A = n.schema.dialogOptions) == null ? void 0 : A.width) || "600px",
1747
1771
  formItems: n.schema.dialogFormItems,
1748
1772
  ...n.schema.dialogOptions || {}
1749
- }, u = {}, y = n.schema.actions || ["add", "edit", "delete"];
1750
- return y.includes("add") && (u.add = { ...s, title: "新增" }), y.includes("edit") && (u.edit = { ...s, title: "编辑" }), y.includes("view") && (u.view = { ...s, title: "查看", isHiddenFooter: !0 }), u;
1773
+ }, u = {}, h = n.schema.actions || ["add", "edit", "delete"];
1774
+ return h.includes("add") && (u.add = { ...s, title: "新增" }), h.includes("edit") && (u.edit = { ...s, title: "编辑" }), h.includes("view") && (u.view = { ...s, title: "查看", isHiddenFooter: !0 }), u;
1751
1775
  }), d = B(() => {
1752
1776
  if (n.schema.toolbarBtns) return n.schema.toolbarBtns;
1753
1777
  if (n.schema.dialogs || n.schema.operationColumn !== void 0) return [];
@@ -1771,51 +1795,51 @@ const fn = se({
1771
1795
  }), u;
1772
1796
  }), g = B(
1773
1797
  () => {
1774
- var R;
1798
+ var A;
1775
1799
  if (n.schema.operationColumn !== void 0) return n.schema.operationColumn;
1776
1800
  const s = n.schema.actions || ["add", "edit", "delete"];
1777
- if ((R = n.schema.columns) == null ? void 0 : R.some(
1801
+ if ((A = n.schema.columns) == null ? void 0 : A.some(
1778
1802
  (x) => x.prop === "action" || x.prop === "operate" || x.btns
1779
1803
  )) return;
1780
1804
  if (s.filter((x) => ["edit", "delete", "view"].includes(x)).length === 0) return !1;
1781
- const I = [];
1782
- return s.includes("view") && I.push({ name: "查看", type: "primary", key: "view", dialogKey: "view" }), s.includes("edit") && I.push({ name: "编辑", type: "primary", key: "edit", dialogKey: "edit" }), s.includes("delete") && I.push({
1805
+ const w = [];
1806
+ return s.includes("view") && w.push({ name: "查看", type: "primary", key: "view", dialogKey: "view" }), s.includes("edit") && w.push({ name: "编辑", type: "primary", key: "edit", dialogKey: "edit" }), s.includes("delete") && w.push({
1783
1807
  name: "删除",
1784
1808
  type: "danger",
1785
1809
  key: "delete",
1786
1810
  confirm: "确定删除该条数据吗?"
1787
1811
  }), {
1788
1812
  label: "操作",
1789
- width: I.length * 80 + 20,
1813
+ width: w.length * 80 + 20,
1790
1814
  fixed: "right",
1791
- btns: I
1815
+ btns: w
1792
1816
  };
1793
1817
  }
1794
- ), r = B(() => {
1818
+ ), a = B(() => {
1795
1819
  if (n.schema.queryBtns) return n.schema.queryBtns;
1796
1820
  const s = [
1797
1821
  { name: "查询", type: "primary", key: "query", triggerEvent: !0 },
1798
1822
  { name: "重置", key: "rest", triggerEvent: !0 }
1799
- ], u = d.value.map((y) => {
1800
- const I = { ...y };
1801
- return I.click || (I.click = () => _(y)), I;
1823
+ ], u = d.value.map((h) => {
1824
+ const w = { ...h };
1825
+ return w.click || (w.click = () => _(h)), w;
1802
1826
  });
1803
1827
  return [...s, ...u];
1804
1828
  }), f = B(() => {
1805
1829
  const s = [...n.schema.columns || []], u = g.value;
1806
1830
  if (u === !1 || u === void 0) return s;
1807
- const y = u.btns.map((I) => ({
1808
- name: I.name,
1809
- type: I.type,
1810
- permissionValue: I.permissionValue,
1811
- clickEvent: (R) => T(I, R)
1831
+ const h = u.btns.map((w) => ({
1832
+ name: w.name,
1833
+ type: w.type,
1834
+ permissionValue: w.permissionValue,
1835
+ clickEvent: (A) => T(w, A)
1812
1836
  }));
1813
1837
  return s.push({
1814
1838
  prop: "operate",
1815
1839
  label: u.label || "操作",
1816
- width: u.width || y.length * 80 + 20,
1840
+ width: u.width || h.length * 80 + 20,
1817
1841
  fixed: u.fixed || "right",
1818
- btns: y
1842
+ btns: h
1819
1843
  }), s;
1820
1844
  }), p = B(() => {
1821
1845
  var s;
@@ -1839,11 +1863,11 @@ const fn = se({
1839
1863
  n.httpRequest && (s.httpRequest = n.httpRequest);
1840
1864
  const u = p.value;
1841
1865
  if (u.length > 0) {
1842
- const y = s.configBtn || [];
1843
- s.configBtn = [...y, ...u];
1866
+ const h = s.configBtn || [];
1867
+ s.configBtn = [...h, ...u];
1844
1868
  }
1845
1869
  return s;
1846
- }), h = B(() => {
1870
+ }), y = B(() => {
1847
1871
  const s = n.schema.formLayout;
1848
1872
  if (s)
1849
1873
  return {
@@ -1857,179 +1881,179 @@ const fn = se({
1857
1881
  async function _(s) {
1858
1882
  const u = s.key || s.actionType || "";
1859
1883
  if (s.confirm) {
1860
- const y = typeof s.confirm == "string" ? s.confirm : "确定执行此操作吗?";
1884
+ const h = typeof s.confirm == "string" ? s.confirm : "确定执行此操作吗?";
1861
1885
  try {
1862
- await Ge.confirm(y, "提示", { type: "warning" });
1863
- } catch (I) {
1886
+ await Xe.confirm(h, "提示", { type: "warning" });
1887
+ } catch (w) {
1864
1888
  return;
1865
1889
  }
1866
1890
  }
1867
1891
  if (s.dialogKey) {
1868
- u === "add" && e("add"), M(s.dialogKey);
1892
+ u === "add" && e("add"), N(s.dialogKey);
1869
1893
  return;
1870
1894
  }
1871
1895
  u === "export" || s.actionType === "export" ? e("export", { ...c }) : u === "add" && e("add"), e("btn-click", u, { ...c });
1872
1896
  }
1873
1897
  async function T(s, u) {
1874
- const y = s.key || "";
1898
+ const h = s.key || "";
1875
1899
  if (s.confirm) {
1876
- const I = typeof s.confirm == "string" ? s.confirm : "确定执行此操作吗?";
1900
+ const w = typeof s.confirm == "string" ? s.confirm : "确定执行此操作吗?";
1877
1901
  try {
1878
- await Ge.confirm(I, "提示", { type: "warning" });
1879
- } catch (R) {
1902
+ await Xe.confirm(w, "提示", { type: "warning" });
1903
+ } catch (A) {
1880
1904
  return;
1881
1905
  }
1882
1906
  }
1883
1907
  if (s.click) {
1884
- s.click(u, { refresh: Q, getSelectedRows: H, openDialog: M });
1908
+ s.click(u, { refresh: K, getSelectedRows: J, openDialog: N });
1885
1909
  return;
1886
1910
  }
1887
1911
  if (s.dialogKey) {
1888
- M(s.dialogKey, u);
1912
+ N(s.dialogKey, u);
1889
1913
  return;
1890
1914
  }
1891
- y === "edit" ? e("edit", u) : y === "delete" ? e("delete", u) : y === "view" && e("view", u), e("btn-click", y, u);
1915
+ h === "edit" ? e("edit", u) : h === "delete" ? e("delete", u) : h === "view" && e("view", u), e("btn-click", h, u);
1892
1916
  }
1893
- const D = /* @__PURE__ */ new Map();
1894
- function M(s, u) {
1895
- var Z;
1896
- const y = k.value[s];
1897
- if (!y) return;
1917
+ const E = /* @__PURE__ */ new Map();
1918
+ function N(s, u) {
1919
+ var Q;
1920
+ const h = F.value[s];
1921
+ if (!h) return;
1898
1922
  e("dialog-open", s, u);
1899
- const I = Ae();
1900
- D.set(s, I);
1901
- const R = $e({});
1902
- y.formItems && y.formItems.forEach((E) => {
1923
+ const w = Ee();
1924
+ E.set(s, w);
1925
+ const A = Te({});
1926
+ h.formItems && h.formItems.forEach((j) => {
1903
1927
  var ne;
1904
- E.prop && (R[E.prop] = (ne = u == null ? void 0 : u[E.prop]) != null ? ne : "");
1928
+ j.prop && (A[j.prop] = (ne = u == null ? void 0 : u[j.prop]) != null ? ne : "");
1905
1929
  });
1906
- const x = typeof y.title == "function" ? y.title(u) : y.title || "";
1907
- (Z = y.onOpen) == null || Z.call(y, u);
1908
- const j = U(s, y, R, u || {});
1909
- I({
1930
+ const x = typeof h.title == "function" ? h.title(u) : h.title || "";
1931
+ (Q = h.onOpen) == null || Q.call(h, u);
1932
+ const D = V(s, h, A, u || {});
1933
+ w({
1910
1934
  title: x,
1911
- width: y.width || "600px",
1912
- isDraggable: y.isDraggable,
1913
- maxHeight: y.maxHeight,
1914
- fullscreen: y.fullscreen,
1915
- isHiddenFooter: y.isHiddenFooter,
1935
+ width: h.width || "600px",
1936
+ isDraggable: h.isDraggable,
1937
+ maxHeight: h.maxHeight,
1938
+ fullscreen: h.fullscreen,
1939
+ isHiddenFooter: h.isHiddenFooter,
1916
1940
  // 用户自定义 render
1917
- render: y.render ? (E, ne) => y.render(E, {
1941
+ render: h.render ? (j, ne) => h.render(j, {
1918
1942
  row: u || {},
1919
- model: R,
1943
+ model: A,
1920
1944
  registerRef: ne.registerRef,
1921
- close: () => W(s),
1922
- refresh: Q
1923
- }) : y.formItems ? (E, { registerRef: ne }) => {
1924
- const oe = E(ye, {
1945
+ close: () => M(s),
1946
+ refresh: K
1947
+ }) : h.formItems ? (j, { registerRef: ne }) => {
1948
+ const oe = j(ve, {
1925
1949
  props: {
1926
- model: R,
1927
- formItemList: y.formItems,
1950
+ model: A,
1951
+ formItemList: h.formItems,
1928
1952
  layoutFormProps: {
1929
1953
  rowLayProps: { gutter: 16 },
1930
1954
  formLayProps: {
1931
1955
  isBtnHidden: !0,
1932
- ...y.formLayout || {}
1956
+ ...h.formLayout || {}
1933
1957
  }
1934
1958
  }
1935
1959
  },
1936
1960
  // Vue 2 函数式 ref:通过 RenderJsx 暴露的 registerRef 注册
1937
1961
  ref: "dialogForm"
1938
1962
  });
1939
- return oe && oe.data && (oe.data.hook = oe.data.hook || {}, oe.data.hook.insert = (de) => {
1940
- de.componentInstance && ne("dialogForm", de.componentInstance);
1963
+ return oe && oe.data && (oe.data.hook = oe.data.hook || {}, oe.data.hook.insert = (le) => {
1964
+ le.componentInstance && ne("dialogForm", le.componentInstance);
1941
1965
  }), oe;
1942
1966
  } : void 0,
1943
- configBtn: j,
1967
+ configBtn: D,
1944
1968
  // useDialog 的 onClosed 通过 extractEventHandlers 转为 'closed' 事件
1945
1969
  onClosed: () => {
1946
- var E;
1947
- D.delete(s), (E = y.onClose) == null || E.call(y);
1970
+ var j;
1971
+ E.delete(s), (j = h.onClose) == null || j.call(h);
1948
1972
  }
1949
1973
  });
1950
1974
  }
1951
- function W(s) {
1952
- const u = D.get(s);
1953
- u && (u.close(), D.delete(s));
1975
+ function M(s) {
1976
+ const u = E.get(s);
1977
+ u && (u.close(), E.delete(s));
1954
1978
  }
1955
- function U(s, u, y, I) {
1979
+ function V(s, u, h, w) {
1956
1980
  if (!u.isHiddenFooter)
1957
- return u.configBtn ? u.configBtn.map((R) => R.action === "cancel" ? {
1958
- ...R,
1959
- click: (x, { close: j }) => {
1960
- e("dialog-cancel", s), j();
1981
+ return u.configBtn ? u.configBtn.map((A) => A.action === "cancel" ? {
1982
+ ...A,
1983
+ click: (x, { close: D }) => {
1984
+ e("dialog-cancel", s), D();
1961
1985
  }
1962
- } : R.action === "confirm" ? {
1963
- ...R,
1964
- click: async (x, { close: j, getRefs: Z }) => {
1965
- await V(s, u, y, I, j, Z);
1986
+ } : A.action === "confirm" ? {
1987
+ ...A,
1988
+ click: async (x, { close: D, getRefs: Q }) => {
1989
+ await U(s, u, h, w, D, Q);
1966
1990
  }
1967
- } : R) : [
1991
+ } : A) : [
1968
1992
  {
1969
1993
  name: "取消",
1970
- click: (R, { close: x }) => {
1994
+ click: (A, { close: x }) => {
1971
1995
  e("dialog-cancel", s), x();
1972
1996
  }
1973
1997
  },
1974
1998
  {
1975
1999
  name: "确定",
1976
2000
  type: "primary",
1977
- click: async (R, { close: x, getRefs: j }) => {
1978
- await V(s, u, y, I, x, j);
2001
+ click: async (A, { close: x, getRefs: D }) => {
2002
+ await U(s, u, h, w, x, D);
1979
2003
  }
1980
2004
  }
1981
2005
  ];
1982
2006
  }
1983
- async function V(s, u, y, I, R, x) {
1984
- var Z;
1985
- if ((Z = u.formItems) != null && Z.length) {
1986
- const E = x("dialogForm");
1987
- E != null && E.validate && await E.validate();
2007
+ async function U(s, u, h, w, A, x) {
2008
+ var Q;
2009
+ if ((Q = u.formItems) != null && Q.length) {
2010
+ const j = x("dialogForm");
2011
+ j != null && j.validate && await j.validate();
1988
2012
  }
1989
- const j = { close: R, refresh: Q, getRefs: x, row: I };
2013
+ const D = { close: A, refresh: K, getRefs: x, row: w };
1990
2014
  if (u.onConfirm)
1991
- await u.onConfirm(y, j);
2015
+ await u.onConfirm(h, D);
1992
2016
  else {
1993
- const E = s === "add" ? "add-confirm" : s === "edit" ? "edit-confirm" : `${s}-confirm`;
1994
- e("btn-click", E, y), R(), Q();
2017
+ const j = s === "add" ? "add-confirm" : s === "edit" ? "edit-confirm" : `${s}-confirm`;
2018
+ e("btn-click", j, h), A(), K();
1995
2019
  }
1996
- e("dialog-confirm", s, y);
2020
+ e("dialog-confirm", s, h);
1997
2021
  }
1998
- function Q() {
2022
+ function K() {
1999
2023
  var s, u;
2000
2024
  (u = (s = t.value) == null ? void 0 : s.httpRequestInstance) == null || u.call(s);
2001
2025
  }
2002
- function H() {
2026
+ function J() {
2003
2027
  var s, u;
2004
2028
  return ((u = (s = t.value) == null ? void 0 : s.getSelectionRows) == null ? void 0 : u.call(s)) || [];
2005
2029
  }
2006
- const K = {
2007
- refresh: Q,
2008
- getSelectedRows: H,
2030
+ const O = {
2031
+ refresh: K,
2032
+ getSelectedRows: J,
2009
2033
  tableRef: t,
2010
- formRef: a,
2034
+ formRef: i,
2011
2035
  queryModel: c,
2012
- openDialog: M,
2013
- closeDialog: W
2036
+ openDialog: N,
2037
+ closeDialog: M
2014
2038
  };
2015
- return typeof o == "function" && o(K), {
2039
+ return typeof o == "function" && o(O), {
2016
2040
  // refs
2017
2041
  tableRef: t,
2018
- formRef: a,
2042
+ formRef: i,
2019
2043
  tableData: l,
2020
2044
  queryModel: c,
2021
2045
  paginationState: S,
2022
2046
  // computeds
2023
2047
  mergedColumns: f,
2024
2048
  mergedOptions: b,
2025
- mergedFormBtns: r,
2026
- formLayoutProps: h,
2049
+ mergedFormBtns: a,
2050
+ formLayoutProps: y,
2027
2051
  // exposed
2028
- ...K
2052
+ ...O
2029
2053
  };
2030
2054
  }
2031
2055
  });
2032
- var pn = function() {
2056
+ var vn = function() {
2033
2057
  var e = this, o = e._self._c;
2034
2058
  return e._self._setupProxy, o("div", { staticClass: "es-crud-page" }, [o("es-table", e._b({ ref: "tableRef", attrs: { columns: e.mergedColumns, options: e.mergedOptions, "data-source": e.tableData, pagination: e.paginationState }, on: { "update:dataSource": function(t) {
2035
2059
  e.tableData = t;
@@ -2037,65 +2061,65 @@ var pn = function() {
2037
2061
  e.tableData = t;
2038
2062
  }, "update:pagination": function(t) {
2039
2063
  e.paginationState = t;
2040
- } }, scopedSlots: e._u([e._l(e.$slots, function(t, a) {
2041
- return { key: a, fn: function(l) {
2042
- return [e._t(a, null, null, l || {})];
2064
+ } }, scopedSlots: e._u([e._l(e.$slots, function(t, i) {
2065
+ return { key: i, fn: function(l) {
2066
+ return [e._t(i, null, null, l || {})];
2043
2067
  } };
2044
2068
  })], null, !0) }, "es-table", e.$attrs, !1), [e.schema.formItems && e.schema.formItems.length ? o("es-form", { ref: "formRef", attrs: { model: e.queryModel, "form-item-list": e.schema.formItems, "config-btn": e.mergedFormBtns, "layout-form-props": e.formLayoutProps } }) : e._e()], 1)], 1);
2045
- }, mn = [], gn = /* @__PURE__ */ me(
2046
- fn,
2047
- pn,
2048
- mn,
2069
+ }, bn = [], _n = /* @__PURE__ */ me(
2070
+ hn,
2071
+ vn,
2072
+ bn,
2049
2073
  !1,
2050
2074
  null,
2051
- "d68fbae6"
2075
+ "ad1d1cb8"
2052
2076
  );
2053
- const He = gn.exports;
2054
- He.install = function(n) {
2077
+ const Ae = _n.exports;
2078
+ Ae.install = function(n) {
2055
2079
  n.component(
2056
- He.name || "EsCrudPage",
2057
- He
2080
+ Ae.name || "EsCrudPage",
2081
+ Ae
2058
2082
  );
2059
2083
  };
2060
- const yn = [ye, Se, Be, He], hn = (n) => {
2084
+ const Cn = [ve, Be, ke, Ae], Sn = (n) => {
2061
2085
  const e = { ...n };
2062
2086
  for (const o of ["EsTable", "EsForm", "EsDialog"]) {
2063
2087
  const t = e[o];
2064
2088
  if (!t || typeof t != "object") continue;
2065
- const a = t.methods;
2066
- if (a && typeof a == "object") {
2089
+ const i = t.methods;
2090
+ if (i && typeof i == "object") {
2067
2091
  const { methods: c, ...S } = t;
2068
- e[o] = { ...a, ...S };
2092
+ e[o] = { ...i, ...S };
2069
2093
  }
2070
2094
  const l = e[o];
2071
2095
  typeof l.configQueryfieldOutput == "function" && typeof l.configQueryFieldOutput != "function" && (l.configQueryFieldOutput = l.configQueryfieldOutput);
2072
2096
  }
2073
2097
  return e;
2074
- }, vn = (n, e = {}) => {
2075
- const o = hn(e);
2076
- vt(o), o.skipComponentRegistration || yn.forEach((t) => {
2077
- const a = t.name;
2078
- a && n.component(a, t);
2079
- }), o.globalProperties !== !1 && (n.prototype.$useDialog = Ae), n.mixin({
2098
+ }, Bn = (n, e = {}) => {
2099
+ const o = Sn(e);
2100
+ Bt(o), o.skipComponentRegistration || Cn.forEach((t) => {
2101
+ const i = t.name;
2102
+ i && n.component(i, t);
2103
+ }), o.globalProperties !== !1 && (n.prototype.$useDialog = Ee), n.mixin({
2080
2104
  provide: {
2081
2105
  $EsPlus: {
2082
- useDialog: Ae,
2106
+ useDialog: Ee,
2083
2107
  ...o
2084
2108
  }
2085
2109
  }
2086
2110
  });
2087
- }, Sn = {
2088
- version: "1.0.2",
2089
- install: vn
2111
+ }, On = {
2112
+ version: "1.0.4",
2113
+ install: Bn
2090
2114
  };
2091
2115
  export {
2092
- He as EsCrudPage,
2093
- Be as EsDialog,
2094
- ye as EsForm,
2095
- Se as EsTable,
2096
- kn as configureEsPlus,
2097
- Sn as default,
2098
- vn as install,
2099
- Ae as useDialog
2116
+ Ae as EsCrudPage,
2117
+ ke as EsDialog,
2118
+ ve as EsForm,
2119
+ Be as EsTable,
2120
+ Pn as configureEsPlus,
2121
+ On as default,
2122
+ Bn as install,
2123
+ Ee as useDialog
2100
2124
  };
2101
2125
  //# sourceMappingURL=es-plus-vue2.js.map