es-plus-ui 1.0.3 → 1.1.0

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