@gopowerteam/form-render 0.0.56 → 0.0.58

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/index.mjs CHANGED
@@ -1,21 +1,21 @@
1
- import { getCurrentInstance as U, inject as le, defineComponent as P, computed as C, openBlock as S, createElementBlock as F, normalizeClass as ae, normalizeStyle as z, createElementVNode as w, shallowRef as E, ref as $, provide as me, onMounted as D, Fragment as he, renderSlot as Ae, createBlock as re, Teleport as Be, createVNode as v, TransitionGroup as De, withCtx as Ue, renderList as We, mergeProps as _e, createCommentVNode as H, defineAsyncComponent as qe, triggerRef as Q, useCssVars as He, onUnmounted as Ye, withModifiers as Ge, toDisplayString as A, resolveDynamicComponent as Ie, normalizeProps as Xe, guardReactiveProps as Je, watch as K, unref as Qe, isRef as oe, toRefs as Ke, customRef as Ze, nextTick as Me, getCurrentScope as et, onScopeDispose as tt, pushScopeId as nt, popScopeId as rt, isVNode as ye, h as lt, createTextVNode as ee, onUpdated as at } from "vue";
2
- import { DatePicker as ot, YearPicker as ut, QuarterPicker as ct, MonthPicker as it, WeekPicker as dt, Input as st, InputNumber as je, Select as ft, Option as mt, Switch as ht, RangePicker as vt, Textarea as yt, TreeSelect as gt, Cascader as pt, FormItem as Te, Tabs as bt, TabPane as kt, Form as wt, Grid as xt, GridItem as Ce, Button as q, Space as St } from "@arco-design/web-vue";
1
+ import { getCurrentInstance as W, inject as le, defineComponent as R, computed as x, openBlock as S, createElementBlock as F, normalizeClass as ae, normalizeStyle as V, createElementVNode as w, shallowRef as A, ref as C, provide as me, onMounted as U, Fragment as he, renderSlot as Ae, createBlock as re, Teleport as Be, createVNode as v, TransitionGroup as De, withCtx as Ue, renderList as We, mergeProps as _e, createCommentVNode as Y, defineAsyncComponent as qe, triggerRef as K, useCssVars as He, onUnmounted as Ye, withModifiers as Ge, toDisplayString as B, resolveDynamicComponent as Ie, normalizeProps as Xe, guardReactiveProps as Je, watch as Z, unref as Qe, isRef as oe, toRefs as Ke, customRef as Ze, nextTick as Me, getCurrentScope as et, onScopeDispose as tt, pushScopeId as nt, popScopeId as rt, isVNode as ye, h as lt, createTextVNode as ee, onUpdated as at } from "vue";
2
+ import { DatePicker as ot, YearPicker as ut, QuarterPicker as ct, MonthPicker as it, WeekPicker as dt, Input as st, InputNumber as je, Select as ft, Option as mt, Switch as ht, RangePicker as vt, Textarea as yt, TreeSelect as gt, Cascader as pt, FormItem as Te, Tabs as bt, TabPane as kt, Form as wt, Grid as xt, GridItem as Ce, Button as H, Space as St } from "@arco-design/web-vue";
3
3
  import $e from "dayjs";
4
4
  import { FormRenderResolver as Kn } from "./resolver.mjs";
5
5
  const Ct = Symbol("ArcoConfigProvider"), $t = "arco", Ft = "$arco", ge = (e) => {
6
- var r, t, n;
7
- const l = U(), u = le(Ct, void 0), a = (n = (t = u == null ? void 0 : u.prefixCls) != null ? t : (r = l == null ? void 0 : l.appContext.config.globalProperties[Ft]) == null ? void 0 : r.classPrefix) != null ? n : $t;
6
+ var n, r, t;
7
+ const l = W(), u = le(Ct, void 0), a = (t = (r = u == null ? void 0 : u.prefixCls) != null ? r : (n = l == null ? void 0 : l.appContext.config.globalProperties[Ft]) == null ? void 0 : n.classPrefix) != null ? t : $t;
8
8
  return e ? `${a}-${e}` : a;
9
9
  }, Ot = Object.prototype.toString;
10
10
  function pe(e) {
11
11
  return Ot.call(e) === "[object Number]" && e === e;
12
12
  }
