es-plus-ui 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.
package/dist/es-plus.js CHANGED
@@ -1,9 +1,9 @@
1
- import { defineComponent as ue, reactive as It, onMounted as st, onUpdated as Lt, h as q, isVNode as Ht, openBlock as b, createBlock as B, unref as p, normalizeProps as Oe, mergeProps as U, withCtx as F, createElementBlock as D, Fragment as ee, renderList as me, createSlots as it, renderSlot as He, computed as w, createElementVNode as _, toDisplayString as ie, normalizeStyle as ge, createTextVNode as X, createCommentVNode as W, ref as z, onBeforeUnmount as Dt, nextTick as De, useSlots as wt, inject as Ie, getCurrentInstance as ze, watch as he, useAttrs as Ft, provide as ot, normalizeClass as ct, withDirectives as ut, createVNode as N, toRaw as Re, render as lt, guardReactiveProps as zt, withModifiers as _t, vShow as Pt } from "vue";
2
- import { ElConfigProvider as Me, ElTableColumn as Fe, ElButton as re, ElTable as At, ElPagination as Vt, vLoading as jt, ElInput as at, ElSelect as qt, ElOption as $t, ElDatePicker as Nt, ElTimePicker as Ut, ElSlider as Mt, ElColorPicker as Kt, ElTransfer as Qt, ElCascader as Wt, ElRadioGroup as Gt, ElRadio as Yt, ElCheckboxGroup as Jt, ElCheckbox as Xt, ElSwitch as Zt, ElRate as en, ElUpload as tn, ElForm as nn, ElRow as on, ElCol as ht, ElFormItem as Ue, ElDropdown as vt, ElDropdownMenu as bt, ElDropdownItem as Pe, ElDialog as ln, ElIcon as kt } from "element-plus";
3
- import * as rt from "@element-plus/icons-vue";
4
- import { FullScreen as an, CopyDocument as rn, Close as sn } from "@element-plus/icons-vue";
5
- const cn = "1.0.2";
6
- var Te = {
1
+ import { defineComponent as fe, reactive as Je, onMounted as pt, onUpdated as _t, h as Q, isVNode as Vt, inject as ce, openBlock as b, createBlock as T, unref as p, normalizeProps as Fe, mergeProps as J, withCtx as P, createElementBlock as D, Fragment as X, renderList as ge, createSlots as Xe, renderSlot as Te, computed as w, createElementVNode as U, toDisplayString as me, normalizeStyle as ke, createTextVNode as ae, createCommentVNode as G, ref as V, onBeforeUnmount as At, nextTick as qe, useSlots as Ot, getCurrentInstance as $e, watch as be, useAttrs as Et, provide as ct, normalizeClass as mt, withDirectives as gt, createVNode as Y, toRaw as Le, render as ut, guardReactiveProps as Bt, withModifiers as qt, vShow as Lt } from "vue";
2
+ import { ElConfigProvider as We, ElTableColumn as Ee, ElButton as de, ElTable as $t, ElPagination as jt, vLoading as Ut, ElInput as dt, ElSelect as Nt, ElOption as Mt, ElDatePicker as Kt, ElTimePicker as Qt, ElSlider as Wt, ElColorPicker as Gt, ElTransfer as Yt, ElCascader as Jt, ElRadioGroup as Xt, ElRadio as Zt, ElCheckboxGroup as en, ElCheckbox as tn, ElSwitch as nn, ElRate as on, ElUpload as an, ElForm as ln, ElRow as rn, ElCol as Ct, ElFormItem as Qe, ElDropdown as St, ElDropdownMenu as It, ElDropdownItem as Be, ElDialog as sn, ElIcon as wt } from "element-plus";
3
+ import * as ft from "@element-plus/icons-vue";
4
+ import { FullScreen as cn, CopyDocument as un, Close as dn } from "@element-plus/icons-vue";
5
+ const fn = "1.1.0";
6
+ var Ve = {
7
7
  name: "zh-cn",
8
8
  el: {
9
9
  breadcrumb: { label: "面包屑" },
@@ -179,7 +179,7 @@ var Te = {
179
179
  }
180
180
  }
181
181
  };
182
- const nt = ue({
182
+ const it = fe({
183
183
  name: "RenderJsx",
184
184
  props: {
185
185
  refs: { type: [Function, Object], default: null },
@@ -191,165 +191,165 @@ const nt = ue({
191
191
  components: { type: Object, default: () => ({}) },
192
192
  locale: { type: Object, default: null }
193
193
  },
194
- setup(n) {
195
- const g = n.refs && typeof n.refs == "object" ? n.refs : It({});
196
- function h(t) {
197
- if (!t) return null;
198
- if (typeof t == "function") return t;
199
- if (t.r) {
200
- if (typeof t.r == "function") return t.r;
201
- if (t.r && typeof t.r == "object" && "value" in t.r) {
202
- const d = t.r;
203
- return (a) => {
204
- d.value = a;
194
+ setup(t) {
195
+ const g = t.refs && typeof t.refs == "object" ? t.refs : Je({});
196
+ function h(o) {
197
+ if (!o) return null;
198
+ if (typeof o == "function") return o;
199
+ if (o.r) {
200
+ if (typeof o.r == "function") return o.r;
201
+ if (o.r && typeof o.r == "object" && "value" in o.r) {
202
+ const r = o.r;
203
+ return (i) => {
204
+ r.value = i;
205
205
  };
206
206
  }
207
207
  }
208
208
  return null;
209
209
  }
210
- let e = null, l = null;
211
- function o() {
210
+ let e = null, a = null;
211
+ function n() {
212
212
  if (!e) return;
213
- const t = e.component;
214
- if (!t) return;
215
- const d = t.exposed || t.proxy;
216
- d && (g.currentRef = d, typeof l == "function" && l(d));
213
+ const o = e.component;
214
+ if (!o) return;
215
+ const r = o.exposed || o.proxy;
216
+ r && (g.currentRef = r, typeof a == "function" && a(r));
217
217
  }
218
- return st(() => o()), Lt(() => o()), () => {
219
- var m;
220
- const { instance: t } = n, d = {
221
- ...t,
222
- registerRef: (i, u) => {
223
- u != null && (g[i] = u);
218
+ return pt(() => n()), _t(() => n()), () => {
219
+ var d;
220
+ const { instance: o } = t, r = {
221
+ ...o,
222
+ registerRef: (y, c) => {
223
+ c != null && (g[y] = c);
224
224
  },
225
225
  getRefs: () => g
226
- }, a = n.render(q, d, n.components || {}) || "";
227
- return typeof a == "string" ? (e = null, q(Me, {
228
- locale: n.locale || Te
229
- }, () => q("span", {
230
- ref: (i) => {
231
- g.currentRef = i;
226
+ }, i = t.render(Q, r, t.components || {}) || "";
227
+ return typeof i == "string" ? (e = null, Q(We, {
228
+ locale: t.locale || Ve
229
+ }, () => Q("span", {
230
+ ref: (y) => {
231
+ g.currentRef = y;
232
232
  }
233
- }, a))) : Ht(a) ? typeof a.type != "string" ? (e = a, l = h(a.ref) || h((m = a.props) == null ? void 0 : m.ref), a) : (e = null, q(Me, {
234
- locale: n.locale || Te
235
- }, () => q("div", {
236
- ref: (u) => {
237
- g.currentRef = u;
233
+ }, i))) : Vt(i) ? typeof i.type != "string" ? (e = i, a = h(i.ref) || h((d = i.props) == null ? void 0 : d.ref), i) : (e = null, Q(We, {
234
+ locale: t.locale || Ve
235
+ }, () => Q("div", {
236
+ ref: (c) => {
237
+ g.currentRef = c;
238
238
  }
239
- }, [a]))) : (e = null, q(Me, {
240
- locale: n.locale || Te
241
- }, () => q(a, {
242
- ref: (i) => {
243
- g.currentRef = i;
239
+ }, [i]))) : (e = null, Q(We, {
240
+ locale: t.locale || Ve
241
+ }, () => Q(i, {
242
+ ref: (y) => {
243
+ g.currentRef = y;
244
244
  }
245
245
  })));
246
246
  };
247
247
  }
248
- }), un = { key: 1 }, dn = { key: 1 }, fn = { key: 1 }, pn = { key: 1 }, mn = /* @__PURE__ */ ue({
248
+ }), pn = { key: 1 }, mn = { key: 1 }, gn = { key: 1 }, yn = { key: 1 }, hn = /* @__PURE__ */ fe({
249
249
  __name: "column-item",
250
250
  props: {
251
251
  cols: {}
252
252
  },
253
- setup(n) {
254
- const g = ue({
253
+ setup(t) {
254
+ const g = ce("$EsPlus", {}), h = fe({
255
255
  props: {
256
256
  row: { type: Object, default: () => ({}) },
257
257
  index: { type: Number, default: 0 },
258
258
  dataKey: String,
259
259
  render: { type: Function, required: !0 }
260
260
  },
261
- setup(l) {
261
+ setup(n) {
262
262
  return () => {
263
- const { row: o, index: t, dataKey: d, render: a } = l;
264
- if (!o) return q("span", "-");
265
- const m = d ? o[d] : null;
263
+ const { row: o, index: r, dataKey: i, render: d } = n;
264
+ if (!o) return Q("span", "-");
265
+ const y = i ? o[i] : null;
266
266
  try {
267
- const i = a(q, { value: m, row: o, index: t });
268
- return typeof i == "string" ? q("span", i) : i;
267
+ const c = d(Q, { value: y, row: o, index: r });
268
+ return typeof c == "string" ? Q("span", c) : c;
269
269
  } catch {
270
- return q("span", "-");
270
+ return Q("span", "-");
271
271
  }
272
272
  };
273
273
  }
274
- }), h = (l) => l.charAt(0).toUpperCase() + l.slice(1).toLowerCase(), e = (l) => {
274
+ }), e = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), a = (n) => {
275
275
  const o = {};
276
- for (const t in l)
277
- if (!(t === "groups" || t === "scopedSlots" || t === "render"))
278
- if (t.includes("-")) {
279
- const d = t.split("-");
280
- let a = d[0];
281
- for (let m = 1; m < d.length; m++)
282
- a += h(d[m]);
283
- o[a] = l[t];
284
- } else t === "key" && (o.prop = l[t]), o[t] = l[t];
276
+ for (const r in n)
277
+ if (!(r === "groups" || r === "scopedSlots" || r === "render"))
278
+ if (r.includes("-")) {
279
+ const i = r.split("-");
280
+ let d = i[0];
281
+ for (let y = 1; y < i.length; y++)
282
+ d += e(i[y]);
283
+ o[d] = n[r];
284
+ } else r === "key" ? (o.prop = n[r], o[r] = n[r]) : r === "label" && n.labelKey && typeof g.t == "function" ? o.label = g.t(n.labelKey) : o[r] = n[r];
285
285
  return o.align || (o.align = "center"), o;
286
286
  };
287
- return (l, o) => n.cols.groups && Array.isArray(n.cols.groups) ? (b(), B(p(Fe), Oe(U({ key: 0 }, e(n.cols))), {
288
- default: F(() => [
289
- (b(!0), D(ee, null, me(n.cols.groups, (t, d) => (b(), B(p(Fe), U({
290
- key: t.prop || t.key || d
291
- }, { ref_for: !0 }, e({ ...t, columnIndex: d })), it({ _: 2 }, [
292
- t.render && typeof t.render == "function" ? {
287
+ return (n, o) => t.cols.groups && Array.isArray(t.cols.groups) ? (b(), T(p(Ee), Fe(J({ key: 0 }, a(t.cols))), {
288
+ default: P(() => [
289
+ (b(!0), D(X, null, ge(t.cols.groups, (r, i) => (b(), T(p(Ee), J({
290
+ key: r.prop || r.key || i
291
+ }, { ref_for: !0 }, a({ ...r, columnIndex: i })), Xe({ _: 2 }, [
292
+ r.render && typeof r.render == "function" ? {
293
293
  name: "default",
294
- fn: F((a) => [
295
- a && a.row ? (b(), B(p(g), {
294
+ fn: P((d) => [
295
+ d && d.row ? (b(), T(p(h), {
296
296
  key: 0,
297
- row: a.row,
298
- index: a.$index,
299
- "data-key": t.key,
300
- render: t.render
301
- }, null, 8, ["row", "index", "data-key", "render"])) : (b(), D("span", un, "-"))
297
+ row: d.row,
298
+ index: d.$index,
299
+ "data-key": r.key,
300
+ render: r.render
301
+ }, null, 8, ["row", "index", "data-key", "render"])) : (b(), D("span", pn, "-"))
302
302
  ]),
303
303
  key: "0"
304
- } : t.scopedSlots && t.scopedSlots.customRender ? {
304
+ } : r.scopedSlots && r.scopedSlots.customRender ? {
305
305
  name: "default",
306
- fn: F((a) => [
307
- a && a.row ? He(l.$slots, t.scopedSlots.customRender, U({
306
+ fn: P((d) => [
307
+ d && d.row ? Te(n.$slots, r.scopedSlots.customRender, J({
308
308
  key: 0,
309
309
  ref_for: !0
310
- }, { ...t, row: a.row, column: a.column, scope: a })) : (b(), D("span", dn, "-"))
310
+ }, { ...r, row: d.row, column: d.column, scope: d })) : (b(), D("span", mn, "-"))
311
311
  ]),
312
312
  key: "1"
313
313
  } : void 0
314
314
  ]), 1040))), 128))
315
315
  ]),
316
316
  _: 3
317
- }, 16)) : n.cols.render && typeof n.cols.render == "function" ? (b(), B(p(Fe), Oe(U({ key: 1 }, e(n.cols))), {
318
- default: F((t) => [
319
- t && t.row ? (b(), B(p(g), {
317
+ }, 16)) : t.cols.render && typeof t.cols.render == "function" ? (b(), T(p(Ee), Fe(J({ key: 1 }, a(t.cols))), {
318
+ default: P((r) => [
319
+ r && r.row ? (b(), T(p(h), {
320
320
  key: 0,
321
- row: t.row,
322
- index: t.$index,
323
- "data-key": n.cols.key,
324
- render: n.cols.render
325
- }, null, 8, ["row", "index", "data-key", "render"])) : (b(), D("span", fn, "-"))
321
+ row: r.row,
322
+ index: r.$index,
323
+ "data-key": t.cols.key,
324
+ render: t.cols.render
325
+ }, null, 8, ["row", "index", "data-key", "render"])) : (b(), D("span", gn, "-"))
326
326
  ]),
327
327
  _: 1
328
- }, 16)) : n.cols.scopedSlots && n.cols.scopedSlots.customRender ? (b(), B(p(Fe), Oe(U({ key: 2 }, e(n.cols))), {
329
- default: F((t) => [
330
- t && t.row ? He(l.$slots, n.cols.scopedSlots.customRender, Oe(U({ key: 0 }, { ...n.cols, row: t.row, column: t.column, scope: t }))) : (b(), D("span", pn, "-"))
328
+ }, 16)) : t.cols.scopedSlots && t.cols.scopedSlots.customRender ? (b(), T(p(Ee), Fe(J({ key: 2 }, a(t.cols))), {
329
+ default: P((r) => [
330
+ r && r.row ? Te(n.$slots, t.cols.scopedSlots.customRender, Fe(J({ key: 0 }, { ...t.cols, row: r.row, column: r.column, scope: r }))) : (b(), D("span", yn, "-"))
331
331
  ]),
332
332
  _: 3
333
- }, 16)) : n.cols.ellipsis && typeof n.cols.ellipsis == "boolean" ? (b(), B(p(Fe), U({
333
+ }, 16)) : t.cols.ellipsis && typeof t.cols.ellipsis == "boolean" ? (b(), T(p(Ee), J({
334
334
  key: 3,
335
335
  "show-overflow-tooltip": ""
336
- }, e(n.cols)), null, 16)) : (b(), B(p(Fe), Oe(U({ key: 4 }, e(n.cols))), null, 16));
336
+ }, a(t.cols)), null, 16)) : (b(), T(p(Ee), Fe(J({ key: 4 }, a(t.cols))), null, 16));
337
337
  }
338
- }), gn = {
338
+ }), vn = {
339
339
  key: 0,
340
340
  class: "flex-float btns"
341
- }, yn = { class: "left-text" }, hn = { class: "btn-container_block" }, vn = { class: "btn-left" }, bn = { class: "btn-right" }, kn = /* @__PURE__ */ ue({
341
+ }, bn = { class: "left-text" }, kn = { class: "btn-container_block" }, xn = { class: "btn-left" }, Cn = { class: "btn-right" }, Sn = /* @__PURE__ */ fe({
342
342
  __name: "table-btns",
343
343
  props: {
344
344
  leftText: {},
345
345
  btnConfig: {},
346
346
  instance: {}
347
347
  },
348
- setup(n) {
349
- const g = n, h = (i) => {
350
- if (!i.render || typeof i.render != "function") return null;
348
+ setup(t) {
349
+ const g = t, h = (c) => {
350
+ if (!c.render || typeof c.render != "function") return null;
351
351
  try {
352
- return i.render();
352
+ return c.render();
353
353
  } catch {
354
354
  return null;
355
355
  }
@@ -357,68 +357,72 @@ const nt = ue({
357
357
  h.props = {
358
358
  render: { type: Function, required: !0 }
359
359
  };
360
- const e = (i, u) => !0, l = (i) => i.map((u) => {
361
- const s = { ...u };
362
- return e([], u.permissionValue) ? typeof u.isHide == "function" ? s.isHide = u.isHide() : s.isHide = u.isHide || !1 : s.isHide = !0, s;
363
- }), o = w(() => l((g.btnConfig || []).filter((i) => i.code === 1)).filter((i) => !i.isHide)), t = w(() => l((g.btnConfig || []).filter((i) => i.code === 2)).filter((i) => !i.isHide)), d = w(() => g.leftText || o.value.length > 0 || t.value.length > 0), a = (i) => typeof i.disabled == "function" ? i.disabled() : i.disabled || !1, m = (i) => ({
360
+ const e = ce("$EsPlus", {}), a = (c, f) => {
361
+ if (!f) return !0;
362
+ const l = e.permission;
363
+ return typeof l == "function" ? l(f) : !0;
364
+ }, n = (c) => c.map((f) => {
365
+ const l = { ...f };
366
+ return a([], f.permissionValue) ? typeof f.isHide == "function" ? l.isHide = f.isHide() : l.isHide = f.isHide || !1 : l.isHide = !0, l;
367
+ }), o = w(() => n((g.btnConfig || []).filter((c) => c.code === 1)).filter((c) => !c.isHide)), r = w(() => n((g.btnConfig || []).filter((c) => c.code === 2)).filter((c) => !c.isHide)), i = w(() => g.leftText || o.value.length > 0 || r.value.length > 0), d = (c) => typeof c.disabled == "function" ? c.disabled() : c.disabled || !1, y = (c) => ({
364
368
  display: "inline-block",
365
- marginLeft: i !== 0 ? "8px" : "0px"
369
+ marginLeft: c !== 0 ? "8px" : "0px"
366
370
  });
367
- return (i, u) => d.value ? (b(), D("div", gn, [
368
- _("div", yn, ie(n.leftText), 1),
369
- _("div", hn, [
370
- _("div", vn, [
371
- (b(!0), D(ee, null, me(o.value, (s, f) => (b(), D(ee, {
372
- key: s.name
371
+ return (c, f) => i.value ? (b(), D("div", vn, [
372
+ U("div", bn, me(t.leftText), 1),
373
+ U("div", kn, [
374
+ U("div", xn, [
375
+ (b(!0), D(X, null, ge(o.value, (l, S) => (b(), D(X, {
376
+ key: l.name
373
377
  }, [
374
- s.isHide ? W("", !0) : (b(), D("div", {
378
+ l.isHide ? G("", !0) : (b(), D("div", {
375
379
  key: 0,
376
- style: ge(m(f))
380
+ style: ke(y(S))
377
381
  }, [
378
- s.render && typeof s.render == "function" ? (b(), B(h, {
382
+ l.render && typeof l.render == "function" ? (b(), T(h, {
379
383
  key: 0,
380
- render: s.render
381
- }, null, 8, ["render"])) : (b(), B(p(re), U({
384
+ render: l.render
385
+ }, null, 8, ["render"])) : (b(), T(p(de), J({
382
386
  key: 1,
383
- type: s.type,
384
- size: s.size || "small",
385
- icon: s.icon,
386
- loading: s.loading || !1
387
- }, { ref_for: !0 }, s, {
388
- disabled: a(s),
389
- onClick: () => s.click(n.instance)
387
+ type: l.type,
388
+ size: l.size || "small",
389
+ icon: l.icon,
390
+ loading: l.loading || !1
391
+ }, { ref_for: !0 }, l, {
392
+ disabled: d(l),
393
+ onClick: () => l.click(t.instance)
390
394
  }), {
391
- default: F(() => [
392
- X(ie(s.name), 1)
395
+ default: P(() => [
396
+ ae(me(l.name), 1)
393
397
  ]),
394
398
  _: 2
395
399
  }, 1040, ["type", "size", "icon", "loading", "disabled", "onClick"]))
396
400
  ], 4))
397
401
  ], 64))), 128))
398
402
  ]),
399
- _("div", bn, [
400
- (b(!0), D(ee, null, me(t.value, (s, f) => (b(), D(ee, {
401
- key: s.name
403
+ U("div", Cn, [
404
+ (b(!0), D(X, null, ge(r.value, (l, S) => (b(), D(X, {
405
+ key: l.name
402
406
  }, [
403
- s.isHide ? W("", !0) : (b(), D("div", {
407
+ l.isHide ? G("", !0) : (b(), D("div", {
404
408
  key: 0,
405
- style: ge(m(f))
409
+ style: ke(y(S))
406
410
  }, [
407
- s.render && typeof s.render == "function" ? (b(), B(h, {
411
+ l.render && typeof l.render == "function" ? (b(), T(h, {
408
412
  key: 0,
409
- render: s.render
410
- }, null, 8, ["render"])) : (b(), B(p(re), U({
413
+ render: l.render
414
+ }, null, 8, ["render"])) : (b(), T(p(de), J({
411
415
  key: 1,
412
- type: s.type,
413
- size: s.size || "small"
414
- }, { ref_for: !0 }, s, {
415
- icon: s.icon,
416
- loading: s.loading || !1,
417
- disabled: a(s),
418
- onClick: () => s.click(n.instance)
416
+ type: l.type,
417
+ size: l.size || "small"
418
+ }, { ref_for: !0 }, l, {
419
+ icon: l.icon,
420
+ loading: l.loading || !1,
421
+ disabled: d(l),
422
+ onClick: () => l.click(t.instance)
419
423
  }), {
420
- default: F(() => [
421
- X(ie(s.name), 1)
424
+ default: P(() => [
425
+ ae(me(l.name), 1)
422
426
  ]),
423
427
  _: 2
424
428
  }, 1040, ["type", "size", "icon", "loading", "disabled", "onClick"]))
@@ -426,71 +430,71 @@ const nt = ue({
426
430
  ], 64))), 128))
427
431
  ])
428
432
  ])
429
- ])) : W("", !0);
433
+ ])) : G("", !0);
430
434
  }
431
- }), Ae = (n, g) => {
432
- const h = n.__vccOpts || n;
433
- for (const [e, l] of g)
434
- h[e] = l;
435
+ }), De = (t, g) => {
436
+ const h = t.__vccOpts || t;
437
+ for (const [e, a] of g)
438
+ h[e] = a;
435
439
  return h;
436
- }, xn = /* @__PURE__ */ Ae(kn, [["__scopeId", "data-v-8e62c688"]]);
437
- function Cn(n, g, h, e, l) {
438
- const o = z(400), t = z(null), d = (s) => Math.sign(s) === -1, a = () => {
439
- var L, P, S, E;
440
- const s = ((L = g.value) == null ? void 0 : L.offsetHeight) || 0, f = ((S = (P = h.value) == null ? void 0 : P.$el) == null ? void 0 : S.offsetHeight) || 0, C = ((E = e.value) == null ? void 0 : E.offsetHeight) || 0;
441
- return Math.round(C + s + f);
442
- }, m = () => {
443
- var K, de, le, Z, R;
444
- const s = n.value;
445
- if (!s) return;
446
- const f = typeof l.tabHeight == "number" ? l.tabHeight : l.heightType === "height" ? ((K = s.parentElement) == null ? void 0 : K.offsetHeight) || s.offsetHeight : parseInt(l.tabHeight, 10) || 450, C = isNaN(f) ? 450 : f, L = C - a(), P = d(L) ? a() + 300 : C, S = ((de = e.value) == null ? void 0 : de.offsetHeight) || 0, E = ((le = g.value) == null ? void 0 : le.offsetHeight) || 0, j = ((R = (Z = h.value) == null ? void 0 : Z.$el) == null ? void 0 : R.offsetHeight) || 0, M = Math.floor(P) - Math.round(S + E + j);
447
- o.value !== M && (o.value = M);
448
- }, i = () => {
449
- De(() => {
450
- if (!n.value || typeof ResizeObserver > "u") return;
451
- t.value = new ResizeObserver(() => {
440
+ }, In = /* @__PURE__ */ De(Sn, [["__scopeId", "data-v-04347b64"]]);
441
+ function wn(t, g, h, e, a) {
442
+ const n = V(400), o = V(null), r = (f) => Math.sign(f) === -1, i = () => {
443
+ var E, R, k, H;
444
+ const f = ((E = g.value) == null ? void 0 : E.offsetHeight) || 0, l = ((k = (R = h.value) == null ? void 0 : R.$el) == null ? void 0 : k.offsetHeight) || 0, S = ((H = e.value) == null ? void 0 : H.offsetHeight) || 0;
445
+ return Math.round(S + f + l);
446
+ }, d = () => {
447
+ var C, z, A, $, ee;
448
+ const f = t.value;
449
+ if (!f) return;
450
+ const l = typeof a.tabHeight == "number" ? a.tabHeight : a.heightType === "height" ? ((C = f.parentElement) == null ? void 0 : C.offsetHeight) || f.offsetHeight : parseInt(a.tabHeight, 10) || 450, S = isNaN(l) ? 450 : l, E = S - i(), R = r(E) ? i() + 300 : S, k = ((z = e.value) == null ? void 0 : z.offsetHeight) || 0, H = ((A = g.value) == null ? void 0 : A.offsetHeight) || 0, q = ((ee = ($ = h.value) == null ? void 0 : $.$el) == null ? void 0 : ee.offsetHeight) || 0, W = Math.floor(R) - Math.round(k + H + q);
451
+ n.value !== W && (n.value = W);
452
+ }, y = () => {
453
+ qe(() => {
454
+ if (!t.value || typeof ResizeObserver > "u") return;
455
+ o.value = new ResizeObserver(() => {
452
456
  requestAnimationFrame(() => {
453
- n.value && m();
457
+ t.value && d();
454
458
  });
455
459
  });
456
- const s = l.heightType === "height" && n.value.parentElement || n.value;
457
- t.value.observe(s), g.value && t.value.observe(g.value);
460
+ const f = a.heightType === "height" && t.value.parentElement || t.value;
461
+ o.value.observe(f), g.value && o.value.observe(g.value);
458
462
  });
459
- }, u = () => {
460
- t.value && (t.value.disconnect(), t.value = null);
463
+ }, c = () => {
464
+ o.value && (o.value.disconnect(), o.value = null);
461
465
  };
462
- return st(() => i()), Dt(() => u()), {
463
- tableHeight: o,
464
- resizeObservers: m,
465
- startObserver: i,
466
- stopObserver: u
466
+ return pt(() => y()), At(() => c()), {
467
+ tableHeight: n,
468
+ resizeObservers: d,
469
+ startObserver: y,
470
+ stopObserver: c
467
471
  };
468
472
  }
469
- function Sn(n) {
470
- const g = z([]), h = z({}), e = z(!1), l = (a, m) => {
471
- if (n) {
473
+ function Fn(t) {
474
+ const g = V([]), h = V({}), e = V(!1), a = (i, d) => {
475
+ if (t) {
472
476
  if (e.value) return;
473
- h.value[m] = a;
474
- let i = [];
475
- const u = {};
476
- Object.values(h.value).forEach((s) => {
477
- s.forEach((f) => {
478
- const C = f[n];
479
- C && !u[C] && (i.push(f), u[C] = !0);
477
+ h.value[d] = i;
478
+ let y = [];
479
+ const c = {};
480
+ Object.values(h.value).forEach((f) => {
481
+ f.forEach((l) => {
482
+ const S = l[t];
483
+ S && !c[S] && (y.push(l), c[S] = !0);
480
484
  });
481
- }), g.value = i;
485
+ }), g.value = y;
482
486
  } else
483
- g.value = a;
484
- }, o = (a, m) => {
485
- if (a != null && a.length && n && g.value.length) {
486
- const i = [];
487
- a.forEach((u) => {
488
- g.value.forEach((s) => {
489
- u[n] === s[n] && i.push(u);
487
+ g.value = i;
488
+ }, n = (i, d) => {
489
+ if (i != null && i.length && t && g.value.length) {
490
+ const y = [];
491
+ i.forEach((c) => {
492
+ g.value.forEach((f) => {
493
+ c[t] === f[t] && y.push(c);
490
494
  });
491
- }), i.forEach((u) => {
492
- var s;
493
- (s = m.toggleRowSelection) == null || s.call(m, u, !0);
495
+ }), y.forEach((c) => {
496
+ var f;
497
+ (f = d.toggleRowSelection) == null || f.call(d, c, !0);
494
498
  });
495
499
  }
496
500
  };
@@ -498,40 +502,40 @@ function Sn(n) {
498
502
  multipleSelection: g,
499
503
  selectionsByPage: h,
500
504
  isInitChange: e,
501
- handleSelectionChange: l,
502
- handleSelectData: o,
503
- clearAllSelection: (a) => {
504
- var m;
505
- g.value = [], h.value = {}, (m = a.clearSelection) == null || m.call(a);
505
+ handleSelectionChange: a,
506
+ handleSelectData: n,
507
+ clearAllSelection: (i) => {
508
+ var d;
509
+ g.value = [], h.value = {}, (d = i.clearSelection) == null || d.call(i);
506
510
  },
507
- initSelection: (a, m) => {
508
- if (e.value = !0, !m) {
511
+ initSelection: (i, d) => {
512
+ if (e.value = !0, !d) {
509
513
  e.value = !1;
510
514
  return;
511
515
  }
512
- n ? De(() => {
513
- o(a, m), e.value = !1;
514
- }) : De(() => {
515
- var i;
516
- (i = m.clearSelection) == null || i.call(m), e.value = !1;
516
+ t ? qe(() => {
517
+ n(i, d), e.value = !1;
518
+ }) : qe(() => {
519
+ var y;
520
+ (y = d.clearSelection) == null || y.call(d), e.value = !1;
517
521
  });
518
522
  }
519
523
  };
520
524
  }
521
- const Y = (n) => typeof n == "object" && n !== null && Object.prototype.toString.call(n) === "[object Object]", dt = (n, g, h = 0) => {
522
- if (h > 3 || !Y(n)) return;
523
- const e = Object.prototype.hasOwnProperty.call(n, g) ? n[g] : void 0;
524
- for (const l in n)
525
- if (Object.prototype.hasOwnProperty.call(n, l) && Y(n[l])) {
526
- const o = dt(n[l], g, h + 1);
527
- if (o !== void 0) return o;
525
+ const oe = (t) => typeof t == "object" && t !== null && Object.prototype.toString.call(t) === "[object Object]", yt = (t, g, h = 0) => {
526
+ if (h > 3 || !oe(t)) return;
527
+ const e = Object.prototype.hasOwnProperty.call(t, g) ? t[g] : void 0;
528
+ for (const a in t)
529
+ if (Object.prototype.hasOwnProperty.call(t, a) && oe(t[a])) {
530
+ const n = yt(t[a], g, h + 1);
531
+ if (n !== void 0) return n;
528
532
  }
529
533
  return e;
530
- }, In = (n) => n.then((g) => ({ status: "fulfilled", value: g })).catch((g) => ({ status: "rejected", reason: g })), wn = { class: "table_containers" }, Fn = {
534
+ }, Pn = (t) => t.then((g) => ({ status: "fulfilled", value: g })).catch((g) => ({ status: "rejected", reason: g })), Rn = { class: "table_containers" }, On = {
531
535
  "element-loading-background": "rgba(0, 0, 0, 0.03)",
532
536
  "element-loading-text": "努力加载中...",
533
537
  class: "page-loading-con tableContainer"
534
- }, Pn = { class: "table_inner_containers" }, xt = {
538
+ }, En = { class: "table_inner_containers" }, Ft = {
535
539
  multiSelect: !1,
536
540
  expand: !1,
537
541
  snIndex: !1,
@@ -541,7 +545,7 @@ const Y = (n) => typeof n == "object" && n !== null && Object.prototype.toString
541
545
  headerCellStyle: { background: "#f5f7fa" },
542
546
  highlightCurrentRow: !0,
543
547
  cachePageSelection: !0
544
- }, On = /* @__PURE__ */ ue({
548
+ }, Bn = /* @__PURE__ */ fe({
545
549
  __name: "component",
546
550
  props: {
547
551
  initTabHeight: { default: 400 },
@@ -549,25 +553,29 @@ const Y = (n) => typeof n == "object" && n !== null && Object.prototype.toString
549
553
  showHeaderBar: { type: Boolean, default: !0 },
550
554
  dataSource: { default: () => [] },
551
555
  columns: { default: () => [] },
552
- options: { default: () => ({ ...xt }) },
556
+ options: { default: () => ({ ...Ft }) },
553
557
  pagination: { default: () => ({}) }
554
558
  },
555
559
  emits: ["update:dataSource", "update:pagination", "pagination-current-change", "size-change", "change-table-sort"],
556
- setup(n, { expose: g, emit: h }) {
557
- const e = n, l = h, o = wt(), t = z(Te), d = Ie("elLocale", null);
558
- d && (t.value = d);
559
- const a = ze() || {}, m = Ie("$esPlusTable", {}), i = z(null), u = z(null), s = z(null), f = z(null), C = z(null), L = z(`table_${Math.random().toString(36).substring(2, 12)}`), P = z([]), S = z([...e.columns]);
560
- he(
560
+ setup(t, { expose: g, emit: h }) {
561
+ const e = t, a = h, n = Ot(), o = V(Ve), r = ce("elLocale", null);
562
+ r && (o.value = r);
563
+ const i = $e() || {}, d = ce("$esPlusTable", {}), y = ce("$EsPlus", {}), c = (s) => {
564
+ if (!s) return !0;
565
+ const x = y.permission;
566
+ return typeof x == "function" ? x(s) : !0;
567
+ }, f = V(null), l = V(null), S = V(null), E = V(null), R = V(null), k = V(`table_${Math.random().toString(36).substring(2, 12)}`), H = V([]), q = V([...e.columns]);
568
+ be(
561
569
  () => e.columns,
562
- (r) => {
563
- S.value = [...r];
570
+ (s) => {
571
+ q.value = [...s];
564
572
  },
565
573
  { deep: !0 }
566
574
  );
567
- const E = z(!1), j = z(!1), M = z(!1), K = (r) => {
568
- r && (C.value = r);
569
- }, de = Ie("bodyFormInstance", () => {
570
- }), le = Ie("getVisibleShow", !1), Z = w(() => typeof le == "function" ? le() : le), R = z({
575
+ const W = V(!1), C = V(!1), z = V(!1), A = (s) => {
576
+ s && (R.value = s);
577
+ }, $ = ce("bodyFormInstance", () => {
578
+ }), ee = ce("getVisibleShow", !1), pe = w(() => typeof ee == "function" ? ee() : ee), O = V({
571
579
  pageSize: 10,
572
580
  current: 1,
573
581
  total: 0,
@@ -575,17 +583,17 @@ const Y = (n) => typeof n == "object" && n !== null && Object.prototype.toString
575
583
  size: "small",
576
584
  isSmall: !0,
577
585
  ...e.pagination
578
- }), H = z(null), ve = w(() => e.options.entryQuery && Y(e.options.entryQuery) && Object.keys(e.options.entryQuery).length ? e.options.entryQuery : {}), ae = w(() => {
579
- if (e.options.configTableOut && Y(e.options.configTableOut) && Object.keys(e.options.configTableOut).length && c(e.options.configTableOut))
586
+ }), L = V(null), Z = w(() => e.options.entryQuery && oe(e.options.entryQuery) && Object.keys(e.options.entryQuery).length ? e.options.entryQuery : {}), te = w(() => {
587
+ if (e.options.configTableOut && oe(e.options.configTableOut) && Object.keys(e.options.configTableOut).length && _e(e.options.configTableOut))
580
588
  return e.options.configTableOut;
581
- if (m != null && m.configQueryFieldOutput && typeof m.configQueryFieldOutput == "function") {
582
- const r = m.configQueryFieldOutput({
589
+ if (d != null && d.configQueryFieldOutput && typeof d.configQueryFieldOutput == "function") {
590
+ const s = d.configQueryFieldOutput({
583
591
  total: "records",
584
592
  pageSize: "pageSize",
585
593
  current: "pageNo",
586
594
  tableData: "rows"
587
595
  });
588
- if (c(r)) return r;
596
+ if (_e(s)) return s;
589
597
  }
590
598
  return {
591
599
  total: "records",
@@ -593,62 +601,62 @@ const Y = (n) => typeof n == "object" && n !== null && Object.prototype.toString
593
601
  current: "pageNo",
594
602
  tableData: "rows"
595
603
  };
596
- }), Q = w(() => {
597
- var x, O, T, $;
598
- const k = (((O = (x = a == null ? void 0 : a.slots) == null ? void 0 : x.default) == null ? void 0 : O.call(x)) || []).find((Se) => {
599
- const pe = Se.type;
600
- return (pe == null ? void 0 : pe.name) === "EsForm" || (pe == null ? void 0 : pe.displayName) === "EsForm";
604
+ }), N = w(() => {
605
+ var I, B, _, K;
606
+ const x = (((B = (I = i == null ? void 0 : i.slots) == null ? void 0 : I.default) == null ? void 0 : B.call(I)) || []).find((we) => {
607
+ const ve = we.type;
608
+ return (ve == null ? void 0 : ve.name) === "EsForm" || (ve == null ? void 0 : ve.displayName) === "EsForm";
601
609
  });
602
- return k && ((T = k.props) != null && T.ref) && (H.value = ($ = k.ctx) == null ? void 0 : $.refs[k.props.ref], de(H.value)), k || {};
603
- }), ye = w(() => {
604
- var r;
605
- return !!((r = o.default) != null && r.call(o));
606
- }), J = w(() => e.options.heightType || "auto"), be = w(() => typeof e.options.tabHeight == "number" ? `${e.options.tabHeight}px` : J.value === "height" && typeof e.options.height == "number" ? `${e.options.height}px` : "100%"), se = w(() => e.headBarClass ? {
610
+ return x && ((_ = x.props) != null && _.ref) && (L.value = (K = x.ctx) == null ? void 0 : K.refs[x.props.ref], $(L.value)), x || {};
611
+ }), Pe = w(() => {
612
+ var s;
613
+ return !!((s = n.default) != null && s.call(n));
614
+ }), le = w(() => e.options.heightType || "auto"), ye = w(() => typeof e.options.tabHeight == "number" ? `${e.options.tabHeight}px` : le.value === "height" && typeof e.options.height == "number" ? `${e.options.height}px` : "100%"), he = w(() => e.headBarClass ? {
607
615
  type: typeof e.headBarClass == "string" ? "string" : "object",
608
616
  value: e.headBarClass
609
- } : { type: "string", value: "" }), ke = w(() => {
610
- const r = m == null ? void 0 : m.paginationLayout;
611
- return r ? typeof r == "function" ? r() : r : null;
612
- }), Qe = w(() => {
613
- var r;
614
- return ((r = ke.value) == null ? void 0 : r.layout) || "prev, pager, next, jumper, sizes, ->, total";
615
- }), We = w(() => {
616
- var r;
617
- return ((r = ke.value) == null ? void 0 : r.pageSizes) || R.value.pageSizes;
618
- }), Ge = w(() => {
619
- var r;
620
- return ((r = ke.value) == null ? void 0 : r.isSmall) ?? R.value.isSmall;
621
- }), Ye = w(() => {
622
- var r;
623
- return ((r = ke.value) == null ? void 0 : r.background) ?? !0;
624
- }), Ve = w(() => e.options.loading || E.value), Be = w(() => !!e.options.actionUrl || e.options.apiParams && Y(e.options.apiParams) && Object.keys(e.options.apiParams).length > 0);
617
+ } : { type: "string", value: "" }), xe = w(() => {
618
+ const s = d == null ? void 0 : d.paginationLayout;
619
+ return s ? typeof s == "function" ? s() : s : null;
620
+ }), je = w(() => {
621
+ var s;
622
+ return ((s = xe.value) == null ? void 0 : s.layout) || "prev, pager, next, jumper, sizes, ->, total";
623
+ }), Ze = w(() => {
624
+ var s;
625
+ return ((s = xe.value) == null ? void 0 : s.pageSizes) || O.value.pageSizes;
626
+ }), et = w(() => {
627
+ var s;
628
+ return ((s = xe.value) == null ? void 0 : s.isSmall) ?? O.value.isSmall;
629
+ }), tt = w(() => {
630
+ var s;
631
+ return ((s = xe.value) == null ? void 0 : s.background) ?? !0;
632
+ }), nt = w(() => e.options.loading || W.value), Re = w(() => !!e.options.actionUrl || e.options.apiParams && oe(e.options.apiParams) && Object.keys(e.options.apiParams).length > 0);
625
633
  w(() => {
626
- var r;
627
- return !!((r = e.options) != null && r.httpRequest) && typeof e.options.httpRequest == "function";
634
+ var s;
635
+ return !!((s = e.options) != null && s.httpRequest) && typeof e.options.httpRequest == "function";
628
636
  });
629
- const Je = w(() => {
630
- const r = S.value.filter((k) => !k.hidCol);
631
- return r.forEach((k) => {
632
- k.prop !== "operate" && k.key !== "operate" && (k.prop || k.key) && !k.formatter && (k.formatter = (x) => {
633
- const O = x[k.prop] || x[k.key];
634
- return O == null || O === "" ? k.emptyPlaceholder || "-" : O;
635
- }), (k.prop === "operate" || k.key === "operate") && k.btns && !k.render && (k.render = (x, { row: O }) => {
636
- var T;
637
- return q("div", [
638
- (T = k.btns) == null ? void 0 : T.map(
639
- ($) => q(re, {
637
+ const ot = w(() => {
638
+ const s = q.value.filter((x) => !x.hidCol);
639
+ return s.forEach((x) => {
640
+ x.prop !== "operate" && x.key !== "operate" && (x.prop || x.key) && !x.formatter && (x.formatter = (I) => {
641
+ const B = I[x.prop] || I[x.key];
642
+ return B == null || B === "" ? x.emptyPlaceholder || "-" : B;
643
+ }), (x.prop === "operate" || x.key === "operate") && x.btns && !x.render && (x.render = (I, { row: B }) => {
644
+ var _;
645
+ return Q("div", [
646
+ (_ = x.btns) == null ? void 0 : _.filter((K) => c(K.permissionValue)).map(
647
+ (K) => Q(de, {
640
648
  onClick: () => {
641
- var Se;
642
- return (Se = $.clickEvent) == null ? void 0 : Se.call($, O);
649
+ var we;
650
+ return (we = K.clickEvent) == null ? void 0 : we.call(K, B);
643
651
  },
644
652
  text: !0,
645
- type: $.type || "primary"
646
- }, () => $.name)
653
+ type: K.type || "primary"
654
+ }, () => K.name)
647
655
  )
648
656
  ]);
649
657
  });
650
- }), r;
651
- }), je = /* @__PURE__ */ new Set([
658
+ }), s;
659
+ }), at = /* @__PURE__ */ new Set([
652
660
  "multiSelect",
653
661
  "expand",
654
662
  "snIndex",
@@ -666,239 +674,239 @@ const Y = (n) => typeof n == "object" && n !== null && Object.prototype.toString
666
674
  "configBtn",
667
675
  "leftText",
668
676
  "rowkey"
669
- ]), Xe = w(() => {
670
- const r = Bt({ ...xt, ...e.options }), { align: k, ...x } = r, O = {};
671
- for (const T in x)
672
- je.has(T) || (O[T] = x[T]);
673
- return O;
674
- }), Ze = Ft(), qe = w(() => {
675
- const r = { ...Xe.value, ...Ze };
676
- return e.options.rowkey && (r.rowKey = e.options.rowkey), J.value === "height" ? r.height = Ee.value : J.value === "maxHeight" && (r.maxHeight = Ee.value), r;
677
- }), { tableHeight: Ee } = Cn(
678
- C,
679
- s,
680
- u,
681
- f,
682
- { heightType: J.value, tabHeight: e.options.tabHeight }
677
+ ]), Ue = w(() => {
678
+ const s = Ht({ ...Ft, ...e.options }), { align: x, ...I } = s, B = {};
679
+ for (const _ in I)
680
+ at.has(_) || (B[_] = I[_]);
681
+ return B;
682
+ }), lt = Et(), rt = w(() => {
683
+ const s = { ...Ue.value, ...lt };
684
+ return e.options.rowkey && (s.rowKey = e.options.rowkey), le.value === "height" ? s.height = ze.value : le.value === "maxHeight" && (s.maxHeight = ze.value), s;
685
+ }), { tableHeight: ze } = wn(
686
+ R,
687
+ S,
688
+ l,
689
+ E,
690
+ { heightType: le.value, tabHeight: e.options.tabHeight }
683
691
  );
684
- he(
685
- Z,
686
- async (r, k) => {
687
- var x, O;
688
- r && r !== k && (e.options.actionUrl && await I(), (O = (x = i.value) == null ? void 0 : x.doLayout) == null || O.call(x));
692
+ be(
693
+ pe,
694
+ async (s, x) => {
695
+ var I, B;
696
+ s && s !== x && (e.options.actionUrl && await j(), (B = (I = f.value) == null ? void 0 : I.doLayout) == null || B.call(I));
689
697
  }
690
- ), he(
698
+ ), be(
691
699
  () => e.pagination,
692
- (r) => {
693
- R.value = { ...R.value, ...r }, M.value = r.total !== void 0;
700
+ (s) => {
701
+ O.value = { ...O.value, ...s }, z.value = s.total !== void 0;
694
702
  },
695
703
  { deep: !0, immediate: !0 }
696
- ), he(
704
+ ), be(
697
705
  () => e.dataSource,
698
- (r) => {
699
- tt(r, i.value);
706
+ (s) => {
707
+ Me(s, f.value);
700
708
  },
701
709
  { deep: !0 }
702
- ), he(
703
- P,
704
- (r) => {
705
- Array.isArray(r) && l("update:dataSource", r);
710
+ ), be(
711
+ H,
712
+ (s) => {
713
+ Array.isArray(s) && a("update:dataSource", s);
706
714
  },
707
715
  { deep: !0 }
708
- ), st(() => {
709
- Be.value && e.options.isInitRun !== !1 && I();
716
+ ), pt(() => {
717
+ Re.value && e.options.isInitRun !== !1 && j();
710
718
  });
711
- const { multipleSelection: et, handleSelectionChange: $e, initSelection: tt, clearAllSelection: fe } = Sn(e.options.rowkey), Ne = (r) => {
712
- $e(r, R.value.current || 1);
713
- }, c = (r) => {
714
- const k = ["total", "pageSize", "current", "tableData"];
715
- return Y(r) ? Object.keys(r).every((x) => k.find((O) => O === x) && r[x] && typeof r[x] == "string") : !1;
716
- }, v = (r, k) => {
717
- const x = [
719
+ const { multipleSelection: Ne, handleSelectionChange: st, initSelection: Me, clearAllSelection: Ke } = Fn(e.options.rowkey), Ce = (s) => {
720
+ st(s, O.value.current || 1);
721
+ }, _e = (s) => {
722
+ const x = ["total", "pageSize", "current", "tableData"];
723
+ return oe(s) ? Object.keys(s).every((I) => x.find((B) => B === I) && s[I] && typeof s[I] == "string") : !1;
724
+ }, u = (s, x) => {
725
+ const I = [
718
726
  { eventName: "brcb", isReturn: !0 },
719
727
  { eventName: "qrcb", isReturn: !0 }
720
- ], O = x.findIndex((T) => T.eventName === r);
721
- if (e.options.listenToCallBack && e.options.listenToCallBack[r] && O !== -1 && x[O].isReturn)
722
- return e.options.listenToCallBack[r](k);
723
- }, y = (r, k) => {
724
- Y(ae.value) && Object.keys(ae.value).length && Object.entries(ae.value).forEach(([x, O]) => {
725
- if (!k.includes(x)) return;
726
- const $ = r[O] ?? dt(r, O);
727
- x === "tableData" ? P.value = Array.isArray($) ? $ : [] : R.value[x] = typeof $ == "number" ? $ : parseInt($, 10) || 0;
728
+ ], B = I.findIndex((_) => _.eventName === s);
729
+ if (e.options.listenToCallBack && e.options.listenToCallBack[s] && B !== -1 && I[B].isReturn)
730
+ return e.options.listenToCallBack[s](x);
731
+ }, v = (s, x) => {
732
+ oe(te.value) && Object.keys(te.value).length && Object.entries(te.value).forEach(([I, B]) => {
733
+ if (!x.includes(I)) return;
734
+ const K = s[B] ?? yt(s, B);
735
+ I === "tableData" ? H.value = Array.isArray(K) ? K : [] : O.value[I] = typeof K == "number" ? K : parseInt(K, 10) || 0;
728
736
  });
729
- }, A = (r, k = {}) => {
730
- var gt, yt;
731
- const { success: x, fail: O } = k, T = ((gt = e.options) == null ? void 0 : gt.apiParams) || {}, $ = ((yt = e.options) == null ? void 0 : yt.actionUrl) || T.url || "";
732
- if (!$ || !Object.keys(T).length) return;
733
- const Se = Object.keys(Q.value).length ? Re(p(Q.value.props.model)) : ve.value || {}, pe = v("brcb", { ...Se, ...r, ...Re(p(T.model || {})) }), ft = Y(pe) ? pe : { ...Se, ...Re(p(T.model || {})), ...r }, pt = { ...Re(p(T.options || {})) };
734
- T != null && T.method && (pt.method = T == null ? void 0 : T.method);
735
- const mt = async (Et) => {
736
- if (!E.value) {
737
- E.value = !0, console.log("formData///", ft);
737
+ }, m = (s, x = {}) => {
738
+ var kt, xt;
739
+ const { success: I, fail: B } = x, _ = ((kt = e.options) == null ? void 0 : kt.apiParams) || {}, K = ((xt = e.options) == null ? void 0 : xt.actionUrl) || _.url || "";
740
+ if (!K || !Object.keys(_).length) return;
741
+ const we = Object.keys(N.value).length ? Le(p(N.value.props.model)) : Z.value || {}, ve = u("brcb", { ...we, ...s, ...Le(p(_.model || {})) }), ht = oe(ve) ? ve : { ...we, ...Le(p(_.model || {})), ...s }, vt = { ...Le(p(_.options || {})) };
742
+ _ != null && _.method && (vt.method = _ == null ? void 0 : _.method);
743
+ const bt = async (Dt) => {
744
+ if (!W.value) {
745
+ W.value = !0, console.log("formData///", ht);
738
746
  try {
739
- const we = await Et({
740
- url: $,
741
- formParams: ft,
742
- headers: T.headers || {},
743
- ...pt,
744
- ...r
745
- }), Tt = v("qrcb", we) || we;
746
- Y(we) && Object.keys(we).length && typeof x == "function" && x(Tt);
747
- } catch (we) {
748
- typeof O == "function" && O(we);
747
+ const Oe = await Dt({
748
+ url: K,
749
+ formParams: ht,
750
+ headers: _.headers || {},
751
+ ...vt,
752
+ ...s
753
+ }), zt = u("qrcb", Oe) || Oe;
754
+ oe(Oe) && Object.keys(Oe).length && typeof I == "function" && I(zt);
755
+ } catch (Oe) {
756
+ typeof B == "function" && B(Oe);
749
757
  } finally {
750
- E.value = !1;
758
+ W.value = !1;
751
759
  }
752
760
  }
753
761
  };
754
- e.options.httpRequest ? mt(e.options.httpRequest) : m.$httpRequest && mt(m.$httpRequest);
755
- }, I = (r) => new Promise((k, x) => {
756
- R.value.current = 1, A(
757
- { ...r || {}, pageIndex: R.value.current, pageSize: R.value.pageSize },
762
+ e.options.httpRequest ? bt(e.options.httpRequest) : d.$httpRequest && bt(d.$httpRequest);
763
+ }, j = (s) => new Promise((x, I) => {
764
+ O.value.current = 1, m(
765
+ { ...s || {}, pageIndex: O.value.current, pageSize: O.value.pageSize },
758
766
  {
759
- success: (O) => {
760
- y(O, ["total", "tableData"]), Object.keys(e.pagination).length && l("update:pagination", R.value), k(O);
767
+ success: (B) => {
768
+ v(B, ["total", "tableData"]), Object.keys(e.pagination).length && a("update:pagination", O.value), x(B);
761
769
  },
762
- fail: (O) => {
763
- x(O);
770
+ fail: (B) => {
771
+ I(B);
764
772
  }
765
773
  }
766
774
  );
767
- }), V = () => {
768
- A(
769
- { pageIndex: R.value.current, pageSize: R.value.pageSize },
775
+ }), F = () => {
776
+ m(
777
+ { pageIndex: O.value.current, pageSize: O.value.pageSize },
770
778
  {
771
- success: (r) => {
772
- y(r, ["total", "tableData"]), l("update:pagination", R.value), l("pagination-current-change", R.value);
779
+ success: (s) => {
780
+ v(s, ["total", "tableData"]), a("update:pagination", O.value), a("pagination-current-change", O.value);
773
781
  }
774
782
  }
775
783
  );
776
- }, G = () => {
777
- A(
778
- { pageIndex: R.value.current, pageSize: R.value.pageSize },
784
+ }, M = () => {
785
+ m(
786
+ { pageIndex: O.value.current, pageSize: O.value.pageSize },
779
787
  {
780
- success: (r) => {
781
- y(r, ["total", "tableData"]), l("update:pagination", R.value);
788
+ success: (s) => {
789
+ v(s, ["total", "tableData"]), a("update:pagination", O.value);
782
790
  }
783
791
  }
784
792
  );
785
- }, xe = (r) => {
786
- R.value.pageSize = r, R.value.current = 1, Be.value ? G() : (l("update:pagination", R.value), l("size-change", R.value, r));
787
- }, Ce = (r) => {
788
- R.value.current = r, Be.value ? (console.log("indexPages//", r), V()) : (l("update:pagination", R.value), l("pagination-current-change", R.value));
789
- }, Ot = (r) => {
790
- l("change-table-sort", r);
791
- }, Rt = (r) => r.toLowerCase().replace(/(\s|^)[a-z]/g, (k) => k.toUpperCase()), Bt = (r) => {
792
- const k = {};
793
- for (const x in r)
794
- if (!(x === "groups" || x === "scopedSlots" || x === "render"))
795
- if (x.includes("-")) {
796
- const O = x.split("-");
797
- let T = O[0];
798
- for (let $ = 1; $ < O.length; $++)
799
- T += Rt(O[$]);
800
- k[T] = r[x];
801
- } else x === "key" && (k.prop = r[x]), k[x] = r[x];
802
- return k.align || (k.align = "center"), k;
793
+ }, ne = (s) => {
794
+ O.value.pageSize = s, O.value.current = 1, Re.value ? M() : (a("update:pagination", O.value), a("size-change", O.value, s));
795
+ }, Se = (s) => {
796
+ O.value.current = s, Re.value ? (console.log("indexPages//", s), F()) : (a("update:pagination", O.value), a("pagination-current-change", O.value));
797
+ }, Ie = (s) => {
798
+ a("change-table-sort", s);
799
+ }, Tt = (s) => s.toLowerCase().replace(/(\s|^)[a-z]/g, (x) => x.toUpperCase()), Ht = (s) => {
800
+ const x = {};
801
+ for (const I in s)
802
+ if (!(I === "groups" || I === "scopedSlots" || I === "render"))
803
+ if (I.includes("-")) {
804
+ const B = I.split("-");
805
+ let _ = B[0];
806
+ for (let K = 1; K < B.length; K++)
807
+ _ += Tt(B[K]);
808
+ x[_] = s[I];
809
+ } else I === "key" && (x.prop = s[I]), x[I] = s[I];
810
+ return x.align || (x.align = "center"), x;
803
811
  };
804
- return ot("getTableInstantce", () => ({
805
- ...(a == null ? void 0 : a.setupState) || {},
806
- tableRef: i,
807
- toggleSelection: (r) => {
808
- var k;
809
- r ? r.forEach((x) => {
810
- var O;
811
- (O = i.value) == null || O.toggleRowSelection(x);
812
- }) : (k = i.value) == null || k.clearSelection();
812
+ return ct("getTableInstantce", () => ({
813
+ ...(i == null ? void 0 : i.setupState) || {},
814
+ tableRef: f,
815
+ toggleSelection: (s) => {
816
+ var x;
817
+ s ? s.forEach((I) => {
818
+ var B;
819
+ (B = f.value) == null || B.toggleRowSelection(I);
820
+ }) : (x = f.value) == null || x.clearSelection();
813
821
  },
814
- clearAllSelection: () => fe(i.value),
815
- refsInstance: () => i.value,
816
- httpRequestInstance: I
822
+ clearAllSelection: () => Ke(f.value),
823
+ refsInstance: () => f.value,
824
+ httpRequestInstance: j
817
825
  })), g({
818
- httpRequestInstance: I,
819
- getSelectionRows: () => et.value,
826
+ httpRequestInstance: j,
827
+ getSelectionRows: () => Ne.value,
820
828
  clearSelection: () => {
821
- var r, k;
822
- return (k = (r = i.value) == null ? void 0 : r.clearSelection) == null ? void 0 : k.call(r);
829
+ var s, x;
830
+ return (x = (s = f.value) == null ? void 0 : s.clearSelection) == null ? void 0 : x.call(s);
823
831
  },
824
- clearAllSelection: () => fe(i.value),
832
+ clearAllSelection: () => Ke(f.value),
825
833
  refresh: () => {
826
- var r, k;
827
- return (k = (r = i.value) == null ? void 0 : r.doLayout) == null ? void 0 : k.call(r);
834
+ var s, x;
835
+ return (x = (s = f.value) == null ? void 0 : s.doLayout) == null ? void 0 : x.call(s);
828
836
  }
829
- }), (r, k) => (b(), B(p(Me), { locale: t.value }, {
830
- default: F(() => [
831
- _("div", {
832
- ref: K,
837
+ }), (s, x) => (b(), T(p(We), { locale: o.value }, {
838
+ default: P(() => [
839
+ U("div", {
840
+ ref: A,
833
841
  class: "table_component",
834
- style: ge({ [J.value]: be.value })
842
+ style: ke({ [le.value]: ye.value })
835
843
  }, [
836
- _("div", wn, [
837
- n.showHeaderBar ? (b(), D("div", {
844
+ U("div", Rn, [
845
+ t.showHeaderBar ? (b(), D("div", {
838
846
  key: 0,
839
847
  ref_key: "headBarRef",
840
- ref: s,
841
- class: ct(["btn-slot", se.value.type === "string" ? se.value.value : { slotClass: j.value && se.value.type !== "object" }]),
842
- style: ge(se.value.value && se.value.type === "object" && se.value.value)
848
+ ref: S,
849
+ class: mt(["btn-slot", he.value.type === "string" ? he.value.value : { slotClass: C.value && he.value.type !== "object" }]),
850
+ style: ke(he.value.value && he.value.type === "object" && he.value.value)
843
851
  }, [
844
- ye.value ? (b(), D("div", {
852
+ Pe.value ? (b(), D("div", {
845
853
  key: 0,
846
854
  class: "headerBar",
847
- style: ge({ paddingBottom: ye.value ? "10px" : "0px" })
855
+ style: ke({ paddingBottom: Pe.value ? "10px" : "0px" })
848
856
  }, [
849
- He(r.$slots, "default", {}, void 0, !0)
850
- ], 4)) : W("", !0)
851
- ], 6)) : W("", !0),
852
- ut((b(), D("div", Fn, [
853
- _("div", Pn, [
854
- n.options.configBtn && n.options.configBtn.length || n.options.leftText ? (b(), B(xn, {
857
+ Te(s.$slots, "default", {}, void 0, !0)
858
+ ], 4)) : G("", !0)
859
+ ], 6)) : G("", !0),
860
+ gt((b(), D("div", On, [
861
+ U("div", En, [
862
+ t.options.configBtn && t.options.configBtn.length || t.options.leftText ? (b(), T(In, {
855
863
  key: 0,
856
864
  ref_key: "tbBtnRef",
857
- ref: u,
858
- instance: { tableRef: p(a), formInstance: H.value },
859
- "btn-config": n.options.configBtn,
860
- "left-text": n.options.leftText
861
- }, null, 8, ["instance", "btn-config", "left-text"])) : W("", !0),
862
- (b(), B(p(At), U({
865
+ ref: l,
866
+ instance: { tableRef: p(i), formInstance: L.value },
867
+ "btn-config": t.options.configBtn,
868
+ "left-text": t.options.leftText
869
+ }, null, 8, ["instance", "btn-config", "left-text"])) : G("", !0),
870
+ (b(), T(p($t), J({
863
871
  class: "el-dp_tables",
864
- id: L.value,
865
- key: L.value,
872
+ id: k.value,
873
+ key: k.value,
866
874
  ref_key: "tableRef",
867
- ref: i,
875
+ ref: f,
868
876
  style: { width: "100%" }
869
- }, qe.value, {
870
- data: n.dataSource,
871
- onSortChange: Ot,
872
- onSelectionChange: Ne
877
+ }, rt.value, {
878
+ data: t.dataSource,
879
+ onSortChange: Ie,
880
+ onSelectionChange: Ce
873
881
  }), {
874
- empty: F(() => [...k[2] || (k[2] = [
875
- _("div", { class: "ant-empty ant-empty-normal" }, [
876
- _("div", { class: "ant-empty-image" }, [
877
- _("svg", {
882
+ empty: P(() => [...x[2] || (x[2] = [
883
+ U("div", { class: "ant-empty ant-empty-normal" }, [
884
+ U("div", { class: "ant-empty-image" }, [
885
+ U("svg", {
878
886
  class: "ant-empty-img-simple",
879
887
  width: "64",
880
888
  height: "41",
881
889
  viewBox: "0 0 64 41",
882
890
  xmlns: "http://www.w3.org/2000/svg"
883
891
  }, [
884
- _("g", {
892
+ U("g", {
885
893
  transform: "translate(0 1)",
886
894
  fill: "none",
887
895
  "fill-rule": "evenodd"
888
896
  }, [
889
- _("ellipse", {
897
+ U("ellipse", {
890
898
  class: "ant-empty-img-simple-ellipse",
891
899
  cx: "32",
892
900
  cy: "33",
893
901
  rx: "32",
894
902
  ry: "7"
895
903
  }),
896
- _("g", {
904
+ U("g", {
897
905
  class: "ant-empty-img-simple-g",
898
906
  "fill-rule": "nonzero"
899
907
  }, [
900
- _("path", { 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" }),
901
- _("path", {
908
+ U("path", { 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" }),
909
+ U("path", {
902
910
  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",
903
911
  class: "ant-empty-img-simple-path"
904
912
  })
@@ -906,18 +914,18 @@ const Y = (n) => typeof n == "object" && n !== null && Object.prototype.toString
906
914
  ])
907
915
  ])
908
916
  ]),
909
- _("div", { class: "ant-empty-description" }, "暂无数据")
917
+ U("div", { class: "ant-empty-description" }, "暂无数据")
910
918
  ], -1)
911
919
  ])]),
912
- default: F(() => [
913
- (b(!0), D(ee, null, me(Je.value, (x, O) => (b(), B(mn, {
914
- key: x.prop || x.key || O,
915
- cols: { ...x, columnIndex: O }
916
- }, it({ _: 2 }, [
917
- x.scopedSlots && x.scopedSlots.customRender ? {
918
- name: x.scopedSlots.customRender,
919
- fn: F(({ scope: T }) => [
920
- He(r.$slots, x.scopedSlots.customRender, U({ ref_for: !0 }, { ...x, columnIndex: O, row: T.row, column: T.column }, { scope: T }), void 0, !0)
920
+ default: P(() => [
921
+ (b(!0), D(X, null, ge(ot.value, (I, B) => (b(), T(hn, {
922
+ key: I.prop || I.key || B,
923
+ cols: { ...I, columnIndex: B }
924
+ }, Xe({ _: 2 }, [
925
+ I.scopedSlots && I.scopedSlots.customRender ? {
926
+ name: I.scopedSlots.customRender,
927
+ fn: P(({ scope: _ }) => [
928
+ Te(s.$slots, I.scopedSlots.customRender, J({ ref_for: !0 }, { ...I, columnIndex: B, row: _.row, column: _.column }, { scope: _ }), void 0, !0)
921
929
  ]),
922
930
  key: "0"
923
931
  } : void 0
@@ -926,36 +934,36 @@ const Y = (n) => typeof n == "object" && n !== null && Object.prototype.toString
926
934
  _: 3
927
935
  }, 16, ["id", "data"]))
928
936
  ]),
929
- M.value ? (b(), D("div", {
937
+ z.value ? (b(), D("div", {
930
938
  key: 0,
931
939
  ref_key: "paginationRef",
932
- ref: f,
940
+ ref: E,
933
941
  class: "pagination_page",
934
- style: ge({
935
- position: J.value === "height" ? "absolute" : "static",
942
+ style: ke({
943
+ position: le.value === "height" ? "absolute" : "static",
936
944
  bottom: "0px",
937
945
  left: "0px",
938
946
  zIndex: 5,
939
947
  background: "#fff"
940
948
  })
941
949
  }, [
942
- N(p(Vt), {
943
- background: Ye.value,
944
- size: Ge.value ? "small" : R.value.size,
945
- total: R.value.total,
946
- "page-size": R.value.pageSize,
947
- "onUpdate:pageSize": k[0] || (k[0] = (x) => R.value.pageSize = x),
948
- "page-sizes": We.value,
949
- "current-page": R.value.current,
950
- "onUpdate:currentPage": k[1] || (k[1] = (x) => R.value.current = x),
951
- layout: Qe.value,
950
+ Y(p(jt), {
951
+ background: tt.value,
952
+ size: et.value ? "small" : O.value.size,
953
+ total: O.value.total,
954
+ "page-size": O.value.pageSize,
955
+ "onUpdate:pageSize": x[0] || (x[0] = (I) => O.value.pageSize = I),
956
+ "page-sizes": Ze.value,
957
+ "current-page": O.value.current,
958
+ "onUpdate:currentPage": x[1] || (x[1] = (I) => O.value.current = I),
959
+ layout: je.value,
952
960
  style: { padding: "0", margin: "10px 0", "text-align": "center" },
953
- onSizeChange: xe,
954
- onCurrentChange: Ce
961
+ onSizeChange: ne,
962
+ onCurrentChange: Se
955
963
  }, null, 8, ["background", "size", "total", "page-size", "page-sizes", "current-page", "layout"])
956
- ], 4)) : W("", !0)
964
+ ], 4)) : G("", !0)
957
965
  ])), [
958
- [p(jt), Ve.value]
966
+ [p(Ut), nt.value]
959
967
  ])
960
968
  ])
961
969
  ], 4)
@@ -963,342 +971,342 @@ const Y = (n) => typeof n == "object" && n !== null && Object.prototype.toString
963
971
  _: 3
964
972
  }, 8, ["locale"]));
965
973
  }
966
- }), oe = /* @__PURE__ */ Ae(On, [["__scopeId", "data-v-c23b96e8"]]);
967
- oe.install = function(n) {
968
- n.component(oe.name, oe);
974
+ }), re = /* @__PURE__ */ De(Bn, [["__scopeId", "data-v-c84b1d80"]]);
975
+ re.install = function(t) {
976
+ t.component(re.name, re);
969
977
  };
970
- oe.isPlugin = !0;
971
- oe.Plugin = {
972
- install(n, g = {}) {
973
- n.provide("$esPlusTable", {
978
+ re.isPlugin = !0;
979
+ re.Plugin = {
980
+ install(t, g = {}) {
981
+ t.provide("$esPlusTable", {
974
982
  ...g.methods || {}
975
- }), n.component(oe.name, { ...oe, methods: { ...oe.methods, ...g.methods || {} } });
983
+ }), t.component(re.name, { ...re, methods: { ...re.methods, ...g.methods || {} } });
976
984
  }
977
985
  };
978
- const te = (n, g) => {
986
+ const se = (t, g) => {
979
987
  const h = g.split(/\.|\[|\]/).filter(Boolean);
980
- let e = n;
981
- for (const l of h) {
988
+ let e = t;
989
+ for (const a of h) {
982
990
  if (e == null) return;
983
- e = e[l];
991
+ e = e[a];
984
992
  }
985
993
  return e;
986
- }, ne = (n, g, h) => {
987
- const e = g.split(/\.|\[|\]/).filter(Boolean), l = e.pop();
988
- let o = n;
989
- for (const t of e)
990
- o[t] == null && (o[t] = {}), o = o[t];
991
- l && (o[l] = h);
994
+ }, ie = (t, g, h) => {
995
+ const e = g.split(/\.|\[|\]/).filter(Boolean), a = e.pop();
996
+ let n = t;
997
+ for (const o of e)
998
+ n[o] == null && (n[o] = {}), n = n[o];
999
+ a && (n[a] = h);
992
1000
  };
993
- function Rn() {
1001
+ function Ln() {
994
1002
  return { formInputComponents: (g) => (/* @__PURE__ */ new Map([
995
1003
  [
996
1004
  "Input",
997
- (e, l, { row: o }) => e(at, {
998
- modelValue: te(l, o.prop),
999
- ...o.attrs,
1000
- ...o.on,
1001
- "onUpdate:modelValue": (t) => {
1002
- ne(l, o.prop, t);
1005
+ (e, a, { row: n }) => e(dt, {
1006
+ modelValue: se(a, n.prop),
1007
+ ...n.attrs,
1008
+ ...n.on,
1009
+ "onUpdate:modelValue": (o) => {
1010
+ ie(a, n.prop, o);
1003
1011
  }
1004
1012
  })
1005
1013
  ],
1006
1014
  [
1007
1015
  "Select",
1008
- (e, l, { row: o }) => e(
1009
- qt,
1016
+ (e, a, { row: n }) => e(
1017
+ Nt,
1010
1018
  {
1011
- modelValue: te(l, o.prop),
1012
- ...o.attrs,
1013
- ...o.on,
1014
- "onUpdate:modelValue": (t) => {
1015
- ne(l, o.prop, t);
1019
+ modelValue: se(a, n.prop),
1020
+ ...n.attrs,
1021
+ ...n.on,
1022
+ "onUpdate:modelValue": (o) => {
1023
+ ie(a, n.prop, o);
1016
1024
  }
1017
1025
  },
1018
1026
  () => {
1019
- var t;
1020
- return (t = o.dataOptions) == null ? void 0 : t.map(
1021
- (d, a) => e($t, { key: a, value: d.value, label: d.label })
1027
+ var o;
1028
+ return (o = n.dataOptions) == null ? void 0 : o.map(
1029
+ (r, i) => e(Mt, { key: i, value: r.value, label: r.label })
1022
1030
  );
1023
1031
  }
1024
1032
  )
1025
1033
  ],
1026
1034
  [
1027
1035
  "datePicker",
1028
- (e, l, { row: o }) => e(Nt, {
1029
- modelValue: te(l, o.prop),
1030
- ...o.attrs,
1031
- ...o.on,
1032
- "onUpdate:modelValue": (t) => {
1033
- ne(l, o.prop, t);
1036
+ (e, a, { row: n }) => e(Kt, {
1037
+ modelValue: se(a, n.prop),
1038
+ ...n.attrs,
1039
+ ...n.on,
1040
+ "onUpdate:modelValue": (o) => {
1041
+ ie(a, n.prop, o);
1034
1042
  }
1035
1043
  })
1036
1044
  ],
1037
1045
  [
1038
1046
  "timePicker",
1039
- (e, l, { row: o }) => e(Ut, {
1040
- modelValue: te(l, o.prop),
1041
- ...o.attrs,
1042
- ...o.on,
1043
- "onUpdate:modelValue": (t) => {
1044
- ne(l, o.prop, t);
1047
+ (e, a, { row: n }) => e(Qt, {
1048
+ modelValue: se(a, n.prop),
1049
+ ...n.attrs,
1050
+ ...n.on,
1051
+ "onUpdate:modelValue": (o) => {
1052
+ ie(a, n.prop, o);
1045
1053
  }
1046
1054
  })
1047
1055
  ],
1048
1056
  [
1049
1057
  "Slider",
1050
- (e, l, { row: o }) => e(Mt, {
1051
- modelValue: te(l, o.prop),
1052
- ...o.attrs,
1053
- ...o.on,
1054
- "onUpdate:modelValue": (t) => {
1055
- ne(l, o.prop, t);
1058
+ (e, a, { row: n }) => e(Wt, {
1059
+ modelValue: se(a, n.prop),
1060
+ ...n.attrs,
1061
+ ...n.on,
1062
+ "onUpdate:modelValue": (o) => {
1063
+ ie(a, n.prop, o);
1056
1064
  }
1057
1065
  })
1058
1066
  ],
1059
1067
  [
1060
1068
  "ColorPicker",
1061
- (e, l, { row: o }) => e(Kt, {
1062
- modelValue: te(l, o.prop),
1063
- ...o.attrs,
1064
- ...o.on,
1065
- "onUpdate:modelValue": (t) => {
1066
- ne(l, o.prop, t);
1069
+ (e, a, { row: n }) => e(Gt, {
1070
+ modelValue: se(a, n.prop),
1071
+ ...n.attrs,
1072
+ ...n.on,
1073
+ "onUpdate:modelValue": (o) => {
1074
+ ie(a, n.prop, o);
1067
1075
  }
1068
1076
  })
1069
1077
  ],
1070
1078
  [
1071
1079
  "Transfer",
1072
- (e, l, { row: o }) => e(Qt, {
1073
- modelValue: te(l, o.prop),
1074
- ...o.attrs,
1075
- ...o.on,
1076
- "onUpdate:modelValue": (t) => {
1077
- ne(l, o.prop, t);
1080
+ (e, a, { row: n }) => e(Yt, {
1081
+ modelValue: se(a, n.prop),
1082
+ ...n.attrs,
1083
+ ...n.on,
1084
+ "onUpdate:modelValue": (o) => {
1085
+ ie(a, n.prop, o);
1078
1086
  }
1079
1087
  })
1080
1088
  ],
1081
1089
  [
1082
1090
  "Cascader",
1083
- (e, l, { row: o }) => e(Wt, {
1084
- modelValue: te(l, o.prop),
1085
- options: o.dataOptions,
1086
- ...o.attrs,
1087
- ...o.on,
1088
- "onUpdate:modelValue": (t) => {
1089
- ne(l, o.prop, t);
1091
+ (e, a, { row: n }) => e(Jt, {
1092
+ modelValue: se(a, n.prop),
1093
+ options: n.dataOptions,
1094
+ ...n.attrs,
1095
+ ...n.on,
1096
+ "onUpdate:modelValue": (o) => {
1097
+ ie(a, n.prop, o);
1090
1098
  }
1091
1099
  })
1092
1100
  ],
1093
1101
  [
1094
1102
  "Radio",
1095
- (e, l, { row: o }) => e(
1096
- Gt,
1103
+ (e, a, { row: n }) => e(
1104
+ Xt,
1097
1105
  {
1098
- modelValue: te(l, o.prop),
1099
- ...o.attrs,
1100
- ...o.on,
1101
- "onUpdate:modelValue": (t) => {
1102
- ne(l, o.prop, t);
1106
+ modelValue: se(a, n.prop),
1107
+ ...n.attrs,
1108
+ ...n.on,
1109
+ "onUpdate:modelValue": (o) => {
1110
+ ie(a, n.prop, o);
1103
1111
  }
1104
1112
  },
1105
1113
  () => {
1106
- var t;
1107
- return (t = o.dataOptions) == null ? void 0 : t.map(
1108
- (d, a) => e(Yt, { key: a, value: d.value }, () => d.label)
1114
+ var o;
1115
+ return (o = n.dataOptions) == null ? void 0 : o.map(
1116
+ (r, i) => e(Zt, { key: i, value: r.value }, () => r.label)
1109
1117
  );
1110
1118
  }
1111
1119
  )
1112
1120
  ],
1113
1121
  [
1114
1122
  "Checkbox",
1115
- (e, l, { row: o }) => e(
1116
- Jt,
1123
+ (e, a, { row: n }) => e(
1124
+ en,
1117
1125
  {
1118
- modelValue: te(l, o.prop),
1119
- ...o.attrs,
1120
- ...o.on,
1121
- "onUpdate:modelValue": (t) => {
1122
- ne(l, o.prop, t);
1126
+ modelValue: se(a, n.prop),
1127
+ ...n.attrs,
1128
+ ...n.on,
1129
+ "onUpdate:modelValue": (o) => {
1130
+ ie(a, n.prop, o);
1123
1131
  }
1124
1132
  },
1125
1133
  () => {
1126
- var t;
1127
- return (t = o.dataOptions) == null ? void 0 : t.map(
1128
- (d, a) => e(Xt, { key: a, value: d.value }, () => d.label)
1134
+ var o;
1135
+ return (o = n.dataOptions) == null ? void 0 : o.map(
1136
+ (r, i) => e(tn, { key: i, value: r.value }, () => r.label)
1129
1137
  );
1130
1138
  }
1131
1139
  )
1132
1140
  ],
1133
1141
  [
1134
1142
  "Switch",
1135
- (e, l, { row: o }) => e(Zt, {
1136
- modelValue: te(l, o.prop),
1137
- ...o.attrs,
1138
- ...o.on,
1139
- "onUpdate:modelValue": (t) => {
1140
- ne(l, o.prop, t);
1143
+ (e, a, { row: n }) => e(nn, {
1144
+ modelValue: se(a, n.prop),
1145
+ ...n.attrs,
1146
+ ...n.on,
1147
+ "onUpdate:modelValue": (o) => {
1148
+ ie(a, n.prop, o);
1141
1149
  }
1142
1150
  })
1143
1151
  ],
1144
1152
  [
1145
1153
  "Rate",
1146
- (e, l, { row: o }) => e(en, {
1147
- modelValue: te(l, o.prop),
1148
- ...o.attrs,
1149
- ...o.on,
1150
- "onUpdate:modelValue": (t) => {
1151
- ne(l, o.prop, t);
1154
+ (e, a, { row: n }) => e(on, {
1155
+ modelValue: se(a, n.prop),
1156
+ ...n.attrs,
1157
+ ...n.on,
1158
+ "onUpdate:modelValue": (o) => {
1159
+ ie(a, n.prop, o);
1152
1160
  }
1153
1161
  })
1154
1162
  ],
1155
1163
  [
1156
1164
  "Upload",
1157
- (e, l, { row: o }) => {
1158
- const { props: t, httpRequest: d, triggerRender: a, fileRender: m, ...i } = o;
1159
- let u = null;
1160
- const s = {
1161
- ...t,
1165
+ (e, a, { row: n }) => {
1166
+ const { props: o, httpRequest: r, triggerRender: i, fileRender: d, ...y } = n;
1167
+ let c = null;
1168
+ const f = {
1169
+ ...o,
1162
1170
  // props 中的配置:action, accept, listType, limit, multiple 等
1163
- ...i.attrs,
1171
+ ...y.attrs,
1164
1172
  // attrs 中的配置(兼容两种方式)
1165
- ref: (C) => {
1166
- u = C;
1173
+ ref: (S) => {
1174
+ c = S;
1167
1175
  }
1168
1176
  };
1169
- if (i.on)
1170
- for (const [C, L] of Object.entries(i.on))
1171
- s[`on${C.charAt(0).toUpperCase()}${C.slice(1)}`] = L;
1172
- d && (s["http-request"] = d);
1173
- const f = {};
1174
- return a && ((s.listType || s["list-type"]) === "picture-card" ? f.trigger = () => a(e) : f.default = () => a(e)), m && (f.file = ({ file: C }) => m(e, C, () => {
1175
- u == null || u.handleRemove(C);
1176
- })), e(tn, s, f);
1177
+ if (y.on)
1178
+ for (const [S, E] of Object.entries(y.on))
1179
+ f[`on${S.charAt(0).toUpperCase()}${S.slice(1)}`] = E;
1180
+ r && (f["http-request"] = r);
1181
+ const l = {};
1182
+ return i && ((f.listType || f["list-type"]) === "picture-card" ? l.trigger = () => i(e) : l.default = () => i(e)), d && (l.file = ({ file: S }) => d(e, S, () => {
1183
+ c == null || c.handleRemove(S);
1184
+ })), e(an, f, l);
1177
1185
  }
1178
1186
  ]
1179
1187
  ])).get(g.formtype) || (() => null) };
1180
1188
  }
1181
- function Bn(n) {
1182
- const g = z(!1), h = w(() => {
1183
- var u, s;
1184
- return ((s = (u = n.layoutFormProps) == null ? void 0 : u.fromLayProps) == null ? void 0 : s.isBtnHidden) ?? !1;
1189
+ function Tn(t) {
1190
+ const g = V(!1), h = w(() => {
1191
+ var c, f;
1192
+ return ((f = (c = t.layoutFormProps) == null ? void 0 : c.fromLayProps) == null ? void 0 : f.isBtnHidden) ?? !1;
1185
1193
  }), e = w(() => {
1186
- var u;
1187
- return ((u = n.layoutFormProps) == null ? void 0 : u.rowLayProps) || { gutter: 20 };
1188
- }), l = w(() => {
1189
- var u;
1190
- return ((u = n.layoutFormProps) == null ? void 0 : u.fromLayProps) || {};
1194
+ var c;
1195
+ return ((c = t.layoutFormProps) == null ? void 0 : c.rowLayProps) || { gutter: 20 };
1196
+ }), a = w(() => {
1197
+ var c;
1198
+ return ((c = t.layoutFormProps) == null ? void 0 : c.fromLayProps) || {};
1199
+ }), n = w(() => {
1200
+ var c;
1201
+ return (c = t.layoutFormProps) == null ? void 0 : c.setOptions;
1191
1202
  }), o = w(() => {
1192
- var u;
1193
- return (u = n.layoutFormProps) == null ? void 0 : u.setOptions;
1194
- }), t = w(() => {
1195
- let u = 0;
1196
- const s = [], f = [], C = n.formItemList;
1197
- for (let S = 0; S < C.length; S++) {
1198
- const E = C[S];
1199
- if (u += E.span || 6, u > 24) {
1200
- const j = f.length ? f[f.length - 1].endIndex : 0;
1201
- f.push({ statIndex: j, endIndex: S }), u = E.span || 6, S === C.length - 1 && f.push({ statIndex: S, endIndex: S + 1 });
1202
- } else if (S === C.length - 1) {
1203
- const j = f.length ? f[f.length - 1].endIndex : 0;
1204
- f.push({ statIndex: j, endIndex: S + 1 });
1205
- } else if (u === 24) {
1206
- const j = f.length ? f[f.length - 1].endIndex : 0;
1207
- f.push({ statIndex: j, endIndex: S + 1 }), u = 0;
1203
+ let c = 0;
1204
+ const f = [], l = [], S = t.formItemList;
1205
+ for (let k = 0; k < S.length; k++) {
1206
+ const H = S[k];
1207
+ if (c += H.span || 6, c > 24) {
1208
+ const q = l.length ? l[l.length - 1].endIndex : 0;
1209
+ l.push({ statIndex: q, endIndex: k }), c = H.span || 6, k === S.length - 1 && l.push({ statIndex: k, endIndex: k + 1 });
1210
+ } else if (k === S.length - 1) {
1211
+ const q = l.length ? l[l.length - 1].endIndex : 0;
1212
+ l.push({ statIndex: q, endIndex: k + 1 });
1213
+ } else if (c === 24) {
1214
+ const q = l.length ? l[l.length - 1].endIndex : 0;
1215
+ l.push({ statIndex: q, endIndex: k + 1 }), c = 0;
1208
1216
  }
1209
1217
  }
1210
- f.forEach((S) => {
1211
- s.push(C.slice(S.statIndex, S.endIndex));
1218
+ l.forEach((k) => {
1219
+ f.push(S.slice(k.statIndex, k.endIndex));
1212
1220
  });
1213
- const L = s.map((S) => S.map(() => 0));
1214
- let P = -1;
1215
- return L.forEach((S) => {
1216
- S.forEach((E, j) => {
1217
- S[j] = P += 1;
1221
+ const E = f.map((k) => k.map(() => 0));
1222
+ let R = -1;
1223
+ return E.forEach((k) => {
1224
+ k.forEach((H, q) => {
1225
+ k[q] = R += 1;
1218
1226
  });
1219
1227
  }), {
1220
- columnRow: L,
1221
- rowNum: L.length,
1222
- columnNodeIndex: L.map((S) => S[S.length - 1])
1228
+ columnRow: E,
1229
+ rowNum: E.length,
1230
+ columnNodeIndex: E.map((k) => k[k.length - 1])
1223
1231
  };
1224
- }), d = w(() => {
1225
- var s, f;
1226
- const u = ((f = (s = n.layoutFormProps) == null ? void 0 : s.fromLayProps) == null ? void 0 : f.minFoldRows) || 0;
1227
- return u > 0 && u < t.value.rowNum;
1228
- }), a = w(() => {
1229
- var S, E;
1230
- const { rowNum: u, columnRow: s } = t.value, f = s[u - 1] || [], C = ((E = (S = n.layoutFormProps) == null ? void 0 : S.fromLayProps) == null ? void 0 : E.btnColSpan) || 0, P = 24 - f.reduce((j, M) => {
1231
- var K;
1232
- return j + (((K = n.formItemList[M]) == null ? void 0 : K.span) || 6);
1232
+ }), r = w(() => {
1233
+ var f, l;
1234
+ const c = ((l = (f = t.layoutFormProps) == null ? void 0 : f.fromLayProps) == null ? void 0 : l.minFoldRows) || 0;
1235
+ return c > 0 && c < o.value.rowNum;
1236
+ }), i = w(() => {
1237
+ var k, H;
1238
+ const { rowNum: c, columnRow: f } = o.value, l = f[c - 1] || [], S = ((H = (k = t.layoutFormProps) == null ? void 0 : k.fromLayProps) == null ? void 0 : H.btnColSpan) || 0, R = 24 - l.reduce((q, W) => {
1239
+ var C;
1240
+ return q + (((C = t.formItemList[W]) == null ? void 0 : C.span) || 6);
1233
1241
  }, 0);
1234
- return !g.value && C <= P ? P : 24;
1235
- }), m = w(() => {
1236
- var f, C;
1237
- const u = ((C = (f = n.layoutFormProps) == null ? void 0 : f.fromLayProps) == null ? void 0 : C.minFoldRows) || 0, { columnNodeIndex: s } = t.value;
1242
+ return !g.value && S <= R ? R : 24;
1243
+ }), d = w(() => {
1244
+ var l, S;
1245
+ const c = ((S = (l = t.layoutFormProps) == null ? void 0 : l.fromLayProps) == null ? void 0 : S.minFoldRows) || 0, { columnNodeIndex: f } = o.value;
1238
1246
  if (g.value) {
1239
- const L = s[u - 1] ?? s[s.length - 1] ?? 9999;
1240
- return n.formItemList.map((P, S) => ({
1241
- ...P,
1242
- isFold: S > L
1247
+ const E = f[c - 1] ?? f[f.length - 1] ?? 9999;
1248
+ return t.formItemList.map((R, k) => ({
1249
+ ...R,
1250
+ isFold: k > E
1243
1251
  }));
1244
1252
  }
1245
- return n.formItemList.map((L) => ({ ...L, isFold: !1 }));
1253
+ return t.formItemList.map((E) => ({ ...E, isFold: !1 }));
1246
1254
  });
1247
- return he(
1248
- d,
1249
- (u) => {
1250
- g.value = u;
1255
+ return be(
1256
+ r,
1257
+ (c) => {
1258
+ g.value = c;
1251
1259
  },
1252
1260
  { immediate: !0 }
1253
1261
  ), {
1254
1262
  folded: g,
1255
1263
  isBtnHidden: h,
1256
1264
  rowLayout: e,
1257
- formLayout: l,
1258
- getSetOptionsStatus: o,
1259
- getRowColsAlgorithm: t,
1260
- isFold: d,
1261
- getBtnColSpan: a,
1262
- formItem: m,
1265
+ formLayout: a,
1266
+ getSetOptionsStatus: n,
1267
+ getRowColsAlgorithm: o,
1268
+ isFold: r,
1269
+ getBtnColSpan: i,
1270
+ formItem: d,
1263
1271
  changeFolded: () => {
1264
1272
  g.value = !g.value;
1265
1273
  }
1266
1274
  };
1267
1275
  }
1268
- function En(n) {
1269
- const g = (d, a = {}, m) => {
1270
- const { success: i, fail: u, ...s } = a || {};
1271
- if (Y(a.apiParams) && Object.keys(a.apiParams).length && a.apiParams.url) {
1272
- const f = { ...d, ...Re(p(a.apiParams.model || {})) }, C = { ...Re(p(a.apiParams.options || {})) };
1273
- a.apiParams.method && (C.method = a.apiParams.method);
1274
- const L = {
1275
- url: a.apiParams.url,
1276
- headers: { ...a.apiParams.headers || {} },
1277
- formParams: f,
1278
- ...C
1279
- }, P = a.httpRequest || n;
1280
- if (!P) return;
1281
- P(L).then((S) => {
1282
- typeof i == "function" && S && (Y(S) || Array.isArray(S)) && i(S);
1283
- }).catch((S) => {
1284
- typeof u == "function" && u(S);
1276
+ function Hn(t) {
1277
+ const g = (r, i = {}, d) => {
1278
+ const { success: y, fail: c, ...f } = i || {};
1279
+ if (oe(i.apiParams) && Object.keys(i.apiParams).length && i.apiParams.url) {
1280
+ const l = { ...r, ...Le(p(i.apiParams.model || {})) }, S = { ...Le(p(i.apiParams.options || {})) };
1281
+ i.apiParams.method && (S.method = i.apiParams.method);
1282
+ const E = {
1283
+ url: i.apiParams.url,
1284
+ headers: { ...i.apiParams.headers || {} },
1285
+ formParams: l,
1286
+ ...S
1287
+ }, R = i.httpRequest || t;
1288
+ if (!R) return;
1289
+ R(E).then((k) => {
1290
+ typeof y == "function" && k && (oe(k) || Array.isArray(k)) && y(k);
1291
+ }).catch((k) => {
1292
+ typeof c == "function" && c(k);
1285
1293
  });
1286
1294
  }
1287
- }, h = (d) => {
1288
- const a = ["total", "pageSize", "current", "listData"];
1289
- return Y(d) ? Object.keys(d).every((m) => a.find((i) => i === m) && d[m] && typeof d[m] == "string") : !1;
1290
- }, e = (d = {}, a) => {
1291
- if (Y(d.configFormOut) && Object.keys(d.configFormOut).length && h(d.configFormOut))
1292
- return d.configFormOut;
1293
- if (typeof a == "function") {
1294
- const m = a({
1295
+ }, h = (r) => {
1296
+ const i = ["total", "pageSize", "current", "listData"];
1297
+ return oe(r) ? Object.keys(r).every((d) => i.find((y) => y === d) && r[d] && typeof r[d] == "string") : !1;
1298
+ }, e = (r = {}, i) => {
1299
+ if (oe(r.configFormOut) && Object.keys(r.configFormOut).length && h(r.configFormOut))
1300
+ return r.configFormOut;
1301
+ if (typeof i == "function") {
1302
+ const d = i({
1295
1303
  total: "records",
1296
1304
  pageSize: "pageSize",
1297
1305
  current: "pageNo",
1298
1306
  listData: "rows"
1299
1307
  });
1300
- if (h(m))
1301
- return m;
1308
+ if (h(d))
1309
+ return d;
1302
1310
  }
1303
1311
  return {
1304
1312
  total: "records",
@@ -1306,34 +1314,34 @@ function En(n) {
1306
1314
  current: "pageNo",
1307
1315
  listData: "rows"
1308
1316
  };
1309
- }, l = (d, a, m = {}, i) => {
1310
- const u = e(m, i), s = {};
1311
- if (a.includes("listData") && Array.isArray(d))
1312
- return s.listData = d, s;
1313
- if (Y(u) && Object.keys(u).length)
1314
- for (const [f, C] of Object.entries(u)) {
1315
- if (a.findIndex((S) => S === f) === -1) continue;
1316
- const P = d[C];
1317
- if (P != null)
1318
- f === "listData" ? s[f] = Array.isArray(P) ? P : [] : s[f] = typeof P == "number" ? P : parseInt(P, 10) || 0;
1317
+ }, a = (r, i, d = {}, y) => {
1318
+ const c = e(d, y), f = {};
1319
+ if (i.includes("listData") && Array.isArray(r))
1320
+ return f.listData = r, f;
1321
+ if (oe(c) && Object.keys(c).length)
1322
+ for (const [l, S] of Object.entries(c)) {
1323
+ if (i.findIndex((k) => k === l) === -1) continue;
1324
+ const R = r[S];
1325
+ if (R != null)
1326
+ l === "listData" ? f[l] = Array.isArray(R) ? R : [] : f[l] = typeof R == "number" ? R : parseInt(R, 10) || 0;
1319
1327
  else {
1320
- const S = dt(d, C);
1321
- f === "listData" ? s[f] = Array.isArray(S) ? S : [] : s[f] = typeof S == "number" ? S : parseInt(S, 10) || 0;
1328
+ const k = yt(r, S);
1329
+ l === "listData" ? f[l] = Array.isArray(k) ? k : [] : f[l] = typeof k == "number" ? k : parseInt(k, 10) || 0;
1322
1330
  }
1323
1331
  }
1324
- return s;
1325
- }, o = (d, a, m, i) => new Promise((u, s) => {
1326
- De(() => {
1332
+ return f;
1333
+ }, n = (r, i, d, y) => new Promise((c, f) => {
1334
+ qe(() => {
1327
1335
  g(
1328
- { pageIndex: 1, pageSize: 1e3, ...d || {} },
1336
+ { pageIndex: 1, pageSize: 1e3, ...r || {} },
1329
1337
  {
1330
- ...a || {},
1331
- success: (f) => {
1332
- const C = l(f, ["total", "listData"], m, i);
1333
- u({ data: f, configRows: C });
1338
+ ...i || {},
1339
+ success: (l) => {
1340
+ const S = a(l, ["total", "listData"], d, y);
1341
+ c({ data: l, configRows: S });
1334
1342
  },
1335
- fail: (f) => {
1336
- s(f);
1343
+ fail: (l) => {
1344
+ f(l);
1337
1345
  }
1338
1346
  }
1339
1347
  );
@@ -1341,94 +1349,94 @@ function En(n) {
1341
1349
  });
1342
1350
  return {
1343
1351
  queryTableListMethod: g,
1344
- getEveryFormQueryField: async (d, a) => {
1352
+ getEveryFormQueryField: async (r, i) => {
1345
1353
  try {
1346
- if (!Array.isArray(d)) return [];
1347
- const m = d.filter((f) => f && f.apiParams && Y(f.apiParams) && f.apiParams.url), i = [], u = m.map((f) => {
1348
- var P, S;
1349
- const { httpRequest: C } = f, L = o(
1350
- { ...((P = f.apiParams) == null ? void 0 : P.model) || {} },
1351
- { httpRequest: C, apiParams: f.apiParams, ...((S = f.apiParams) == null ? void 0 : S.options) || {} },
1352
- f,
1353
- a
1354
+ if (!Array.isArray(r)) return [];
1355
+ const d = r.filter((l) => l && l.apiParams && oe(l.apiParams) && l.apiParams.url), y = [], c = d.map((l) => {
1356
+ var R, k;
1357
+ const { httpRequest: S } = l, E = n(
1358
+ { ...((R = l.apiParams) == null ? void 0 : R.model) || {} },
1359
+ { httpRequest: S, apiParams: l.apiParams, ...((k = l.apiParams) == null ? void 0 : k.options) || {} },
1360
+ l,
1361
+ i
1354
1362
  );
1355
- return In(L);
1363
+ return Pn(E);
1356
1364
  });
1357
- return (await Promise.all(u)).forEach((f, C) => {
1358
- var L;
1359
- if (f.status === "fulfilled") {
1360
- const { configRows: P, data: S } = f.value, E = m[C], j = E == null ? void 0 : E.listenToCallBack;
1361
- let M = [];
1362
- j != null && j.crtn && (M = j.crtn(S));
1363
- const K = Array.isArray(M) && M.length > 0 ? M : typeof (E == null ? void 0 : E.callOptionListFormat) == "function" ? E.callOptionListFormat((P == null ? void 0 : P.listData) || (E == null ? void 0 : E.dataOptions) || []) : void 0;
1364
- i.push({
1365
- prop: m[C].prop,
1366
- listData: Array.isArray(K) ? K : (P == null ? void 0 : P.listData) || ((L = m[C]) == null ? void 0 : L.dataOptions) || []
1365
+ return (await Promise.all(c)).forEach((l, S) => {
1366
+ var E;
1367
+ if (l.status === "fulfilled") {
1368
+ const { configRows: R, data: k } = l.value, H = d[S], q = H == null ? void 0 : H.listenToCallBack;
1369
+ let W = [];
1370
+ q != null && q.crtn && (W = q.crtn(k));
1371
+ const C = Array.isArray(W) && W.length > 0 ? W : typeof (H == null ? void 0 : H.callOptionListFormat) == "function" ? H.callOptionListFormat((R == null ? void 0 : R.listData) || (H == null ? void 0 : H.dataOptions) || []) : void 0;
1372
+ y.push({
1373
+ prop: d[S].prop,
1374
+ listData: Array.isArray(C) ? C : (R == null ? void 0 : R.listData) || ((E = d[S]) == null ? void 0 : E.dataOptions) || []
1367
1375
  });
1368
1376
  }
1369
- }), i;
1377
+ }), y;
1370
1378
  } catch {
1371
1379
  return [];
1372
1380
  }
1373
1381
  },
1374
- formatConfigOut: l,
1382
+ formatConfigOut: a,
1375
1383
  configFormField: e
1376
1384
  };
1377
1385
  }
1378
- const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.body : n instanceof HTMLElement ? n : document.body, Ct = (n, g, h, e) => {
1379
- var t;
1380
- const l = N(n, g);
1386
+ const Dn = (t) => typeof t == "string" ? document.querySelector(t) || document.body : t instanceof HTMLElement ? t : document.body, Pt = (t, g, h, e) => {
1387
+ var o;
1388
+ const a = Y(t, g);
1381
1389
  if (e) {
1382
- l.appContext = e, l.appContext.provides || (l.appContext.provides = {});
1383
- const d = (t = e.provides) == null ? void 0 : t.elLocale;
1384
- d && (l.appContext.provides.elLocale = d), l.appContext.config || (l.appContext.config = {}), l.appContext.config.globalProperties || (l.appContext.config.globalProperties = {});
1390
+ a.appContext = e, a.appContext.provides || (a.appContext.provides = {});
1391
+ const r = (o = e.provides) == null ? void 0 : o.elLocale;
1392
+ r && (a.appContext.provides.elLocale = r), a.appContext.config || (a.appContext.config = {}), a.appContext.config.globalProperties || (a.appContext.config.globalProperties = {});
1385
1393
  }
1386
- return lt(l, h), Tn(g.appendTo).appendChild(h), l;
1387
- }, _e = (n, g = {}) => {
1388
- if (n = n || Le, Object.assign({ onlyInstance: !1 }, g).onlyInstance) {
1389
- const e = ze(), l = (e == null ? void 0 : e.appContext) || null, o = document.createElement("div"), t = () => {
1390
- lt(null, o), o.remove();
1391
- }, d = (a) => {
1392
- a.visible === void 0 && (a.visible = !0);
1393
- const m = a.onClosed, i = a.onSubmit;
1394
- return a.onClosed = (...u) => {
1395
- m == null || m(...u), t();
1396
- }, a.onSubmit = (u = t) => {
1397
- i == null || i(u);
1398
- }, Ct(n, a, o, l);
1394
+ return ut(a, h), Dn(g.appendTo).appendChild(h), a;
1395
+ }, He = (t, g = {}) => {
1396
+ if (t = t || Ae, Object.assign({ onlyInstance: !1 }, g).onlyInstance) {
1397
+ const e = $e(), a = (e == null ? void 0 : e.appContext) || null, n = document.createElement("div"), o = () => {
1398
+ ut(null, n), n.remove();
1399
+ }, r = (i) => {
1400
+ i.visible === void 0 && (i.visible = !0);
1401
+ const d = i.onClosed, y = i.onSubmit;
1402
+ return i.onClosed = (...c) => {
1403
+ d == null || d(...c), o();
1404
+ }, i.onSubmit = (c = o) => {
1405
+ y == null || y(c);
1406
+ }, Pt(t, i, n, a);
1399
1407
  };
1400
- return d.close = t, d;
1408
+ return r.close = o, r;
1401
1409
  } else {
1402
1410
  const e = document.createElement("div");
1403
1411
  e.className = "dialog-containers";
1404
- const l = ze(), o = (l == null ? void 0 : l.appContext) || null;
1405
- let t = null;
1406
- const d = () => {
1407
- t && t.component && (t.component.props.visible = !1);
1408
- }, a = () => {
1409
- t && (lt(null, e), e.remove(), t = null);
1410
- }, m = (i) => {
1411
- if (t && t.component)
1412
- return Object.assign(t.component.props, i), t.component.props.visible = !0, t;
1413
- const u = {
1412
+ const a = $e(), n = (a == null ? void 0 : a.appContext) || null;
1413
+ let o = null;
1414
+ const r = () => {
1415
+ o && o.component && (o.component.props.visible = !1);
1416
+ }, i = () => {
1417
+ o && (ut(null, e), e.remove(), o = null);
1418
+ }, d = (y) => {
1419
+ if (o && o.component)
1420
+ return Object.assign(o.component.props, y), o.component.props.visible = !0, o;
1421
+ const c = {
1414
1422
  visible: !0,
1415
1423
  width: "50%",
1416
1424
  destroyOnClose: !0,
1417
- ...i
1418
- }, { onClosed: s, onSubmit: f } = u;
1419
- return u.onClosed = () => {
1420
- s == null || s(), d();
1421
- }, u.onSubmit = (C = d) => {
1422
- f == null || f(C);
1423
- }, t = Ct(n, u, e, o), t;
1425
+ ...y
1426
+ }, { onClosed: f, onSubmit: l } = c;
1427
+ return c.onClosed = () => {
1428
+ f == null || f(), r();
1429
+ }, c.onSubmit = (S = r) => {
1430
+ l == null || l(S);
1431
+ }, o = Pt(t, c, e, n), o;
1424
1432
  };
1425
- return m.close = d, m.destroy = a, m;
1433
+ return d.close = r, d.destroy = i, d;
1426
1434
  }
1427
- }, Ln = { class: "flex-center" }, Hn = {
1435
+ }, zn = { class: "flex-center" }, _n = {
1428
1436
  key: 0,
1429
1437
  class: "buttonOperate leftRightBtn"
1430
- }, Dn = { class: "btn-left" }, zn = { class: "btn-right" }, _n = { name: "EsForm" }, An = /* @__PURE__ */ ue({
1431
- ..._n,
1438
+ }, Vn = { class: "btn-left" }, An = { class: "btn-right" }, qn = { name: "EsForm" }, $n = /* @__PURE__ */ fe({
1439
+ ...qn,
1432
1440
  props: {
1433
1441
  model: { default: () => ({}) },
1434
1442
  formItemList: { default: () => [] },
@@ -1440,97 +1448,101 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1440
1448
  fieldFieldOutput: {}
1441
1449
  },
1442
1450
  emits: ["confirm", "reset"],
1443
- setup(n, { expose: g, emit: h }) {
1444
- var Ne;
1445
- const e = n, l = ze(), o = Ie("$esPlusForm", {}), t = Ie("getTableInstantce", null), d = w(() => {
1446
- if (t)
1447
- return typeof t == "function" ? t() : t;
1448
- const c = l == null ? void 0 : l.ctx;
1449
- return typeof (c == null ? void 0 : c.getTableInstantce) == "function" ? c == null ? void 0 : c.getTableInstantce() : c == null ? void 0 : c.getTableInstantce;
1450
- }), a = w(() => !!(d.value && Object.keys(d.value).length)), m = Object.fromEntries(Object.entries(rt)), i = (c) => c ? m[c] || c : void 0, u = (c) => {
1451
- const { icon: v, ...y } = c;
1452
- return y;
1453
- }, s = z(null), f = z({}), C = z(e.formItemList), L = (c) => {
1454
- c && (s.value = c);
1455
- }, { formInputComponents: P } = Rn(), S = (o == null ? void 0 : o.$httpRequest) || void 0, E = e.fieldFieldOutput || (o == null ? void 0 : o.fieldFieldOutput), { getEveryFormQueryField: j } = En(S), M = z(((Ne = e.layoutFormProps) == null ? void 0 : Ne.fromLayProps) || {}), K = w(() => ({
1456
- ...M.value,
1451
+ setup(t, { expose: g, emit: h }) {
1452
+ var _e;
1453
+ const e = t, a = $e(), n = ce("$esPlusForm", {}), o = ce("$EsPlus", {}), r = (u) => {
1454
+ if (!u) return !0;
1455
+ const v = o.permission;
1456
+ return typeof v == "function" ? v(u) : !0;
1457
+ }, i = (u) => u.labelKey && typeof o.t == "function" ? o.t(u.labelKey) : u.label, d = ce("getTableInstantce", null), y = w(() => {
1458
+ if (d)
1459
+ return typeof d == "function" ? d() : d;
1460
+ const u = a == null ? void 0 : a.ctx;
1461
+ return typeof (u == null ? void 0 : u.getTableInstantce) == "function" ? u == null ? void 0 : u.getTableInstantce() : u == null ? void 0 : u.getTableInstantce;
1462
+ }), c = w(() => !!(y.value && Object.keys(y.value).length)), f = Object.fromEntries(Object.entries(ft)), l = (u) => u ? f[u] || u : void 0, S = (u) => {
1463
+ const { icon: v, ...m } = u;
1464
+ return m;
1465
+ }, E = V(null), R = V({}), k = V(e.formItemList), H = (u) => {
1466
+ u && (E.value = u);
1467
+ }, { formInputComponents: q } = Ln(), W = (n == null ? void 0 : n.$httpRequest) || void 0, C = e.fieldFieldOutput || (n == null ? void 0 : n.fieldFieldOutput), { getEveryFormQueryField: z } = Hn(W), A = V(((_e = e.layoutFormProps) == null ? void 0 : _e.fromLayProps) || {}), $ = w(() => ({
1468
+ ...A.value,
1457
1469
  model: e.model,
1458
1470
  rules: e.rules,
1459
1471
  validateOnRuleChange: !1
1460
- })), de = z(/* @__PURE__ */ new Set());
1461
- he(
1472
+ })), ee = V(/* @__PURE__ */ new Set());
1473
+ be(
1462
1474
  () => e.formItemList,
1463
- async (c) => {
1464
- const v = Array.isArray(c) ? c : [], y = v.filter((I) => I && I.isInitRun !== !1 && !de.value.has(I.prop));
1465
- if (!y.length) {
1466
- C.value = v.map((I) => {
1467
- var G;
1468
- if (!I) return null;
1469
- const V = C.value.find((xe) => xe && xe.prop === I.prop);
1470
- return (G = V == null ? void 0 : V.dataOptions) != null && G.length ? { ...I, dataOptions: V.dataOptions } : I;
1471
- }).filter((I) => !!I);
1475
+ async (u) => {
1476
+ const v = Array.isArray(u) ? u : [], m = v.filter((F) => F && F.isInitRun !== !1 && !ee.value.has(F.prop));
1477
+ if (!m.length) {
1478
+ k.value = v.map((F) => {
1479
+ var ne;
1480
+ if (!F) return null;
1481
+ const M = k.value.find((Se) => Se && Se.prop === F.prop);
1482
+ return (ne = M == null ? void 0 : M.dataOptions) != null && ne.length ? { ...F, dataOptions: M.dataOptions } : F;
1483
+ }).filter((F) => !!F);
1472
1484
  return;
1473
1485
  }
1474
- const A = await j(y, E);
1475
- y.forEach((I) => de.value.add(I.prop)), C.value = v.map((I) => {
1476
- var xe;
1477
- if (!I) return null;
1478
- const V = A.find((Ce) => Ce && Ce.prop === I.prop), G = C.value.find((Ce) => Ce && Ce.prop === I.prop);
1479
- return V ? { ...I, dataOptions: V.listData } : (xe = G == null ? void 0 : G.dataOptions) != null && xe.length ? { ...I, dataOptions: G.dataOptions } : I;
1480
- }).filter((I) => !!I);
1486
+ const j = await z(m, C);
1487
+ m.forEach((F) => ee.value.add(F.prop)), k.value = v.map((F) => {
1488
+ var Se;
1489
+ if (!F) return null;
1490
+ const M = j.find((Ie) => Ie && Ie.prop === F.prop), ne = k.value.find((Ie) => Ie && Ie.prop === F.prop);
1491
+ return M ? { ...F, dataOptions: M.listData } : (Se = ne == null ? void 0 : ne.dataOptions) != null && Se.length ? { ...F, dataOptions: ne.dataOptions } : F;
1492
+ }).filter((F) => !!F);
1481
1493
  },
1482
1494
  { immediate: !0, deep: !0 }
1483
1495
  );
1484
- const le = w(() => (C.value || []).map((v) => v ? { ...v, span: v.span || 6, dataOptions: v.dataOptions || [] } : null).filter((v) => v ? v.isHidden && typeof v.isHidden == "function" ? !v.isHidden(e.model, v, K.value) : !0 : !1)), {
1485
- folded: Z,
1486
- isBtnHidden: R,
1487
- rowLayout: H,
1488
- formLayout: ve,
1489
- getSetOptionsStatus: ae,
1490
- getRowColsAlgorithm: Q,
1491
- isFold: ye,
1492
- getBtnColSpan: J,
1493
- formItem: be,
1494
- changeFolded: se
1495
- } = Bn({
1496
+ const pe = w(() => (k.value || []).map((v) => v ? { ...v, span: v.span || 6, dataOptions: v.dataOptions || [] } : null).filter((v) => v ? v.isHidden && typeof v.isHidden == "function" ? !v.isHidden(e.model, v, $.value) : !0 : !1)), {
1497
+ folded: O,
1498
+ isBtnHidden: L,
1499
+ rowLayout: Z,
1500
+ formLayout: te,
1501
+ getSetOptionsStatus: N,
1502
+ getRowColsAlgorithm: Pe,
1503
+ isFold: le,
1504
+ getBtnColSpan: ye,
1505
+ formItem: he,
1506
+ changeFolded: xe
1507
+ } = Tn({
1496
1508
  layoutFormProps: e.layoutFormProps,
1497
1509
  get formItemList() {
1498
- return le.value;
1510
+ return pe.value;
1499
1511
  }
1500
1512
  });
1501
- he(
1502
- ve,
1503
- (c) => {
1504
- M.value = c;
1513
+ be(
1514
+ te,
1515
+ (u) => {
1516
+ A.value = u;
1505
1517
  },
1506
1518
  { immediate: !0 }
1507
1519
  );
1508
- const ke = w(() => ({
1509
- colRightBtn: e.configBtn.filter((c) => c.direction === "right" || !c.direction),
1510
- colLeftBtn: e.configBtn.filter((c) => c.direction === "left")
1511
- })), Qe = w(() => typeof e.renderBtn == "function"), We = async (c) => {
1512
- var v, y;
1513
- c.triggerEvent && ["query", "rest"].includes(c.key || "") ? Ge(e.model, s.value, c.key) : (c.key === "rest" && s.value && s.value.resetFields(), (y = c.click) == null || y.call(c, e.model, s.value, (v = d.value) == null ? void 0 : v.httpRequestInstance));
1514
- }, Ge = async (c, v, y) => {
1515
- var A, I, V, G;
1516
- y === "query" ? a.value && ((I = (A = d.value) == null ? void 0 : A.httpRequestInstance) == null || I.call(A, c)) : y === "rest" && v && (a.value && ((G = (V = d.value) == null ? void 0 : V.httpRequestInstance) == null || G.call(V, c)), v.resetFields());
1517
- }, Ye = (c) => {
1518
- if (a.value) {
1519
- const { style: v, ...y } = c;
1520
- return { style: { marginBottom: "10px", ...v }, ...y };
1520
+ const je = w(() => ({
1521
+ colRightBtn: e.configBtn.filter((u) => u.direction === "right" || !u.direction),
1522
+ colLeftBtn: e.configBtn.filter((u) => u.direction === "left")
1523
+ })), Ze = w(() => typeof e.renderBtn == "function"), et = async (u) => {
1524
+ var v, m;
1525
+ u.triggerEvent && ["query", "rest"].includes(u.key || "") ? tt(e.model, E.value, u.key) : (u.key === "rest" && E.value && E.value.resetFields(), (m = u.click) == null || m.call(u, e.model, E.value, (v = y.value) == null ? void 0 : v.httpRequestInstance));
1526
+ }, tt = async (u, v, m) => {
1527
+ var j, F, M, ne;
1528
+ m === "query" ? c.value && ((F = (j = y.value) == null ? void 0 : j.httpRequestInstance) == null || F.call(j, u)) : m === "rest" && v && (c.value && ((ne = (M = y.value) == null ? void 0 : M.httpRequestInstance) == null || ne.call(M, u)), v.resetFields());
1529
+ }, nt = (u) => {
1530
+ if (c.value) {
1531
+ const { style: v, ...m } = u;
1532
+ return { style: { marginBottom: "10px", ...v }, ...m };
1521
1533
  }
1522
- return c;
1523
- }, Ve = (() => {
1524
- var c;
1525
- return (c = l == null ? void 0 : l.ctx) != null && c.dialogInstance ? l.ctx.dialogInstance() : _e;
1526
- })(), Be = Ve(), Je = Ve(), je = () => {
1527
- }, Xe = () => ({
1528
- data: C.value.map((c) => ({
1529
- ...c,
1530
- label: c.label,
1531
- prop: c.prop,
1532
- isHidden: !!c.isHidden,
1533
- width: c.width
1534
+ return u;
1535
+ }, Re = (() => {
1536
+ var u;
1537
+ return (u = a == null ? void 0 : a.ctx) != null && u.dialogInstance ? a.ctx.dialogInstance() : He;
1538
+ })(), ot = Re(), at = Re(), Ue = () => {
1539
+ }, lt = () => ({
1540
+ data: k.value.map((u) => ({
1541
+ ...u,
1542
+ label: u.label,
1543
+ prop: u.prop,
1544
+ isHidden: !!u.isHidden,
1545
+ width: u.width
1534
1546
  })),
1535
1547
  columns: [
1536
1548
  { type: "selection", width: 50 },
@@ -1539,14 +1551,14 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1539
1551
  {
1540
1552
  label: "列宽",
1541
1553
  width: 180,
1542
- render: (c, v) => q("div", [
1543
- q(at, {
1554
+ render: (u, v) => Q("div", [
1555
+ Q(dt, {
1544
1556
  size: "small",
1545
1557
  maxlength: 3,
1546
- formatter: (y) => y.replace(/^0|[^0-9]/g, ""),
1558
+ formatter: (m) => m.replace(/^0|[^0-9]/g, ""),
1547
1559
  modelValue: v.width,
1548
- "onUpdate:modelValue": (y) => {
1549
- v.width = y;
1560
+ "onUpdate:modelValue": (m) => {
1561
+ v.width = m;
1550
1562
  }
1551
1563
  }, {
1552
1564
  prepend: () => "宽度",
@@ -1555,7 +1567,7 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1555
1567
  ])
1556
1568
  }
1557
1569
  ]
1558
- }), Ze = () => ({
1570
+ }), rt = () => ({
1559
1571
  dataSource: [],
1560
1572
  columns: [
1561
1573
  { type: "selection", width: 50 },
@@ -1564,14 +1576,14 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1564
1576
  {
1565
1577
  label: "列宽",
1566
1578
  width: 180,
1567
- render: (c, v) => q("div", [
1568
- q(at, {
1579
+ render: (u, v) => Q("div", [
1580
+ Q(dt, {
1569
1581
  size: "small",
1570
1582
  maxlength: 3,
1571
- formatter: (y) => y.replace(/^0|[^0-9]/g, ""),
1583
+ formatter: (m) => m.replace(/^0|[^0-9]/g, ""),
1572
1584
  modelValue: v.width,
1573
- "onUpdate:modelValue": (y) => {
1574
- v.width = y;
1585
+ "onUpdate:modelValue": (m) => {
1586
+ v.width = m;
1575
1587
  }
1576
1588
  }, {
1577
1589
  prepend: () => "宽度",
@@ -1580,17 +1592,17 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1580
1592
  ])
1581
1593
  }
1582
1594
  ]
1583
- }), qe = () => {
1584
- const c = Xe();
1585
- Be({
1595
+ }), ze = () => {
1596
+ const u = lt();
1597
+ ot({
1586
1598
  title: "自定义查询",
1587
1599
  width: "800px",
1588
1600
  isDraggable: !0,
1589
1601
  render: () => {
1590
1602
  var v;
1591
- return q(oe, {
1592
- dataSource: c.data,
1593
- columns: c.columns,
1603
+ return Q(re, {
1604
+ dataSource: u.data,
1605
+ columns: u.columns,
1594
1606
  options: {
1595
1607
  multiSelect: !0,
1596
1608
  expand: !1,
@@ -1602,7 +1614,7 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1602
1614
  pagination: {
1603
1615
  pageSize: 10,
1604
1616
  current: 1,
1605
- total: ((v = c.data) == null ? void 0 : v.length) || 0
1617
+ total: ((v = u.data) == null ? void 0 : v.length) || 0
1606
1618
  }
1607
1619
  });
1608
1620
  },
@@ -1610,32 +1622,32 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1610
1622
  {
1611
1623
  name: "取消",
1612
1624
  icon: "Close",
1613
- click: (v, { close: y }) => y()
1625
+ click: (v, { close: m }) => m()
1614
1626
  },
1615
1627
  {
1616
1628
  name: "确认",
1617
1629
  type: "primary",
1618
1630
  icon: "Check",
1619
- click: (v, { close: y }) => y()
1631
+ click: (v, { close: m }) => m()
1620
1632
  }
1621
1633
  ]
1622
1634
  });
1623
- }, Ee = () => {
1624
- const c = Ze();
1625
- Je({
1635
+ }, Ne = () => {
1636
+ const u = rt();
1637
+ at({
1626
1638
  title: "自定义表格",
1627
1639
  width: "800px",
1628
- render: () => q(oe, {
1629
- dataSource: c.dataSource,
1630
- columns: c.columns
1640
+ render: () => Q(re, {
1641
+ dataSource: u.dataSource,
1642
+ columns: u.columns
1631
1643
  })
1632
1644
  });
1633
1645
  };
1634
- De(() => {
1635
- var c, v;
1636
- f.value = s.value, (v = (c = l == null ? void 0 : l.ctx) == null ? void 0 : c.bodyFormInstance) == null || v.call(c, f.value);
1646
+ qe(() => {
1647
+ var u, v;
1648
+ R.value = E.value, (v = (u = a == null ? void 0 : a.ctx) == null ? void 0 : u.bodyFormInstance) == null || v.call(u, R.value);
1637
1649
  });
1638
- const et = ue({
1650
+ const st = fe({
1639
1651
  props: {
1640
1652
  row: Object,
1641
1653
  formItemList: Array,
@@ -1643,14 +1655,14 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1643
1655
  render: Function,
1644
1656
  ellipsis: Boolean
1645
1657
  },
1646
- setup(c) {
1658
+ setup(u) {
1647
1659
  return () => {
1648
- var V;
1649
- const { formItemList: v, formModel: y, row: A } = c, I = ((V = c.render) == null ? void 0 : V.call(c, A, y, v, q)) || "";
1650
- return typeof I == "string" ? q("span", I) : I;
1660
+ var M;
1661
+ const { formItemList: v, formModel: m, row: j } = u, F = ((M = u.render) == null ? void 0 : M.call(u, j, m, v, Q)) || "";
1662
+ return typeof F == "string" ? Q("span", F) : F;
1651
1663
  };
1652
1664
  }
1653
- }), $e = ue({
1665
+ }), Me = fe({
1654
1666
  props: {
1655
1667
  row: Object,
1656
1668
  index: Number,
@@ -1659,78 +1671,78 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1659
1671
  model: Object,
1660
1672
  ellipsis: Boolean
1661
1673
  },
1662
- setup(c) {
1674
+ setup(u) {
1663
1675
  return () => {
1664
- var V;
1665
- const { row: v, index: y, model: A } = c, I = ((V = c.render) == null ? void 0 : V.call(c, q, A, { row: v, index: y })) || "";
1666
- return typeof I == "string" ? q("span", I) : I;
1676
+ var M;
1677
+ const { row: v, index: m, model: j } = u, F = ((M = u.render) == null ? void 0 : M.call(u, Q, j, { row: v, index: m })) || "";
1678
+ return typeof F == "string" ? Q("span", F) : F;
1667
1679
  };
1668
1680
  }
1669
- }), tt = async (c) => {
1670
- const y = le.value.filter((I) => I && c.includes(I.prop));
1671
- if (!y.length) return;
1672
- (await j(y, E)).forEach((I) => {
1673
- if (!I) return;
1674
- const V = C.value.findIndex((G) => G && G.prop === I.prop);
1675
- V !== -1 && (C.value[V] = {
1676
- ...C.value[V],
1677
- dataOptions: I.listData
1681
+ }), Ke = async (u) => {
1682
+ const m = pe.value.filter((F) => F && u.includes(F.prop));
1683
+ if (!m.length) return;
1684
+ (await z(m, C)).forEach((F) => {
1685
+ if (!F) return;
1686
+ const M = k.value.findIndex((ne) => ne && ne.prop === F.prop);
1687
+ M !== -1 && (k.value[M] = {
1688
+ ...k.value[M],
1689
+ dataOptions: F.listData
1678
1690
  });
1679
1691
  });
1680
- }, fe = () => s.value;
1692
+ }, Ce = () => E.value;
1681
1693
  return g({
1682
- formItmeRequestInstance: tt,
1683
- getFormRef: fe,
1694
+ formItmeRequestInstance: Ke,
1695
+ getFormRef: Ce,
1684
1696
  validate: () => {
1685
- var c;
1686
- return (c = fe()) == null ? void 0 : c.validate();
1697
+ var u;
1698
+ return (u = Ce()) == null ? void 0 : u.validate();
1687
1699
  },
1688
1700
  resetFields: () => {
1689
- var c;
1690
- return (c = fe()) == null ? void 0 : c.resetFields();
1701
+ var u;
1702
+ return (u = Ce()) == null ? void 0 : u.resetFields();
1691
1703
  },
1692
- clearValidate: (c) => {
1704
+ clearValidate: (u) => {
1693
1705
  var v;
1694
- return (v = fe()) == null ? void 0 : v.clearValidate(c);
1706
+ return (v = Ce()) == null ? void 0 : v.clearValidate(u);
1695
1707
  },
1696
- validateField: (c) => {
1708
+ validateField: (u) => {
1697
1709
  var v;
1698
- return (v = fe()) == null ? void 0 : v.validateField(c);
1710
+ return (v = Ce()) == null ? void 0 : v.validateField(u);
1699
1711
  },
1700
- scrollToField: (c) => {
1712
+ scrollToField: (u) => {
1701
1713
  var v;
1702
- return (v = fe()) == null ? void 0 : v.scrollToField(c);
1714
+ return (v = Ce()) == null ? void 0 : v.scrollToField(u);
1703
1715
  }
1704
- }), (c, v) => (b(), B(p(nn), U({ ref: L }, K.value, { class: "es-form" }), {
1705
- default: F(() => [
1706
- _("div", Ln, [
1707
- N(p(on), Oe(zt(p(H))), {
1708
- default: F(() => [
1709
- (b(!0), D(ee, null, me(p(be), (y, A) => ut((b(), B(p(ht), {
1710
- key: y.prop,
1711
- span: y.span || 6
1716
+ }), (u, v) => (b(), T(p(ln), J({ ref: H }, $.value, { class: "es-form" }), {
1717
+ default: P(() => [
1718
+ U("div", zn, [
1719
+ Y(p(rn), Fe(Bt(p(Z))), {
1720
+ default: P(() => [
1721
+ (b(!0), D(X, null, ge(p(he), (m, j) => gt((b(), T(p(Ct), {
1722
+ key: m.prop,
1723
+ span: m.span || 6
1712
1724
  }, {
1713
- default: F(() => [
1714
- N(p(Ue), U({
1715
- label: y.label
1716
- }, { ref_for: !0 }, Ye(y.formItemOptions || {}), {
1717
- prop: y.prop,
1718
- onClick: _t(() => {
1725
+ default: P(() => [
1726
+ Y(p(Qe), J({
1727
+ label: i(m)
1728
+ }, { ref_for: !0 }, nt(m.formItemOptions || {}), {
1729
+ prop: m.prop,
1730
+ onClick: qt(() => {
1719
1731
  }, ["stop"])
1720
1732
  }), {
1721
- default: F(() => [
1722
- y.formtype ? (b(), B(p($e), {
1733
+ default: P(() => [
1734
+ m.formtype ? (b(), T(p(Me), {
1723
1735
  key: 0,
1724
- row: y,
1725
- render: p(P)(y),
1726
- index: A,
1727
- model: n.model
1728
- }, null, 8, ["row", "render", "index", "model"])) : (b(), B(p($e), {
1736
+ row: m,
1737
+ render: p(q)(m),
1738
+ index: j,
1739
+ model: t.model
1740
+ }, null, 8, ["row", "render", "index", "model"])) : (b(), T(p(Me), {
1729
1741
  key: 1,
1730
- row: y,
1731
- render: y.render,
1732
- index: A,
1733
- model: n.model
1742
+ row: m,
1743
+ render: m.render,
1744
+ index: j,
1745
+ model: t.model
1734
1746
  }, null, 8, ["row", "render", "index", "model"]))
1735
1747
  ]),
1736
1748
  _: 2
@@ -1738,97 +1750,109 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1738
1750
  ]),
1739
1751
  _: 2
1740
1752
  }, 1032, ["span"])), [
1741
- [Pt, !(y != null && y.isFold)]
1753
+ [Lt, !(m != null && m.isFold)]
1742
1754
  ])), 128)),
1743
- p(R) ? W("", !0) : (b(), D(ee, { key: 0 }, [
1744
- Qe.value ? (b(), B(p(et), {
1755
+ p(L) ? G("", !0) : (b(), D(X, { key: 0 }, [
1756
+ Ze.value ? (b(), T(p(st), {
1745
1757
  key: 0,
1746
- row: { isFold: p(ye), folded: p(Z), getBtnColSpan: p(J), getRowColsAlgorithm: p(Q), changeFolded: p(se), refsForm: f.value },
1747
- "form-model": n.model,
1748
- "form-item-list": p(be),
1749
- render: n.renderBtn
1750
- }, null, 8, ["row", "form-model", "form-item-list", "render"])) : (b(), B(p(ht), {
1758
+ row: { isFold: p(le), folded: p(O), getBtnColSpan: p(ye), getRowColsAlgorithm: p(Pe), changeFolded: p(xe), refsForm: R.value },
1759
+ "form-model": t.model,
1760
+ "form-item-list": p(he),
1761
+ render: t.renderBtn
1762
+ }, null, 8, ["row", "form-model", "form-item-list", "render"])) : (b(), T(p(Ct), {
1751
1763
  key: 1,
1752
- span: n.btnColSpanRow ? 24 : p(J)
1764
+ span: t.btnColSpanRow ? 24 : p(ye)
1753
1765
  }, {
1754
- default: F(() => [
1755
- n.btnColSpanRow && n.configBtn.length ? (b(), D("div", Hn, [
1756
- _("div", Dn, [
1757
- N(p(Ue), {
1766
+ default: P(() => [
1767
+ t.btnColSpanRow && t.configBtn.length ? (b(), D("div", _n, [
1768
+ U("div", Vn, [
1769
+ Y(p(Qe), {
1758
1770
  "label-width": "0px",
1759
1771
  class: "btn-formItem"
1760
1772
  }, {
1761
- default: F(() => [
1762
- (b(!0), D(ee, null, me(ke.value.colLeftBtn, (y, A) => (b(), B(p(re), U({ ref_for: !0 }, u(y), {
1763
- icon: i(y.icon),
1764
- disabled: typeof y.disabled == "function" ? y.disabled() || !1 : y.disabled || !1,
1765
- onClick: () => {
1766
- var I;
1767
- return y.click(n.model, s.value, (I = d.value) == null ? void 0 : I.httpRequestInstance);
1768
- },
1769
- key: y.key || A
1770
- }), {
1771
- default: F(() => [
1772
- X(ie(y.name), 1)
1773
- ]),
1774
- _: 2
1775
- }, 1040, ["icon", "disabled", "onClick"]))), 128))
1773
+ default: P(() => [
1774
+ (b(!0), D(X, null, ge(je.value.colLeftBtn, (m, j) => (b(), D(X, {
1775
+ key: m.key || j
1776
+ }, [
1777
+ r(m.permissionValue) ? (b(), T(p(de), J({
1778
+ key: 0,
1779
+ ref_for: !0
1780
+ }, S(m), {
1781
+ icon: l(m.icon),
1782
+ disabled: typeof m.disabled == "function" ? m.disabled() || !1 : m.disabled || !1,
1783
+ onClick: () => {
1784
+ var F;
1785
+ return m.click(t.model, E.value, (F = y.value) == null ? void 0 : F.httpRequestInstance);
1786
+ }
1787
+ }), {
1788
+ default: P(() => [
1789
+ ae(me(m.name), 1)
1790
+ ]),
1791
+ _: 2
1792
+ }, 1040, ["icon", "disabled", "onClick"])) : G("", !0)
1793
+ ], 64))), 128))
1776
1794
  ]),
1777
1795
  _: 1
1778
1796
  })
1779
1797
  ]),
1780
- _("div", zn, [
1781
- N(p(Ue), {
1798
+ U("div", An, [
1799
+ Y(p(Qe), {
1782
1800
  "label-width": "0px",
1783
1801
  class: "btn-formItem"
1784
1802
  }, {
1785
- default: F(() => [
1786
- (b(!0), D(ee, null, me(ke.value.colRightBtn, (y, A) => (b(), B(p(re), U({ ref_for: !0 }, u(y), {
1787
- icon: i(y.icon),
1788
- disabled: typeof y.disabled == "function" ? y.disabled() || !1 : y.disabled || !1,
1789
- onClick: () => We(y),
1790
- key: y.key || A
1791
- }), {
1792
- default: F(() => [
1793
- X(ie(y.name), 1)
1794
- ]),
1795
- _: 2
1796
- }, 1040, ["icon", "disabled", "onClick"]))), 128)),
1797
- p(ye) ? (b(), B(p(re), {
1803
+ default: P(() => [
1804
+ (b(!0), D(X, null, ge(je.value.colRightBtn, (m, j) => (b(), D(X, {
1805
+ key: m.key || j
1806
+ }, [
1807
+ r(m.permissionValue) ? (b(), T(p(de), J({
1808
+ key: 0,
1809
+ ref_for: !0
1810
+ }, S(m), {
1811
+ icon: l(m.icon),
1812
+ disabled: typeof m.disabled == "function" ? m.disabled() || !1 : m.disabled || !1,
1813
+ onClick: () => et(m)
1814
+ }), {
1815
+ default: P(() => [
1816
+ ae(me(m.name), 1)
1817
+ ]),
1818
+ _: 2
1819
+ }, 1040, ["icon", "disabled", "onClick"])) : G("", !0)
1820
+ ], 64))), 128)),
1821
+ p(le) ? (b(), T(p(de), {
1798
1822
  key: 0,
1799
1823
  link: "",
1800
1824
  type: "primary",
1801
- icon: i(p(Z) ? "ArrowDown" : "ArrowUp"),
1825
+ icon: l(p(O) ? "ArrowDown" : "ArrowUp"),
1802
1826
  style: { "padding-left": "0", border: "none" },
1803
- onClick: p(se)
1827
+ onClick: p(xe)
1804
1828
  }, {
1805
- default: F(() => [
1806
- X(ie(p(Z) ? "展开" : "收起"), 1)
1829
+ default: P(() => [
1830
+ ae(me(p(O) ? "展开" : "收起"), 1)
1807
1831
  ]),
1808
1832
  _: 1
1809
- }, 8, ["icon", "onClick"])) : W("", !0),
1810
- p(ae) ? (b(), B(p(vt), {
1833
+ }, 8, ["icon", "onClick"])) : G("", !0),
1834
+ p(N) ? (b(), T(p(St), {
1811
1835
  key: 1,
1812
1836
  placement: "bottom-start"
1813
1837
  }, {
1814
- dropdown: F(() => [
1815
- N(p(bt), null, {
1816
- default: F(() => [
1817
- N(p(Pe), { onClick: qe }, {
1818
- default: F(() => [...v[0] || (v[0] = [
1819
- X("自定义查询", -1)
1838
+ dropdown: P(() => [
1839
+ Y(p(It), null, {
1840
+ default: P(() => [
1841
+ Y(p(Be), { onClick: ze }, {
1842
+ default: P(() => [...v[0] || (v[0] = [
1843
+ ae("自定义查询", -1)
1820
1844
  ])]),
1821
1845
  _: 1
1822
1846
  }),
1823
- N(p(Pe), { onClick: Ee }, {
1824
- default: F(() => [...v[1] || (v[1] = [
1825
- X("自定义表格", -1)
1847
+ Y(p(Be), { onClick: Ne }, {
1848
+ default: P(() => [...v[1] || (v[1] = [
1849
+ ae("自定义表格", -1)
1826
1850
  ])]),
1827
1851
  _: 1
1828
1852
  }),
1829
- N(p(Pe), { onClick: je }, {
1830
- default: F(() => [...v[2] || (v[2] = [
1831
- X("重置(刷新)", -1)
1853
+ Y(p(Be), { onClick: Ue }, {
1854
+ default: P(() => [...v[2] || (v[2] = [
1855
+ ae("重置(刷新)", -1)
1832
1856
  ])]),
1833
1857
  _: 1
1834
1858
  })
@@ -1836,81 +1860,87 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1836
1860
  _: 1
1837
1861
  })
1838
1862
  ]),
1839
- default: F(() => [
1840
- N(p(re), {
1863
+ default: P(() => [
1864
+ Y(p(de), {
1841
1865
  link: "",
1842
1866
  type: "primary",
1843
1867
  style: { "margin-left": "2px", "margin-right": "5px", outline: "none" },
1844
- icon: i("Tools")
1868
+ icon: l("Tools")
1845
1869
  }, null, 8, ["icon"])
1846
1870
  ]),
1847
1871
  _: 1
1848
- })) : W("", !0)
1872
+ })) : G("", !0)
1849
1873
  ]),
1850
1874
  _: 1
1851
1875
  })
1852
1876
  ])
1853
- ])) : W("", !0),
1854
- !n.btnColSpanRow && n.configBtn.length ? (b(), B(p(Ue), {
1877
+ ])) : G("", !0),
1878
+ !t.btnColSpanRow && t.configBtn.length ? (b(), T(p(Qe), {
1855
1879
  key: 1,
1856
1880
  label: " ",
1857
- "label-width": K.value.labelBtnWidth ? K.value.labelBtnWidth : K.value.labelWidth,
1858
- class: ct([{ formItemCols: n.btnColSpanRow ? !0 : p(J) === 24 }, "btn-formItem"])
1881
+ "label-width": $.value.labelBtnWidth ? $.value.labelBtnWidth : $.value.labelWidth,
1882
+ class: mt([{ formItemCols: t.btnColSpanRow ? !0 : p(ye) === 24 }, "btn-formItem"])
1859
1883
  }, {
1860
- default: F(() => [
1861
- _("div", {
1884
+ default: P(() => [
1885
+ U("div", {
1862
1886
  class: "buttonOperate",
1863
- style: ge({ "text-align": p(J) === 24 ? "right" : "left" })
1887
+ style: ke({ "text-align": p(ye) === 24 ? "right" : "left" })
1864
1888
  }, [
1865
- n.configBtn.length ? (b(!0), D(ee, { key: 0 }, me(n.configBtn, (y, A) => (b(), B(p(re), U({ ref_for: !0 }, u(y), {
1866
- icon: i(y.icon),
1867
- disabled: typeof y.disabled == "function" ? y.disabled() || !1 : y.disabled || !1,
1868
- onClick: () => {
1869
- var I;
1870
- return y == null ? void 0 : y.click(n.model, s.value, (I = d.value) == null ? void 0 : I.httpRequestInstance);
1871
- },
1872
- key: y.key || A
1873
- }), {
1874
- default: F(() => [
1875
- X(ie(y.name), 1)
1876
- ]),
1877
- _: 2
1878
- }, 1040, ["icon", "disabled", "onClick"]))), 128)) : W("", !0),
1879
- p(ye) ? (b(), B(p(re), {
1889
+ t.configBtn.length ? (b(!0), D(X, { key: 0 }, ge(t.configBtn, (m, j) => (b(), D(X, {
1890
+ key: m.key || j
1891
+ }, [
1892
+ r(m.permissionValue) ? (b(), T(p(de), J({
1893
+ key: 0,
1894
+ ref_for: !0
1895
+ }, S(m), {
1896
+ icon: l(m.icon),
1897
+ disabled: typeof m.disabled == "function" ? m.disabled() || !1 : m.disabled || !1,
1898
+ onClick: () => {
1899
+ var F;
1900
+ return m == null ? void 0 : m.click(t.model, E.value, (F = y.value) == null ? void 0 : F.httpRequestInstance);
1901
+ }
1902
+ }), {
1903
+ default: P(() => [
1904
+ ae(me(m.name), 1)
1905
+ ]),
1906
+ _: 2
1907
+ }, 1040, ["icon", "disabled", "onClick"])) : G("", !0)
1908
+ ], 64))), 128)) : G("", !0),
1909
+ p(le) ? (b(), T(p(de), {
1880
1910
  key: 1,
1881
1911
  type: "primary",
1882
1912
  link: "",
1883
- icon: i(p(Z) ? "ArrowDown" : "ArrowUp"),
1913
+ icon: l(p(O) ? "ArrowDown" : "ArrowUp"),
1884
1914
  style: { "padding-left": "0", border: "none" },
1885
- onClick: p(se)
1915
+ onClick: p(xe)
1886
1916
  }, {
1887
- default: F(() => [
1888
- X(ie(p(Z) ? "展开" : "收起"), 1)
1917
+ default: P(() => [
1918
+ ae(me(p(O) ? "展开" : "收起"), 1)
1889
1919
  ]),
1890
1920
  _: 1
1891
- }, 8, ["icon", "onClick"])) : W("", !0),
1892
- p(ae) ? (b(), B(p(vt), {
1921
+ }, 8, ["icon", "onClick"])) : G("", !0),
1922
+ p(N) ? (b(), T(p(St), {
1893
1923
  key: 2,
1894
1924
  placement: "bottom-start"
1895
1925
  }, {
1896
- dropdown: F(() => [
1897
- N(p(bt), null, {
1898
- default: F(() => [
1899
- N(p(Pe), { onClick: qe }, {
1900
- default: F(() => [...v[3] || (v[3] = [
1901
- X("自定义查询", -1)
1926
+ dropdown: P(() => [
1927
+ Y(p(It), null, {
1928
+ default: P(() => [
1929
+ Y(p(Be), { onClick: ze }, {
1930
+ default: P(() => [...v[3] || (v[3] = [
1931
+ ae("自定义查询", -1)
1902
1932
  ])]),
1903
1933
  _: 1
1904
1934
  }),
1905
- N(p(Pe), { onClick: Ee }, {
1906
- default: F(() => [...v[4] || (v[4] = [
1907
- X("自定义表格", -1)
1935
+ Y(p(Be), { onClick: Ne }, {
1936
+ default: P(() => [...v[4] || (v[4] = [
1937
+ ae("自定义表格", -1)
1908
1938
  ])]),
1909
1939
  _: 1
1910
1940
  }),
1911
- N(p(Pe), { onClick: je }, {
1912
- default: F(() => [...v[5] || (v[5] = [
1913
- X("重置(刷新)", -1)
1941
+ Y(p(Be), { onClick: Ue }, {
1942
+ default: P(() => [...v[5] || (v[5] = [
1943
+ ae("重置(刷新)", -1)
1914
1944
  ])]),
1915
1945
  _: 1
1916
1946
  })
@@ -1918,20 +1948,20 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1918
1948
  _: 1
1919
1949
  })
1920
1950
  ]),
1921
- default: F(() => [
1922
- N(p(re), {
1951
+ default: P(() => [
1952
+ Y(p(de), {
1923
1953
  link: "",
1924
1954
  type: "primary",
1925
1955
  style: { "margin-left": "2px", "margin-right": "5px", outline: "none" },
1926
- icon: i("Tools")
1956
+ icon: l("Tools")
1927
1957
  }, null, 8, ["icon"])
1928
1958
  ]),
1929
1959
  _: 1
1930
- })) : W("", !0)
1960
+ })) : G("", !0)
1931
1961
  ], 4)
1932
1962
  ]),
1933
1963
  _: 1
1934
- }, 8, ["label-width", "class"])) : W("", !0)
1964
+ }, 8, ["label-width", "class"])) : G("", !0)
1935
1965
  ]),
1936
1966
  _: 1
1937
1967
  }, 8, ["span"]))
@@ -1944,23 +1974,23 @@ const Tn = (n) => typeof n == "string" ? document.querySelector(n) || document.b
1944
1974
  _: 1
1945
1975
  }, 16));
1946
1976
  }
1947
- }), ce = /* @__PURE__ */ Ae(An, [["__scopeId", "data-v-5bcb00c5"]]);
1948
- ce.install = function(n) {
1949
- n.component(ce.name, ce);
1977
+ }), ue = /* @__PURE__ */ De($n, [["__scopeId", "data-v-4a516856"]]);
1978
+ ue.install = function(t) {
1979
+ t.component(ue.name, ue);
1950
1980
  };
1951
- ce.isPlugin = !0;
1952
- ce.Plugin = {
1953
- install(n, g = {}) {
1954
- n.provide("$esPlusForm", {
1981
+ ue.isPlugin = !0;
1982
+ ue.Plugin = {
1983
+ install(t, g = {}) {
1984
+ t.provide("$esPlusForm", {
1955
1985
  ...g.methods,
1956
- useDialog: () => _e()
1957
- }), n.component(ce.name, { ...ce, methods: { ...ce.methods, ...g.methods || {}, useDialog: () => _e() } });
1986
+ useDialog: () => He()
1987
+ }), t.component(ue.name, { ...ue, methods: { ...ue.methods, ...g.methods || {}, useDialog: () => He() } });
1958
1988
  }
1959
1989
  };
1960
- const Vn = { class: "dp-dialog_wrapper" }, jn = { class: "dialog-title" }, qn = { class: "btns" }, $n = {
1990
+ const jn = { class: "dp-dialog_wrapper" }, Un = { class: "dialog-title" }, Nn = { class: "btns" }, Mn = {
1961
1991
  key: 0,
1962
1992
  class: "dialog-footer"
1963
- }, Nn = /* @__PURE__ */ ue({
1993
+ }, Kn = /* @__PURE__ */ fe({
1964
1994
  __name: "component",
1965
1995
  props: {
1966
1996
  title: {},
@@ -1980,131 +2010,141 @@ const Vn = { class: "dp-dialog_wrapper" }, jn = { class: "dialog-title" }, qn =
1980
2010
  fullscreen: { type: Boolean }
1981
2011
  },
1982
2012
  emits: ["update:visible", "closed", "submit"],
1983
- setup(n, { emit: g }) {
1984
- const h = n, e = g, l = wt(), o = ze(), t = Ft(), d = Object.fromEntries(Object.entries(rt).map(([H]) => [H, rt[H]])), a = z(null), m = It({}), i = z(!1), u = o, s = z(Te), f = Ie("elLocale", null);
1985
- f && (s.value = f), ot("elLocale", s.value);
1986
- const C = (H) => H ? d[H] || H : void 0, L = (H) => {
1987
- const { icon: ve, ...ae } = H;
1988
- return ae;
1989
- }, P = () => {
2013
+ setup(t, { emit: g }) {
2014
+ const h = t, e = g, a = Ot(), n = $e(), o = Et(), r = Object.fromEntries(Object.entries(ft).map(([L]) => [L, ft[L]])), i = V(null), d = Je({}), y = V(!1), c = n, f = V(Ve), l = ce("$EsPlus", {}), S = (L) => {
2015
+ if (!L) return !0;
2016
+ const Z = l.permission;
2017
+ return typeof Z == "function" ? Z(L) : !0;
2018
+ }, E = ce("elLocale", null);
2019
+ E && (f.value = E), ct("elLocale", f.value);
2020
+ const R = (L) => L ? r[L] || L : void 0, k = (L) => {
2021
+ const { icon: Z, ...te } = L;
2022
+ return te;
2023
+ }, H = () => {
1990
2024
  setTimeout(() => {
1991
- i.value && (i.value = !1);
2025
+ y.value && (y.value = !1);
1992
2026
  }, 500);
1993
- }, S = () => {
1994
- t != null && t.fullscreen || (i.value = !i.value);
1995
- }, E = () => {
1996
- e("closed", !1), P();
1997
- }, j = () => {
1998
- e("closed", !1), P();
1999
- }, M = w(() => {
2000
- const { ...H } = t;
2001
- return H;
2002
- }), K = w(() => i.value ? "dialogFull" : h.maxHeight ? "dialogShadow" : "dialogAuto"), de = () => {
2003
- const H = window.innerHeight;
2004
- return Math.max(H - 135, 200);
2005
- }, le = w(() => {
2006
- const H = de();
2007
- return i.value ? { height: H + "px" } : h.maxHeight ? { maxHeight: typeof h.maxHeight == "number" ? `${h.maxHeight}px` : h.maxHeight } : { maxHeight: H + "px" };
2008
- }), Z = w({
2027
+ }, q = () => {
2028
+ o != null && o.fullscreen || (y.value = !y.value);
2029
+ }, W = () => {
2030
+ e("closed", !1), H();
2031
+ }, C = () => {
2032
+ e("closed", !1), H();
2033
+ }, z = w(() => {
2034
+ const { ...L } = o;
2035
+ return L;
2036
+ }), A = w(() => y.value ? "dialogFull" : h.maxHeight ? "dialogShadow" : "dialogAuto"), $ = () => {
2037
+ const L = window.innerHeight;
2038
+ return Math.max(L - 135, 200);
2039
+ }, ee = w(() => {
2040
+ const L = $();
2041
+ return y.value ? { height: L + "px" } : h.maxHeight ? { maxHeight: typeof h.maxHeight == "number" ? `${h.maxHeight}px` : h.maxHeight } : { maxHeight: L + "px" };
2042
+ }), pe = w({
2009
2043
  get: () => h.visible || !1,
2010
- set: (H) => {
2011
- e("update:visible", H), H || (e("closed", H), P());
2044
+ set: (L) => {
2045
+ e("update:visible", L), L || (e("closed", L), H());
2012
2046
  }
2013
- }), R = w(() => ({
2014
- renderBodyRefs: m.currentRef,
2015
- renderBodyRefsObject: m,
2016
- lyFormInstance: a,
2017
- dialogInstance: u,
2018
- getRefs: () => m
2047
+ }), O = w(() => ({
2048
+ renderBodyRefs: d.currentRef,
2049
+ renderBodyRefsObject: d,
2050
+ lyFormInstance: i,
2051
+ dialogInstance: c,
2052
+ getRefs: () => d
2019
2053
  }));
2020
- return ot("bodyFormInstance", (H) => {
2021
- a.value = H;
2022
- }), o && (o.exposed = {
2023
- closed: E
2024
- }), (H, ve) => {
2025
- var ae;
2026
- return b(), D("div", Vn, [
2027
- N(p(ln), U({
2028
- class: ["dg-dialog", K.value]
2029
- }, M.value, {
2030
- modelValue: Z.value,
2031
- "onUpdate:modelValue": ve[0] || (ve[0] = (Q) => Z.value = Q),
2054
+ return ct("bodyFormInstance", (L) => {
2055
+ i.value = L;
2056
+ }), n && (n.exposed = {
2057
+ closed: W
2058
+ }), (L, Z) => {
2059
+ var te;
2060
+ return b(), D("div", jn, [
2061
+ Y(p(sn), J({
2062
+ class: ["dg-dialog", A.value]
2063
+ }, z.value, {
2064
+ modelValue: pe.value,
2065
+ "onUpdate:modelValue": Z[0] || (Z[0] = (N) => pe.value = N),
2032
2066
  draggable: h.isDraggable,
2033
2067
  width: h.width,
2034
2068
  "show-close": !1,
2035
- onClose: j,
2036
- fullscreen: ((ae = M.value) == null ? void 0 : ae.fullscreen) ?? i.value
2037
- }), it({
2038
- header: F(() => [
2039
- h.renderHeader ? (b(), B(nt, {
2069
+ onClose: C,
2070
+ fullscreen: ((te = z.value) == null ? void 0 : te.fullscreen) ?? y.value
2071
+ }), Xe({
2072
+ header: P(() => [
2073
+ h.renderHeader ? (b(), T(it, {
2040
2074
  key: 0,
2041
2075
  render: h.renderHeader,
2042
- instance: R.value
2043
- }, null, 8, ["render", "instance"])) : (b(), D(ee, { key: 1 }, [
2044
- _("div", null, [
2045
- _("span", jn, ie(h.title), 1)
2076
+ instance: O.value
2077
+ }, null, 8, ["render", "instance"])) : (b(), D(X, { key: 1 }, [
2078
+ U("div", null, [
2079
+ U("span", Un, me(h.title), 1)
2046
2080
  ]),
2047
- _("div", qn, [
2048
- ut(N(p(kt), { onClick: S }, {
2049
- default: F(() => [
2050
- i.value ? (b(), B(p(rn), { key: 1 })) : (b(), B(p(an), { key: 0 }))
2081
+ U("div", Nn, [
2082
+ gt(Y(p(wt), { onClick: q }, {
2083
+ default: P(() => [
2084
+ y.value ? (b(), T(p(un), { key: 1 })) : (b(), T(p(cn), { key: 0 }))
2051
2085
  ]),
2052
2086
  _: 1
2053
2087
  }, 512), [
2054
- [Pt, !h.hiddenFullBtn]
2088
+ [Lt, !h.hiddenFullBtn]
2055
2089
  ]),
2056
- N(p(kt), { onClick: E }, {
2057
- default: F(() => [
2058
- N(p(sn))
2090
+ Y(p(wt), { onClick: W }, {
2091
+ default: P(() => [
2092
+ Y(p(dn))
2059
2093
  ]),
2060
2094
  _: 1
2061
2095
  })
2062
2096
  ])
2063
2097
  ], 64))
2064
2098
  ]),
2065
- default: F(() => [
2066
- _("div", {
2099
+ default: P(() => [
2100
+ U("div", {
2067
2101
  class: "dialog_body_layouts",
2068
- style: ge(le.value)
2102
+ style: ke(ee.value)
2069
2103
  }, [
2070
- h.render && typeof h.render == "function" ? (b(), B(nt, {
2104
+ h.render && typeof h.render == "function" ? (b(), T(it, {
2071
2105
  key: 0,
2072
- refs: m,
2073
- instance: R.value,
2106
+ refs: d,
2107
+ instance: O.value,
2074
2108
  render: h.render,
2075
- components: { EsTable: p(oe), EsForm: p(ce) },
2076
- locale: s.value
2077
- }, null, 8, ["refs", "instance", "render", "components", "locale"])) : W("", !0)
2109
+ components: { EsTable: p(re), EsForm: p(ue) },
2110
+ locale: f.value
2111
+ }, null, 8, ["refs", "instance", "render", "components", "locale"])) : G("", !0)
2078
2112
  ], 4)
2079
2113
  ]),
2080
2114
  _: 2
2081
2115
  }, [
2082
- p(t).isHiddenFooter ? void 0 : {
2116
+ p(o).isHiddenFooter ? void 0 : {
2083
2117
  name: "footer",
2084
- fn: F(() => [
2085
- l.footer ? He(H.$slots, "footer", { key: 1 }, void 0, !0) : (b(), D("span", $n, [
2086
- h.renderFooter && typeof h.renderFooter == "function" ? (b(), B(nt, {
2118
+ fn: P(() => [
2119
+ a.footer ? Te(L.$slots, "footer", { key: 1 }, void 0, !0) : (b(), D("span", Mn, [
2120
+ h.renderFooter && typeof h.renderFooter == "function" ? (b(), T(it, {
2087
2121
  key: 0,
2088
2122
  render: h.renderFooter,
2089
- instance: R.value
2090
- }, null, 8, ["render", "instance"])) : h.configBtn && h.configBtn.length ? (b(!0), D(ee, { key: 1 }, me(n.configBtn, (Q, ye) => (b(), B(p(re), U({ size: "small" }, { ref_for: !0 }, L(Q), {
2091
- icon: C(Q.icon),
2092
- disabled: typeof Q.disabled == "function" ? Q.disabled() : Q.disabled || !1,
2093
- onClick: () => {
2094
- var J;
2095
- (J = Q.click) == null || J.call(Q, m.currentRef, {
2096
- close: E,
2097
- getRefs: (be) => be ? m[be] || null : m,
2098
- dialogInstance: p(u)
2099
- });
2100
- },
2101
- key: Q.key || ye
2102
- }), {
2103
- default: F(() => [
2104
- X(ie(Q.name), 1)
2105
- ]),
2106
- _: 2
2107
- }, 1040, ["icon", "disabled", "onClick"]))), 128)) : W("", !0)
2123
+ instance: O.value
2124
+ }, null, 8, ["render", "instance"])) : h.configBtn && h.configBtn.length ? (b(!0), D(X, { key: 1 }, ge(t.configBtn, (N, Pe) => (b(), D(X, {
2125
+ key: N.key || Pe
2126
+ }, [
2127
+ S(N.permissionValue) ? (b(), T(p(de), J({
2128
+ key: 0,
2129
+ size: "small"
2130
+ }, { ref_for: !0 }, k(N), {
2131
+ icon: R(N.icon),
2132
+ disabled: typeof N.disabled == "function" ? N.disabled() : N.disabled || !1,
2133
+ onClick: () => {
2134
+ var le;
2135
+ (le = N.click) == null || le.call(N, d.currentRef, {
2136
+ close: W,
2137
+ getRefs: (ye) => ye ? d[ye] || null : d,
2138
+ dialogInstance: p(c)
2139
+ });
2140
+ }
2141
+ }), {
2142
+ default: P(() => [
2143
+ ae(me(N.name), 1)
2144
+ ]),
2145
+ _: 2
2146
+ }, 1040, ["icon", "disabled", "onClick"])) : G("", !0)
2147
+ ], 64))), 128)) : G("", !0)
2108
2148
  ]))
2109
2149
  ]),
2110
2150
  key: "0"
@@ -2113,57 +2153,222 @@ const Vn = { class: "dp-dialog_wrapper" }, jn = { class: "dialog-title" }, qn =
2113
2153
  ]);
2114
2154
  };
2115
2155
  }
2116
- }), Le = /* @__PURE__ */ Ae(Nn, [["__scopeId", "data-v-857351a8"]]);
2117
- Le.install = function(n) {
2118
- n.component(Le.name, Le);
2156
+ }), Ae = /* @__PURE__ */ De(Kn, [["__scopeId", "data-v-cf3f1ce4"]]);
2157
+ Ae.install = function(t) {
2158
+ t.component(Ae.name, Ae);
2159
+ };
2160
+ const Qn = { class: "es-crud-page" }, Wn = /* @__PURE__ */ fe({
2161
+ name: "EsCrudPage",
2162
+ __name: "es-crud-page",
2163
+ props: {
2164
+ schema: {},
2165
+ httpRequest: {},
2166
+ autoLoad: { type: Boolean, default: !0 }
2167
+ },
2168
+ emits: ["query", "add", "edit", "delete", "view", "export", "row-click", "btn-click"],
2169
+ setup(t, { expose: g, emit: h }) {
2170
+ const e = t, a = h, n = V(null), o = V(null), r = V([]), i = Je({});
2171
+ be(
2172
+ () => e.schema.formItems,
2173
+ (C) => {
2174
+ C && C.forEach((z) => {
2175
+ z.prop && !(z.prop in i) && (i[z.prop] = "");
2176
+ });
2177
+ },
2178
+ { immediate: !0 }
2179
+ );
2180
+ const d = V({
2181
+ current: 1,
2182
+ pageSize: 10,
2183
+ total: 0,
2184
+ ...e.schema.pagination || {}
2185
+ }), y = w(() => e.schema.actions || ["add", "edit", "delete"]), c = w(() => {
2186
+ if (e.schema.queryBtns) return e.schema.queryBtns;
2187
+ const C = [
2188
+ { name: "查询", type: "primary", key: "query", triggerEvent: !0 },
2189
+ { name: "重置", key: "rest", triggerEvent: !0 }
2190
+ ];
2191
+ return y.value.includes("add") && C.push({
2192
+ name: "新增",
2193
+ type: "primary",
2194
+ key: "add",
2195
+ icon: "Plus",
2196
+ click: () => S()
2197
+ }), y.value.includes("export") && C.push({
2198
+ name: "导出",
2199
+ key: "export",
2200
+ icon: "Download",
2201
+ click: () => a("export", { ...i })
2202
+ }), C;
2203
+ }), f = w(() => {
2204
+ const C = [...e.schema.columns || []];
2205
+ if (!C.some((A) => A.prop === "action" || A.btns) && y.value.some((A) => ["edit", "delete", "view"].includes(A))) {
2206
+ const A = [];
2207
+ y.value.includes("view") && A.push({ name: "查看", type: "primary", clickEvent: ($) => k($) }), y.value.includes("edit") && A.push({ name: "编辑", type: "primary", clickEvent: ($) => E($) }), y.value.includes("delete") && A.push({ name: "删除", type: "danger", clickEvent: ($) => R($) }), C.push({
2208
+ prop: "action",
2209
+ label: "操作",
2210
+ width: A.length * 80 + 20,
2211
+ fixed: "right",
2212
+ btns: A
2213
+ });
2214
+ }
2215
+ return C;
2216
+ }), l = w(() => {
2217
+ const C = {
2218
+ border: !0,
2219
+ isInitRun: e.autoLoad,
2220
+ ...e.schema.tableOptions || {}
2221
+ };
2222
+ return e.httpRequest && (C.httpRequest = e.httpRequest), C.httpRequest && typeof C.httpRequest == "function" && !C.apiParams && !C.actionUrl && (C.apiParams = { url: "/crud-page", method: "GET" }), C;
2223
+ });
2224
+ function S() {
2225
+ var C;
2226
+ (C = e.schema.dialogFormItems) != null && C.length && H("新增", {}), a("add");
2227
+ }
2228
+ function E(C) {
2229
+ var z;
2230
+ (z = e.schema.dialogFormItems) != null && z.length && H("编辑", { ...C }), a("edit", C);
2231
+ }
2232
+ function R(C) {
2233
+ a("delete", C);
2234
+ }
2235
+ function k(C) {
2236
+ a("view", C);
2237
+ }
2238
+ function H(C, z) {
2239
+ var pe, O;
2240
+ const A = He(), $ = Je({});
2241
+ (pe = e.schema.dialogFormItems) == null || pe.forEach((L) => {
2242
+ L.prop && ($[L.prop] = z[L.prop] ?? "");
2243
+ });
2244
+ const ee = ((O = e.schema.dialogOptions) == null ? void 0 : O.width) || "600px";
2245
+ A({
2246
+ title: C,
2247
+ width: ee,
2248
+ ...e.schema.dialogOptions || {},
2249
+ render: (L, { registerRef: Z }) => L(ue, {
2250
+ ref: (te) => te && Z("dialogForm", te),
2251
+ model: $,
2252
+ formItemList: e.schema.dialogFormItems,
2253
+ layoutFormProps: {
2254
+ rowLayProps: { gutter: 16 },
2255
+ fromLayProps: { isBtnHidden: !0 }
2256
+ }
2257
+ }),
2258
+ configBtn: [
2259
+ {
2260
+ name: "取消",
2261
+ click: (L, { close: Z }) => Z()
2262
+ },
2263
+ {
2264
+ name: "确定",
2265
+ type: "primary",
2266
+ click: async (L, { close: Z, getRefs: te }) => {
2267
+ const N = te("dialogForm");
2268
+ N != null && N.validate && await N.validate(), a("btn-click", C === "新增" ? "add-confirm" : "edit-confirm", $), Z(), q();
2269
+ }
2270
+ }
2271
+ ]
2272
+ });
2273
+ }
2274
+ function q() {
2275
+ var C, z;
2276
+ (z = (C = n.value) == null ? void 0 : C.httpRequestInstance) == null || z.call(C);
2277
+ }
2278
+ function W() {
2279
+ var C, z;
2280
+ return ((z = (C = n.value) == null ? void 0 : C.getSelectionRows) == null ? void 0 : z.call(C)) || [];
2281
+ }
2282
+ return g({
2283
+ refresh: q,
2284
+ getSelectedRows: W,
2285
+ tableRef: n,
2286
+ formRef: o,
2287
+ queryModel: i
2288
+ }), (C, z) => (b(), D("div", Qn, [
2289
+ Y(re, J({
2290
+ ref_key: "tableRef",
2291
+ ref: n,
2292
+ columns: f.value,
2293
+ options: l.value,
2294
+ "data-source": r.value,
2295
+ "onUpdate:dataSource": z[0] || (z[0] = (A) => r.value = A),
2296
+ pagination: d.value,
2297
+ "onUpdate:pagination": z[1] || (z[1] = (A) => d.value = A)
2298
+ }, C.$attrs), Xe({
2299
+ default: P(() => [
2300
+ t.schema.formItems && t.schema.formItems.length ? (b(), T(ue, {
2301
+ key: 0,
2302
+ ref_key: "formRef",
2303
+ ref: o,
2304
+ model: i,
2305
+ "form-item-list": t.schema.formItems,
2306
+ "config-btn": c.value
2307
+ }, null, 8, ["model", "form-item-list", "config-btn"])) : G("", !0)
2308
+ ]),
2309
+ _: 2
2310
+ }, [
2311
+ ge(C.$slots, (A, $) => ({
2312
+ name: $,
2313
+ fn: P((ee) => [
2314
+ Te(C.$slots, $, Fe(Bt(ee || {})), void 0, !0)
2315
+ ])
2316
+ }))
2317
+ ]), 1040, ["columns", "options", "data-source", "pagination"])
2318
+ ]));
2319
+ }
2320
+ }), Ge = /* @__PURE__ */ De(Wn, [["__scopeId", "data-v-7a9de7fc"]]);
2321
+ Ge.install = function(t) {
2322
+ t.component(Ge.name, Ge);
2119
2323
  };
2120
- const Un = ["xlink:href"], Mn = /* @__PURE__ */ ue({
2324
+ const Gn = ["xlink:href"], Yn = /* @__PURE__ */ fe({
2121
2325
  __name: "svg-icon",
2122
2326
  props: {
2123
2327
  iconClass: {},
2124
2328
  className: {}
2125
2329
  },
2126
- setup(n) {
2127
- const g = n, h = w(() => t(g.iconClass)), e = w(() => `#icon-${g.iconClass}`), l = w(() => g.className ? "svg-icon " + g.className : "svg-icon"), o = w(() => ({
2330
+ setup(t) {
2331
+ const g = t, h = w(() => o(g.iconClass)), e = w(() => `#icon-${g.iconClass}`), a = w(() => g.className ? "svg-icon " + g.className : "svg-icon"), n = w(() => ({
2128
2332
  mask: `url(${g.iconClass}) no-repeat 50% 50%`,
2129
2333
  "-webkit-mask": `url(${g.iconClass}) no-repeat 50% 50%`
2130
- })), t = (d) => /^(https?:|mailto:|tel:|open)/.test(d);
2131
- return (d, a) => h.value ? (b(), D("div", {
2334
+ })), o = (r) => /^(https?:|mailto:|tel:|open)/.test(r);
2335
+ return (r, i) => h.value ? (b(), D("div", {
2132
2336
  key: 0,
2133
- style: ge(o.value),
2337
+ style: ke(n.value),
2134
2338
  class: "svg-external-icon svg-icon"
2135
2339
  }, null, 4)) : (b(), D("svg", {
2136
2340
  key: 1,
2137
- class: ct(l.value),
2341
+ class: mt(a.value),
2138
2342
  "aria-hidden": "true"
2139
2343
  }, [
2140
- _("use", { "xlink:href": e.value }, null, 8, Un)
2344
+ U("use", { "xlink:href": e.value }, null, 8, Gn)
2141
2345
  ], 2));
2142
2346
  }
2143
- }), Ke = /* @__PURE__ */ Ae(Mn, [["__scopeId", "data-v-3a11db57"]]);
2144
- Ke.install = function(n) {
2145
- n.component(Ke.name, Ke);
2347
+ }), Ye = /* @__PURE__ */ De(Yn, [["__scopeId", "data-v-3a11db57"]]);
2348
+ Ye.install = function(t) {
2349
+ t.component(Ye.name, Ye);
2146
2350
  };
2147
- const St = [Le, ce, oe, Ke], Kn = (n, g = {}) => {
2148
- St.forEach((h) => {
2149
- h.name && n.component(h.name, h);
2150
- }), g.globalProperties !== !1 && (n.config.globalProperties.$useDialog = _e, St.forEach((h) => {
2151
- h.isPlugin && h.Plugin && n.use(h.Plugin, g[h.name] || {});
2152
- })), n.provide("$EsPlus", {
2153
- useDialog: _e,
2351
+ const Rt = [Ae, ue, re, Ge, Ye], Jn = (t, g = {}) => {
2352
+ Rt.forEach((h) => {
2353
+ h.name && t.component(h.name, h);
2354
+ }), g.globalProperties !== !1 && (t.config.globalProperties.$useDialog = He, Rt.forEach((h) => {
2355
+ h.isPlugin && h.Plugin && t.use(h.Plugin, g[h.name] || {});
2356
+ })), t.provide("$EsPlus", {
2357
+ useDialog: He,
2154
2358
  ...g
2155
2359
  });
2156
- }, Yn = {
2157
- version: cn,
2158
- install: Kn
2360
+ }, to = {
2361
+ version: fn,
2362
+ install: Jn
2159
2363
  };
2160
2364
  export {
2161
- Le as EsDialog,
2162
- ce as EsForm,
2163
- oe as EsTable,
2164
- Ke as SvgIcon,
2165
- Yn as default,
2166
- Kn as install,
2167
- _e as useDialog
2365
+ Ge as EsCrudPage,
2366
+ Ae as EsDialog,
2367
+ ue as EsForm,
2368
+ re as EsTable,
2369
+ Ye as SvgIcon,
2370
+ to as default,
2371
+ Jn as install,
2372
+ He as useDialog
2168
2373
  };
2169
2374
  //# sourceMappingURL=es-plus.js.map