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