13
- var be = (e, r) => {
14
- for (const [t, n] of r)
15
- e[t] = n;
13
+ var be = (e, n) => {
14
+ for (const [r, t] of n)
15
+ e[r] = t;
16
16
  return e;
17
17
  };
18
- const _t = P({
18
+ const _t = R({
19
19
  name: "IconDown",
20
20
  props: {
21
21
  size: {
@@ -42,47 +42,47 @@ const _t = P({
42
42
  click: (e) => !0
43
43
  },
44
44
  setup(e, {
45
- emit: r
45
+ emit: n
46
46
  }) {
47
- const t = ge("icon"), n = C(() => [t, `${t}-down`, {
48
- [`${t}-spin`]: e.spin
49
- }]), l = C(() => {
47
+ const r = ge("icon"), t = x(() => [r, `${r}-down`, {
48
+ [`${r}-spin`]: e.spin
49
+ }]), l = x(() => {
50
50
  const a = {};
51
51
  return e.size && (a.fontSize = pe(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
52
52
  });
53
53
  return {
54
- cls: n,
54
+ cls: t,
55
55
  innerStyle: l,
56
56
  onClick: (a) => {
57
- r("click", a);
57
+ n("click", a);
58
58
  }
59
59
  };
60
60
  }
61
61
  }), It = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Mt = /* @__PURE__ */ w("path", {
62
62
  d: "M39.6 17.443 24.043 33 8.487 17.443"
63
63
  }, null, -1), jt = [Mt];
64
- function Tt(e, r, t, n, l, u) {
64
+ function Tt(e, n, r, t, l, u) {
65
65
  return S(), F("svg", {
66
66
  viewBox: "0 0 48 48",
67
67
  fill: "none",
68
68
  xmlns: "http://www.w3.org/2000/svg",
69
69
  stroke: "currentColor",
70
70
  class: ae(e.cls),
71
- style: z(e.innerStyle),
71
+ style: V(e.innerStyle),
72
72
  "stroke-width": e.strokeWidth,
73
73
  "stroke-linecap": e.strokeLinecap,
74
74
  "stroke-linejoin": e.strokeLinejoin,
75
- onClick: r[0] || (r[0] = (...a) => e.onClick && e.onClick(...a))
75
+ onClick: n[0] || (n[0] = (...a) => e.onClick && e.onClick(...a))
76
76
  }, jt, 14, It);
77
77
  }
78
78
  var ie = /* @__PURE__ */ be(_t, [["render", Tt]]);
79
79
  const Lt = Object.assign(ie, {
80
- install: (e, r) => {
81
- var t;
82
- const n = (t = r == null ? void 0 : r.iconPrefix) != null ? t : "";
83
- e.component(n + ie.name, ie);
80
+ install: (e, n) => {
81
+ var r;
82
+ const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
83
+ e.component(t + ie.name, ie);
84
84
  }
85
- }), zt = P({
85
+ }), zt = R({
86
86
  name: "IconUp",
87
87
  props: {
88
88
  size: {
@@ -109,47 +109,47 @@ const Lt = Object.assign(ie, {
109
109
  click: (e) => !0
110
110
  },
111
111
  setup(e, {
112
- emit: r
112
+ emit: n
113
113
  }) {
114
- const t = ge("icon"), n = C(() => [t, `${t}-up`, {
115
- [`${t}-spin`]: e.spin
116
- }]), l = C(() => {
114
+ const r = ge("icon"), t = x(() => [r, `${r}-up`, {
115
+ [`${r}-spin`]: e.spin
116
+ }]), l = x(() => {
117
117
  const a = {};
118
118
  return e.size && (a.fontSize = pe(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
119
119
  });
120
120
  return {
121
- cls: n,
121
+ cls: t,
122
122
  innerStyle: l,
123
123
  onClick: (a) => {
124
- r("click", a);
124
+ n("click", a);
125
125
  }
126
126
  };
127
127
  }
128
128
  }), Pt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Vt = /* @__PURE__ */ w("path", {
129
129
  d: "M39.6 30.557 24.043 15 8.487 30.557"
130
130
  }, null, -1), Rt = [Vt];
131
- function Nt(e, r, t, n, l, u) {
131
+ function Nt(e, n, r, t, l, u) {
132
132
  return S(), F("svg", {
133
133
  viewBox: "0 0 48 48",
134
134
  fill: "none",
135
135
  xmlns: "http://www.w3.org/2000/svg",
136
136
  stroke: "currentColor",
137
137
  class: ae(e.cls),
138
- style: z(e.innerStyle),
138
+ style: V(e.innerStyle),
139
139
  "stroke-width": e.strokeWidth,
140
140
  "stroke-linecap": e.strokeLinecap,
141
141
  "stroke-linejoin": e.strokeLinejoin,
142
- onClick: r[0] || (r[0] = (...a) => e.onClick && e.onClick(...a))
142
+ onClick: n[0] || (n[0] = (...a) => e.onClick && e.onClick(...a))
143
143
  }, Rt, 14, Pt);
144
144
  }
145
145
  var de = /* @__PURE__ */ be(zt, [["render", Nt]]);
146
146
  const Et = Object.assign(de, {
147
- install: (e, r) => {
148
- var t;
149
- const n = (t = r == null ? void 0 : r.iconPrefix) != null ? t : "";
150
- e.component(n + de.name, de);
147
+ install: (e, n) => {
148
+ var r;
149
+ const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
150
+ e.component(t + de.name, de);
151
151
  }
152
- }), At = P({
152
+ }), At = R({
153
153
  name: "IconSearch",
154
154
  props: {
155
155
  size: {
@@ -176,106 +176,106 @@ const Et = Object.assign(de, {
176
176
  click: (e) => !0
177
177
  },
178
178
  setup(e, {
179
- emit: r
179
+ emit: n
180
180
  }) {
181
- const t = ge("icon"), n = C(() => [t, `${t}-search`, {
182
- [`${t}-spin`]: e.spin
183
- }]), l = C(() => {
181
+ const r = ge("icon"), t = x(() => [r, `${r}-search`, {
182
+ [`${r}-spin`]: e.spin
183
+ }]), l = x(() => {
184
184
  const a = {};
185
185
  return e.size && (a.fontSize = pe(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
186
186
  });
187
187
  return {
188
- cls: n,
188
+ cls: t,
189
189
  innerStyle: l,
190
190
  onClick: (a) => {
191
- r("click", a);
191
+ n("click", a);
192
192
  }
193
193
  };
194
194
  }
195
195
  }), Bt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Dt = /* @__PURE__ */ w("path", {
196
196
  d: "M33.072 33.071c6.248-6.248 6.248-16.379 0-22.627-6.249-6.249-16.38-6.249-22.628 0-6.248 6.248-6.248 16.379 0 22.627 6.248 6.248 16.38 6.248 22.628 0Zm0 0 8.485 8.485"
197
197
  }, null, -1), Ut = [Dt];
198
- function Wt(e, r, t, n, l, u) {
198
+ function Wt(e, n, r, t, l, u) {
199
199
  return S(), F("svg", {
200
200
  viewBox: "0 0 48 48",
201
201
  fill: "none",
202
202
  xmlns: "http://www.w3.org/2000/svg",
203
203
  stroke: "currentColor",
204
204
  class: ae(e.cls),
205
- style: z(e.innerStyle),
205
+ style: V(e.innerStyle),
206
206
  "stroke-width": e.strokeWidth,
207
207
  "stroke-linecap": e.strokeLinecap,
208
208
  "stroke-linejoin": e.strokeLinejoin,
209
- onClick: r[0] || (r[0] = (...a) => e.onClick && e.onClick(...a))
209
+ onClick: n[0] || (n[0] = (...a) => e.onClick && e.onClick(...a))
210
210
  }, Ut, 14, Bt);
211
211
  }
212
212
  var se = /* @__PURE__ */ be(At, [["render", Wt]]);
213
213
  const qt = Object.assign(se, {
214
- install: (e, r) => {
215
- var t;
216
- const n = (t = r == null ? void 0 : r.iconPrefix) != null ? t : "";
217
- e.component(n + se.name, se);
214
+ install: (e, n) => {
215
+ var r;
216
+ const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
217
+ e.component(t + se.name, se);
218
218
  }
219
219
  }), ue = Symbol("__MODAL__");
220
220
  function Le(e) {
221
221
  return et() ? (tt(e), !0) : !1;
222
222
  }
223
- function I(e) {
223
+ function M(e) {
224
224
  return typeof e == "function" ? e() : Qe(e);
225
225
  }
226
226
  const ze = typeof window < "u" && typeof document < "u";
227
227
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
228
228
  const Ht = Object.prototype.toString, Yt = (e) => Ht.call(e) === "[object Object]", Gt = () => {
229
229
  };
230
- function Xt(e, r = {}) {
230
+ function Xt(e, n = {}) {
231
231
  if (!oe(e))
232
232
  return Ke(e);
233
- const t = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
234
- for (const n in e.value)
235
- t[n] = Ze(() => ({
233
+ const r = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
234
+ for (const t in e.value)
235
+ r[t] = Ze(() => ({
236
236
  get() {
237
- return e.value[n];
237
+ return e.value[t];
238
238
  },
239
239
  set(l) {
240
240
  var u;
241
- if ((u = I(r.replaceRef)) == null || u)
241
+ if ((u = M(n.replaceRef)) == null || u)
242
242
  if (Array.isArray(e.value)) {
243
243
  const a = [...e.value];
244
- a[n] = l, e.value = a;
244
+ a[t] = l, e.value = a;
245
245
  } else {
246
- const a = { ...e.value, [n]: l };
246
+ const a = { ...e.value, [t]: l };
247
247
  Object.setPrototypeOf(a, Object.getPrototypeOf(e.value)), e.value = a;
248
248
  }
249
249
  else
250
- e.value[n] = l;
250
+ e.value[t] = l;
251
251
  }
252
252
  }));
253
- return t;
253
+ return r;
254
254
  }
255
- function Jt(e, r = !0) {
256
- U() ? D(e) : r ? e() : Me(e);
255
+ function Jt(e, n = !0) {
256
+ W() ? U(e) : n ? e() : Me(e);
257
257
  }
258
- function B(e) {
259
- var r;
260
- const t = I(e);
261
- return (r = t == null ? void 0 : t.$el) != null ? r : t;
258
+ function D(e) {
259
+ var n;
260
+ const r = M(e);
261
+ return (n = r == null ? void 0 : r.$el) != null ? n : r;
262
262
  }
263
263
  const ce = ze ? window : void 0;
264
264
  function fe(...e) {
265
- let r, t, n, l;
266
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, n, l] = e, r = ce) : [r, t, n, l] = e, !r)
265
+ let n, r, t, l;
266
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, t, l] = e, n = ce) : [n, r, t, l] = e, !n)
267
267
  return Gt;
268
- Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
268
+ Array.isArray(r) || (r = [r]), Array.isArray(t) || (t = [t]);
269
269
  const u = [], a = () => {
270
270
  u.forEach((o) => o()), u.length = 0;
271
- }, d = (o, i, c, h) => (o.addEventListener(i, c, h), () => o.removeEventListener(i, c, h)), p = K(
272
- () => [B(r), I(l)],
273
- ([o, i]) => {
271
+ }, d = (o, c, i, h) => (o.addEventListener(c, i, h), () => o.removeEventListener(c, i, h)), p = Z(
272
+ () => [D(n), M(l)],
273
+ ([o, c]) => {
274
274
  if (a(), !o)
275
275
  return;
276
- const c = Yt(i) ? { ...i } : i;
276
+ const i = Yt(c) ? { ...c } : c;
277
277
  u.push(
278
- ...t.flatMap((h) => n.map((m) => d(o, h, m, c)))
278
+ ...r.flatMap((h) => t.map((m) => d(o, h, m, i)))
279
279
  );
280
280
  },
281
281
  { immediate: !0, flush: "post" }
@@ -285,17 +285,17 @@ function fe(...e) {
285
285
  return Le(s), s;
286
286
  }
287
287
  function Qt() {
288
- const e = $(!1);
289
- return U() && D(() => {
288
+ const e = C(!1);
289
+ return W() && U(() => {
290
290
  e.value = !0;
291
291
  }), e;
292
292
  }
293
293
  function Kt(e) {
294
- const r = Qt();
295
- return C(() => (r.value, !!e()));
294
+ const n = Qt();
295
+ return x(() => (n.value, !!e()));
296
296
  }
297
- function Zt(e, r = {}) {
298
- var t, n;
297
+ function Zt(e, n = {}) {
298
+ var r, t;
299
299
  const {
300
300
  pointerTypes: l,
301
301
  preventDefault: u,
@@ -304,62 +304,62 @@ function Zt(e, r = {}) {
304
304
  onMove: p,
305
305
  onEnd: s,
306
306
  onStart: o,
307
- initialValue: i,
308
- axis: c = "both",
307
+ initialValue: c,
308
+ axis: i = "both",
309
309
  draggingElement: h = ce,
310
310
  containerElement: m,
311
311
  handle: k = e
312
- } = r, y = $(
313
- (t = I(i)) != null ? t : { x: 0, y: 0 }
314
- ), O = $(), j = (b) => l ? l.includes(b.pointerType) : !0, g = (b) => {
315
- I(u) && b.preventDefault(), I(a) && b.stopPropagation();
316
- }, x = (b) => {
317
- var R;
318
- if (!j(b) || I(d) && b.target !== I(e))
312
+ } = n, y = C(
313
+ (r = M(c)) != null ? r : { x: 0, y: 0 }
314
+ ), O = C(), T = (b) => l ? l.includes(b.pointerType) : !0, I = (b) => {
315
+ M(u) && b.preventDefault(), M(a) && b.stopPropagation();
316
+ }, g = (b) => {
317
+ var N;
318
+ if (!T(b) || M(d) && b.target !== M(e))
319
319
  return;
320
- const _ = I(m), N = (R = _ == null ? void 0 : _.getBoundingClientRect) == null ? void 0 : R.call(_), T = I(e).getBoundingClientRect(), L = {
321
- x: b.clientX - (_ ? T.left - N.left : T.left),
322
- y: b.clientY - (_ ? T.top - N.top : T.top)
320
+ const _ = M(m), E = (N = _ == null ? void 0 : _.getBoundingClientRect) == null ? void 0 : N.call(_), L = M(e).getBoundingClientRect(), z = {
321
+ x: b.clientX - (_ ? L.left - E.left : L.left),
322
+ y: b.clientY - (_ ? L.top - E.top : L.top)
323
323
  };
324
- (o == null ? void 0 : o(L, b)) !== !1 && (O.value = L, g(b));
325
- }, V = (b) => {
326
- var R;
327
- if (!j(b) || !O.value)
324
+ (o == null ? void 0 : o(z, b)) !== !1 && (O.value = z, I(b));
325
+ }, $ = (b) => {
326
+ var N;
327
+ if (!T(b) || !O.value)
328
328
  return;
329
- const _ = I(m), N = (R = _ == null ? void 0 : _.getBoundingClientRect) == null ? void 0 : R.call(_), T = I(e).getBoundingClientRect();
330
- let { x: L, y: W } = y.value;
331
- (c === "x" || c === "both") && (L = b.clientX - O.value.x, _ && (L = Math.min(Math.max(0, L), N.width - T.width))), (c === "y" || c === "both") && (W = b.clientY - O.value.y, _ && (W = Math.min(Math.max(0, W), N.height - T.height))), y.value = {
332
- x: L,
333
- y: W
334
- }, p == null || p(y.value, b), g(b);
335
- }, Z = (b) => {
336
- j(b) && O.value && (O.value = void 0, s == null || s(y.value, b), g(b));
329
+ const _ = M(m), E = (N = _ == null ? void 0 : _.getBoundingClientRect) == null ? void 0 : N.call(_), L = M(e).getBoundingClientRect();
330
+ let { x: z, y: q } = y.value;
331
+ (i === "x" || i === "both") && (z = b.clientX - O.value.x, _ && (z = Math.min(Math.max(0, z), E.width - L.width))), (i === "y" || i === "both") && (q = b.clientY - O.value.y, _ && (q = Math.min(Math.max(0, q), E.height - L.height))), y.value = {
332
+ x: z,
333
+ y: q
334
+ }, p == null || p(y.value, b), I(b);
335
+ }, P = (b) => {
336
+ T(b) && O.value && (O.value = void 0, s == null || s(y.value, b), I(b));
337
337
  };
338
338
  if (ze) {
339
- const b = { capture: (n = r.capture) != null ? n : !0 };
340
- fe(k, "pointerdown", x, b), fe(h, "pointermove", V, b), fe(h, "pointerup", Z, b);
339
+ const b = { capture: (t = n.capture) != null ? t : !0 };
340
+ fe(k, "pointerdown", g, b), fe(h, "pointermove", $, b), fe(h, "pointerup", P, b);
341
341
  }
342
342
  return {
343
343
  ...Xt(y),
344
344
  position: y,
345
- isDragging: C(() => !!O.value),
346
- style: C(
345
+ isDragging: x(() => !!O.value),
346
+ style: x(
347
347
  () => `left:${y.value.x}px;top:${y.value.y}px;`
348
348
  )
349
349
  };
350
350
  }
351
- function en(e, r, t = {}) {
352
- const { window: n = ce, ...l } = t;
351
+ function en(e, n, r = {}) {
352
+ const { window: t = ce, ...l } = r;
353
353
  let u;
354
- const a = Kt(() => n && "ResizeObserver" in n), d = () => {
354
+ const a = Kt(() => t && "ResizeObserver" in t), d = () => {
355
355
  u && (u.disconnect(), u = void 0);
356
- }, p = C(() => Array.isArray(e) ? e.map((i) => B(i)) : [B(e)]), s = K(
356
+ }, p = x(() => Array.isArray(e) ? e.map((c) => D(c)) : [D(e)]), s = Z(
357
357
  p,
358
- (i) => {
359
- if (d(), a.value && n) {
360
- u = new ResizeObserver(r);
361
- for (const c of i)
362
- c && u.observe(c, l);
358
+ (c) => {
359
+ if (d(), a.value && t) {
360
+ u = new ResizeObserver(n);
361
+ for (const i of c)
362
+ i && u.observe(i, l);
363
363
  }
364
364
  },
365
365
  { immediate: !0, flush: "post", deep: !0 }
@@ -371,36 +371,36 @@ function en(e, r, t = {}) {
371
371
  stop: o
372
372
  };
373
373
  }
374
- function Y(e, r = { width: 0, height: 0 }, t = {}) {
375
- const { window: n = ce, box: l = "content-box" } = t, u = C(() => {
376
- var i, c;
377
- return (c = (i = B(e)) == null ? void 0 : i.namespaceURI) == null ? void 0 : c.includes("svg");
378
- }), a = $(r.width), d = $(r.height), { stop: p } = en(
374
+ function G(e, n = { width: 0, height: 0 }, r = {}) {
375
+ const { window: t = ce, box: l = "content-box" } = r, u = x(() => {
376
+ var c, i;
377
+ return (i = (c = D(e)) == null ? void 0 : c.namespaceURI) == null ? void 0 : i.includes("svg");
378
+ }), a = C(n.width), d = C(n.height), { stop: p } = en(
379
379
  e,
380
- ([i]) => {
381
- const c = l === "border-box" ? i.borderBoxSize : l === "content-box" ? i.contentBoxSize : i.devicePixelContentBoxSize;
382
- if (n && u.value) {
383
- const h = B(e);
380
+ ([c]) => {
381
+ const i = l === "border-box" ? c.borderBoxSize : l === "content-box" ? c.contentBoxSize : c.devicePixelContentBoxSize;
382
+ if (t && u.value) {
383
+ const h = D(e);
384
384
  if (h) {
385
- const m = n.getComputedStyle(h);
385
+ const m = t.getComputedStyle(h);
386
386
  a.value = Number.parseFloat(m.width), d.value = Number.parseFloat(m.height);
387
387
  }
388
- } else if (c) {
389
- const h = Array.isArray(c) ? c : [c];
388
+ } else if (i) {
389
+ const h = Array.isArray(i) ? i : [i];
390
390
  a.value = h.reduce((m, { inlineSize: k }) => m + k, 0), d.value = h.reduce((m, { blockSize: k }) => m + k, 0);
391
391
  } else
392
- a.value = i.contentRect.width, d.value = i.contentRect.height;
392
+ a.value = c.contentRect.width, d.value = c.contentRect.height;
393
393
  },
394
- t
394
+ r
395
395
  );
396
396
  Jt(() => {
397
- const i = B(e);
398
- i && (a.value = "offsetWidth" in i ? i.offsetWidth : r.width, d.value = "offsetHeight" in i ? i.offsetHeight : r.height);
397
+ const c = D(e);
398
+ c && (a.value = "offsetWidth" in c ? c.offsetWidth : n.width, d.value = "offsetHeight" in c ? c.offsetHeight : n.height);
399
399
  });
400
- const s = K(
401
- () => B(e),
402
- (i) => {
403
- a.value = i ? r.width : 0, d.value = i ? r.height : 0;
400
+ const s = Z(
401
+ () => D(e),
402
+ (c) => {
403
+ a.value = c ? n.width : 0, d.value = c ? n.height : 0;
404
404
  }
405
405
  );
406
406
  function o() {
@@ -425,7 +425,7 @@ const tn = (e) => (nt("data-v-189513f2"), e = e(), rt(), e), nn = { class: "titl
425
425
  ], cn = {
426
426
  name: "ModalContainer",
427
427
  inheritAttrs: !0
428
- }, dn = /* @__PURE__ */ P({
428
+ }, dn = /* @__PURE__ */ R({
429
429
  ...cn,
430
430
  props: {
431
431
  id: {},
@@ -455,54 +455,54 @@ const tn = (e) => (nt("data-v-189513f2"), e = e(), rt(), e), nn = { class: "titl
455
455
  zIndex: { default: 1e3 }
456
456
  },
457
457
  emits: ["submit"],
458
- setup(e, { expose: r, emit: t }) {
458
+ setup(e, { expose: n, emit: r }) {
459
459
  He((f) => ({
460
460
  b10a2d42: f.zIndex
461
461
  }));
462
- const n = e, l = t, u = le(ue), a = $(!1);
462
+ const t = e, l = r, u = le(ue), a = C(!1);
463
463
  let d = 0, p = 0;
464
- const s = E(), o = E(), i = E(), c = E(), h = E(), m = E(), { height: k } = Y(s), { height: y } = Y(i, void 0, { box: "border-box" }), { height: O } = Y(c, void 0, { box: "border-box" }), { height: j } = Y(h), { height: g } = Y(m), { x, y: V } = Zt(i, {
464
+ const s = A(), o = A(), c = A(), i = A(), h = A(), m = A(), { height: k } = G(s), { height: y } = G(c, void 0, { box: "border-box" }), { height: O } = G(i, void 0, { box: "border-box" }), { height: T } = G(h), { height: I } = G(m), { x: g, y: $ } = Zt(c, {
465
465
  initialValue: { x: 0, y: 0 }
466
466
  });
467
- function Z() {
468
- u == null || u.close(n.id);
467
+ function P() {
468
+ u == null || u.close(t.id);
469
469
  }
470
470
  function b(f) {
471
471
  return typeof f == "number" ? `${f}px` : f;
472
472
  }
473
- const R = C(() => {
473
+ const N = x(() => {
474
474
  const f = {};
475
- return n.mode === "dialog" && (f.justifyContent = "center"), n.mode === "drawer" && (f.justifyContent = "flex-end"), f;
476
- }), _ = C(() => {
475
+ return t.mode === "dialog" && (f.justifyContent = "center"), t.mode === "drawer" && (f.justifyContent = "flex-end"), f;
476
+ }), _ = x(() => {
477
477
  const f = {};
478
- return n.size && (f.width = b(n.sizes[n.size])), n.width && (f.width = b(n.width)), n.maxWidth && (f.maxWidth = b(n.maxWidth)), n.fullscreen && (f.maxWidth = "unset", f.width = "100%", f.position = "fixed", f.top = 0, f.left = 0, f.bottom = 0, f.right = 0, f.borderRadius = 0), n.draggable && !n.fullscreen && n.mode === "dialog" && (f.transform = `translate3d(${x.value - d}px, ${V.value - p}px, 0px)`), n.mode === "drawer" && (f.borderRadius = 0, f.height = "100%"), n.offset && n.mode === "dialog" && (f.marginLeft = `${n.offset.x || 0}px`, f.marginTop = `${n.offset.y || 0}px`), n.backgroundColor && (f.backgroundColor = n.backgroundColor), f;
479
- }), N = C(() => {
478
+ return t.size && (f.width = b(t.sizes[t.size])), t.width && (f.width = b(t.width)), t.maxWidth && (f.maxWidth = b(t.maxWidth)), t.fullscreen && (f.maxWidth = "unset", f.width = "100%", f.position = "fixed", f.top = 0, f.left = 0, f.bottom = 0, f.right = 0, f.borderRadius = 0), t.draggable && !t.fullscreen && t.mode === "dialog" && (f.transform = `translate3d(${g.value - d}px, ${$.value - p}px, 0px)`), t.mode === "drawer" && (f.borderRadius = 0, f.height = "100%"), t.offset && t.mode === "dialog" && (f.marginLeft = `${t.offset.x || 0}px`, f.marginTop = `${t.offset.y || 0}px`), t.backgroundColor && (f.backgroundColor = t.backgroundColor), f;
479
+ }), E = x(() => {
480
480
  const f = {};
481
- return n.draggable && !n.fullscreen && n.mode === "dialog" && (f.cursor = "move"), f;
482
- }), T = C(() => {
483
- const f = {}, M = j.value + g.value + y.value + O.value, Se = Math.floor(k.value * (Number(b(n.maxHeight).replace("%", "")) / 100));
484
- return n.maxHeight && (f.maxHeight = `${Se - M}px`), n.mode === "drawer" && (f.maxHeight = "unset", f.height = `${k.value - M}px`), n.fullscreen && (f.maxHeight = "unset", f.height = `calc(100% - ${M}px)`), n.type !== "component" && (f.padding = "0"), n.bodyStyle && Object.assign(f, n.bodyStyle), f;
481
+ return t.draggable && !t.fullscreen && t.mode === "dialog" && (f.cursor = "move"), f;
482
+ }), L = x(() => {
483
+ const f = {}, j = T.value + I.value + y.value + O.value, Se = Math.floor(k.value * (Number(b(t.maxHeight).replace("%", "")) / 100));
484
+ return t.maxHeight && (f.maxHeight = `${Se - j}px`), t.mode === "drawer" && (f.maxHeight = "unset", f.height = `${k.value - j}px`), t.fullscreen && (f.maxHeight = "unset", f.height = `calc(100% - ${j}px)`), t.type !== "component" && (f.padding = "0"), t.bodyStyle && Object.assign(f, t.bodyStyle), f;
485
485
  });
486
- function L() {
486
+ function z() {
487
487
  const f = o.value;
488
- if (n.form && f) {
489
- const M = f.querySelector(`form[name="${n.form}"]`);
490
- M && M.dispatchEvent(new Event("submit"));
488
+ if (t.form && f) {
489
+ const j = f.querySelector(`form[name="${t.form}"]`);
490
+ j && j.dispatchEvent(new Event("submit"));
491
491
  }
492
492
  l("submit");
493
493
  }
494
- function W() {
495
- u == null || u.close(n.id);
494
+ function q() {
495
+ u == null || u.close(t.id);
496
496
  }
497
497
  function Ve() {
498
498
  window && window.addEventListener("resize", () => {
499
- Q(s), Q(o), o.value && (d = o.value.offsetLeft, p = o.value.offsetTop);
499
+ K(s), K(o), o.value && (d = o.value.offsetLeft, p = o.value.offsetTop);
500
500
  });
501
501
  }
502
502
  function Re() {
503
- if (n.closeable && n.esc) {
504
- const f = ({ key: M }) => {
505
- M === "Escape" && (u == null || u.close(n.id), window.removeEventListener("keydown", f));
503
+ if (t.closeable && t.esc) {
504
+ const f = ({ key: j }) => {
505
+ j === "Escape" && (u == null || u.close(t.id), window.removeEventListener("keydown", f));
506
506
  };
507
507
  window.addEventListener("keydown", f);
508
508
  }
@@ -510,7 +510,7 @@ const tn = (e) => (nt("data-v-189513f2"), e = e(), rt(), e), nn = { class: "titl
510
510
  function Ne() {
511
511
  d = o.value.offsetLeft, p = o.value.offsetTop;
512
512
  }
513
- D(() => {
513
+ U(() => {
514
514
  Re(), Ve();
515
515
  }), Ye(() => {
516
516
  });
@@ -520,39 +520,39 @@ const tn = (e) => (nt("data-v-189513f2"), e = e(), rt(), e), nn = { class: "titl
520
520
  function xe() {
521
521
  a.value = !1;
522
522
  }
523
- return r({
523
+ return n({
524
524
  showLoading: Ee,
525
525
  hideLoading: xe
526
- }), (f, M) => (S(), F("div", {
526
+ }), (f, j) => (S(), F("div", {
527
527
  ref_key: "wrapperRef",
528
528
  ref: s,
529
529
  class: "modal-wrapper",
530
- style: z(R.value),
531
- onClick: M[0] || (M[0] = Ge((Se) => f.maskClosable && Z(), ["self"]))
530
+ style: V(N.value),
531
+ onClick: j[0] || (j[0] = Ge((Se) => f.maskClosable && P(), ["self"]))
532
532
  }, [
533
533
  w("div", {
534
534
  ref_key: "contentRef",
535
535
  ref: o,
536
536
  class: ae(["modal-content", { [`${f.mode}-mode`]: !0 }]),
537
- style: z(_.value)
537
+ style: V(_.value)
538
538
  }, [
539
539
  f.header ? (S(), F("div", {
540
540
  key: 0,
541
541
  ref_key: "headerRef",
542
- ref: i,
542
+ ref: c,
543
543
  class: "modal-header",
544
- style: z(N.value),
544
+ style: V(E.value),
545
545
  onMousedown: Ne
546
546
  }, [
547
- w("div", nn, A(f.title), 1),
547
+ w("div", nn, B(f.title), 1),
548
548
  w("div", rn, [
549
549
  f.closeable ? (S(), F("div", {
550
550
  key: 0,
551
551
  class: "i-icon-park-outline:close block cursor-pointer",
552
- onClick: Z
553
- })) : H("", !0)
552
+ onClick: P
553
+ })) : Y("", !0)
554
554
  ])
555
- ], 36)) : H("", !0),
555
+ ], 36)) : Y("", !0),
556
556
  w("div", {
557
557
  id: "modal-header-slot",
558
558
  ref_key: "headerSlotRef",
@@ -560,7 +560,7 @@ const tn = (e) => (nt("data-v-189513f2"), e = e(), rt(), e), nn = { class: "titl
560
560
  }, null, 512),
561
561
  w("div", {
562
562
  class: "modal-body",
563
- style: z(T.value)
563
+ style: V(L.value)
564
564
  }, [
565
565
  (S(), re(Ie(f.component), Xe(Je(f.componentProps)), null, 16))
566
566
  ], 4),
@@ -572,31 +572,31 @@ const tn = (e) => (nt("data-v-189513f2"), e = e(), rt(), e), nn = { class: "titl
572
572
  f.footer ? (S(), F("div", {
573
573
  key: 1,
574
574
  ref_key: "footerRef",
575
- ref: c,
575
+ ref: i,
576
576
  class: "modal-footer space-x-2"
577
577
  }, [
578
578
  w("button", {
579
579
  class: "cancel-button",
580
580
  type: "button",
581
- onClick: W
582
- }, A(f.cancelText), 1),
581
+ onClick: q
582
+ }, B(f.cancelText), 1),
583
583
  w("button", {
584
584
  class: "submit-button",
585
585
  form: f.form,
586
586
  type: "submit",
587
- onClick: L
588
- }, A(f.submitText), 9, ln)
589
- ], 512)) : H("", !0),
590
- a.value ? (S(), F("div", an, un)) : H("", !0)
587
+ onClick: z
588
+ }, B(f.submitText), 9, ln)
589
+ ], 512)) : Y("", !0),
590
+ a.value ? (S(), F("div", an, un)) : Y("", !0)
591
591
  ], 6)
592
592
  ], 4));
593
593
  }
594
- }), ke = (e, r) => {
595
- const t = e.__vccOpts || e;
596
- for (const [n, l] of r)
597
- t[n] = l;
598
- return t;
599
- }, sn = /* @__PURE__ */ ke(dn, [["__scopeId", "data-v-189513f2"]]), fn = { class: "modal-dialog" }, mn = { class: "dialog-body" }, hn = { class: "dialog-title" }, vn = { class: "dialog-content" }, yn = /* @__PURE__ */ P({
594
+ }), ke = (e, n) => {
595
+ const r = e.__vccOpts || e;
596
+ for (const [t, l] of n)
597
+ r[t] = l;
598
+ return r;
599
+ }, sn = /* @__PURE__ */ ke(dn, [["__scopeId", "data-v-189513f2"]]), fn = { class: "modal-dialog" }, mn = { class: "dialog-body" }, hn = { class: "dialog-title" }, vn = { class: "dialog-content" }, yn = /* @__PURE__ */ R({
600
600
  __name: "modal-dialog",
601
601
  props: {
602
602
  type: {},
@@ -609,40 +609,40 @@ const tn = (e) => (nt("data-v-189513f2"), e = e(), rt(), e), nn = { class: "titl
609
609
  footer: {}
610
610
  },
611
611
  setup(e) {
612
- const r = e, t = Pe(), n = C(() => r.title ? r.title : {
612
+ const n = e, r = Pe(), t = x(() => n.title ? n.title : {
613
613
  confirm: "提示",
614
614
  info: "提示",
615
615
  warning: "警告",
616
616
  error: "错误",
617
617
  success: "成功"
618
- }[r.type]);
618
+ }[n.type]);
619
619
  async function l() {
620
- r.onOk && await r.onOk(), t.close();
620
+ n.onOk && await n.onOk(), r.close();
621
621
  }
622
622
  async function u() {
623
- r.onCancel && await r.onCancel(), t.close();
623
+ n.onCancel && await n.onCancel(), r.close();
624
624
  }
625
625
  return (a, d) => (S(), F("section", fn, [
626
626
  w("div", mn, [
627
- w("div", hn, A(n.value), 1),
628
- w("div", vn, A(a.content), 1)
627
+ w("div", hn, B(t.value), 1),
628
+ w("div", vn, B(a.content), 1)
629
629
  ]),
630
630
  w("div", {
631
631
  class: "dialog-footer space-x-2",
632
- style: z(a.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
632
+ style: V(a.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
633
633
  }, [
634
634
  a.footer ? (S(), re(Ie(a.footer), { key: 0 })) : (S(), F(he, { key: 1 }, [
635
635
  w("button", {
636
636
  class: "submit-button",
637
637
  type: "submit",
638
638
  onClick: l
639
- }, A(a.okText), 1),
639
+ }, B(a.okText), 1),
640
640
  a.type === "confirm" ? (S(), F("button", {
641
641
  key: 0,
642
642
  class: "cancel-button",
643
643
  type: "button",
644
644
  onClick: u
645
- }, A(a.cancelText), 1)) : H("", !0)
645
+ }, B(a.cancelText), 1)) : Y("", !0)
646
646
  ], 64))
647
647
  ], 4)
648
648
  ]));
@@ -653,7 +653,7 @@ const tn = (e) => (nt("data-v-189513f2"), e = e(), rt(), e), nn = { class: "titl
653
653
  }, bn = {
654
654
  name: "ModalProvider",
655
655
  inheritAttrs: !0
656
- }, kn = /* @__PURE__ */ P({
656
+ }, kn = /* @__PURE__ */ R({
657
657
  ...bn,
658
658
  props: {
659
659
  appendToBody: { type: [Boolean, String], default: !1 },
@@ -666,48 +666,48 @@ const tn = (e) => (nt("data-v-189513f2"), e = e(), rt(), e), nn = { class: "titl
666
666
  maxHeight: { default: "90%" },
667
667
  offset: { default: () => ({ x: 0, y: 0 }) }
668
668
  },
669
- setup(e, { expose: r }) {
670
- const t = E([]), n = $(!1), l = U();
671
- function u(c, h = {}, m = {}) {
669
+ setup(e, { expose: n }) {
670
+ const r = A([]), t = C(!1), l = W();
671
+ function u(i, h = {}, m = {}) {
672
672
  const k = qe(
673
- () => Promise.resolve(typeof c == "string" ? gn : c)
673
+ () => Promise.resolve(typeof i == "string" ? gn : i)
674
674
  );
675
- typeof c == "string" && (h.type = c, m.size = "small", m.fullscreen = !1, m.mode = "dialog", m.footer = !1, m.header = !1);
675
+ typeof i == "string" && (h.type = i, m.size = "small", m.fullscreen = !1, m.mode = "dialog", m.footer = !1, m.header = !1);
676
676
  const y = Math.random().toString(32).slice(2), O = Object.assign({
677
- zIndex: typeof c == "string" ? 1100 : 1e3
678
- }, m), j = new Promise((g, x) => {
679
- t.value.push({
677
+ zIndex: typeof i == "string" ? 1100 : 1e3
678
+ }, m), T = new Promise((I, g) => {
679
+ r.value.push({
680
680
  id: y,
681
681
  component: k,
682
682
  props: h || {},
683
683
  options: {
684
684
  ...O,
685
- type: typeof c == "string" ? c : "component"
685
+ type: typeof i == "string" ? i : "component"
686
686
  },
687
- resolve: g,
688
- reject: x,
687
+ resolve: I,
688
+ reject: g,
689
689
  listeners: []
690
- }), Q(t);
691
- }).catch((g) => g === "CANCEL" ? new Promise(() => {
692
- }) : Promise.reject(g));
693
- return Object.assign(j, {
690
+ }), K(r);
691
+ }).catch((I) => I === "CANCEL" ? new Promise(() => {
692
+ }) : Promise.reject(I));
693
+ return Object.assign(T, {
694
694
  close: () => a(y)
695
695
  });
696
696
  }
697
- function a(c, h) {
698
- const m = t.value.findIndex((y) => y.id === c);
697
+ function a(i, h) {
698
+ const m = r.value.findIndex((y) => y.id === i);
699
699
  if (m < 0)
700
700
  return;
701
- const k = t.value[m];
702
- h === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(h), t.value.splice(m, 1), Q(t);
701
+ const k = r.value[m];
702
+ h === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(h), r.value.splice(m, 1), K(r);
703
703
  }
704
704
  function d() {
705
- !t.value || t.value.length === 0 || (t.value.forEach((c) => {
706
- c == null || c.reject("CANCEL");
707
- }), t.value = [], Q(t));
705
+ !r.value || r.value.length === 0 || (r.value.forEach((i) => {
706
+ i == null || i.reject("CANCEL");
707
+ }), r.value = [], K(r));
708
708
  }
709
- function p(c, h) {
710
- const m = t.value.find((y) => y.id === c);
709
+ function p(i, h) {
710
+ const m = r.value.find((y) => y.id === i);
711
711
  if (!m)
712
712
  return;
713
713
  const k = m.listeners.find((y) => y.event === h);
@@ -724,22 +724,22 @@ const tn = (e) => (nt("data-v-189513f2"), e = e(), rt(), e), nn = { class: "titl
724
724
  info: (y) => u("info", y)
725
725
  });
726
726
  }
727
- function s(c) {
727
+ function s(i) {
728
728
  if (!l)
729
729
  return;
730
- const [h] = l.refs[`modal-container_${c}`];
730
+ const [h] = l.refs[`modal-container_${i}`];
731
731
  if (h)
732
732
  return h.showLoading();
733
733
  }
734
- function o(c) {
734
+ function o(i) {
735
735
  if (!l)
736
736
  return;
737
- const [h] = l.refs[`modal-container_${c}`];
737
+ const [h] = l.refs[`modal-container_${i}`];
738
738
  if (h)
739
739
  return h.hideLoading();
740
740
  }
741
- function i(c, h, m) {
742
- const k = t.value.find((y) => y.id === c);
741
+ function c(i, h, m) {
742
+ const k = r.value.find((y) => y.id === i);
743
743
  k && k.listeners.push({
744
744
  event: h,
745
745
  callback: m
@@ -749,34 +749,34 @@ const tn = (e) => (nt("data-v-189513f2"), e = e(), rt(), e), nn = { class: "titl
749
749
  open: u,
750
750
  close: a,
751
751
  closeAll: d,
752
- addEventListener: i
753
- }), r({
754
- elements: t,
752
+ addEventListener: c
753
+ }), n({
754
+ elements: r,
755
755
  open: u,
756
756
  close: a,
757
757
  closeAll: d
758
- }), D(() => {
759
- n.value = !0;
760
- }), (c, h) => (S(), F(he, null, [
761
- Ae(c.$slots, "default", {}, void 0, !0),
762
- n.value ? (S(), F("div", pn, [
758
+ }), U(() => {
759
+ t.value = !0;
760
+ }), (i, h) => (S(), F(he, null, [
761
+ Ae(i.$slots, "default", {}, void 0, !0),
762
+ t.value ? (S(), F("div", pn, [
763
763
  (S(), re(Be, {
764
- disabled: !c.appendToBody,
765
- to: typeof c.appendToBody == "string" ? c.appendToBody : "body"
764
+ disabled: !i.appendToBody,
765
+ to: typeof i.appendToBody == "string" ? i.appendToBody : "body"
766
766
  }, [
767
767
  v(De, { name: "modal-fade" }, {
768
768
  default: Ue(() => [
769
- (S(!0), F(he, null, We(t.value, (m) => (S(), re(sn, _e({
769
+ (S(!0), F(he, null, We(r.value, (m) => (S(), re(sn, _e({
770
770
  id: m.id,
771
771
  key: m.id,
772
772
  ref_for: !0,
773
773
  ref: `modal-container_${m.id}`,
774
774
  component: m.component,
775
775
  "component-props": m.props,
776
- "max-height": c.maxHeight,
777
- "max-width": c.maxWidth,
778
- offset: c.offset,
779
- sizes: c.sizes
776
+ "max-height": i.maxHeight,
777
+ "max-width": i.maxWidth,
778
+ offset: i.offset,
779
+ sizes: i.sizes
780
780
  }, m.options, {
781
781
  onSubmit: () => p(m.id, "submit")
782
782
  }), null, 16, ["id", "component", "component-props", "max-height", "max-width", "offset", "sizes", "onSubmit"]))), 128))
@@ -784,34 +784,34 @@ const tn = (e) => (nt("data-v-189513f2"), e = e(), rt(), e), nn = { class: "titl
784
784
  _: 1
785
785
  })
786
786
  ], 8, ["disabled", "to"]))
787
- ])) : H("", !0)
787
+ ])) : Y("", !0)
788
788
  ], 64));
789
789
  }
790
790
  }), wn = /* @__PURE__ */ ke(kn, [["__scopeId", "data-v-45a851d0"]]);
791
- function ne(e, r) {
792
- var t, n;
791
+ function ne(e, n) {
792
+ var r, t;
793
793
  let l = e == null ? void 0 : e.parent;
794
- for (; l && ((t = l == null ? void 0 : l.type) == null ? void 0 : t.name) !== r; )
794
+ for (; l && ((r = l == null ? void 0 : l.type) == null ? void 0 : r.name) !== n; )
795
795
  l = l.parent;
796
- return ((n = l == null ? void 0 : l.type) == null ? void 0 : n.name) === r ? l : null;
796
+ return ((t = l == null ? void 0 : l.type) == null ? void 0 : t.name) === n ? l : null;
797
797
  }
798
798
  function Pe() {
799
- const e = le(ue), r = U();
800
- function t(n, l, u) {
799
+ const e = le(ue), n = W();
800
+ function r(t, l, u) {
801
801
  if (!e)
802
802
  throw new Error("Not Found Modal Provider Component");
803
- return e.open(n, l, u);
803
+ return e.open(t, l, u);
804
804
  }
805
805
  return {
806
- open: t,
807
- close(n) {
806
+ open: r,
807
+ close(t) {
808
808
  var l;
809
809
  if (!e)
810
810
  throw new Error("Not Found Modal Provider Component");
811
- const u = ne(r, "ModalContainer"), a = (l = u == null ? void 0 : u.props) == null ? void 0 : l.id;
811
+ const u = ne(n, "ModalContainer"), a = (l = u == null ? void 0 : u.props) == null ? void 0 : l.id;
812
812
  if (!a)
813
813
  throw new Error("Not Found Current Modal Container");
814
- e.close(a, n);
814
+ e.close(a, t);
815
815
  },
816
816
  closeAll() {
817
817
  if (!e)
@@ -819,93 +819,93 @@ function Pe() {
819
819
  e.closeAll();
820
820
  },
821
821
  showLoading() {
822
- var n;
822
+ var t;
823
823
  if (!e)
824
824
  throw new Error("Not Found Modal Provider Component");
825
- const l = ne(r, "ModalContainer");
826
- if (!((n = l == null ? void 0 : l.props) != null && n.id))
825
+ const l = ne(n, "ModalContainer");
826
+ if (!((t = l == null ? void 0 : l.props) != null && t.id))
827
827
  throw new Error("Not Found Current Modal Container");
828
828
  l != null && l.exposed && (l == null || l.exposed.showLoading());
829
829
  },
830
830
  hideLoading() {
831
- var n;
831
+ var t;
832
832
  if (!e)
833
833
  throw new Error("Not Found Modal Provider Component");
834
- const l = ne(r, "ModalContainer");
835
- if (!((n = l == null ? void 0 : l.props) != null && n.id))
834
+ const l = ne(n, "ModalContainer");
835
+ if (!((t = l == null ? void 0 : l.props) != null && t.id))
836
836
  throw new Error("Not Found Current Modal Container");
837
837
  l != null && l.exposed && (l == null || l.exposed.hideLoading());
838
838
  },
839
- confirm(n) {
840
- return this.open("confirm", n);
839
+ confirm(t) {
840
+ return this.open("confirm", t);
841
841
  },
842
- info(n) {
843
- return this.open("info", n);
842
+ info(t) {
843
+ return this.open("info", t);
844
844
  },
845
- error(n) {
846
- return this.open("error", n);
845
+ error(t) {
846
+ return this.open("error", t);
847
847
  },
848
- warning(n) {
849
- return this.open("warning", n);
848
+ warning(t) {
849
+ return this.open("warning", t);
850
850
  },
851
- success(n) {
852
- return this.open("success", n);
851
+ success(t) {
852
+ return this.open("success", t);
853
853
  }
854
854
  };
855
855
  }
856
856
  function xn(e) {
857
- var r;
858
- const t = le(ue), n = U(), l = ne(n, "ModalContainer"), u = (r = l == null ? void 0 : l.props) == null ? void 0 : r.id;
859
- t && u && t.addEventListener(u, "submit", e);
857
+ var n;
858
+ const r = le(ue), t = W(), l = ne(t, "ModalContainer"), u = (n = l == null ? void 0 : l.props) == null ? void 0 : n.id;
859
+ r && u && r.addEventListener(u, "submit", e);
860
860
  }
861
861
  const Fe = {
862
862
  id: Symbol("ID"),
863
863
  source: Symbol("Source")
864
864
  };
865
- function Sn(e, r) {
866
- const t = $({});
865
+ function Sn(e, n) {
866
+ const r = C({});
867
867
  return e == null || e.forEach((l) => {
868
868
  let u = null;
869
- l.default && (u = (typeof l.default == "function" ? l.default() : l.default) || null), r && r[l.key] !== void 0 && (u = r[l.key]), t.value[l.key] = u;
870
- }), [t, (l) => {
871
- t.value = l;
869
+ l.default && (u = (typeof l.default == "function" ? l.default() : l.default) || null), n && n[l.key] !== void 0 && (u = n[l.key]), r.value[l.key] = u;
870
+ }), [r, (l) => {
871
+ r.value = l;
872
872
  }];
873
873
  }
874
874
  function Cn(e) {
875
- function r(t, n) {
876
- return e != null && e.disabledDate ? e.disabledDate(t, n) : !1;
875
+ function n(r, t) {
876
+ return e != null && e.disabledDate ? e.disabledDate(r, t) : !1;
877
877
  }
878
- return (t, n) => {
878
+ return (r, t) => {
879
879
  switch (e == null ? void 0 : e.type) {
880
880
  case "week":
881
881
  return v(dt, {
882
- modelValue: t[n.key],
883
- "onUpdate:modelValue": (l) => t[n.key] = l,
884
- "disabled-date": r,
882
+ modelValue: r[t.key],
883
+ "onUpdate:modelValue": (l) => r[t.key] = l,
884
+ "disabled-date": n,
885
885
  format: e == null ? void 0 : e.labelFormat,
886
886
  "value-format": e == null ? void 0 : e.valueFormat
887
887
  }, null);
888
888
  case "month":
889
889
  return v(it, {
890
- modelValue: t[n.key],
891
- "onUpdate:modelValue": (l) => t[n.key] = l,
892
- "disabled-date": r,
890
+ modelValue: r[t.key],
891
+ "onUpdate:modelValue": (l) => r[t.key] = l,
892
+ "disabled-date": n,
893
893
  format: e == null ? void 0 : e.labelFormat,
894
894
  "value-format": e == null ? void 0 : e.valueFormat
895
895
  }, null);
896
896
  case "quarter":
897
897
  return v(ct, {
898
- modelValue: t[n.key],
899
- "onUpdate:modelValue": (l) => t[n.key] = l,
900
- "disabled-date": r,
898
+ modelValue: r[t.key],
899
+ "onUpdate:modelValue": (l) => r[t.key] = l,
900
+ "disabled-date": n,
901
901
  format: e == null ? void 0 : e.labelFormat,
902
902
  "value-format": e == null ? void 0 : e.valueFormat
903
903
  }, null);
904
904
  case "year":
905
905
  return v(ut, {
906
- modelValue: t[n.key],
907
- "onUpdate:modelValue": (l) => t[n.key] = l,
908
- "disabled-date": r,
906
+ modelValue: r[t.key],
907
+ "onUpdate:modelValue": (l) => r[t.key] = l,
908
+ "disabled-date": n,
909
909
  format: e == null ? void 0 : e.labelFormat,
910
910
  "value-format": e == null ? void 0 : e.valueFormat
911
911
  }, null);
@@ -913,9 +913,9 @@ function Cn(e) {
913
913
  default:
914
914
  return v(ot, {
915
915
  "disabled-input": !0,
916
- modelValue: t[n.key],
917
- "onUpdate:modelValue": (l) => t[n.key] = l,
918
- "disabled-date": r,
916
+ modelValue: r[t.key],
917
+ "onUpdate:modelValue": (l) => r[t.key] = l,
918
+ "disabled-date": n,
919
919
  format: e == null ? void 0 : e.labelFormat,
920
920
  "value-format": e == null ? void 0 : e.valueFormat
921
921
  }, null);
@@ -923,12 +923,12 @@ function Cn(e) {
923
923
  };
924
924
  }
925
925
  function $n(e) {
926
- return (r, t) => {
926
+ return (n, r) => {
927
927
  switch (e == null ? void 0 : e.type) {
928
928
  case "number":
929
929
  return v(je, {
930
- modelValue: r[t.key],
931
- "onUpdate:modelValue": (n) => r[t.key] = n,
930
+ modelValue: n[r.key],
931
+ "onUpdate:modelValue": (t) => n[r.key] = t,
932
932
  hideButton: !0,
933
933
  "read-only": e == null ? void 0 : e.readonly,
934
934
  placeholder: e == null ? void 0 : e.placeholder,
@@ -937,8 +937,8 @@ function $n(e) {
937
937
  case "string":
938
938
  default:
939
939
  return v(st, {
940
- modelValue: r[t.key],
941
- "onUpdate:modelValue": (n) => r[t.key] = n,
940
+ modelValue: n[r.key],
941
+ "onUpdate:modelValue": (t) => n[r.key] = t,
942
942
  placeholder: e == null ? void 0 : e.placeholder,
943
943
  readonly: e == null ? void 0 : e.readonly,
944
944
  allowClear: e == null ? void 0 : e.clearable
@@ -947,43 +947,43 @@ function $n(e) {
947
947
  };
948
948
  }
949
949
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
950
- function we(e, r, t) {
951
- const n = K(e, (...l) => (Me(() => n()), r(...l)), t);
952
- return n;
950
+ function we(e, n, r) {
951
+ const t = Z(e, (...l) => (Me(() => t()), n(...l)), r);
952
+ return t;
953
953
  }
954
954
  function Fn(e) {
955
955
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ye(e);
956
956
  }
957
- const G = /* @__PURE__ */ new WeakMap();
957
+ const X = /* @__PURE__ */ new WeakMap();
958
958
  function On() {
959
- const e = $(/* @__PURE__ */ new Map());
960
- return [e, (t) => e.value = t];
959
+ const e = C(/* @__PURE__ */ new Map());
960
+ return [e, (r) => e.value = r];
961
961
  }
962
962
  function _n(e) {
963
- let r, t = !1;
964
- const [n, l] = On(), u = (s) => {
965
- if (e.onChange && e.onChange(s), !e.autoSumbit || !r)
963
+ let n, r = !1;
964
+ const [t, l] = On(), u = (s) => {
965
+ if (e.onChange && e.onChange(s), !e.autoSumbit || !n)
966
966
  return;
967
- let o = r;
967
+ let o = n;
968
968
  for (; o && o.$el.tagName !== "FORM"; )
969
969
  o = o.$parent;
970
970
  o && o.$el && o.$el.dispatchEvent(new Event("submit"));
971
971
  }, a = (s, o) => {
972
- const i = s();
973
- i instanceof Promise ? i.then(o) : o(i);
972
+ const c = s();
973
+ c instanceof Promise ? c.then(o) : o(c);
974
974
  }, d = async () => {
975
- const s = G.get(e.options);
975
+ const s = X.get(e.options);
976
976
  switch (typeof s) {
977
977
  case "function":
978
- G.set(e.options, l);
978
+ X.set(e.options, l);
979
979
  return;
980
980
  case "object":
981
981
  l(s);
982
982
  return;
983
983
  }
984
- G.set(e.options, l), a(e.options, (o) => {
985
- const i = G.get(e.options);
986
- G.set(e.options, o), i(o);
984
+ X.set(e.options, l), a(e.options, (o) => {
985
+ const c = X.get(e.options);
986
+ X.set(e.options, o), c(o);
987
987
  });
988
988
  }, p = () => {
989
989
  a(e.options, (s) => {
@@ -1004,66 +1004,66 @@ function _n(e) {
1004
1004
  break;
1005
1005
  }
1006
1006
  default:
1007
- n.value = e.options;
1007
+ t.value = e.options;
1008
1008
  }
1009
1009
  return (s, o) => {
1010
- let i;
1011
- return e.default && !t && (s[o.key] = e.default, t = !0), v(ft, {
1012
- ref: (c) => r = c,
1010
+ let c;
1011
+ return e.default && !r && (s[o.key] = e.default, r = !0), v(ft, {
1012
+ ref: (i) => n = i,
1013
1013
  multiple: e.multiple,
1014
1014
  modelValue: s[o.key],
1015
- "onUpdate:modelValue": (c) => s[o.key] = c,
1015
+ "onUpdate:modelValue": (i) => s[o.key] = i,
1016
1016
  placeholder: e.placeholder,
1017
1017
  allowClear: e.clearable,
1018
1018
  allowSearch: e.searchable,
1019
1019
  "allow-create": e.createable,
1020
1020
  maxTagCount: e.maxTagCount ?? 2,
1021
1021
  onChange: u
1022
- }, Fn(i = Array.from(n.value.entries()).map(([c, h]) => v(mt, {
1023
- key: c,
1024
- value: c,
1022
+ }, Fn(c = Array.from(t.value.entries()).map(([i, h]) => v(mt, {
1023
+ key: i,
1024
+ value: i,
1025
1025
  label: h
1026
- }, null))) ? i : {
1027
- default: () => [i]
1026
+ }, null))) ? c : {
1027
+ default: () => [c]
1028
1028
  });
1029
1029
  };
1030
1030
  }
1031
1031
  function In(e) {
1032
- function r() {
1032
+ function n() {
1033
1033
  e != null && e.autoSumbit;
1034
1034
  }
1035
- return (t, n) => (e != null && e.default && (t[n.key] = e.default), v(ht, {
1036
- modelValue: t[n.key],
1037
- "onUpdate:modelValue": (l) => t[n.key] = l,
1035
+ return (r, t) => (e != null && e.default && (r[t.key] = e.default), v(ht, {
1036
+ modelValue: r[t.key],
1037
+ "onUpdate:modelValue": (l) => r[t.key] = l,
1038
1038
  checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
1039
1039
  uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
1040
1040
  checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
1041
1041
  uncheckedValue: (e == null ? void 0 : e.closeValue) ?? !1,
1042
- onChange: r
1042
+ onChange: n
1043
1043
  }, null));
1044
1044
  }
1045
1045
  function Mn(e) {
1046
- return (r, t) => {
1047
- let n = [];
1046
+ return (n, r) => {
1047
+ let t = [];
1048
1048
  function l(d) {
1049
- n = d;
1049
+ t = d;
1050
1050
  }
1051
1051
  function u(d) {
1052
1052
  if (d && d.length === 2) {
1053
- const [p, s] = d.sort(), o = $e(p).startOf("days"), i = $e(s).endOf("days");
1054
- r[t.key] = [o.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), i.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
1053
+ const [p, s] = d.sort(), o = $e(p).startOf("days"), c = $e(s).endOf("days");
1054
+ n[r.key] = [o.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), c.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
1055
1055
  }
1056
1056
  }
1057
1057
  function a(d) {
1058
- return e != null && e.disabledDate ? e.disabledDate(n, d) : !1;
1058
+ return e != null && e.disabledDate ? e.disabledDate(t.filter(Boolean), d) : !1;
1059
1059
  }
1060
1060
  return v("div", null, [v(vt, {
1061
1061
  "disabled-input": !0,
1062
1062
  style: {
1063
1063
  width: "300px"
1064
1064
  },
1065
- modelValue: r[t.key],
1066
- "onUpdate:modelValue": (d) => r[t.key] = d,
1065
+ modelValue: n[r.key],
1066
+ "onUpdate:modelValue": (d) => n[r.key] = d,
1067
1067
  onSelect: l,
1068
1068
  onChange: u,
1069
1069
  mode: e == null ? void 0 : e.type,
@@ -1075,44 +1075,44 @@ function Mn(e) {
1075
1075
  };
1076
1076
  }
1077
1077
  function jn(e) {
1078
- return (r, t) => v(yt, {
1079
- modelValue: r[t.key],
1080
- "onUpdate:modelValue": (n) => r[t.key] = n,
1078
+ return (n, r) => v(yt, {
1079
+ modelValue: n[r.key],
1080
+ "onUpdate:modelValue": (t) => n[r.key] = t,
1081
1081
  placeholder: e == null ? void 0 : e.placeholder,
1082
1082
  autoSize: e == null ? void 0 : e.autosize,
1083
1083
  maxLength: e == null ? void 0 : e.maxLength
1084
1084
  }, null);
1085
1085
  }
1086
- const X = /* @__PURE__ */ new WeakMap();
1086
+ const J = /* @__PURE__ */ new WeakMap();
1087
1087
  function Tn() {
1088
- const e = $([]);
1089
- return [e, (t) => e.value = t];
1088
+ const e = C([]);
1089
+ return [e, (r) => e.value = r];
1090
1090
  }
1091
1091
  function Ln(e) {
1092
- let r, t = !1;
1093
- const [n, l] = Tn(), u = () => {
1094
- if (!e.autoSumbit || !r)
1092
+ let n, r = !1;
1093
+ const [t, l] = Tn(), u = () => {
1094
+ if (!e.autoSumbit || !n)
1095
1095
  return;
1096
- let o = r;
1096
+ let o = n;
1097
1097
  for (; o && o.$el.tagName !== "FORM"; )
1098
1098
  o = o.$parent;
1099
1099
  o && o.$el && o.$el.dispatchEvent(new Event("submit"));
1100
- }, a = (o, i) => {
1101
- const c = o();
1102
- c instanceof Promise ? c.then(i) : i(c);
1100
+ }, a = (o, c) => {
1101
+ const i = o();
1102
+ i instanceof Promise ? i.then(c) : c(i);
1103
1103
  }, d = async () => {
1104
- const o = X.get(e.options);
1104
+ const o = J.get(e.options);
1105
1105
  switch (typeof o) {
1106
1106
  case "function":
1107
- X.set(e.options, l);
1107
+ J.set(e.options, l);
1108
1108
  return;
1109
1109
  case "object":
1110
1110
  l(o);
1111
1111
  return;
1112
1112
  }
1113
- X.set(e.options, l), a(e.options, (i) => {
1114
- const c = X.get(e.options);
1115
- X.set(e.options, i), c(i);
1113
+ J.set(e.options, l), a(e.options, (c) => {
1114
+ const i = J.get(e.options);
1115
+ J.set(e.options, c), i(c);
1116
1116
  });
1117
1117
  }, p = () => {
1118
1118
  a(e.options, (o) => {
@@ -1133,61 +1133,61 @@ function Ln(e) {
1133
1133
  break;
1134
1134
  }
1135
1135
  default:
1136
- n.value = e.options;
1136
+ t.value = e.options;
1137
1137
  }
1138
- function s(o, i) {
1138
+ function s(o, c) {
1139
1139
  var m;
1140
- const c = ((m = e.fieldNames) == null ? void 0 : m.title) || "title", h = i[c];
1140
+ const i = ((m = e.fieldNames) == null ? void 0 : m.title) || "title", h = c[i];
1141
1141
  return h ? h.toLowerCase().includes(o.toLowerCase()) : !1;
1142
1142
  }
1143
- return (o, i) => (e.default && !t && (o[i.key] = e.default, t = !0), v(gt, {
1144
- ref: (c) => r = c,
1143
+ return (o, c) => (e.default && !r && (o[c.key] = e.default, r = !0), v(gt, {
1144
+ ref: (i) => n = i,
1145
1145
  multiple: e.multiple,
1146
- modelValue: o[i.key],
1147
- "onUpdate:modelValue": (c) => o[i.key] = c,
1146
+ modelValue: o[c.key],
1147
+ "onUpdate:modelValue": (i) => o[c.key] = i,
1148
1148
  placeholder: e.placeholder,
1149
1149
  allowClear: e.clearable,
1150
1150
  allowSearch: e.searchable,
1151
1151
  maxTagCount: e.maxTagCount ?? 2,
1152
1152
  onChange: u,
1153
1153
  filterTreeNode: s,
1154
- data: n.value,
1154
+ data: t.value,
1155
1155
  fieldNames: e.fieldNames,
1156
1156
  treeProps: e.treeProps
1157
1157
  }, {
1158
1158
  ...e.slots
1159
1159
  }));
1160
1160
  }
1161
- const J = /* @__PURE__ */ new WeakMap();
1161
+ const Q = /* @__PURE__ */ new WeakMap();
1162
1162
  function zn() {
1163
- const e = $([]);
1164
- return [e, (t) => e.value = t];
1163
+ const e = C([]);
1164
+ return [e, (r) => e.value = r];
1165
1165
  }
1166
1166
  function Pn(e) {
1167
- let r, t = !1;
1168
- const [n, l] = zn(), u = () => {
1169
- if (!e.autoSumbit || !r)
1167
+ let n, r = !1;
1168
+ const [t, l] = zn(), u = () => {
1169
+ if (!e.autoSumbit || !n)
1170
1170
  return;
1171
- let s = r;
1171
+ let s = n;
1172
1172
  for (; s && s.$el.tagName !== "FORM"; )
1173
1173
  s = s.$parent;
1174
1174
  s && s.$el && s.$el.dispatchEvent(new Event("submit"));
1175
1175
  }, a = (s, o) => {
1176
- const i = s();
1177
- i instanceof Promise ? i.then(o) : o(i);
1176
+ const c = s();
1177
+ c instanceof Promise ? c.then(o) : o(c);
1178
1178
  }, d = async () => {
1179
- const s = J.get(e.options);
1179
+ const s = Q.get(e.options);
1180
1180
  switch (typeof s) {
1181
1181
  case "function":
1182
- J.set(e.options, l);
1182
+ Q.set(e.options, l);
1183
1183
  return;
1184
1184
  case "object":
1185
1185
  l(s);
1186
1186
  return;
1187
1187
  }
1188
- J.set(e.options, l), a(e.options, (o) => {
1189
- const i = J.get(e.options);
1190
- J.set(e.options, o), i(o);
1188
+ Q.set(e.options, l), a(e.options, (o) => {
1189
+ const c = Q.get(e.options);
1190
+ Q.set(e.options, o), c(o);
1191
1191
  });
1192
1192
  }, p = () => {
1193
1193
  a(e.options, (s) => {
@@ -1208,24 +1208,24 @@ function Pn(e) {
1208
1208
  break;
1209
1209
  }
1210
1210
  default:
1211
- n.value = e.options;
1211
+ t.value = e.options;
1212
1212
  }
1213
- return (s, o) => (e.default && !t && (s[o.key] = e.default, t = !0), v(pt, {
1213
+ return (s, o) => (e.default && !r && (s[o.key] = e.default, r = !0), v(pt, {
1214
1214
  pathMode: e.pathMode,
1215
- ref: (i) => r = i,
1215
+ ref: (c) => n = c,
1216
1216
  multiple: e.multiple,
1217
1217
  modelValue: s[o.key],
1218
- "onUpdate:modelValue": (i) => s[o.key] = i,
1218
+ "onUpdate:modelValue": (c) => s[o.key] = c,
1219
1219
  placeholder: e.placeholder,
1220
1220
  allowClear: e.clearable,
1221
1221
  allowSearch: e.searchable,
1222
1222
  maxTagCount: e.maxTagCount ?? 2,
1223
1223
  onChange: u,
1224
- options: n.value
1224
+ options: t.value
1225
1225
  }, null));
1226
1226
  }
1227
1227
  function Vn(e) {
1228
- return (r) => e(r);
1228
+ return (n) => e(n);
1229
1229
  }
1230
1230
  const Rn = {
1231
1231
  thousands: !0,
@@ -1241,31 +1241,31 @@ function Nn(e) {
1241
1241
  ...Rn,
1242
1242
  ...e || {}
1243
1243
  };
1244
- const r = (a) => {
1244
+ const n = (a) => {
1245
1245
  if (a == null)
1246
1246
  return;
1247
1247
  if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
1248
1248
  return a;
1249
1249
  const d = te[e.outputUnit] / te[e.inputUnit];
1250
1250
  return a * d;
1251
- }, t = (a) => {
1251
+ }, r = (a) => {
1252
1252
  if (a == null)
1253
1253
  return;
1254
1254
  if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
1255
1255
  return a;
1256
1256
  const d = te[e.inputUnit] / te[e.outputUnit];
1257
1257
  return a * d;
1258
- }, n = (a) => {
1258
+ }, t = (a) => {
1259
1259
  const d = a.split(".");
1260
1260
  return d[0] = d[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), d.join(".");
1261
1261
  }, l = (a) => {
1262
1262
  const d = a;
1263
- return e != null && e.thousands ? n(d) : d;
1263
+ return e != null && e.thousands ? t(d) : d;
1264
1264
  }, u = (a) => a.replace(/,/g, "");
1265
1265
  return (a, d) => {
1266
- const p = $(r(a[d.key]));
1267
- return K(p, (s) => {
1268
- a[d.key] = t(s);
1266
+ const p = C(n(a[d.key]));
1267
+ return Z(p, (s) => {
1268
+ a[d.key] = r(s);
1269
1269
  }), v(je, {
1270
1270
  modelValue: p.value,
1271
1271
  "onUpdate:modelValue": (s) => p.value = s,
@@ -1296,25 +1296,25 @@ function En() {
1296
1296
  currency: Nn
1297
1297
  };
1298
1298
  }
1299
- function An(e, r) {
1300
- r.render || (r.render = (n) => n.input());
1301
- const t = r.render({
1299
+ function An(e, n) {
1300
+ n.render || (n.render = (t) => t.input());
1301
+ const r = n.render({
1302
1302
  ...En()
1303
1303
  });
1304
1304
  return {
1305
- default: () => t(e, r)
1305
+ default: () => r(e, n)
1306
1306
  };
1307
1307
  }
1308
- function Bn(e, r) {
1308
+ function Bn(e, n) {
1309
1309
  return lt(Te, {
1310
- field: r.key,
1311
- label: r.title
1312
- }, An(e, r));
1310
+ field: n.key,
1311
+ label: n.title
1312
+ }, An(e, n));
1313
1313
  }
1314
1314
  function Dn(e) {
1315
1315
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ye(e);
1316
1316
  }
1317
- const Un = /* @__PURE__ */ P({
1317
+ const Un = /* @__PURE__ */ R({
1318
1318
  props: {
1319
1319
  form: {
1320
1320
  type: Object,
@@ -1322,61 +1322,61 @@ const Un = /* @__PURE__ */ P({
1322
1322
  }
1323
1323
  },
1324
1324
  setup(e) {
1325
- const r = Pe(), t = e.form.map((a) => ({
1325
+ const n = Pe(), r = e.form.map((a) => ({
1326
1326
  ...a,
1327
1327
  collapsed: !1
1328
- })), n = Array.from(new Set(t.map((a) => a.group).flat().filter(Boolean))), l = t.reduce((a, d) => ((d.group ? [d.group].flat() : ["默认"]).forEach((p) => {
1328
+ })), t = Array.from(new Set(r.map((a) => a.group).flat().filter(Boolean))), l = r.reduce((a, d) => ((d.group ? [d.group].flat() : ["默认"]).forEach((p) => {
1329
1329
  let s = a.find((o) => o.group === p);
1330
1330
  s || (s = {
1331
1331
  group: p,
1332
1332
  instance: void 0,
1333
1333
  form: []
1334
1334
  }, a.push(s)), s.form.push(d);
1335
- }), a), []).sort((a, d) => a.group === "默认" ? -1 : d.group === "默认" ? 1 : a.group > d.group ? -1 : 1), u = $("默认");
1335
+ }), a), []).sort((a, d) => a.group === "默认" ? -1 : d.group === "默认" ? 1 : a.group > d.group ? -1 : 1), u = C("默认");
1336
1336
  return xn(() => {
1337
1337
  const a = l.find((d) => d.group === u.value);
1338
1338
  if (a && a.instance) {
1339
1339
  const d = a.instance.formSource;
1340
1340
  a.instance.validate().then(() => {
1341
- r.close(d);
1341
+ n.close(d);
1342
1342
  });
1343
1343
  }
1344
1344
  }), {
1345
- formItems: t,
1346
- groups: n,
1345
+ formItems: r,
1346
+ groups: t,
1347
1347
  groupForms: l,
1348
1348
  activeTab: u
1349
1349
  };
1350
1350
  },
1351
1351
  render() {
1352
- const e = this.groupForms.find((r) => r.group === this.activeTab);
1352
+ const e = this.groupForms.find((n) => n.group === this.activeTab);
1353
1353
  if (this.groups.length) {
1354
- let r;
1354
+ let n;
1355
1355
  return v(bt, {
1356
1356
  "active-key": this.activeTab,
1357
- "onUpdate:active-key": (t) => this.activeTab = t
1358
- }, Dn(r = this.groupForms.map((t) => v(kt, {
1359
- title: t.group,
1360
- key: t.group
1357
+ "onUpdate:active-key": (r) => this.activeTab = r
1358
+ }, Dn(n = this.groupForms.map((r) => v(kt, {
1359
+ title: r.group,
1360
+ key: r.group
1361
1361
  }, {
1362
1362
  default: () => [v(ve, {
1363
- form: t.form,
1364
- ref: (n) => t.instance = n
1363
+ form: r.form,
1364
+ ref: (t) => r.instance = t
1365
1365
  }, null)]
1366
- }))) ? r : {
1367
- default: () => [r]
1366
+ }))) ? n : {
1367
+ default: () => [n]
1368
1368
  });
1369
1369
  } else
1370
1370
  return v(ve, {
1371
1371
  form: this.formItems,
1372
- ref: (r) => e.instance = r
1372
+ ref: (n) => e.instance = n
1373
1373
  }, null);
1374
1374
  }
1375
1375
  });
1376
1376
  function Oe(e) {
1377
1377
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ye(e);
1378
1378
  }
1379
- const ve = /* @__PURE__ */ P({
1379
+ const ve = /* @__PURE__ */ R({
1380
1380
  props: {
1381
1381
  form: {
1382
1382
  type: Object,
@@ -1438,31 +1438,40 @@ const ve = /* @__PURE__ */ P({
1438
1438
  emits: ["submit", "cancel", "update:model-value"],
1439
1439
  expose: ["formSource", "updateFormField", "updateFormSource", "reset", "validate"],
1440
1440
  setup(e, {
1441
- emit: r
1441
+ emit: n
1442
1442
  }) {
1443
- const t = $(), [n, l] = Sn(e.form, e.modelValue || e.value), u = $(e.columns || 0), a = $(!0), d = $(), p = () => a.value = !a.value;
1444
- me(Fe.id, e.id), me(Fe.source, n);
1443
+ const r = C(), [t, l] = Sn(e.form, e.modelValue || e.value), u = C(e.columns || 0), a = C(!0), d = C(), p = () => a.value = !a.value;
1444
+ me(Fe.id, e.id), me(Fe.source, t);
1445
1445
  const s = () => {
1446
- r("submit", n.value), r("update:model-value", n.value);
1447
- }, o = C(() => {
1446
+ n("submit", t.value), n("update:model-value", t.value);
1447
+ }, o = x(() => e.form.filter((g) => a.value ? !g.collapsed : !0).filter((g) => {
1448
+ switch (!0) {
1449
+ case typeof g.visiable == "boolean":
1450
+ return g.visiable;
1451
+ case typeof g.visiable == "function":
1452
+ return g.visiable(t.value);
1453
+ default:
1454
+ return !0;
1455
+ }
1456
+ })), c = x(() => {
1448
1457
  if (!u.value)
1449
1458
  return 1;
1450
- const g = e.form.reduce((x, V) => x + ((V == null ? void 0 : V.span) || 1), 0);
1459
+ const g = o.value.reduce(($, P) => $ + ((P == null ? void 0 : P.span) || 1), 0);
1451
1460
  return u.value - g % u.value;
1452
- }), i = C(() => e.form.reduce((g, x) => (x.rule && (g[x.key] = x.rule), g), {}));
1453
- function c() {
1454
- var x;
1461
+ }), i = x(() => e.form.reduce((g, $) => ($.rule && (g[$.key] = $.rule), g), {}));
1462
+ function h() {
1463
+ var $;
1455
1464
  if (e.columns)
1456
1465
  return;
1457
- const g = (x = t.value) == null ? void 0 : x.$el;
1458
- g && (u.value = Math.floor(g.offsetWidth / e.minWidth));
1466
+ const g = ($ = r.value) == null ? void 0 : $.$el;
1467
+ g && (u.value = Math.max(Math.floor(g.offsetWidth / e.minWidth), 1));
1459
1468
  }
1460
- function h() {
1461
- var x;
1462
- const g = (x = t.value) == null ? void 0 : x.$el;
1469
+ function m() {
1470
+ var $;
1471
+ const g = ($ = r.value) == null ? void 0 : $.$el;
1463
1472
  g && (g.id = e.id);
1464
1473
  }
1465
- function m() {
1474
+ function k() {
1466
1475
  d.value.open(Un, {
1467
1476
  form: e.form
1468
1477
  }, {
@@ -1470,114 +1479,106 @@ const ve = /* @__PURE__ */ P({
1470
1479
  footer: !0,
1471
1480
  submitText: "搜索"
1472
1481
  }).then((g) => {
1473
- g && (k(g), s());
1482
+ g && (y(g), s());
1474
1483
  });
1475
1484
  }
1476
- D(() => {
1477
- c(), h();
1485
+ U(() => {
1486
+ h(), m();
1478
1487
  });
1479
- function k(g) {
1488
+ function y(g) {
1480
1489
  l({
1481
- ...n.value,
1490
+ ...t.value,
1482
1491
  ...g || {}
1483
1492
  });
1484
1493
  }
1485
- function y(g, x) {
1486
- n.value[g] = x, k({
1487
- ...n.value
1494
+ function O(g, $) {
1495
+ t.value[g] = $, y({
1496
+ ...t.value
1488
1497
  });
1489
1498
  }
1490
- function O() {
1499
+ function T() {
1491
1500
  var g;
1492
- (g = t.value) == null || g.resetFields();
1501
+ (g = r.value) == null || g.resetFields();
1493
1502
  }
1494
- function j() {
1503
+ function I() {
1495
1504
  var g;
1496
- return (g = t.value) == null ? void 0 : g.validate();
1505
+ return (g = r.value) == null ? void 0 : g.validate();
1497
1506
  }
1498
- return D(() => {
1499
- window && window.addEventListener("resize", c);
1507
+ return U(() => {
1508
+ window && window.addEventListener("resize", h);
1500
1509
  }), {
1501
- formSource: n,
1502
- formInstance: t,
1510
+ formSource: t,
1511
+ formInstance: r,
1503
1512
  formColumns: u,
1504
1513
  formRules: i,
1505
1514
  formCollspased: a,
1506
- formActiosSpan: o,
1515
+ formActiosSpan: c,
1516
+ formItems: o,
1507
1517
  toggleFormCollapsed: p,
1508
- updateFormField: y,
1509
- updateFormSource: k,
1510
- reset: O,
1511
- validate: j,
1518
+ updateFormField: O,
1519
+ updateFormSource: y,
1520
+ reset: T,
1521
+ validate: I,
1512
1522
  onSubmitSuccess: s,
1513
- openCollapsedDialog: m,
1523
+ openCollapsedDialog: k,
1514
1524
  modalInstance: d
1515
1525
  };
1516
1526
  },
1517
1527
  render() {
1518
1528
  const e = () => {
1519
- const t = [], n = this.footer ? {
1529
+ const n = [], r = this.footer ? {
1520
1530
  span: this.formColumns
1521
1531
  } : {
1522
1532
  span: this.formActiosSpan
1523
1533
  };
1524
- if (this.searchable && (t.push(v(q, {
1534
+ if (this.searchable && (n.push(v(H, {
1525
1535
  type: "primary",
1526
1536
  htmlType: "submit"
1527
1537
  }, {
1528
1538
  default: () => [ee("搜索")]
1529
- })), t.push(v(q, {
1539
+ })), n.push(v(H, {
1530
1540
  type: "secondary",
1531
1541
  onClick: () => {
1532
- var l;
1533
- return (l = this.formInstance) == null ? void 0 : l.resetFields();
1542
+ var t;
1543
+ return (t = this.formInstance) == null ? void 0 : t.resetFields();
1534
1544
  }
1535
1545
  }, {
1536
1546
  default: () => [ee("重置")]
1537
- }))), this.submitable && (t.push(v(q, {
1547
+ }))), this.submitable && (n.push(v(H, {
1538
1548
  type: "primary",
1539
1549
  htmlType: "submit"
1540
1550
  }, {
1541
1551
  default: () => [ee("提交")]
1542
- })), t.push(v(q, {
1552
+ })), n.push(v(H, {
1543
1553
  type: "secondary",
1544
1554
  onClick: () => this.$emit("cancel")
1545
1555
  }, {
1546
1556
  default: () => [ee("取消")]
1547
- }))), this.form.some((l) => !!l.collapsed) && (this.collapsedMode === "append" && t.push(v(q, {
1557
+ }))), this.form.some((t) => !!t.collapsed) && (this.collapsedMode === "append" && n.push(v(H, {
1548
1558
  onClick: this.toggleFormCollapsed
1549
1559
  }, {
1550
1560
  default: () => this.formCollspased ? "展开" : "收起",
1551
1561
  icon: () => this.formCollspased ? v(Lt, null, null) : v(Et, null, null)
1552
- })), this.collapsedMode === "dialog" && t.push(v(q, {
1562
+ })), this.collapsedMode === "dialog" && n.push(v(H, {
1553
1563
  onClick: this.openCollapsedDialog
1554
1564
  }, {
1555
1565
  default: () => "高级搜索",
1556
1566
  icon: () => v(qt, null, null)
1557
- }))), this.$slots.actions && t.push(...this.$slots.actions()), t.length)
1558
- return v(Ce, n, {
1567
+ }))), this.$slots.actions && n.push(...this.$slots.actions()), n.length)
1568
+ return v(Ce, r, {
1559
1569
  default: () => [v(Te, {
1560
1570
  contentClass: this.footer ? "form-footer" : ""
1561
1571
  }, {
1562
- default: () => [v(St, null, Oe(t) ? t : {
1563
- default: () => [t]
1572
+ default: () => [v(St, null, Oe(n) ? n : {
1573
+ default: () => [n]
1564
1574
  })]
1565
1575
  })]
1566
1576
  });
1567
- }, r = this.form.filter((t) => this.formCollspased ? !t.collapsed : !0).filter((t) => {
1568
- switch (!0) {
1569
- case typeof t.visiable == "boolean":
1570
- return t.visiable;
1571
- case typeof t.visiable == "function":
1572
- return t.visiable(this.formSource);
1573
- default:
1574
- return !0;
1575
- }
1576
- });
1577
+ };
1577
1578
  return v("div", {
1578
1579
  class: "form-render"
1579
1580
  }, [v(wn, {
1580
- ref: (t) => this.modalInstance = t
1581
+ ref: (n) => this.modalInstance = n
1581
1582
  }, {
1582
1583
  default: () => [v(wt, _e({
1583
1584
  name: this.name
@@ -1587,7 +1588,7 @@ const ve = /* @__PURE__ */ P({
1587
1588
  rules: this.formRules,
1588
1589
  onSubmitSuccess: this.onSubmitSuccess,
1589
1590
  "auto-label-width": !0,
1590
- ref: (t) => this.formInstance = t,
1591
+ ref: (n) => this.formInstance = n,
1591
1592
  model: this.formSource
1592
1593
  }), {
1593
1594
  default: () => [v(xt, {
@@ -1595,12 +1596,12 @@ const ve = /* @__PURE__ */ P({
1595
1596
  "col-gap": 24,
1596
1597
  "rol-gap": 10
1597
1598
  }, {
1598
- default: () => [r.filter(() => this.formColumns !== 0).map((t) => {
1599
- let n;
1599
+ default: () => [this.formItems.filter(() => this.formColumns !== 0).map((n) => {
1600
+ let r;
1600
1601
  return v(Ce, {
1601
- span: t.span
1602
- }, Oe(n = Bn(this.formSource, t)) ? n : {
1603
- default: () => [n]
1602
+ span: n.span
1603
+ }, Oe(r = Bn(this.formSource, n)) ? r : {
1604
+ default: () => [r]
1604
1605
  });
1605
1606
  }), e()]
1606
1607
  })]
@@ -1612,16 +1613,16 @@ function Yn(e) {
1612
1613
  return e;
1613
1614
  }
1614
1615
  function Gn(e) {
1615
- const r = U(), t = $();
1616
- function n() {
1616
+ const n = W(), r = C();
1617
+ function t() {
1617
1618
  var u, a;
1618
- const l = (a = (u = r == null ? void 0 : r.proxy) == null ? void 0 : u.$refs) == null ? void 0 : a[e];
1619
- l && (t.value = l);
1619
+ const l = (a = (u = n == null ? void 0 : n.proxy) == null ? void 0 : u.$refs) == null ? void 0 : a[e];
1620
+ l && (r.value = l);
1620
1621
  }
1621
- return D(n), at(n), t;
1622
+ return U(t), at(t), r;
1622
1623
  }
1623
1624
  const Xn = {
1624
- install(e, r) {
1625
+ install(e, n) {
1625
1626
  e.component("FormRender", ve);
1626
1627
  }
1627
1628
  };