@es-plus/vue2 1.0.3 → 1.1.0

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