@es-plus/vue2 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
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";
1
+ import { getNestedValue as G, setNestedValue as K, resolveFormLayProps as Le, getRowColsAlgorithm as Ct, configFormField as St, formatConfigOut as Bt, getEveryFormQueryField as Ft, queryTableListMethod as kt, getGlobalConfig as me, getButtonPosition as nt, createSelectionState as xt, restoreSelectionForPage as It, clearAllSelection as Rt, applySelectionChange as Ot, isObject as pe, findValueByKey as wt, configureEsPlus as Pt } from "@es-plus/core";
2
2
  import { configureEsPlus as Mn } from "@es-plus/core";
3
3
  import * as $t from "vue";
4
4
  import ct from "vue";
5
5
  import * as Ve from "@vue/composition-api";
6
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;
7
+ const Ht = ct.version || "", [Tt = "0", Lt = "0"] = Ht.split("."), At = Number(Tt), zt = Number(Lt), ut = At === 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, xe = te.nextTick, Ke = te.getCurrentInstance, ue = te.h;
8
8
  var it;
9
9
  const st = (it = Ve.default) != null ? it : Ve;
10
10
  function Be(n) {
@@ -27,19 +27,19 @@ function oe(n, e) {
27
27
  }
28
28
  function Dt() {
29
29
  return { formInputComponents: (e) => {
30
- var k;
30
+ var F;
31
31
  const o = /* @__PURE__ */ new Map([
32
32
  // ─────────────────────────────────────────────────────────────────
33
33
  // Input - 文本输入
34
34
  // ─────────────────────────────────────────────────────────────────
35
35
  [
36
36
  "Input",
37
- (d, g, { row: a }) => {
38
- const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
39
- return d("el-input", {
40
- attrs: f,
41
- props: { value: p, ...a.props },
42
- on: b
37
+ (f, p, { row: r }) => {
38
+ const h = Y(r), d = G(p, r.prop), v = oe(r, (m) => K(p, r.prop, m));
39
+ return f("el-input", {
40
+ attrs: h,
41
+ props: { value: d, ...r.props },
42
+ on: v
43
43
  });
44
44
  }
45
45
  ],
@@ -48,12 +48,12 @@ function Dt() {
48
48
  // ─────────────────────────────────────────────────────────────────
49
49
  [
50
50
  "InputNumber",
51
- (d, g, { row: a }) => {
52
- const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
53
- return d("el-input-number", {
54
- attrs: f,
55
- props: { value: p, ...a.props },
56
- on: b
51
+ (f, p, { row: r }) => {
52
+ const h = Y(r), d = G(p, r.prop), v = oe(r, (m) => K(p, r.prop, m));
53
+ return f("el-input-number", {
54
+ attrs: h,
55
+ props: { value: d, ...r.props },
56
+ on: v
57
57
  });
58
58
  }
59
59
  ],
@@ -62,18 +62,18 @@ function Dt() {
62
62
  // ─────────────────────────────────────────────────────────────────
63
63
  [
64
64
  "Select",
65
- (d, g, { row: a }) => {
66
- const f = Y(a), p = G(g, a.prop), b = Be(a.dataOptions), y = oe(a, (_) => K(g, a.prop, _));
67
- return d(
65
+ (f, p, { row: r }) => {
66
+ const h = Y(r), d = G(p, r.prop), v = Be(r.dataOptions), m = oe(r, (_) => K(p, r.prop, _));
67
+ return f(
68
68
  "el-select",
69
69
  {
70
- attrs: f,
71
- props: { value: p, ...a.props },
72
- on: y
70
+ attrs: h,
71
+ props: { value: d, ...r.props },
72
+ on: m
73
73
  },
74
- b.map(
75
- (_, L) => d("el-option", {
76
- key: L,
74
+ v.map(
75
+ (_, T) => f("el-option", {
76
+ key: T,
77
77
  props: { value: _.value, label: _.label, disabled: _.disabled }
78
78
  })
79
79
  )
@@ -86,12 +86,12 @@ function Dt() {
86
86
  // ─────────────────────────────────────────────────────────────────
87
87
  [
88
88
  "datePicker",
89
- (d, g, { row: a }) => {
90
- const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
91
- return d("el-date-picker", {
92
- attrs: f,
93
- props: { value: p, ...a.props },
94
- on: b
89
+ (f, p, { row: r }) => {
90
+ const h = Y(r), d = G(p, r.prop), v = oe(r, (m) => K(p, r.prop, m));
91
+ return f("el-date-picker", {
92
+ attrs: h,
93
+ props: { value: d, ...r.props },
94
+ on: v
95
95
  });
96
96
  }
97
97
  ],
@@ -100,12 +100,12 @@ function Dt() {
100
100
  // ─────────────────────────────────────────────────────────────────
101
101
  [
102
102
  "timePicker",
103
- (d, g, { row: a }) => {
104
- const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
105
- return d("el-time-picker", {
106
- attrs: f,
107
- props: { value: p, ...a.props },
108
- on: b
103
+ (f, p, { row: r }) => {
104
+ const h = Y(r), d = G(p, r.prop), v = oe(r, (m) => K(p, r.prop, m));
105
+ return f("el-time-picker", {
106
+ attrs: h,
107
+ props: { value: d, ...r.props },
108
+ on: v
109
109
  });
110
110
  }
111
111
  ],
@@ -114,12 +114,12 @@ function Dt() {
114
114
  // ─────────────────────────────────────────────────────────────────
115
115
  [
116
116
  "Slider",
117
- (d, g, { row: a }) => {
118
- const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
119
- return d("el-slider", {
120
- attrs: f,
121
- props: { value: p, ...a.props },
122
- on: b
117
+ (f, p, { row: r }) => {
118
+ const h = Y(r), d = G(p, r.prop), v = oe(r, (m) => K(p, r.prop, m));
119
+ return f("el-slider", {
120
+ attrs: h,
121
+ props: { value: d, ...r.props },
122
+ on: v
123
123
  });
124
124
  }
125
125
  ],
@@ -130,14 +130,14 @@ function Dt() {
130
130
  // ─────────────────────────────────────────────────────────────────
131
131
  [
132
132
  "ColorPicker",
133
- (d, g, { row: a }) => {
134
- const f = Y(a), p = G(g, a.prop), b = a.on || {}, y = {};
135
- for (const [_, L] of Object.entries(b))
136
- typeof L == "function" && (y[_] = L);
137
- return typeof y.change != "function" && (y.change = (_) => K(g, a.prop, _)), d("el-color-picker", {
138
- attrs: f,
139
- props: { value: p, ...a.props },
140
- on: y
133
+ (f, p, { row: r }) => {
134
+ const h = Y(r), d = G(p, r.prop), v = r.on || {}, m = {};
135
+ for (const [_, T] of Object.entries(v))
136
+ typeof T == "function" && (m[_] = T);
137
+ return typeof m.change != "function" && (m.change = (_) => K(p, r.prop, _)), f("el-color-picker", {
138
+ attrs: h,
139
+ props: { value: d, ...r.props },
140
+ on: m
141
141
  });
142
142
  }
143
143
  ],
@@ -147,16 +147,16 @@ function Dt() {
147
147
  // ─────────────────────────────────────────────────────────────────
148
148
  [
149
149
  "Transfer",
150
- (d, g, { row: a }) => {
151
- const f = Y(a), p = G(g, a.prop), b = Be(a.dataOptions), y = oe(a, (_) => K(g, a.prop, _));
152
- return d("el-transfer", {
153
- attrs: f,
150
+ (f, p, { row: r }) => {
151
+ const h = Y(r), d = G(p, r.prop), v = Be(r.dataOptions), m = oe(r, (_) => K(p, r.prop, _));
152
+ return f("el-transfer", {
153
+ attrs: h,
154
154
  props: {
155
- value: p,
156
- data: b.map((_) => ({ key: _.value, label: _.label, disabled: _.disabled })),
157
- ...a.props
155
+ value: d,
156
+ data: v.map((_) => ({ key: _.value, label: _.label, disabled: _.disabled })),
157
+ ...r.props
158
158
  },
159
- on: y
159
+ on: m
160
160
  });
161
161
  }
162
162
  ],
@@ -165,18 +165,18 @@ function Dt() {
165
165
  // ─────────────────────────────────────────────────────────────────
166
166
  [
167
167
  "Cascader",
168
- (d, g, { row: a }) => {
169
- const f = Y(a), p = G(g, a.prop), b = Be(a.dataOptions), y = oe(a, (_) => K(g, a.prop, _));
170
- return d("el-cascader", {
168
+ (f, p, { row: r }) => {
169
+ const h = Y(r), d = G(p, r.prop), v = Be(r.dataOptions), m = oe(r, (_) => K(p, r.prop, _));
170
+ return f("el-cascader", {
171
171
  // key 强制 dataOptions 变化时重渲染,Element UI 内部 cache 否则不刷新
172
- key: JSON.stringify(b),
173
- attrs: f,
172
+ key: JSON.stringify(v),
173
+ attrs: h,
174
174
  props: {
175
- value: p,
176
- options: b,
177
- ...a.props
175
+ value: d,
176
+ options: v,
177
+ ...r.props
178
178
  },
179
- on: y
179
+ on: m
180
180
  });
181
181
  }
182
182
  ],
@@ -185,22 +185,22 @@ function Dt() {
185
185
  // ─────────────────────────────────────────────────────────────────
186
186
  [
187
187
  "Radio",
188
- (d, g, { row: a }) => {
189
- const f = Y(a), p = G(g, a.prop), b = Be(a.dataOptions), y = oe(a, (_) => K(g, a.prop, _));
190
- return d(
188
+ (f, p, { row: r }) => {
189
+ const h = Y(r), d = G(p, r.prop), v = Be(r.dataOptions), m = oe(r, (_) => K(p, r.prop, _));
190
+ return f(
191
191
  "el-radio-group",
192
192
  {
193
- attrs: f,
194
- props: { value: p, ...a.props },
195
- on: y
193
+ attrs: h,
194
+ props: { value: d, ...r.props },
195
+ on: m
196
196
  },
197
- b.map(
198
- (_, L) => d(
197
+ v.map(
198
+ (_, T) => f(
199
199
  "el-radio",
200
200
  {
201
- key: L,
201
+ key: T,
202
202
  // Element UI 中 el-radio 使用 :label 作为值
203
- props: { label: _.value, disabled: _.disabled || f.disabled }
203
+ props: { label: _.value, disabled: _.disabled || h.disabled }
204
204
  },
205
205
  [_.label]
206
206
  )
@@ -213,21 +213,21 @@ function Dt() {
213
213
  // ─────────────────────────────────────────────────────────────────
214
214
  [
215
215
  "Checkbox",
216
- (d, g, { row: a }) => {
217
- const f = Y(a), p = G(g, a.prop), b = Be(a.dataOptions), y = oe(a, (_) => K(g, a.prop, _));
218
- return d(
216
+ (f, p, { row: r }) => {
217
+ const h = Y(r), d = G(p, r.prop), v = Be(r.dataOptions), m = oe(r, (_) => K(p, r.prop, _));
218
+ return f(
219
219
  "el-checkbox-group",
220
220
  {
221
- attrs: f,
222
- props: { value: p, ...a.props },
223
- on: y
221
+ attrs: h,
222
+ props: { value: d, ...r.props },
223
+ on: m
224
224
  },
225
- b.map(
226
- (_, L) => d(
225
+ v.map(
226
+ (_, T) => f(
227
227
  "el-checkbox",
228
228
  {
229
- key: L,
230
- props: { label: _.value, disabled: _.disabled || f.disabled }
229
+ key: T,
230
+ props: { label: _.value, disabled: _.disabled || h.disabled }
231
231
  },
232
232
  [_.label]
233
233
  )
@@ -240,12 +240,12 @@ function Dt() {
240
240
  // ─────────────────────────────────────────────────────────────────
241
241
  [
242
242
  "Switch",
243
- (d, g, { row: a }) => {
244
- const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
245
- return d("el-switch", {
246
- attrs: f,
247
- props: { value: p, ...a.props },
248
- on: b
243
+ (f, p, { row: r }) => {
244
+ const h = Y(r), d = G(p, r.prop), v = oe(r, (m) => K(p, r.prop, m));
245
+ return f("el-switch", {
246
+ attrs: h,
247
+ props: { value: d, ...r.props },
248
+ on: v
249
249
  });
250
250
  }
251
251
  ],
@@ -254,12 +254,12 @@ function Dt() {
254
254
  // ─────────────────────────────────────────────────────────────────
255
255
  [
256
256
  "Rate",
257
- (d, g, { row: a }) => {
258
- const f = Y(a), p = G(g, a.prop), b = oe(a, (y) => K(g, a.prop, y));
259
- return d("el-rate", {
260
- attrs: f,
261
- props: { value: p, ...a.props },
262
- on: b
257
+ (f, p, { row: r }) => {
258
+ const h = Y(r), d = G(p, r.prop), v = oe(r, (m) => K(p, r.prop, m));
259
+ return f("el-rate", {
260
+ attrs: h,
261
+ props: { value: d, ...r.props },
262
+ on: v
263
263
  });
264
264
  }
265
265
  ],
@@ -268,23 +268,23 @@ function Dt() {
268
268
  // ─────────────────────────────────────────────────────────────────
269
269
  [
270
270
  "Upload",
271
- (d, g, { row: a }) => {
272
- const f = a.prop, p = Y(a), b = a.props || {}, y = a.on || {}, _ = G(g, f) || [], L = typeof a.httpRequest == "function", j = a.triggerRender, N = a.fileRender, M = j ? j(d) : d("el-button", { props: { size: "mini", type: "primary" } }, ["选择文件"]), V = (r, u, h) => {
273
- var A, x;
274
- const w = (r == null ? void 0 : r.link) || (r == null ? void 0 : r.url) || ((A = r == null ? void 0 : r.data) == null ? void 0 : A.link) || ((x = r == null ? void 0 : r.data) == null ? void 0 : x.url);
275
- w && (u.url = w), u.status = "success", u.response = r, typeof y.success == "function" && y.success(r, u, h), K(g, f, [...h]);
276
- }, W = (r, u, h) => {
277
- u.status = "fail", u.error = r, typeof y.error == "function" && y.error(r, u, h), K(g, f, [...h]);
278
- }, U = L ? (r) => {
279
- const u = a.httpRequest;
271
+ (f, p, { row: r }) => {
272
+ const h = r.prop, d = Y(r), v = r.props || {}, m = r.on || {}, _ = G(p, h) || [], T = typeof r.httpRequest == "function", j = r.triggerRender, N = r.fileRender, U = j ? j(f) : f("el-button", { props: { size: "mini", type: "primary" } }, ["选择文件"]), M = (a, u, y) => {
273
+ var A, k;
274
+ const w = (a == null ? void 0 : a.link) || (a == null ? void 0 : a.url) || ((A = a == null ? void 0 : a.data) == null ? void 0 : A.link) || ((k = a == null ? void 0 : a.data) == null ? void 0 : k.url);
275
+ w && (u.url = w), u.status = "success", u.response = a, typeof m.success == "function" && m.success(a, u, y), K(p, h, [...y]);
276
+ }, W = (a, u, y) => {
277
+ u.status = "fail", u.error = a, typeof m.error == "function" && m.error(a, u, y), K(p, h, [...y]);
278
+ }, V = T ? (a) => {
279
+ const u = r.httpRequest;
280
280
  u({
281
- file: r.file,
282
- filename: r.file.name,
283
- onProgress: r.onProgress
284
- }).then((h) => {
285
- const w = (h == null ? void 0 : h.data) || h;
286
- r.onSuccess(w);
287
- }).catch((h) => r.onError(h));
281
+ file: a.file,
282
+ filename: a.file.name,
283
+ onProgress: a.onProgress
284
+ }).then((y) => {
285
+ const w = (y == null ? void 0 : y.data) || y;
286
+ a.onSuccess(w);
287
+ }).catch((y) => a.onError(y));
288
288
  } : void 0, J = {
289
289
  preview: "onPreview",
290
290
  change: "onChange",
@@ -294,109 +294,109 @@ function Dt() {
294
294
  remove: "onRemove",
295
295
  exceed: "onExceed"
296
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
+ for (const [a, u] of Object.entries(m)) {
298
+ if (typeof u != "function" || a === "success" || a === "error" || a === "remove") continue;
299
+ const y = J[a];
300
+ y && (R[y] = u);
301
301
  }
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]);
304
- }, d(
302
+ return R.onSuccess = M, R.onError = W, R.onRemove = (a, u) => {
303
+ typeof m.remove == "function" && m.remove(a, u), K(p, h, [...u]);
304
+ }, f(
305
305
  "el-upload",
306
306
  {
307
307
  attrs: {
308
- ...p,
309
- action: b.action || p.action || "#",
308
+ ...d,
309
+ action: v.action || d.action || "#",
310
310
  "file-list": _
311
311
  },
312
312
  props: {
313
- ...b,
313
+ ...v,
314
314
  fileList: _,
315
315
  // 自定义上传时禁用 auto-upload,由 httpRequest 接管
316
- autoUpload: L ? !1 : b.autoUpload !== !1,
317
- httpRequest: U,
316
+ autoUpload: T ? !1 : v.autoUpload !== !1,
317
+ httpRequest: V,
318
318
  // 把 row.on.* 转换为 onXxx prop(覆盖在 userProps 之上:
319
319
  // 若用户已直接在 props 里给了 onPreview,这里仍以 row.on 为优先权来源)
320
320
  ...R
321
321
  },
322
322
  // Vue 2 的 scopedSlots 用于自定义文件项渲染
323
323
  scopedSlots: N ? {
324
- file: ({ file: r }) => N(d, r, () => {
325
- const u = _.filter((h) => h !== r);
326
- K(g, f, u);
324
+ file: ({ file: a }) => N(f, a, () => {
325
+ const u = _.filter((y) => y !== a);
326
+ K(p, h, u);
327
327
  })
328
328
  } : void 0
329
329
  },
330
- [M]
330
+ [U]
331
331
  );
332
332
  }
333
333
  ]
334
- ]), t = (k = e.formtype) != null ? k : "";
334
+ ]), t = (F = e.formtype) != null ? F : "";
335
335
  if (!t) return () => null;
336
336
  const i = o.get(t);
337
337
  if (i) return i;
338
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);
339
339
  if (c) return c;
340
340
  const B = t.toLowerCase();
341
- for (const [d, g] of o)
342
- if (d.toLowerCase() === B) return g;
341
+ for (const [f, p] of o)
342
+ if (f.toLowerCase() === B) return p;
343
343
  return () => null;
344
344
  } };
345
345
  }
346
346
  function qt(n) {
347
347
  const e = z(!1), o = S(() => {
348
- var y;
349
- const f = Ae(n.layoutFormProps);
350
- if (!f || !Object.keys(f).length) return !1;
351
- const p = f.isBtnHiden, b = f.isBtnHidden;
352
- return !!((y = p != null ? p : b) != null && y);
348
+ var m;
349
+ const h = Le(n.layoutFormProps);
350
+ if (!h || !Object.keys(h).length) return !1;
351
+ const d = h.isBtnHiden, v = h.isBtnHidden;
352
+ return !!((m = d != null ? d : v) != null && m);
353
353
  }), t = S(() => {
354
- var p;
354
+ var d;
355
355
  return {
356
356
  type: "flex",
357
357
  gutter: 20,
358
- ...((p = n.layoutFormProps) == null ? void 0 : p.rowLayProps) || {}
358
+ ...((d = n.layoutFormProps) == null ? void 0 : d.rowLayProps) || {}
359
359
  };
360
- }), i = S(() => Ae(n.layoutFormProps)), l = S(() => {
361
- var f;
362
- return (f = n.layoutFormProps) == null ? void 0 : f.setOptions;
360
+ }), i = S(() => Le(n.layoutFormProps)), l = S(() => {
361
+ var h;
362
+ return (h = n.layoutFormProps) == null ? void 0 : h.setOptions;
363
363
  }), c = S(
364
364
  () => Ct(n.formItemList || [])
365
365
  ), B = () => {
366
- var y;
367
- const f = Ae(n.layoutFormProps);
368
- if (!f || !Object.keys(f).length) return 0;
369
- const p = f.minfoldRows, b = f.minFoldRows;
370
- return Number((y = p != null ? p : b) != null ? y : 0) || 0;
371
- }, k = S(() => {
372
- const f = B();
373
- return f > 0 && f < c.value.rowNum;
374
- }), d = S(() => {
366
+ var m;
367
+ const h = Le(n.layoutFormProps);
368
+ if (!h || !Object.keys(h).length) return 0;
369
+ const d = h.minfoldRows, v = h.minFoldRows;
370
+ return Number((m = d != null ? d : v) != null ? m : 0) || 0;
371
+ }, F = S(() => {
372
+ const h = B();
373
+ return h > 0 && h < c.value.rowNum;
374
+ }), f = S(() => {
375
375
  var j;
376
- const { rowNum: f, columnRow: p } = c.value, b = p[f - 1] || [], y = Number((j = Ae(n.layoutFormProps)) == null ? void 0 : j.btnColSpan) || 0, L = 24 - b.reduce(
377
- (N, M) => {
378
- var V;
379
- return N + (((V = n.formItemList[M]) == null ? void 0 : V.span) || 24);
376
+ const { rowNum: h, columnRow: d } = c.value, v = d[h - 1] || [], m = Number((j = Le(n.layoutFormProps)) == null ? void 0 : j.btnColSpan) || 0, T = 24 - v.reduce(
377
+ (N, U) => {
378
+ var M;
379
+ return N + (((M = n.formItemList[U]) == null ? void 0 : M.span) || 24);
380
380
  },
381
381
  0
382
382
  );
383
- return !e.value && y <= L ? L : 24;
384
- }), g = S(() => {
385
- var b, y;
386
- const f = B(), { columnNodeIndex: p } = c.value;
383
+ return !e.value && m <= T ? T : 24;
384
+ }), p = S(() => {
385
+ var v, m;
386
+ const h = B(), { columnNodeIndex: d } = c.value;
387
387
  if (e.value) {
388
- const _ = (y = (b = p[f - 1]) != null ? b : p[p.length - 1]) != null ? y : 9999;
389
- return (n.formItemList || []).map((L, j) => ({
390
- ...L,
388
+ const _ = (m = (v = d[h - 1]) != null ? v : d[d.length - 1]) != null ? m : 9999;
389
+ return (n.formItemList || []).map((T, j) => ({
390
+ ...T,
391
391
  isFold: j > _
392
392
  }));
393
393
  }
394
394
  return (n.formItemList || []).map((_) => ({ ..._, isFold: !1 }));
395
395
  });
396
396
  return de(
397
- k,
398
- (f) => {
399
- e.value = f;
397
+ F,
398
+ (h) => {
399
+ e.value = h;
400
400
  },
401
401
  { immediate: !0 }
402
402
  ), {
@@ -406,9 +406,9 @@ function qt(n) {
406
406
  formLayout: i,
407
407
  getSetOptionsStatus: l,
408
408
  getRowColsAlgorithm: c,
409
- isFold: k,
410
- getBtnColSpan: d,
411
- formItem: g,
409
+ isFold: F,
410
+ getBtnColSpan: f,
411
+ formItem: p,
412
412
  changeFolded: () => {
413
413
  e.value = !e.value;
414
414
  }
@@ -416,9 +416,9 @@ function qt(n) {
416
416
  }
417
417
  function Nt(n) {
418
418
  return {
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),
419
+ queryTableListMethod: (l, c = {}) => kt(l, c, n),
420
+ getEveryFormQueryField: (l, c) => Ft(l, n, c),
421
+ formatConfigOut: (l, c, B = {}, F) => Bt(l, c, B, F),
422
422
  configFormField: (l = {}, c) => St(l, c)
423
423
  };
424
424
  }
@@ -490,174 +490,174 @@ const Vt = ie({
490
490
  setup(n, e) {
491
491
  var Pe, $e, Ce, he, He;
492
492
  const o = Ke(), t = () => {
493
- const m = o == null ? void 0 : o.proxy;
494
- return (m == null ? void 0 : m.$refs) || {};
493
+ const g = o == null ? void 0 : o.proxy;
494
+ return (g == null ? void 0 : g.$refs) || {};
495
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;
498
- return v && typeof v == "object" && typeof v.callback != "function" ? v : n.model;
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) => {
500
- if (!m) return !0;
501
- const v = c.permission;
502
- return typeof v == "function" ? v(m) : !0;
503
- }, k = (m) => m.labelKey && typeof c.t == "function" ? c.t(m.labelKey) : m.label, d = ce("getTableInstantce", null), g = S(() => {
504
- if (d)
505
- return typeof d == "function" ? d() : d;
506
- const m = o == null ? void 0 : o.proxy, v = m == null ? void 0 : m.getTableInstantce;
507
- return typeof v == "function" ? v() : v;
508
- }), a = S(() => {
509
- const m = g.value;
510
- return !!(m && Object.keys(m).length);
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) => {
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);
496
+ var L, H;
497
+ const g = o == null ? void 0 : o.proxy, b = (H = (L = g == null ? void 0 : g.$vnode) == null ? void 0 : L.data) == null ? void 0 : H.model;
498
+ return b && typeof b == "object" && typeof b.callback != "function" ? b : n.model;
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 = (g) => {
500
+ if (!g) return !0;
501
+ const b = c.permission;
502
+ return typeof b == "function" ? b(g) : !0;
503
+ }, F = (g) => g.labelKey && typeof c.t == "function" ? c.t(g.labelKey) : g.label, f = ce("getTableInstantce", null), p = S(() => {
504
+ if (f)
505
+ return typeof f == "function" ? f() : f;
506
+ const g = o == null ? void 0 : o.proxy, b = g == null ? void 0 : g.getTableInstantce;
507
+ return typeof b == "function" ? b() : b;
508
+ }), r = S(() => {
509
+ const g = p.value;
510
+ return !!(g && Object.keys(g).length);
511
+ }), h = (g) => g ? g.startsWith("el-icon-") ? g : `el-icon-${g.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase()}` : void 0, d = (g) => {
512
+ const { icon: b, ...L } = g;
513
+ if (L.size !== void 0) {
514
+ const H = je(L.size);
515
+ H !== void 0 && (L.size = H);
516
516
  } else
517
- T.size = "mini";
518
- return T;
519
- }, b = (m) => {
520
- const v = m.disabled;
521
- return typeof v == "function" ? !!v() : !!v;
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(
517
+ L.size = "mini";
518
+ return L;
519
+ }, v = (g) => {
520
+ const b = g.disabled;
521
+ return typeof b == "function" ? !!b() : !!b;
522
+ }, m = z({}), _ = z(n.formItemList || []), { formInputComponents: T } = Dt(), j = (l == null ? void 0 : l.$httpRequest) || void 0, N = n.fieldFieldOutput || (l == null ? void 0 : l.fieldFieldOutput), { getEveryFormQueryField: U } = Nt(j), M = z(
523
523
  ((He = n.layoutFormProps) == null ? void 0 : He.fromLayProps) || {}
524
524
  ), W = S(() => {
525
- const v = {
525
+ const b = {
526
526
  size: "mini",
527
- ...V.value || {},
527
+ ...M.value || {},
528
528
  model: i.value,
529
529
  rules: n.rules,
530
530
  validateOnRuleChange: !1
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());
531
+ }, L = je(b.size);
532
+ return L !== void 0 && (b.size = L), (b.labelWidth === void 0 || b.labelWidth === "" || b.labelWidth === null) && (b.labelWidth = "auto"), b;
533
+ }), V = z(/* @__PURE__ */ new Set());
534
534
  de(
535
535
  () => n.formItemList,
536
- async (m) => {
537
- const v = Array.isArray(m) ? m : [], T = v.filter(
538
- (F) => F && F.isInitRun !== !1 && !U.value.has(F.prop)
536
+ async (g) => {
537
+ const b = Array.isArray(g) ? g : [], L = b.filter(
538
+ (x) => x && x.isInitRun !== !1 && !V.value.has(x.prop)
539
539
  );
540
- if (!T.length) {
541
- _.value = v.map((F) => {
540
+ if (!L.length) {
541
+ _.value = b.map((x) => {
542
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
+ if (!x) return null;
544
+ const $ = _.value.find((X) => X && X.prop === x.prop);
545
+ return (D = $ == null ? void 0 : $.dataOptions) != null && D.length ? { ...x, dataOptions: $.dataOptions } : x;
546
+ }).filter((x) => !!x);
547
547
  return;
548
548
  }
549
- const H = await M(T, N);
550
- T.forEach((F) => U.value.add(F.prop)), _.value = v.map((F) => {
549
+ const H = await U(L, N);
550
+ L.forEach((x) => V.value.add(x.prop)), _.value = b.map((x) => {
551
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);
552
+ if (!x) return null;
553
+ const $ = H.find((ee) => ee && ee.prop === x.prop), D = _.value.find((ee) => ee && ee.prop === x.prop);
554
554
  return $ ? {
555
- ...F,
555
+ ...x,
556
556
  dataOptions: $.listData
557
- } : (X = D == null ? void 0 : D.dataOptions) != null && X.length ? { ...F, dataOptions: D.dataOptions } : F;
558
- }).filter((F) => !!F);
557
+ } : (X = D == null ? void 0 : D.dataOptions) != null && X.length ? { ...x, dataOptions: D.dataOptions } : x;
558
+ }).filter((x) => !!x);
559
559
  },
560
560
  { immediate: !0, deep: !0 }
561
561
  );
562
562
  const J = S(() => {
563
- const v = (_.value || []).map(($) => $ ? { ...$, dataOptions: $.dataOptions || [] } : null).filter(($) => {
563
+ const b = (_.value || []).map(($) => $ ? { ...$, dataOptions: $.dataOptions || [] } : null).filter(($) => {
564
564
  if (!$) return !1;
565
565
  const D = $.isHiden, X = $.isHidden, ee = typeof D == "function" ? D : typeof X == "function" ? X : null;
566
566
  return ee ? !ee(i.value, $, W.value) : !0;
567
- }), H = v.filter(($) => !$.span).length;
568
- let F = 6;
567
+ }), H = b.filter(($) => !$.span).length;
568
+ let x = 6;
569
569
  if (H > 0) {
570
- const $ = v.reduce((X, ee) => X + (ee.span || 0), 0), D = 24 - ($ % 24 || ($ ? 24 : 0));
571
- $ === 0 ? H === 1 ? F = 24 : H === 2 ? F = 12 : H === 3 ? F = 8 : F = 6 : (F = D >= H ? Math.floor(D / H) : 6, F > 12 && (F = 12), F < 4 && (F = 6));
570
+ const $ = b.reduce((X, ee) => X + (ee.span || 0), 0), D = 24 - ($ % 24 || ($ ? 24 : 0));
571
+ $ === 0 ? H === 1 ? x = 24 : H === 2 ? x = 12 : H === 3 ? x = 8 : x = 6 : (x = D >= H ? Math.floor(D / H) : 6, x > 12 && (x = 12), x < 4 && (x = 6));
572
572
  }
573
- return v.map(($) => ({ ...$, span: $.span || F }));
573
+ return b.map(($) => ({ ...$, span: $.span || x }));
574
574
  }), R = qt({
575
575
  layoutFormProps: n.layoutFormProps,
576
576
  get formItemList() {
577
577
  return J.value;
578
578
  }
579
579
  }), {
580
- folded: r,
580
+ folded: a,
581
581
  isBtnHidden: u,
582
- rowLayout: h,
582
+ rowLayout: y,
583
583
  formLayout: w,
584
584
  getRowColsAlgorithm: A,
585
- isFold: x,
585
+ isFold: k,
586
586
  getBtnColSpan: E,
587
587
  formItem: Q,
588
588
  changeFolded: q
589
589
  } = R;
590
590
  de(
591
591
  w,
592
- (m) => {
593
- V.value = m;
592
+ (g) => {
593
+ M.value = g;
594
594
  },
595
595
  { immediate: !0 }
596
596
  );
597
597
  const se = S(() => ({
598
- colRightBtn: n.configBtn.filter((m) => m.direction === "right" || !m.direction),
599
- colLeftBtn: n.configBtn.filter((m) => m.direction === "left")
600
- })), re = S(() => typeof n.renderBtn == "function"), ne = (m) => {
601
- var H, F;
602
- const v = t().formRef, T = (H = g.value) == null ? void 0 : H.httpRequestInstance;
603
- (F = m.click) == null || F.call(m, i.value, v, T);
604
- }, _e = (m, v, T) => {
605
- var F, $, D;
606
- const H = g.value;
607
- T === "query" ? a.value && ((F = H == null ? void 0 : H.httpRequestInstance) == null || F.call(H, m)) : T === "rest" && v && (a.value && (($ = H == null ? void 0 : H.httpRequestInstance) == null || $.call(H, m)), (D = v.resetFields) == null || D.call(v));
608
- }, De = (m) => {
609
- var T, H, F;
610
- const v = t().formRef;
611
- if (m.triggerEvent && ["query", "rest"].includes(m.key || ""))
612
- _e(i.value, v, m.key);
598
+ colRightBtn: n.configBtn.filter((g) => g.direction === "right" || !g.direction),
599
+ colLeftBtn: n.configBtn.filter((g) => g.direction === "left")
600
+ })), ae = S(() => typeof n.renderBtn == "function"), ne = (g) => {
601
+ var H, x;
602
+ const b = t().formRef, L = (H = p.value) == null ? void 0 : H.httpRequestInstance;
603
+ (x = g.click) == null || x.call(g, i.value, b, L);
604
+ }, _e = (g, b, L) => {
605
+ var x, $, D;
606
+ const H = p.value;
607
+ L === "query" ? r.value && ((x = H == null ? void 0 : H.httpRequestInstance) == null || x.call(H, g)) : L === "rest" && b && (r.value && (($ = H == null ? void 0 : H.httpRequestInstance) == null || $.call(H, g)), (D = b.resetFields) == null || D.call(b));
608
+ }, De = (g) => {
609
+ var L, H, x;
610
+ const b = t().formRef;
611
+ if (g.triggerEvent && ["query", "rest"].includes(g.key || ""))
612
+ _e(i.value, b, g.key);
613
613
  else {
614
- m.key === "rest" && v && ((T = v.resetFields) == null || T.call(v));
615
- const $ = (H = g.value) == null ? void 0 : H.httpRequestInstance;
616
- (F = m.click) == null || F.call(m, i.value, v, $);
614
+ g.key === "rest" && b && ((L = b.resetFields) == null || L.call(b));
615
+ const $ = (H = p.value) == null ? void 0 : H.httpRequestInstance;
616
+ (x = g.click) == null || x.call(g, i.value, b, $);
617
617
  }
618
- }, qe = (m) => {
619
- if (a.value) {
620
- const { style: v, ...T } = m;
621
- return { style: { marginBottom: "10px", ...v || {} }, ...T };
618
+ }, qe = (g) => {
619
+ if (r.value) {
620
+ const { style: b, ...L } = g;
621
+ return { style: { marginBottom: "10px", ...b || {} }, ...L };
622
622
  }
623
- return m;
623
+ return g;
624
624
  }, fe = () => t().formRef, Ie = () => {
625
- const m = fe();
626
- return m ? new Promise((v) => {
625
+ const g = fe();
626
+ return g ? new Promise((b) => {
627
627
  try {
628
- const T = m.validate((H) => {
629
- v(!!H);
628
+ const L = g.validate((H) => {
629
+ b(!!H);
630
630
  });
631
- T && typeof T.then == "function" && T.then(v).catch(() => v(!1));
632
- } catch (T) {
633
- v(!1);
631
+ L && typeof L.then == "function" && L.then(b).catch(() => b(!1));
632
+ } catch (L) {
633
+ b(!1);
634
634
  }
635
635
  }) : Promise.resolve(!1);
636
636
  }, Re = () => {
637
- var m;
638
- return (m = fe()) == null ? void 0 : m.resetFields();
639
- }, Oe = (m) => {
640
- var v;
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);
637
+ var g;
638
+ return (g = fe()) == null ? void 0 : g.resetFields();
639
+ }, Oe = (g) => {
640
+ var b;
641
+ return (b = fe()) == null ? void 0 : b.clearValidate(g);
642
+ }, we = (g) => {
643
+ var b;
644
+ return (b = fe()) == null ? void 0 : b.validateField(g);
645
+ }, ye = async (g) => {
646
+ const L = J.value.filter((x) => x && g.includes(x.prop));
647
+ if (!L.length) return;
648
+ (await U(L, N)).forEach((x) => {
649
+ if (!x) return;
650
+ const $ = _.value.findIndex((D) => D && D.prop === x.prop);
651
651
  $ !== -1 && (_.value[$] = {
652
652
  ..._.value[$],
653
- dataOptions: F.listData
653
+ dataOptions: x.listData
654
654
  });
655
655
  });
656
656
  };
657
- return Fe(() => {
658
- y.value = t().formRef;
659
- const m = o == null ? void 0 : o.proxy, v = m == null ? void 0 : m.bodyFormInstance;
660
- v == null || v(y.value);
657
+ return xe(() => {
658
+ m.value = t().formRef;
659
+ const g = o == null ? void 0 : o.proxy, b = g == null ? void 0 : g.bodyFormInstance;
660
+ b == null || b(m.value);
661
661
  }), typeof e.expose == "function" && e.expose({
662
662
  formItmeRequestInstance: ye,
663
663
  getFormRef: fe,
@@ -668,16 +668,16 @@ const Vt = ie({
668
668
  }), {
669
669
  // 模板使用
670
670
  formProps: W,
671
- rowLayout: h,
671
+ rowLayout: y,
672
672
  formItem: Q,
673
673
  isBtnHidden: u,
674
- isFold: x,
675
- folded: r,
674
+ isFold: k,
675
+ folded: a,
676
676
  getBtnColSpan: E,
677
- isRenderBtn: re,
677
+ isRenderBtn: ae,
678
678
  colRightLeftList: se,
679
- formInputComponents: L,
680
- formInstance: y,
679
+ formInputComponents: T,
680
+ formInstance: m,
681
681
  // 注意:不要在 setup return 中暴露与 props 同名的 key(configBtn / model /
682
682
  // btnColSpanRow / renderBtn)——Vue 2 已自动把 props 挂到 vm 实例,
683
683
  // 重复暴露会在 @vue/composition-api 下触发 "already declared as a prop" 警告。
@@ -687,10 +687,10 @@ const Vt = ie({
687
687
  changeFolded: q,
688
688
  // 方法
689
689
  checkPermission: B,
690
- translateLabel: k,
691
- getCompIcon: f,
692
- filterOptions: p,
693
- resolveDisabled: b,
690
+ translateLabel: F,
691
+ getCompIcon: h,
692
+ filterOptions: d,
693
+ resolveDisabled: v,
694
694
  handleBtnClick: ne,
695
695
  clickBtn: De,
696
696
  initFormItemOptions: qe,
@@ -707,10 +707,10 @@ const Vt = ie({
707
707
  }
708
708
  });
709
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), {
710
+ var F = typeof n == "function" ? n.options : n;
711
+ return e && (F.render = e, F.staticRenderFns = o, F._compiled = !0), l && (F._scopeId = "data-v-" + l), {
712
712
  exports: n,
713
- options: k
713
+ options: F
714
714
  };
715
715
  }
716
716
  var Wt = function() {
@@ -784,10 +784,10 @@ const Zt = ie({
784
784
  if (!(c === "groups" || c === "scopedSlots" || c === "render"))
785
785
  if (c.includes("-")) {
786
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
+ let F = B[0];
788
+ for (let f = 1; f < B.length; f++)
789
+ F += Gt(B[f]);
790
+ l[F] = i[c];
791
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];
792
792
  return l.align || (l.align = "center"), l;
793
793
  }
@@ -845,119 +845,123 @@ const nn = tn.exports, ft = (n) => n ? n.startsWith("el-icon-") ? n : `el-icon-$
845
845
  }
846
846
  },
847
847
  setup(n) {
848
- var a, f;
849
- const e = (f = (a = ce("$EsPlus", null)) != null ? a : me()) != null ? f : {}, o = (p, b) => {
850
- if (!b) return !0;
851
- const y = e.permission;
852
- return typeof y == "function" ? y(b) : !0;
853
- }, t = (p) => p.map((b) => {
854
- const y = { ...b };
855
- return o([], b.permissionValue) ? typeof b.isHide == "function" ? y.isHide = b.isHide() : y.isHide = b.isHide || !1 : y.isHide = !0, y;
848
+ var r, h;
849
+ const e = (h = (r = ce("$EsPlus", null)) != null ? r : me()) != null ? h : {}, o = (d, v) => {
850
+ if (!v) return !0;
851
+ const m = e.permission;
852
+ return typeof m == "function" ? m(v) : !0;
853
+ }, t = (d) => d.map((v) => {
854
+ const m = { ...v };
855
+ return o([], v.permissionValue) ? typeof v.isHide == "function" ? m.isHide = v.isHide() : m.isHide = v.isHide || !1 : m.isHide = !0, m;
856
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
+ (n.btnConfig || []).filter((d) => nt(d) === "left")
858
+ ).filter((d) => !d.isHide)), l = S(() => t(
859
+ (n.btnConfig || []).filter((d) => nt(d) === "right")
860
+ ).filter((d) => !d.isHide)), c = S(() => !!n.leftText || i.value.length > 0 || l.value.length > 0);
861
861
  return {
862
862
  processedBtnLeft: i,
863
863
  processedBtnRight: l,
864
864
  showContainer: c,
865
- getDisabledState: (p) => typeof p.disabled == "function" ? p.disabled() : p.disabled || !1,
866
- buttonContainerStyle: (p) => ({
865
+ getDisabledState: (d) => typeof d.disabled == "function" ? d.disabled() : d.disabled || !1,
866
+ buttonContainerStyle: (d) => ({
867
867
  display: "inline-block",
868
- marginLeft: p !== 0 ? "8px" : "0px"
868
+ marginLeft: d !== 0 ? "8px" : "0px"
869
869
  }),
870
870
  getCompIcon: ft,
871
- filterOptions: (p) => {
871
+ filterOptions: (d) => {
872
872
  const {
873
- render: b,
874
- click: y,
873
+ render: v,
874
+ click: m,
875
875
  icon: _,
876
- permissionValue: L,
876
+ permissionValue: T,
877
877
  code: j,
878
878
  isHide: N,
879
- name: M,
880
- size: V,
879
+ name: U,
880
+ size: M,
881
881
  ...W
882
- } = p;
882
+ } = d;
883
883
  return W;
884
884
  },
885
- resolveBtnSize: (p) => je(p.size) || "mini"
885
+ resolveBtnSize: (d) => je(d.size) || "mini"
886
886
  };
887
887
  }
888
888
  });
889
- var rn = function() {
889
+ var an = function() {
890
890
  var e = this, o = e._self._c;
891
891
  return e._self._setupProxy, e.showContainer ? o("div", { staticClass: "flex-float btns" }, [o("div", { staticClass: "left-text" }, [e._v(" " + e._s(e.leftText) + " ")]), o("div", { staticClass: "btn-container_block" }, [o("div", { staticClass: "btn-left" }, [e._l(e.processedBtnLeft, function(t, i) {
892
892
  return [t.isHide ? e._e() : o("div", { key: t.name || i, style: e.buttonContainerStyle(i) }, [t.render && typeof t.render == "function" ? o("render-dom", { attrs: { render: t.render } }) : o("el-button", e._b({ attrs: { type: t.type || "", size: e.resolveBtnSize(t), icon: e.getCompIcon(t.icon), loading: t.loading || !1, disabled: e.getDisabledState(t) }, on: { click: () => t.click && t.click(e.instance) } }, "el-button", e.filterOptions(t), !1), [e._v(" " + e._s(t.name) + " ")])], 1)];
893
893
  })], 2), o("div", { staticClass: "btn-right" }, [e._l(e.processedBtnRight, function(t, i) {
894
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)];
895
895
  })], 2)])]) : e._e();
896
- }, an = [], ln = /* @__PURE__ */ ge(
896
+ }, rn = [], ln = /* @__PURE__ */ ge(
897
897
  sn,
898
- rn,
899
898
  an,
899
+ rn,
900
900
  !1,
901
901
  null,
902
902
  "2b641efd"
903
903
  );
904
904
  const cn = ln.exports;
905
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;
909
- return Math.round(b + f + p);
910
- }, d = () => {
911
- var V, W, U, J, R;
912
- const f = n.value;
913
- if (!f) return;
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);
906
+ const l = z(400), c = z(null), B = (d) => Math.sign(d) === -1, F = () => {
907
+ var _, T, j, N;
908
+ const d = ((_ = e.value) == null ? void 0 : _.offsetHeight) || 0, v = ((j = (T = o.value) == null ? void 0 : T.$el) == null ? void 0 : j.offsetHeight) || 0, m = ((N = t.value) == null ? void 0 : N.offsetHeight) || 0;
909
+ return Math.round(m + d + v);
910
+ }, f = (d) => {
911
+ if (!d) return 0;
912
+ const v = typeof window != "undefined" ? window.getComputedStyle(d) : null, m = v && parseFloat(v.paddingTop) || 0, _ = v && parseFloat(v.paddingBottom) || 0, T = d.clientHeight - m - _;
913
+ return T > 0 ? T : d.clientHeight || d.offsetHeight || 0;
914
+ }, p = () => {
915
+ var W, V, J, R;
916
+ const d = n.value;
917
+ if (!d) return;
918
+ const v = typeof i.tabHeight == "number" ? i.tabHeight : i.heightType === "height" ? f(d.parentElement) || d.offsetHeight : parseInt(i.tabHeight, 10) || 450, m = isNaN(v) ? 450 : v, _ = m - F(), T = B(_) ? F() + 300 : m, j = ((W = t.value) == null ? void 0 : W.offsetHeight) || 0, N = ((V = e.value) == null ? void 0 : V.offsetHeight) || 0, U = ((R = (J = o.value) == null ? void 0 : J.$el) == null ? void 0 : R.offsetHeight) || 0, M = Math.floor(T) - Math.round(j + N + U);
915
919
  l.value !== M && (l.value = M);
916
- }, g = () => {
917
- Fe(() => {
920
+ }, r = () => {
921
+ xe(() => {
918
922
  if (!n.value || typeof ResizeObserver == "undefined") return;
919
923
  c.value = new ResizeObserver(() => {
920
924
  requestAnimationFrame(() => {
921
- n.value && d();
925
+ n.value && p();
922
926
  });
923
927
  });
924
- const f = i.heightType === "height" && n.value.parentElement || n.value;
925
- c.value.observe(f), d(), e.value && c.value.observe(e.value), t.value && c.value.observe(t.value);
928
+ const d = i.heightType === "height" && n.value.parentElement || n.value;
929
+ c.value.observe(d), p(), e.value && c.value.observe(e.value), t.value && c.value.observe(t.value);
926
930
  });
927
- }, a = () => {
931
+ }, h = () => {
928
932
  c.value && (c.value.disconnect(), c.value = null);
929
933
  };
930
- return Ue(() => g()), jt(() => a()), { tableHeight: l, resizeObservers: d, startObserver: g, stopObserver: a };
934
+ return Ue(() => r()), jt(() => h()), { tableHeight: l, resizeObservers: p, startObserver: r, stopObserver: h };
931
935
  }
932
936
  function dn(n) {
933
- const e = Ft(), o = z([]), t = z({}), i = z(!1), l = () => {
937
+ const e = xt(), o = z([]), t = z({}), i = z(!1), l = () => {
934
938
  o.value = [...e.multipleSelection], t.value = { ...e.selectionsByPage }, i.value = e.isInitChange;
935
939
  };
936
940
  return {
937
941
  multipleSelection: o,
938
942
  selectionsByPage: t,
939
943
  isInitChange: i,
940
- handleSelectionChange: (d, g) => {
941
- e.isInitChange && n || (Ot(e, d, g, n), l());
944
+ handleSelectionChange: (f, p) => {
945
+ e.isInitChange && n || (Ot(e, f, p, n), l());
942
946
  },
943
- clearAllSelection: (d) => {
944
- d ? Rt(e, d) : (e.multipleSelection = [], e.selectionsByPage = {}), l();
947
+ clearAllSelection: (f) => {
948
+ f ? Rt(e, f) : (e.multipleSelection = [], e.selectionsByPage = {}), l();
945
949
  },
946
- initSelection: (d, g) => {
947
- if (e.isInitChange = !0, l(), !g) {
950
+ initSelection: (f, p) => {
951
+ if (e.isInitChange = !0, l(), !p) {
948
952
  e.isInitChange = !1, l();
949
953
  return;
950
954
  }
951
- Fe(n ? () => {
952
- It(e, d, g, n), e.isInitChange = !1, l();
955
+ xe(n ? () => {
956
+ It(e, f, p, n), e.isInitChange = !1, l();
953
957
  } : () => {
954
- var a;
955
- (a = g.clearSelection) == null || a.call(g), e.isInitChange = !1, l();
958
+ var r;
959
+ (r = p.clearSelection) == null || r.call(p), e.isInitChange = !1, l();
956
960
  });
957
961
  }
958
962
  };
959
963
  }
960
- const rt = {
964
+ const at = {
961
965
  multiSelect: !1,
962
966
  expand: !1,
963
967
  snIndex: !1,
@@ -990,7 +994,8 @@ const rt = {
990
994
  "rowHeight",
991
995
  "estimatedRowHeight",
992
996
  "overscanCount",
993
- "rowClassName"
997
+ "rowClassName",
998
+ "lazyLoad"
994
999
  ]), pn = (n) => n.toLowerCase().replace(/(\s|^)[a-z]/g, (e) => e.toUpperCase()), mn = (n) => {
995
1000
  const e = {};
996
1001
  for (const o in n)
@@ -1003,7 +1008,7 @@ const rt = {
1003
1008
  e[i] = n[o];
1004
1009
  } else o === "key" && (e.prop = n[o]), e[o] = n[o];
1005
1010
  return e.align || (e.align = "center"), e;
1006
- }, at = (n) => {
1011
+ }, rt = (n) => {
1007
1012
  const e = ["total", "pageSize", "current", "tableData"];
1008
1013
  return pe(n) ? Object.keys(n).every((o) => e.find((t) => t === o) && n[o] && typeof n[o] == "string") : !1;
1009
1014
  }, gn = ie({
@@ -1028,7 +1033,7 @@ const rt = {
1028
1033
  },
1029
1034
  options: {
1030
1035
  type: Object,
1031
- default: () => ({ ...rt })
1036
+ default: () => ({ ...at })
1032
1037
  },
1033
1038
  pagination: {
1034
1039
  type: Object,
@@ -1047,7 +1052,7 @@ const rt = {
1047
1052
  const l = Ke(), c = (Je = (Qe = ce(
1048
1053
  "$esPlusTable",
1049
1054
  null
1050
- )) != null ? Qe : me().EsTable) != null ? Je : {}, B = (Ge = (Ze = ce("$EsPlus", null)) != null ? Ze : me()) != null ? Ge : {}, k = (s) => {
1055
+ )) != null ? Qe : me().EsTable) != null ? Je : {}, B = (Ge = (Ze = ce("$EsPlus", null)) != null ? Ze : me()) != null ? Ge : {}, F = (s) => {
1051
1056
  if (!s) return !0;
1052
1057
  const O = B.permission;
1053
1058
  return typeof O == "function" ? O(s) : !0;
@@ -1055,20 +1060,19 @@ const rt = {
1055
1060
  (n.options.virtual === !0 || n.options.engine === "virtual") && console.warn(
1056
1061
  "[@es-plus/vue2] 虚拟滚动 (virtual: true) 在 Vue 2 + Element UI 下不可用,已降级为普通 el-table 渲染。如需虚拟滚动请使用 Vue 3 + Element Plus 版本(@es-plus/vue3)。"
1057
1062
  );
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]);
1063
+ const f = z(null), p = z(null), r = z(null), h = z(null), d = z(null), v = z(`table_${Math.random().toString(36).substring(2, 12)}`), m = z([]), _ = S(() => m.value && m.value.length ? m.value : n.dataSource), T = z([...n.columns]);
1059
1064
  de(
1060
1065
  () => n.columns,
1061
1066
  (s) => {
1062
- L.value = [...s];
1063
- },
1064
- { deep: !0 }
1067
+ T.value = [...s];
1068
+ }
1065
1069
  );
1066
- const j = z(!1), N = z(!1), M = z(!1), V = () => {
1070
+ const j = z(!1), N = z(!1), U = z(!1), M = () => {
1067
1071
  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);
1072
+ !s || !s.$refs || (d.value = s.$refs.tableContainerEl || null, r.value = s.$refs.headBarRef || null, h.value = s.$refs.paginationRef || null, p.value = s.$refs.tbBtnRef || null, f.value = s.$refs.tableRef || null);
1069
1073
  }, W = ce("bodyFormInstance", () => {
1070
- }), U = ce("getVisibleShow", !1), J = S(
1071
- () => typeof U == "function" ? U() : U
1074
+ }), V = ce("getVisibleShow", !1), J = S(
1075
+ () => typeof V == "function" ? V() : V
1072
1076
  ), R = z({
1073
1077
  pageSize: 10,
1074
1078
  current: 1,
@@ -1077,11 +1081,11 @@ const rt = {
1077
1081
  size: "small",
1078
1082
  isSmall: !0,
1079
1083
  ...n.pagination
1080
- }), r = z(null), u = S(() => {
1084
+ }), a = z(null), u = S(() => {
1081
1085
  const s = n.options.entryQuery;
1082
1086
  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))
1087
+ }), y = S(() => {
1088
+ if (n.options.configTableOut && pe(n.options.configTableOut) && Object.keys(n.options.configTableOut).length && rt(n.options.configTableOut))
1085
1089
  return n.options.configTableOut;
1086
1090
  if (c != null && c.configQueryFieldOutput && typeof c.configQueryFieldOutput == "function") {
1087
1091
  const s = c.configQueryFieldOutput({
@@ -1090,7 +1094,7 @@ const rt = {
1090
1094
  current: "pageNo",
1091
1095
  tableData: "rows"
1092
1096
  });
1093
- if (at(s)) return s;
1097
+ if (rt(s)) return s;
1094
1098
  }
1095
1099
  return {
1096
1100
  total: "records",
@@ -1105,7 +1109,7 @@ const rt = {
1105
1109
  var I;
1106
1110
  return ((I = C == null ? void 0 : C.$options) == null ? void 0 : I.name) === "EsForm";
1107
1111
  });
1108
- return O ? (r.value = O, W(O), O) : {};
1112
+ return O ? (a.value = O, W(O), O) : {};
1109
1113
  }), A = S(() => {
1110
1114
  const s = o.default;
1111
1115
  if (typeof s == "function") {
@@ -1114,17 +1118,17 @@ const rt = {
1114
1118
  }
1115
1119
  const O = o.default;
1116
1120
  return Array.isArray(O) && O.length > 0;
1117
- }), x = S(
1121
+ }), k = S(
1118
1122
  () => n.options.heightType || "auto"
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
1123
+ ), E = S(() => typeof n.options.tabHeight == "number" ? `${n.options.tabHeight}px` : k.value === "height" && typeof n.options.height == "number" ? `${n.options.height}px` : "100%"), Q = S(() => ({
1124
+ [k.value]: E.value
1121
1125
  })), q = S(() => n.headBarClass ? {
1122
1126
  type: typeof n.headBarClass == "string" ? "string" : "object",
1123
1127
  value: n.headBarClass
1124
1128
  } : { type: "string", value: "" }), se = S(() => {
1125
1129
  const s = q.value;
1126
1130
  return s.type === "object" && s.value && typeof s.value == "object" ? s.value : {};
1127
- }), re = S(() => {
1131
+ }), ae = S(() => {
1128
1132
  const s = q.value;
1129
1133
  return s.type === "string" ? s.value : "";
1130
1134
  }), ne = S(() => {
@@ -1161,7 +1165,7 @@ const rt = {
1161
1165
  return ((s = ne.value) == null ? void 0 : s.nextText) || "";
1162
1166
  }
1163
1167
  ), Oe = S(() => ({
1164
- position: x.value === "height" ? "absolute" : "static",
1168
+ position: k.value === "height" ? "absolute" : "static",
1165
1169
  bottom: "0px",
1166
1170
  left: "0px",
1167
1171
  // z-index 必须高于 element-loading 蒙层(默认 2000),否则请求加载过程中分页会被蒙层遮挡。
@@ -1170,15 +1174,15 @@ const rt = {
1170
1174
  })), we = S(() => n.options.loading || j.value), ye = S(
1171
1175
  () => !!n.options.actionUrl || n.options.apiParams && pe(n.options.apiParams) && Object.keys(n.options.apiParams).length > 0
1172
1176
  ), Pe = S(() => {
1173
- const s = L.value.filter((C) => !C.hidCol);
1177
+ const s = T.value.filter((C) => !C.hidCol);
1174
1178
  if (s.forEach((C) => {
1175
1179
  C.prop !== "operate" && C.key !== "operate" && (C.prop || C.key) && !C.formatter && (C.formatter = (P) => {
1176
1180
  const I = P[C.prop] || P[C.key];
1177
1181
  return I == null || I === "" ? C.emptyPlaceholder || "-" : I;
1178
1182
  }), (C.prop === "operate" || C.key === "operate") && C.btns && !C.render && (C.render = (P, { row: I }) => {
1179
- var ae;
1183
+ var re;
1180
1184
  return ue("div", [
1181
- (ae = C.btns) == null ? void 0 : ae.filter((Z) => k(Z.permissionValue)).map(
1185
+ (re = C.btns) == null ? void 0 : re.filter((Z) => F(Z.permissionValue)).map(
1182
1186
  (Z) => (
1183
1187
  // Element UI text 按钮:type="text" 而非 text 属性
1184
1188
  ue(
@@ -1219,40 +1223,40 @@ const rt = {
1219
1223
  }
1220
1224
  return s;
1221
1225
  }), $e = S(() => {
1222
- const s = mn({ ...rt, ...n.options }), { align: O, ...C } = s, P = {};
1226
+ const s = mn({ ...at, ...n.options }), { align: O, ...C } = s, P = {};
1223
1227
  for (const I in C)
1224
1228
  fn.has(I) || (P[I] = C[I]);
1225
1229
  if (P.size !== void 0) {
1226
1230
  const I = je(P.size);
1227
1231
  I !== void 0 && (P.size = I);
1228
1232
  }
1229
- return P;
1233
+ return typeof n.options.lazyLoad == "function" && (P.load = n.options.lazyLoad), P;
1230
1234
  }), { tableHeight: Ce, resizeObservers: he } = un(
1235
+ d,
1236
+ r,
1231
1237
  p,
1232
- a,
1233
- g,
1234
- f,
1238
+ h,
1235
1239
  {
1236
- heightType: x.value,
1240
+ heightType: k.value,
1237
1241
  tabHeight: n.options.tabHeight
1238
1242
  }
1239
1243
  ), He = S(() => {
1240
1244
  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;
1245
+ return n.options.rowkey && (s.rowKey = n.options.rowkey), k.value === "height" ? s.height = Ce.value : k.value === "maxHeight" && (s.maxHeight = Ce.value), s;
1242
1246
  }), {
1243
- multipleSelection: m,
1244
- handleSelectionChange: v,
1245
- initSelection: T,
1247
+ multipleSelection: g,
1248
+ handleSelectionChange: b,
1249
+ initSelection: L,
1246
1250
  clearAllSelection: H
1247
- } = dn(n.options.rowkey), F = (s) => {
1248
- v(s, R.value.current || 1);
1251
+ } = dn(n.options.rowkey), x = (s) => {
1252
+ b(s, R.value.current || 1);
1249
1253
  };
1250
1254
  de(J, async (s, O) => {
1251
1255
  var C, P;
1252
- s && s !== O && (n.options.actionUrl && await Te(), (P = (C = d.value) == null ? void 0 : C.doLayout) == null || P.call(C));
1256
+ s && s !== O && (n.options.actionUrl && await Te(), (P = (C = f.value) == null ? void 0 : C.doLayout) == null || P.call(C));
1253
1257
  });
1254
1258
  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);
1259
+ n.pagination && Object.keys(n.pagination).length && (R.value = { ...R.value, ...n.pagination }, U.value = n.pagination.total !== void 0);
1256
1260
  const D = () => {
1257
1261
  const s = { ...R.value };
1258
1262
  $ = JSON.stringify(s), e("update:pagination", s);
@@ -1261,21 +1265,21 @@ const rt = {
1261
1265
  () => n.pagination,
1262
1266
  (s) => {
1263
1267
  const O = JSON.stringify(s || {});
1264
- O !== $ && ($ = O, R.value = { ...R.value, ...s }, M.value = s.total !== void 0);
1268
+ O !== $ && ($ = O, R.value = { ...R.value, ...s }, U.value = s.total !== void 0);
1265
1269
  }
1266
1270
  ), de(
1267
1271
  () => n.dataSource,
1268
1272
  (s) => {
1269
- T(s, d.value);
1273
+ L(s, f.value);
1270
1274
  }
1271
1275
  );
1272
1276
  let X = null;
1273
- de(y, (s) => {
1277
+ de(m, (s) => {
1274
1278
  Array.isArray(s) && s !== X && (X = s, e("update:dataSource", s));
1275
1279
  }), Ue(() => {
1276
- V(), ye.value && n.options.isInitRun !== !1 && Te(), Fe(() => {
1277
- V(), w.value, typeof requestAnimationFrame != "undefined" ? requestAnimationFrame(() => {
1278
- V(), he();
1280
+ M(), ye.value && n.options.isInitRun !== !1 && Te(), xe(() => {
1281
+ M(), w.value, typeof requestAnimationFrame != "undefined" ? requestAnimationFrame(() => {
1282
+ M(), he();
1279
1283
  }) : he();
1280
1284
  });
1281
1285
  });
@@ -1287,20 +1291,20 @@ const rt = {
1287
1291
  if (n.options.listenToCallBack && n.options.listenToCallBack[s] && P !== -1 && C[P].isReturn)
1288
1292
  return n.options.listenToCallBack[s](O);
1289
1293
  }, Ne = (s, O) => {
1290
- const C = h.value;
1294
+ const C = y.value;
1291
1295
  if (pe(C) && Object.keys(C).length) {
1292
1296
  const P = {};
1293
- Object.entries(C).forEach(([I, ae]) => {
1297
+ Object.entries(C).forEach(([I, re]) => {
1294
1298
  var Se;
1295
1299
  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;
1300
+ const le = (Se = s[re]) != null ? Se : wt(s, re);
1301
+ I === "tableData" ? m.value = Array.isArray(le) ? le : [] : P[I] = typeof le == "number" ? le : parseInt(le, 10) || 0;
1298
1302
  }), Object.keys(P).length && (R.value = { ...R.value, ...P });
1299
1303
  }
1300
1304
  }, Me = (s, O = {}) => {
1301
1305
  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;
1306
+ const { success: C, fail: P } = O, I = ((et = n.options) == null ? void 0 : et.apiParams) || {}, re = ((tt = n.options) == null ? void 0 : tt.actionUrl) || I.url || "";
1307
+ if (!re || !Object.keys(I).length) return;
1304
1308
  const Z = w.value, le = Z && Z.props && Z.props.model ? { ...Z.props.model } : u.value || {}, Se = ee("brcb", {
1305
1309
  ...le,
1306
1310
  ...s,
@@ -1312,7 +1316,7 @@ const rt = {
1312
1316
  j.value = !0;
1313
1317
  try {
1314
1318
  const ve = await bt({
1315
- url: ae,
1319
+ url: re,
1316
1320
  formParams: vt,
1317
1321
  headers: I.headers || {},
1318
1322
  ...Ye,
@@ -1375,29 +1379,29 @@ const rt = {
1375
1379
  e("change-table-sort", s);
1376
1380
  };
1377
1381
  dt("getTableInstantce", () => ({
1378
- tableRef: d,
1382
+ tableRef: f,
1379
1383
  toggleSelection: (s) => {
1380
1384
  var O, C;
1381
1385
  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);
1386
+ var I, re;
1387
+ (re = (I = f.value) == null ? void 0 : I.toggleRowSelection) == null || re.call(I, P);
1388
+ }) : (C = (O = f.value) == null ? void 0 : O.clearSelection) == null || C.call(O);
1385
1389
  },
1386
- clearAllSelection: () => H(d.value),
1387
- refsInstance: () => d.value,
1390
+ clearAllSelection: () => H(f.value),
1391
+ refsInstance: () => f.value,
1388
1392
  httpRequestInstance: Te
1389
1393
  }));
1390
1394
  const We = {
1391
1395
  httpRequestInstance: Te,
1392
- getSelectionRows: () => m.value,
1396
+ getSelectionRows: () => g.value,
1393
1397
  clearSelection: () => {
1394
1398
  var s, O;
1395
- return (O = (s = d.value) == null ? void 0 : s.clearSelection) == null ? void 0 : O.call(s);
1399
+ return (O = (s = f.value) == null ? void 0 : s.clearSelection) == null ? void 0 : O.call(s);
1396
1400
  },
1397
- clearAllSelection: () => H(d.value),
1401
+ clearAllSelection: () => H(f.value),
1398
1402
  refresh: () => {
1399
1403
  var s, O;
1400
- return (O = (s = d.value) == null ? void 0 : s.doLayout) == null ? void 0 : O.call(s);
1404
+ return (O = (s = f.value) == null ? void 0 : s.doLayout) == null ? void 0 : O.call(s);
1401
1405
  },
1402
1406
  // virtual 滚动占位(保持 API 一致,Vue 2 版本无效)
1403
1407
  scrollToRow: (s) => {
@@ -1405,28 +1409,28 @@ const rt = {
1405
1409
  };
1406
1410
  return typeof i == "function" && i(We), {
1407
1411
  // refs
1408
- tableRef: d,
1409
- tbBtnRef: g,
1410
- headBarRef: a,
1411
- paginationRef: f,
1412
- tableId: b,
1413
- tableData: y,
1412
+ tableRef: f,
1413
+ tbBtnRef: p,
1414
+ headBarRef: r,
1415
+ paginationRef: h,
1416
+ tableId: v,
1417
+ tableData: m,
1414
1418
  effectiveDataSource: _,
1415
1419
  // state
1416
1420
  loadStatus: we,
1417
1421
  paginationConfig: R,
1418
- formInstance: r,
1422
+ formInstance: a,
1419
1423
  // computeds
1420
1424
  filteredColumns: Pe,
1421
1425
  tableBindAttrs: He,
1422
1426
  hasDefaultSlot: A,
1423
- heightType: x,
1427
+ heightType: k,
1424
1428
  tabHeight: E,
1425
1429
  slotStyles: q,
1426
1430
  slotStyleValue: se,
1427
- slotClassValue: re,
1431
+ slotClassValue: ae,
1428
1432
  slotState: N,
1429
- showPagination: M,
1433
+ showPagination: U,
1430
1434
  containerStyle: Q,
1431
1435
  paginationStyle: Oe,
1432
1436
  layout: _e,
@@ -1436,7 +1440,7 @@ const rt = {
1436
1440
  paginationPrevText: Ie,
1437
1441
  paginationNextText: Re,
1438
1442
  // handlers
1439
- handleTableSelectionChange: F,
1443
+ handleTableSelectionChange: x,
1440
1444
  changeTableSort: ht,
1441
1445
  handleSizeChange: gt,
1442
1446
  handleIndexChange: yt,
@@ -1479,11 +1483,11 @@ var yn = function() {
1479
1483
  hn,
1480
1484
  !1,
1481
1485
  null,
1482
- "63718c59"
1486
+ "cf8d6168"
1483
1487
  );
1484
- const ke = vn.exports;
1485
- ke.install = function(n) {
1486
- n.component(ke.name || "EsTable", ke);
1488
+ const Fe = vn.exports;
1489
+ Fe.install = function(n) {
1490
+ n.component(Fe.name || "EsTable", Fe);
1487
1491
  };
1488
1492
  const bn = ie({
1489
1493
  name: "RenderJsx",
@@ -1507,8 +1511,8 @@ const bn = ie({
1507
1511
  return Ue(() => t()), Et(() => t()), () => {
1508
1512
  const { instance: i } = n, l = {
1509
1513
  ...i,
1510
- registerRef: (k, d) => {
1511
- d != null && (e[k] = d);
1514
+ registerRef: (F, f) => {
1515
+ f != null && (e[F] = f);
1512
1516
  },
1513
1517
  getRefs: () => e
1514
1518
  }, c = n.render, B = c && typeof c == "function" ? c(ue, l, n.components || {}) : "";
@@ -1531,7 +1535,7 @@ var Sn = /* @__PURE__ */ ge(
1531
1535
  null,
1532
1536
  null
1533
1537
  );
1534
- const Bn = Sn.exports, kn = ie({
1538
+ const Bn = Sn.exports, Fn = ie({
1535
1539
  name: "EsDialog",
1536
1540
  components: { RenderJsx: Bn },
1537
1541
  inheritAttrs: !1,
@@ -1563,101 +1567,101 @@ const Bn = Sn.exports, kn = ie({
1563
1567
  emits: ["update:visible", "closed", "submit"],
1564
1568
  setup(n, { emit: e, attrs: o, slots: t, expose: i }) {
1565
1569
  var w, A;
1566
- const l = Ke(), c = z(null), B = ze({}), k = z(!1), d = l, g = (A = (w = ce("$EsPlus", null)) != null ? w : me()) != null ? A : {}, a = (x) => {
1567
- if (!x) return !0;
1568
- const E = g.permission;
1569
- return typeof E == "function" ? E(x) : !0;
1570
- }, f = (x) => {
1570
+ const l = Ke(), c = z(null), B = ze({}), F = z(!1), f = l, p = (A = (w = ce("$EsPlus", null)) != null ? w : me()) != null ? A : {}, r = (k) => {
1571
+ if (!k) return !0;
1572
+ const E = p.permission;
1573
+ return typeof E == "function" ? E(k) : !0;
1574
+ }, h = (k) => {
1571
1575
  const {
1572
1576
  icon: E,
1573
1577
  click: Q,
1574
1578
  permissionValue: q,
1575
1579
  name: se,
1576
- disabled: re,
1580
+ disabled: ae,
1577
1581
  key: ne,
1578
1582
  ..._e
1579
- } = x;
1583
+ } = k;
1580
1584
  return _e;
1581
- }, p = (x) => {
1582
- const E = x.disabled;
1585
+ }, d = (k) => {
1586
+ const E = k.disabled;
1583
1587
  return typeof E == "function" ? E() : !!E;
1584
- }, b = () => {
1588
+ }, v = () => {
1585
1589
  setTimeout(() => {
1586
- k.value && (k.value = !1);
1590
+ F.value && (F.value = !1);
1587
1591
  }, 500);
1588
- }, y = () => {
1589
- o != null && o.fullscreen || (k.value = !k.value);
1592
+ }, m = () => {
1593
+ o != null && o.fullscreen || (F.value = !F.value);
1590
1594
  }, _ = S({
1591
1595
  get: () => n.visible || !1,
1592
- set: (x) => {
1593
- e("update:visible", x), x || (e("closed", x), b());
1596
+ set: (k) => {
1597
+ e("update:visible", k), k || (e("closed", k), v());
1594
1598
  }
1595
- }), L = () => {
1596
- _.value = !1, e("closed", !1), b();
1599
+ }), T = () => {
1600
+ _.value = !1, e("closed", !1), v();
1597
1601
  }, j = () => {
1598
- e("closed", !1), b();
1602
+ e("closed", !1), v();
1599
1603
  }, N = () => {
1600
- }, M = (x) => {
1601
- x();
1602
- }, V = S(() => ({ ...o })), W = S(() => k.value ? "dialogFull" : n.maxHeight ? "dialogShadow" : "dialogAuto"), U = () => {
1603
- const x = typeof window != "undefined" ? window.innerHeight : 800;
1604
- return Math.max(x - 135, 200);
1604
+ }, U = (k) => {
1605
+ k();
1606
+ }, M = S(() => ({ ...o })), W = S(() => F.value ? "dialogFull" : n.maxHeight ? "dialogShadow" : "dialogAuto"), V = () => {
1607
+ const k = typeof window != "undefined" ? window.innerHeight : 800;
1608
+ return Math.max(k - 135, 200);
1605
1609
  }, J = S(() => {
1606
- const x = U();
1607
- return k.value ? { height: x + "px" } : n.maxHeight ? {
1610
+ const k = V();
1611
+ return F.value ? { height: k + "px" } : n.maxHeight ? {
1608
1612
  maxHeight: typeof n.maxHeight == "number" ? `${n.maxHeight}px` : n.maxHeight
1609
- } : { maxHeight: x + "px" };
1613
+ } : { maxHeight: k + "px" };
1610
1614
  }), R = S(() => ({
1611
1615
  renderBodyRefs: B.currentRef,
1612
1616
  renderBodyRefsObject: B,
1613
1617
  lyFormInstance: c,
1614
- dialogInstance: d,
1618
+ dialogInstance: f,
1615
1619
  getRefs: () => B
1616
- })), r = (x) => {
1617
- const E = x.click;
1620
+ })), a = (k) => {
1621
+ const E = k.click;
1618
1622
  typeof E == "function" && E(B.currentRef, {
1619
- close: L,
1623
+ close: T,
1620
1624
  getRefs: (Q) => Q ? B[Q] || null : B,
1621
- dialogInstance: d
1625
+ dialogInstance: f
1622
1626
  });
1623
1627
  };
1624
- dt("bodyFormInstance", (x) => {
1625
- c.value = x;
1628
+ dt("bodyFormInstance", (k) => {
1629
+ c.value = k;
1626
1630
  });
1627
1631
  const u = S(() => ({
1628
1632
  ...n.components
1629
- })), h = {
1630
- closed: L
1633
+ })), y = {
1634
+ closed: T
1631
1635
  };
1632
- return typeof i == "function" && i(h), {
1636
+ return typeof i == "function" && i(y), {
1633
1637
  // state
1634
1638
  dialogVisible: _,
1635
- isFullscreen: k,
1639
+ isFullscreen: F,
1636
1640
  lyFormInstance: c,
1637
1641
  renderBodyRefsObject: B,
1638
1642
  // computeds
1639
- filteredAttrs: V,
1643
+ filteredAttrs: M,
1640
1644
  initDialogCls: W,
1641
1645
  initDialogHeight: J,
1642
1646
  getCurrentInstanceModel: R,
1643
1647
  dialogComponents: u,
1644
1648
  // methods
1645
- handleClose: L,
1646
- handleFullscreen: y,
1647
- handleBtnClick: r,
1649
+ handleClose: T,
1650
+ handleFullscreen: m,
1651
+ handleBtnClick: a,
1648
1652
  onDialogClose: j,
1649
1653
  onDialogClosed: N,
1650
- beforeCloseHandler: M,
1651
- checkPermission: a,
1652
- filterOptions: f,
1653
- getDisabled: p,
1654
+ beforeCloseHandler: U,
1655
+ checkPermission: r,
1656
+ filterOptions: h,
1657
+ getDisabled: d,
1654
1658
  getCompIcon: ft,
1655
1659
  // exposed
1656
- ...h
1660
+ ...y
1657
1661
  };
1658
1662
  }
1659
1663
  });
1660
- var xn = function() {
1664
+ var kn = function() {
1661
1665
  var e = this, o = e._self._c;
1662
1666
  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) {
1663
1667
  e.dialogVisible = t;
@@ -1668,15 +1672,15 @@ var xn = function() {
1668
1672
  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()];
1669
1673
  })] : e._e()], 2)];
1670
1674
  }, 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);
1671
- }, Fn = [], In = /* @__PURE__ */ ge(
1675
+ }, xn = [], In = /* @__PURE__ */ ge(
1676
+ Fn,
1672
1677
  kn,
1673
1678
  xn,
1674
- Fn,
1675
1679
  !1,
1676
1680
  null,
1677
1681
  "1f2694c2"
1678
1682
  );
1679
- const xe = In.exports, Rn = (n) => typeof n == "string" ? document.querySelector(n) || document.body : n instanceof HTMLElement ? n : document.body, On = (n) => {
1683
+ const ke = In.exports, Rn = (n) => typeof n == "string" ? document.querySelector(n) || document.body : n instanceof HTMLElement ? n : document.body, On = (n) => {
1680
1684
  const e = {}, o = {};
1681
1685
  return Object.entries(n).forEach(([t, i]) => {
1682
1686
  if (t.startsWith("on") && typeof i == "function" && t.length > 2) {
@@ -1687,12 +1691,12 @@ const xe = In.exports, Rn = (n) => typeof n == "string" ? document.querySelector
1687
1691
  }), { propsData: o, events: e };
1688
1692
  }, lt = (n, e, o) => {
1689
1693
  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);
1694
+ return Object.entries(i).forEach(([F, f]) => {
1695
+ c.$on(F, f);
1692
1696
  }), c.$mount(), Rn(o).appendChild(c.$el), c;
1693
1697
  };
1694
1698
  function Ee(n, e = {}) {
1695
- if (n = n || xe, Object.assign({ onlyInstance: !1 }, e).onlyInstance) {
1699
+ if (n = n || ke, Object.assign({ onlyInstance: !1 }, e).onlyInstance) {
1696
1700
  let t = null;
1697
1701
  const i = () => {
1698
1702
  t && (t.visible = !1, setTimeout(() => {
@@ -1700,11 +1704,11 @@ function Ee(n, e = {}) {
1700
1704
  }, 300));
1701
1705
  }, l = (c) => {
1702
1706
  c.visible === void 0 && (c.visible = !0);
1703
- const B = c.onClosed, k = c.onSubmit;
1704
- return c.onClosed = (...d) => {
1705
- B == null || B(...d), i();
1706
- }, c.onSubmit = (d = i) => {
1707
- k == null || k(d);
1707
+ const B = c.onClosed, F = c.onSubmit;
1708
+ return c.onClosed = (...f) => {
1709
+ B == null || B(...f), i();
1710
+ }, c.onSubmit = (f = i) => {
1711
+ F == null || F(f);
1708
1712
  }, t = lt(n, c, c.appendTo), t;
1709
1713
  };
1710
1714
  return l.close = i, l;
@@ -1716,30 +1720,30 @@ function Ee(n, e = {}) {
1716
1720
  t && (t.$destroy(), t.$el && t.$el.parentNode && t.$el.parentNode.removeChild(t.$el), t = null);
1717
1721
  }, c = (B) => {
1718
1722
  if (t)
1719
- return Object.entries(B).forEach(([a, f]) => {
1720
- a.startsWith("on") || (t[a] = f);
1723
+ return Object.entries(B).forEach(([r, h]) => {
1724
+ r.startsWith("on") || (t[r] = h);
1721
1725
  }), t.visible = !0, t;
1722
- const k = {
1726
+ const F = {
1723
1727
  visible: !0,
1724
1728
  width: "50%",
1725
1729
  destroyOnClose: !0,
1726
1730
  ...B
1727
- }, d = k.onClosed, g = k.onSubmit;
1728
- return k.onClosed = () => {
1729
- d == null || d(), i();
1730
- }, k.onSubmit = (a = i) => {
1731
- g == null || g(a);
1732
- }, t = lt(n, k, k.appendTo), t;
1731
+ }, f = F.onClosed, p = F.onSubmit;
1732
+ return F.onClosed = () => {
1733
+ f == null || f(), i();
1734
+ }, F.onSubmit = (r = i) => {
1735
+ p == null || p(r);
1736
+ }, t = lt(n, F, F.appendTo), t;
1733
1737
  };
1734
1738
  return c.close = i, c.destroy = l, c;
1735
1739
  }
1736
1740
  }
1737
- xe.install = function(n) {
1738
- n.component(xe.name || "EsDialog", xe), n.prototype.$useDialog = Ee;
1741
+ ke.install = function(n) {
1742
+ n.component(ke.name || "EsDialog", ke), n.prototype.$useDialog = Ee;
1739
1743
  };
1740
1744
  const wn = ie({
1741
1745
  name: "EsCrudPage",
1742
- components: { EsForm: be, EsTable: ke },
1746
+ components: { EsForm: be, EsTable: Fe },
1743
1747
  inheritAttrs: !1,
1744
1748
  props: {
1745
1749
  schema: { type: Object, required: !0 },
@@ -1766,8 +1770,8 @@ const wn = ie({
1766
1770
  const t = z(null), i = z(null), l = z([]), c = ze({});
1767
1771
  de(
1768
1772
  () => n.schema.formItems,
1769
- (r) => {
1770
- r && r.forEach((u) => {
1773
+ (a) => {
1774
+ a && a.forEach((u) => {
1771
1775
  u.prop && !(u.prop in c) && (c[u.prop] = "");
1772
1776
  });
1773
1777
  },
@@ -1778,48 +1782,48 @@ const wn = ie({
1778
1782
  pageSize: 10,
1779
1783
  total: 0,
1780
1784
  ...n.schema.pagination || {}
1781
- }), k = S(() => {
1785
+ }), F = S(() => {
1782
1786
  var w, A;
1783
1787
  if (n.schema.dialogs) return n.schema.dialogs;
1784
1788
  if (!((w = n.schema.dialogFormItems) != null && w.length)) return {};
1785
- const r = {
1789
+ const a = {
1786
1790
  width: ((A = n.schema.dialogOptions) == null ? void 0 : A.width) || "600px",
1787
1791
  formItems: n.schema.dialogFormItems,
1788
1792
  ...n.schema.dialogOptions || {}
1789
- }, u = {}, h = n.schema.actions || ["add", "edit", "delete"];
1790
- return h.includes("add") && (u.add = { ...r, title: "新增" }), h.includes("edit") && (u.edit = { ...r, title: "编辑" }), h.includes("view") && (u.view = { ...r, title: "查看", isHiddenFooter: !0 }), u;
1791
- }), d = S(() => {
1793
+ }, u = {}, y = n.schema.actions || ["add", "edit", "delete"];
1794
+ return y.includes("add") && (u.add = { ...a, title: "新增" }), y.includes("edit") && (u.edit = { ...a, title: "编辑" }), y.includes("view") && (u.view = { ...a, title: "查看", isHiddenFooter: !0 }), u;
1795
+ }), f = S(() => {
1792
1796
  if (n.schema.toolbarBtns) return n.schema.toolbarBtns;
1793
1797
  if (n.schema.dialogs || n.schema.operationColumn !== void 0) return [];
1794
- const r = n.schema.actions || ["add", "edit", "delete"], u = [];
1795
- return r.includes("add") && u.push({
1798
+ const a = n.schema.actions || ["add", "edit", "delete"], u = [];
1799
+ return a.includes("add") && u.push({
1796
1800
  name: "新增",
1797
1801
  type: "primary",
1798
1802
  key: "add",
1799
1803
  icon: "Plus",
1800
1804
  dialogKey: "add"
1801
- }), r.includes("export") && u.push({
1805
+ }), a.includes("export") && u.push({
1802
1806
  name: "导出",
1803
1807
  key: "export",
1804
1808
  icon: "Download",
1805
1809
  actionType: "export"
1806
- }), r.includes("import") && u.push({
1810
+ }), a.includes("import") && u.push({
1807
1811
  name: "导入",
1808
1812
  key: "import",
1809
1813
  icon: "Upload",
1810
1814
  actionType: "import"
1811
1815
  }), u;
1812
- }), g = S(
1816
+ }), p = S(
1813
1817
  () => {
1814
1818
  var A;
1815
1819
  if (n.schema.operationColumn !== void 0) return n.schema.operationColumn;
1816
- const r = n.schema.actions || ["add", "edit", "delete"];
1820
+ const a = n.schema.actions || ["add", "edit", "delete"];
1817
1821
  if ((A = n.schema.columns) == null ? void 0 : A.some(
1818
- (x) => x.prop === "action" || x.prop === "operate" || x.btns
1822
+ (k) => k.prop === "action" || k.prop === "operate" || k.btns
1819
1823
  )) return;
1820
- if (r.filter((x) => ["edit", "delete", "view"].includes(x)).length === 0) return !1;
1824
+ if (a.filter((k) => ["edit", "delete", "view"].includes(k)).length === 0) return !1;
1821
1825
  const w = [];
1822
- return r.includes("view") && w.push({ name: "查看", type: "primary", key: "view", dialogKey: "view" }), r.includes("edit") && w.push({ name: "编辑", type: "primary", key: "edit", dialogKey: "edit" }), r.includes("delete") && w.push({
1826
+ return a.includes("view") && w.push({ name: "查看", type: "primary", key: "view", dialogKey: "view" }), a.includes("edit") && w.push({ name: "编辑", type: "primary", key: "edit", dialogKey: "edit" }), a.includes("delete") && w.push({
1823
1827
  name: "删除",
1824
1828
  type: "danger",
1825
1829
  key: "delete",
@@ -1831,35 +1835,35 @@ const wn = ie({
1831
1835
  btns: w
1832
1836
  };
1833
1837
  }
1834
- ), a = S(() => {
1838
+ ), r = S(() => {
1835
1839
  if (n.schema.queryBtns) return n.schema.queryBtns;
1836
- const r = [
1840
+ const a = [
1837
1841
  { name: "查询", type: "primary", key: "query", triggerEvent: !0 },
1838
1842
  { name: "重置", key: "rest", triggerEvent: !0 }
1839
- ], u = d.value.map((h) => {
1840
- const w = { ...h };
1841
- return w.click || (w.click = () => _(h)), w;
1843
+ ], u = f.value.map((y) => {
1844
+ const w = { ...y };
1845
+ return w.click || (w.click = () => _(y)), w;
1842
1846
  });
1843
- return [...r, ...u];
1844
- }), f = S(() => {
1845
- const r = [...n.schema.columns || []], u = g.value;
1846
- if (u === !1 || u === void 0) return r;
1847
- const h = u.btns.map((w) => ({
1847
+ return [...a, ...u];
1848
+ }), h = S(() => {
1849
+ const a = [...n.schema.columns || []], u = p.value;
1850
+ if (u === !1 || u === void 0) return a;
1851
+ const y = u.btns.map((w) => ({
1848
1852
  name: w.name,
1849
1853
  type: w.type,
1850
1854
  permissionValue: w.permissionValue,
1851
- clickEvent: (A) => L(w, A)
1855
+ clickEvent: (A) => T(w, A)
1852
1856
  }));
1853
- return r.push({
1857
+ return a.push({
1854
1858
  prop: "operate",
1855
1859
  label: u.label || "操作",
1856
- width: u.width || h.length * 80 + 20,
1860
+ width: u.width || y.length * 80 + 20,
1857
1861
  fixed: u.fixed || "right",
1858
- btns: h
1859
- }), r;
1860
- }), p = S(() => {
1861
- var r;
1862
- return (r = n.schema.tableBtns) != null && r.length ? n.schema.tableBtns.map((u) => ({
1862
+ btns: y
1863
+ }), a;
1864
+ }), d = S(() => {
1865
+ var a;
1866
+ return (a = n.schema.tableBtns) != null && a.length ? n.schema.tableBtns.map((u) => ({
1863
1867
  name: u.name,
1864
1868
  type: u.type,
1865
1869
  size: u.size || "small",
@@ -1870,187 +1874,187 @@ const wn = ie({
1870
1874
  disabled: u.disabled,
1871
1875
  click: () => _(u)
1872
1876
  })) : [];
1873
- }), b = S(() => {
1874
- const r = {
1877
+ }), v = S(() => {
1878
+ const a = {
1875
1879
  border: !0,
1876
1880
  isInitRun: n.autoLoad,
1877
1881
  ...n.schema.tableOptions || {}
1878
1882
  };
1879
- n.httpRequest && (r.httpRequest = n.httpRequest);
1880
- const u = p.value;
1883
+ n.httpRequest && (a.httpRequest = n.httpRequest);
1884
+ const u = d.value;
1881
1885
  if (u.length > 0) {
1882
- const h = r.configBtn || [];
1883
- r.configBtn = [...h, ...u];
1886
+ const y = a.configBtn || [];
1887
+ a.configBtn = [...y, ...u];
1884
1888
  }
1885
- return r;
1886
- }), y = S(() => {
1887
- const r = n.schema.formLayout;
1888
- if (r)
1889
+ return a;
1890
+ }), m = S(() => {
1891
+ const a = n.schema.formLayout;
1892
+ if (a)
1889
1893
  return {
1890
1894
  rowLayProps: { gutter: 16 },
1891
1895
  formLayProps: {
1892
- labelBtnWidth: r.labelWidth,
1893
- ...r.minFoldRows ? { minFoldRows: r.minFoldRows } : {}
1896
+ labelBtnWidth: a.labelWidth,
1897
+ ...a.minFoldRows ? { minFoldRows: a.minFoldRows } : {}
1894
1898
  }
1895
1899
  };
1896
1900
  });
1897
- async function _(r) {
1898
- const u = r.key || r.actionType || "";
1899
- if (r.confirm) {
1900
- const h = typeof r.confirm == "string" ? r.confirm : "确定执行此操作吗?";
1901
+ async function _(a) {
1902
+ const u = a.key || a.actionType || "";
1903
+ if (a.confirm) {
1904
+ const y = typeof a.confirm == "string" ? a.confirm : "确定执行此操作吗?";
1901
1905
  try {
1902
- await ot.confirm(h, "提示", { type: "warning" });
1906
+ await ot.confirm(y, "提示", { type: "warning" });
1903
1907
  } catch (w) {
1904
1908
  return;
1905
1909
  }
1906
1910
  }
1907
- if (r.dialogKey) {
1908
- u === "add" && e("add"), N(r.dialogKey);
1911
+ if (a.dialogKey) {
1912
+ u === "add" && e("add"), N(a.dialogKey);
1909
1913
  return;
1910
1914
  }
1911
- u === "export" || r.actionType === "export" ? e("export", { ...c }) : u === "add" && e("add"), e("btn-click", u, { ...c });
1915
+ u === "export" || a.actionType === "export" ? e("export", { ...c }) : u === "add" && e("add"), e("btn-click", u, { ...c });
1912
1916
  }
1913
- async function L(r, u) {
1914
- const h = r.key || "";
1915
- if (r.confirm) {
1916
- const w = typeof r.confirm == "string" ? r.confirm : "确定执行此操作吗?";
1917
+ async function T(a, u) {
1918
+ const y = a.key || "";
1919
+ if (a.confirm) {
1920
+ const w = typeof a.confirm == "string" ? a.confirm : "确定执行此操作吗?";
1917
1921
  try {
1918
1922
  await ot.confirm(w, "提示", { type: "warning" });
1919
1923
  } catch (A) {
1920
1924
  return;
1921
1925
  }
1922
1926
  }
1923
- if (r.click) {
1924
- r.click(u, { refresh: U, getSelectedRows: J, openDialog: N });
1927
+ if (a.click) {
1928
+ a.click(u, { refresh: V, getSelectedRows: J, openDialog: N });
1925
1929
  return;
1926
1930
  }
1927
- if (r.dialogKey) {
1928
- N(r.dialogKey, u);
1931
+ if (a.dialogKey) {
1932
+ N(a.dialogKey, u);
1929
1933
  return;
1930
1934
  }
1931
- h === "edit" ? e("edit", u) : h === "delete" ? e("delete", u) : h === "view" && e("view", u), e("btn-click", h, u);
1935
+ y === "edit" ? e("edit", u) : y === "delete" ? e("delete", u) : y === "view" && e("view", u), e("btn-click", y, u);
1932
1936
  }
1933
1937
  const j = /* @__PURE__ */ new Map();
1934
- function N(r, u) {
1938
+ function N(a, u) {
1935
1939
  var Q;
1936
- const h = k.value[r];
1937
- if (!h) return;
1938
- e("dialog-open", r, u);
1940
+ const y = F.value[a];
1941
+ if (!y) return;
1942
+ e("dialog-open", a, u);
1939
1943
  const w = Ee();
1940
- j.set(r, w);
1944
+ j.set(a, w);
1941
1945
  const A = ze({});
1942
- h.formItems && h.formItems.forEach((q) => {
1946
+ y.formItems && y.formItems.forEach((q) => {
1943
1947
  var se;
1944
1948
  q.prop && (A[q.prop] = (se = u == null ? void 0 : u[q.prop]) != null ? se : "");
1945
1949
  });
1946
- const x = typeof h.title == "function" ? h.title(u) : h.title || "";
1947
- (Q = h.onOpen) == null || Q.call(h, u);
1948
- const E = V(r, h, A, u || {});
1950
+ const k = typeof y.title == "function" ? y.title(u) : y.title || "";
1951
+ (Q = y.onOpen) == null || Q.call(y, u);
1952
+ const E = M(a, y, A, u || {});
1949
1953
  w({
1950
- title: x,
1951
- width: h.width || "600px",
1952
- isDraggable: h.isDraggable,
1953
- maxHeight: h.maxHeight,
1954
- fullscreen: h.fullscreen,
1955
- isHiddenFooter: h.isHiddenFooter,
1954
+ title: k,
1955
+ width: y.width || "600px",
1956
+ isDraggable: y.isDraggable,
1957
+ maxHeight: y.maxHeight,
1958
+ fullscreen: y.fullscreen,
1959
+ isHiddenFooter: y.isHiddenFooter,
1956
1960
  // 用户自定义 render
1957
- render: h.render ? (q, se) => h.render(q, {
1961
+ render: y.render ? (q, se) => y.render(q, {
1958
1962
  row: u || {},
1959
1963
  model: A,
1960
1964
  registerRef: se.registerRef,
1961
- close: () => M(r),
1962
- refresh: U
1963
- }) : h.formItems ? (q, { registerRef: se }) => {
1964
- const re = q(be, {
1965
+ close: () => U(a),
1966
+ refresh: V
1967
+ }) : y.formItems ? (q, { registerRef: se }) => {
1968
+ const ae = q(be, {
1965
1969
  props: {
1966
1970
  model: A,
1967
- formItemList: h.formItems,
1971
+ formItemList: y.formItems,
1968
1972
  layoutFormProps: {
1969
1973
  rowLayProps: { gutter: 16 },
1970
1974
  formLayProps: {
1971
1975
  isBtnHidden: !0,
1972
- ...h.formLayout || {}
1976
+ ...y.formLayout || {}
1973
1977
  }
1974
1978
  }
1975
1979
  },
1976
1980
  // Vue 2 函数式 ref:通过 RenderJsx 暴露的 registerRef 注册
1977
1981
  ref: "dialogForm"
1978
1982
  });
1979
- return re && re.data && (re.data.hook = re.data.hook || {}, re.data.hook.insert = (ne) => {
1983
+ return ae && ae.data && (ae.data.hook = ae.data.hook || {}, ae.data.hook.insert = (ne) => {
1980
1984
  ne.componentInstance && se("dialogForm", ne.componentInstance);
1981
- }), re;
1985
+ }), ae;
1982
1986
  } : void 0,
1983
1987
  configBtn: E,
1984
1988
  // useDialog 的 onClosed 通过 extractEventHandlers 转为 'closed' 事件
1985
1989
  onClosed: () => {
1986
1990
  var q;
1987
- j.delete(r), (q = h.onClose) == null || q.call(h);
1991
+ j.delete(a), (q = y.onClose) == null || q.call(y);
1988
1992
  }
1989
1993
  });
1990
1994
  }
1991
- function M(r) {
1992
- const u = j.get(r);
1993
- u && (u.close(), j.delete(r));
1995
+ function U(a) {
1996
+ const u = j.get(a);
1997
+ u && (u.close(), j.delete(a));
1994
1998
  }
1995
- function V(r, u, h, w) {
1999
+ function M(a, u, y, w) {
1996
2000
  if (!u.isHiddenFooter)
1997
2001
  return u.configBtn ? u.configBtn.map((A) => A.action === "cancel" ? {
1998
2002
  ...A,
1999
- click: (x, { close: E }) => {
2000
- e("dialog-cancel", r), E();
2003
+ click: (k, { close: E }) => {
2004
+ e("dialog-cancel", a), E();
2001
2005
  }
2002
2006
  } : A.action === "confirm" ? {
2003
2007
  ...A,
2004
- click: async (x, { close: E, getRefs: Q }) => {
2005
- await W(r, u, h, w, E, Q);
2008
+ click: async (k, { close: E, getRefs: Q }) => {
2009
+ await W(a, u, y, w, E, Q);
2006
2010
  }
2007
2011
  } : A) : [
2008
2012
  {
2009
2013
  name: "取消",
2010
- click: (A, { close: x }) => {
2011
- e("dialog-cancel", r), x();
2014
+ click: (A, { close: k }) => {
2015
+ e("dialog-cancel", a), k();
2012
2016
  }
2013
2017
  },
2014
2018
  {
2015
2019
  name: "确定",
2016
2020
  type: "primary",
2017
- click: async (A, { close: x, getRefs: E }) => {
2018
- await W(r, u, h, w, x, E);
2021
+ click: async (A, { close: k, getRefs: E }) => {
2022
+ await W(a, u, y, w, k, E);
2019
2023
  }
2020
2024
  }
2021
2025
  ];
2022
2026
  }
2023
- async function W(r, u, h, w, A, x) {
2027
+ async function W(a, u, y, w, A, k) {
2024
2028
  var Q;
2025
2029
  if ((Q = u.formItems) != null && Q.length) {
2026
- const q = x("dialogForm");
2030
+ const q = k("dialogForm");
2027
2031
  q != null && q.validate && await q.validate();
2028
2032
  }
2029
- const E = { close: A, refresh: U, getRefs: x, row: w };
2033
+ const E = { close: A, refresh: V, getRefs: k, row: w };
2030
2034
  if (u.onConfirm)
2031
- await u.onConfirm(h, E);
2035
+ await u.onConfirm(y, E);
2032
2036
  else {
2033
- const q = r === "add" ? "add-confirm" : r === "edit" ? "edit-confirm" : `${r}-confirm`;
2034
- e("btn-click", q, h), A(), U();
2037
+ const q = a === "add" ? "add-confirm" : a === "edit" ? "edit-confirm" : `${a}-confirm`;
2038
+ e("btn-click", q, y), A(), V();
2035
2039
  }
2036
- e("dialog-confirm", r, h);
2040
+ e("dialog-confirm", a, y);
2037
2041
  }
2038
- function U() {
2039
- var r, u;
2040
- (u = (r = t.value) == null ? void 0 : r.httpRequestInstance) == null || u.call(r);
2042
+ function V() {
2043
+ var a, u;
2044
+ (u = (a = t.value) == null ? void 0 : a.httpRequestInstance) == null || u.call(a);
2041
2045
  }
2042
2046
  function J() {
2043
- var r, u;
2044
- return ((u = (r = t.value) == null ? void 0 : r.getSelectionRows) == null ? void 0 : u.call(r)) || [];
2047
+ var a, u;
2048
+ return ((u = (a = t.value) == null ? void 0 : a.getSelectionRows) == null ? void 0 : u.call(a)) || [];
2045
2049
  }
2046
2050
  const R = {
2047
- refresh: U,
2051
+ refresh: V,
2048
2052
  getSelectedRows: J,
2049
2053
  tableRef: t,
2050
2054
  formRef: i,
2051
2055
  queryModel: c,
2052
2056
  openDialog: N,
2053
- closeDialog: M
2057
+ closeDialog: U
2054
2058
  };
2055
2059
  return typeof o == "function" && o(R), {
2056
2060
  // refs
@@ -2060,10 +2064,10 @@ const wn = ie({
2060
2064
  queryModel: c,
2061
2065
  paginationState: B,
2062
2066
  // computeds
2063
- mergedColumns: f,
2064
- mergedOptions: b,
2065
- mergedFormBtns: a,
2066
- formLayoutProps: y,
2067
+ mergedColumns: h,
2068
+ mergedOptions: v,
2069
+ mergedFormBtns: r,
2070
+ formLayoutProps: m,
2067
2071
  // exposed
2068
2072
  ...R
2069
2073
  };
@@ -2090,14 +2094,14 @@ var Pn = function() {
2090
2094
  null,
2091
2095
  "ad1d1cb8"
2092
2096
  );
2093
- const Le = Hn.exports;
2094
- Le.install = function(n) {
2097
+ const Ae = Hn.exports;
2098
+ Ae.install = function(n) {
2095
2099
  n.component(
2096
- Le.name || "EsCrudPage",
2097
- Le
2100
+ Ae.name || "EsCrudPage",
2101
+ Ae
2098
2102
  );
2099
2103
  };
2100
- const Tn = [be, ke, xe, Le], An = (n) => {
2104
+ const Tn = [be, Fe, ke, Ae], Ln = (n) => {
2101
2105
  const e = { ...n };
2102
2106
  for (const o of ["EsTable", "EsForm", "EsDialog"]) {
2103
2107
  const t = e[o];
@@ -2111,12 +2115,12 @@ const Tn = [be, ke, xe, Le], An = (n) => {
2111
2115
  typeof l.configQueryfieldOutput == "function" && typeof l.configQueryFieldOutput != "function" && (l.configQueryFieldOutput = l.configQueryfieldOutput);
2112
2116
  }
2113
2117
  return e;
2114
- }, Ln = (n, e = {}) => {
2118
+ }, An = (n, e = {}) => {
2115
2119
  const o = n.__composition_api_installed__ === !0;
2116
2120
  ut ? o && console.warn(
2117
2121
  '[@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
2122
  ) : !o && st && n.use(st);
2119
- const t = An(e);
2123
+ const t = Ln(e);
2120
2124
  Pt(t), t.skipComponentRegistration || Tn.forEach((i) => {
2121
2125
  const l = i.name;
2122
2126
  l && n.component(l, i);
@@ -2129,17 +2133,17 @@ const Tn = [be, ke, xe, Le], An = (n) => {
2129
2133
  }
2130
2134
  });
2131
2135
  }, Dn = {
2132
- version: "1.1.2",
2133
- install: Ln
2136
+ version: "1.1.4",
2137
+ install: An
2134
2138
  };
2135
2139
  export {
2136
- Le as EsCrudPage,
2137
- xe as EsDialog,
2140
+ Ae as EsCrudPage,
2141
+ ke as EsDialog,
2138
2142
  be as EsForm,
2139
- ke as EsTable,
2143
+ Fe as EsTable,
2140
2144
  Mn as configureEsPlus,
2141
2145
  Dn as default,
2142
- Ln as install,
2146
+ An as install,
2143
2147
  Ee as useDialog
2144
2148
  };
2145
2149
  //# sourceMappingURL=es-plus-vue2.js.map