@gopowerteam/form-render 0.0.61 → 0.0.62

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 ne, defineComponent as R, computed as S, openBlock as C, createElementBlock as O, normalizeClass as le, normalizeStyle as V, createElementVNode as w, shallowRef as E, ref as x, provide as fe, onMounted as B, Fragment as me, renderSlot as Ae, createBlock as re, Teleport as De, createVNode as v, TransitionGroup as Be, withCtx as Ue, renderList as We, mergeProps as Oe, createCommentVNode as q, defineAsyncComponent as qe, triggerRef as K, useCssVars as Ge, onUnmounted as He, withModifiers as Ye, toDisplayString as A, resolveDynamicComponent as _e, normalizeProps as Xe, guardReactiveProps as Ke, watch as J, unref as Je, isRef as ae, toRefs as Qe, customRef as Ze, nextTick as Ie, getCurrentScope as et, onScopeDispose as tt, pushScopeId as rt, popScopeId as nt, isVNode as ve, h as lt, createTextVNode as Z, onUpdated as at } from "vue";
2
- import { DatePicker as ut, YearPicker as ot, QuarterPicker as ct, MonthPicker as it, WeekPicker as dt, Input as st, InputNumber as Me, Select as ft, Option as mt, Switch as ht, RangePicker as vt, Textarea as yt, TreeSelect as gt, Cascader as pt, FormItem as je, Tabs as bt, TabPane as kt, Form as wt, Grid as St, GridItem as Ce, Button as W, Space as Ct } from "@arco-design/web-vue";
1
+ import { getCurrentInstance as U, inject as le, defineComponent as V, computed as C, openBlock as S, createElementBlock as O, normalizeClass as ne, normalizeStyle as A, createElementVNode as k, shallowRef as R, ref as x, provide as me, onMounted as B, Fragment as he, renderSlot as Be, createBlock as re, Teleport as Ue, createVNode as v, TransitionGroup as We, withCtx as qe, renderList as Ge, mergeProps as Oe, createCommentVNode as q, defineAsyncComponent as He, triggerRef as J, useCssVars as Ye, onUnmounted as Xe, withModifiers as Je, toDisplayString as E, resolveDynamicComponent as _e, normalizeProps as Qe, guardReactiveProps as Ke, watch as Q, unref as Ze, isRef as ae, toRefs as et, customRef as tt, nextTick as Ie, getCurrentScope as rt, onScopeDispose as lt, pushScopeId as Me, popScopeId as Te, isVNode as ge, h as nt, createTextVNode as Z, 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 gt, TreeSelect as yt, Cascader as pt, FormItem as Le, Tabs as bt, TabPane as kt, Form as wt, Grid as St, GridItem as Ce, Button as W, Space as Ct } from "@arco-design/web-vue";
3
3
  import xe from "dayjs";
4
- import { FormRenderResolver as Qr } from "./resolver.mjs";
4
+ import { FormRenderResolver as nl } from "./resolver.mjs";
5
5
  const xt = Symbol("ArcoConfigProvider"), $t = "arco", Ft = "$arco", ye = (e) => {
6
- var r, n, t;
7
- const l = U(), o = ne(xt, void 0);
8
- return `${(t = (n = o == null ? void 0 : o.prefixCls) != null ? n : (r = l == null ? void 0 : l.appContext.config.globalProperties[Ft]) == null ? void 0 : r.classPrefix) != null ? t : $t}-${e}`;
6
+ var r, l, t;
7
+ const a = U(), u = le(xt, void 0);
8
+ return `${(t = (l = u == null ? void 0 : u.prefixCls) != null ? l : (r = a == null ? void 0 : a.appContext.config.globalProperties[Ft]) == null ? void 0 : r.classPrefix) != null ? t : $t}-${e}`;
9
9
  }, Ot = Object.prototype.toString;
10
- function ge(e) {
10
+ function pe(e) {
11
11
  return Ot.call(e) === "[object Number]" && e === e;
12
12
  }
13
- var pe = (e, r) => {
14
- for (const [n, t] of r)
15
- e[n] = t;
13
+ var be = (e, r) => {
14
+ for (const [l, t] of r)
15
+ e[l] = t;
16
16
  return e;
17
17
  };
18
- const _t = R({
18
+ const _t = V({
19
19
  name: "IconDown",
20
20
  props: {
21
21
  size: {
@@ -44,45 +44,45 @@ const _t = R({
44
44
  setup(e, {
45
45
  emit: r
46
46
  }) {
47
- const n = ye("icon"), t = S(() => [n, `${n}-down`, {
48
- [`${n}-spin`]: e.spin
49
- }]), l = S(() => {
50
- const a = {};
51
- return e.size && (a.fontSize = ge(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
47
+ const l = ye("icon"), t = C(() => [l, `${l}-down`, {
48
+ [`${l}-spin`]: e.spin
49
+ }]), a = C(() => {
50
+ const n = {};
51
+ return e.size && (n.fontSize = pe(e.size) ? `${e.size}px` : e.size), e.rotate && (n.transform = `rotate(${e.rotate}deg)`), n;
52
52
  });
53
53
  return {
54
54
  cls: t,
55
- innerStyle: l,
56
- onClick: (a) => {
57
- r("click", a);
55
+ innerStyle: a,
56
+ onClick: (n) => {
57
+ r("click", n);
58
58
  }
59
59
  };
60
60
  }
61
- }), It = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Mt = /* @__PURE__ */ w("path", {
61
+ }), It = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Mt = /* @__PURE__ */ k("path", {
62
62
  d: "M39.6 17.443 24.043 33 8.487 17.443"
63
- }, null, -1), jt = [Mt];
64
- function Lt(e, r, n, t, l, o) {
65
- return C(), O("svg", {
63
+ }, null, -1), Tt = [Mt];
64
+ function jt(e, r, l, t, a, u) {
65
+ return S(), O("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
- class: le(e.cls),
71
- style: V(e.innerStyle),
70
+ class: ne(e.cls),
71
+ style: A(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))
76
- }, jt, 14, It);
75
+ onClick: r[0] || (r[0] = (...n) => e.onClick && e.onClick(...n))
76
+ }, Tt, 14, It);
77
77
  }
78
- var ce = /* @__PURE__ */ pe(_t, [["render", Lt]]);
79
- const Tt = Object.assign(ce, {
78
+ var ie = /* @__PURE__ */ be(_t, [["render", jt]]);
79
+ const Lt = Object.assign(ie, {
80
80
  install: (e, r) => {
81
- var n;
82
- const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
83
- e.component(t + ce.name, ce);
81
+ var l;
82
+ const t = (l = r == null ? void 0 : r.iconPrefix) != null ? l : "";
83
+ e.component(t + ie.name, ie);
84
84
  }
85
- }), zt = R({
85
+ }), zt = V({
86
86
  name: "IconUp",
87
87
  props: {
88
88
  size: {
@@ -111,45 +111,45 @@ const Tt = Object.assign(ce, {
111
111
  setup(e, {
112
112
  emit: r
113
113
  }) {
114
- const n = ye("icon"), t = S(() => [n, `${n}-up`, {
115
- [`${n}-spin`]: e.spin
116
- }]), l = S(() => {
117
- const a = {};
118
- return e.size && (a.fontSize = ge(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
114
+ const l = ye("icon"), t = C(() => [l, `${l}-up`, {
115
+ [`${l}-spin`]: e.spin
116
+ }]), a = C(() => {
117
+ const n = {};
118
+ return e.size && (n.fontSize = pe(e.size) ? `${e.size}px` : e.size), e.rotate && (n.transform = `rotate(${e.rotate}deg)`), n;
119
119
  });
120
120
  return {
121
121
  cls: t,
122
- innerStyle: l,
123
- onClick: (a) => {
124
- r("click", a);
122
+ innerStyle: a,
123
+ onClick: (n) => {
124
+ r("click", n);
125
125
  }
126
126
  };
127
127
  }
128
- }), Nt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Pt = /* @__PURE__ */ w("path", {
128
+ }), Pt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Vt = /* @__PURE__ */ k("path", {
129
129
  d: "M39.6 30.557 24.043 15 8.487 30.557"
130
- }, null, -1), Vt = [Pt];
131
- function Rt(e, r, n, t, l, o) {
132
- return C(), O("svg", {
130
+ }, null, -1), Nt = [Vt];
131
+ function At(e, r, l, t, a, u) {
132
+ return S(), O("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
- class: le(e.cls),
138
- style: V(e.innerStyle),
137
+ class: ne(e.cls),
138
+ style: A(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))
143
- }, Vt, 14, Nt);
142
+ onClick: r[0] || (r[0] = (...n) => e.onClick && e.onClick(...n))
143
+ }, Nt, 14, Pt);
144
144
  }
145
- var ie = /* @__PURE__ */ pe(zt, [["render", Rt]]);
146
- const Et = Object.assign(ie, {
145
+ var de = /* @__PURE__ */ be(zt, [["render", At]]);
146
+ const Et = Object.assign(de, {
147
147
  install: (e, r) => {
148
- var n;
149
- const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
150
- e.component(t + ie.name, ie);
148
+ var l;
149
+ const t = (l = r == null ? void 0 : r.iconPrefix) != null ? l : "";
150
+ e.component(t + de.name, de);
151
151
  }
152
- }), At = R({
152
+ }), Rt = V({
153
153
  name: "IconSearch",
154
154
  props: {
155
155
  size: {
@@ -178,256 +178,256 @@ const Et = Object.assign(ie, {
178
178
  setup(e, {
179
179
  emit: r
180
180
  }) {
181
- const n = ye("icon"), t = S(() => [n, `${n}-search`, {
182
- [`${n}-spin`]: e.spin
183
- }]), l = S(() => {
184
- const a = {};
185
- return e.size && (a.fontSize = ge(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
181
+ const l = ye("icon"), t = C(() => [l, `${l}-search`, {
182
+ [`${l}-spin`]: e.spin
183
+ }]), a = C(() => {
184
+ const n = {};
185
+ return e.size && (n.fontSize = pe(e.size) ? `${e.size}px` : e.size), e.rotate && (n.transform = `rotate(${e.rotate}deg)`), n;
186
186
  });
187
187
  return {
188
188
  cls: t,
189
- innerStyle: l,
190
- onClick: (a) => {
191
- r("click", a);
189
+ innerStyle: a,
190
+ onClick: (n) => {
191
+ r("click", n);
192
192
  }
193
193
  };
194
194
  }
195
- }), Dt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Bt = /* @__PURE__ */ w("path", {
195
+ }), Dt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Bt = /* @__PURE__ */ k("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 = [Bt];
198
- function Wt(e, r, n, t, l, o) {
199
- return C(), O("svg", {
198
+ function Wt(e, r, l, t, a, u) {
199
+ return S(), O("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
- class: le(e.cls),
205
- style: V(e.innerStyle),
204
+ class: ne(e.cls),
205
+ style: A(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: r[0] || (r[0] = (...n) => e.onClick && e.onClick(...n))
210
210
  }, Ut, 14, Dt);
211
211
  }
212
- var de = /* @__PURE__ */ pe(At, [["render", Wt]]);
213
- const qt = Object.assign(de, {
212
+ var se = /* @__PURE__ */ be(Rt, [["render", Wt]]);
213
+ const qt = Object.assign(se, {
214
214
  install: (e, r) => {
215
- var n;
216
- const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
217
- e.component(t + de.name, de);
215
+ var l;
216
+ const t = (l = r == null ? void 0 : r.iconPrefix) != null ? l : "";
217
+ e.component(t + se.name, se);
218
218
  }
219
- }), ue = Symbol("__MODAL__");
220
- function Le(e) {
221
- return et() ? (tt(e), !0) : !1;
219
+ }), oe = Symbol("__MODAL__");
220
+ function ze(e) {
221
+ return rt() ? (lt(e), !0) : !1;
222
222
  }
223
223
  function F(e) {
224
- return typeof e == "function" ? e() : Je(e);
224
+ return typeof e == "function" ? e() : Ze(e);
225
225
  }
226
- const Te = typeof window < "u" && typeof document < "u";
226
+ const Pe = typeof window < "u" && typeof document < "u";
227
227
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
228
228
  const Gt = Object.prototype.toString, Ht = (e) => Gt.call(e) === "[object Object]", Yt = () => {
229
229
  };
230
230
  function Xt(e) {
231
231
  return U();
232
232
  }
233
- function Kt(e, r = {}) {
233
+ function Jt(e, r = {}) {
234
234
  if (!ae(e))
235
- return Qe(e);
236
- const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
235
+ return et(e);
236
+ const l = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
237
237
  for (const t in e.value)
238
- n[t] = Ze(() => ({
238
+ l[t] = tt(() => ({
239
239
  get() {
240
240
  return e.value[t];
241
241
  },
242
- set(l) {
243
- var o;
244
- if ((o = F(r.replaceRef)) == null || o)
242
+ set(a) {
243
+ var u;
244
+ if ((u = F(r.replaceRef)) == null || u)
245
245
  if (Array.isArray(e.value)) {
246
- const a = [...e.value];
247
- a[t] = l, e.value = a;
246
+ const n = [...e.value];
247
+ n[t] = a, e.value = n;
248
248
  } else {
249
- const a = { ...e.value, [t]: l };
250
- Object.setPrototypeOf(a, Object.getPrototypeOf(e.value)), e.value = a;
249
+ const n = { ...e.value, [t]: a };
250
+ Object.setPrototypeOf(n, Object.getPrototypeOf(e.value)), e.value = n;
251
251
  }
252
252
  else
253
- e.value[t] = l;
253
+ e.value[t] = a;
254
254
  }
255
255
  }));
256
- return n;
256
+ return l;
257
257
  }
258
- function Jt(e, r = !0, n) {
259
- Xt() ? B(e, n) : r ? e() : Ie(e);
258
+ function Qt(e, r = !0, l) {
259
+ Xt() ? B(e, l) : r ? e() : Ie(e);
260
260
  }
261
261
  function D(e) {
262
262
  var r;
263
- const n = F(e);
264
- return (r = n == null ? void 0 : n.$el) != null ? r : n;
263
+ const l = F(e);
264
+ return (r = l == null ? void 0 : l.$el) != null ? r : l;
265
265
  }
266
- const oe = Te ? window : void 0;
267
- function se(...e) {
268
- let r, n, t, l;
269
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, t, l] = e, r = oe) : [r, n, t, l] = e, !r)
266
+ const ue = Pe ? window : void 0;
267
+ function fe(...e) {
268
+ let r, l, t, a;
269
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([l, t, a] = e, r = ue) : [r, l, t, a] = e, !r)
270
270
  return Yt;
271
- Array.isArray(n) || (n = [n]), Array.isArray(t) || (t = [t]);
272
- const o = [], a = () => {
273
- o.forEach((u) => u()), o.length = 0;
274
- }, d = (u, c, i, h) => (u.addEventListener(c, i, h), () => u.removeEventListener(c, i, h)), b = J(
275
- () => [D(r), F(l)],
276
- ([u, c]) => {
277
- if (a(), !u)
271
+ Array.isArray(l) || (l = [l]), Array.isArray(t) || (t = [t]);
272
+ const u = [], n = () => {
273
+ u.forEach((o) => o()), u.length = 0;
274
+ }, d = (o, c, i, h) => (o.addEventListener(c, i, h), () => o.removeEventListener(c, i, h)), b = Q(
275
+ () => [D(r), F(a)],
276
+ ([o, c]) => {
277
+ if (n(), !o)
278
278
  return;
279
279
  const i = Ht(c) ? { ...c } : c;
280
- o.push(
281
- ...n.flatMap((h) => t.map((m) => d(u, h, m, i)))
280
+ u.push(
281
+ ...l.flatMap((h) => t.map((m) => d(o, h, m, i)))
282
282
  );
283
283
  },
284
284
  { immediate: !0, flush: "post" }
285
285
  ), s = () => {
286
- b(), a();
286
+ b(), n();
287
287
  };
288
- return Le(s), s;
288
+ return ze(s), s;
289
289
  }
290
- function Qt() {
290
+ function Kt() {
291
291
  const e = x(!1), r = U();
292
292
  return r && B(() => {
293
293
  e.value = !0;
294
294
  }, r), e;
295
295
  }
296
296
  function Zt(e) {
297
- const r = Qt();
298
- return S(() => (r.value, !!e()));
297
+ const r = Kt();
298
+ return C(() => (r.value, !!e()));
299
299
  }
300
300
  function er(e, r = {}) {
301
- var n, t;
301
+ var l, t;
302
302
  const {
303
- pointerTypes: l,
304
- preventDefault: o,
305
- stopPropagation: a,
303
+ pointerTypes: a,
304
+ preventDefault: u,
305
+ stopPropagation: n,
306
306
  exact: d,
307
307
  onMove: b,
308
308
  onEnd: s,
309
- onStart: u,
309
+ onStart: o,
310
310
  initialValue: c,
311
311
  axis: i = "both",
312
- draggingElement: h = oe,
312
+ draggingElement: h = ue,
313
313
  containerElement: m,
314
- handle: k = e
315
- } = r, y = x(
316
- (n = F(c)) != null ? n : { x: 0, y: 0 }
317
- ), _ = x(), T = (p) => l ? l.includes(p.pointerType) : !0, I = (p) => {
318
- F(o) && p.preventDefault(), F(a) && p.stopPropagation();
319
- }, g = (p) => {
314
+ handle: w = e
315
+ } = r, g = x(
316
+ (l = F(c)) != null ? l : { x: 0, y: 0 }
317
+ ), _ = x(), L = (p) => a ? a.includes(p.pointerType) : !0, I = (p) => {
318
+ F(u) && p.preventDefault(), F(n) && p.stopPropagation();
319
+ }, y = (p) => {
320
320
  var z;
321
- if (F(r.disabled) || !T(p) || F(d) && p.target !== F(e))
321
+ if (F(r.disabled) || !L(p) || F(d) && p.target !== F(e))
322
322
  return;
323
- const M = F(m), N = (z = M == null ? void 0 : M.getBoundingClientRect) == null ? void 0 : z.call(M), j = F(e).getBoundingClientRect(), Q = {
324
- x: p.clientX - (M ? j.left - N.left + M.scrollLeft : j.left),
325
- y: p.clientY - (M ? j.top - N.top + M.scrollTop : j.top)
323
+ const M = F(m), P = (z = M == null ? void 0 : M.getBoundingClientRect) == null ? void 0 : z.call(M), T = F(e).getBoundingClientRect(), K = {
324
+ x: p.clientX - (M ? T.left - P.left + M.scrollLeft : T.left),
325
+ y: p.clientY - (M ? T.top - P.top + M.scrollTop : T.top)
326
326
  };
327
- (u == null ? void 0 : u(Q, p)) !== !1 && (_.value = Q, I(p));
327
+ (o == null ? void 0 : o(K, p)) !== !1 && (_.value = K, I(p));
328
328
  }, $ = (p) => {
329
- if (F(r.disabled) || !T(p) || !_.value)
329
+ if (F(r.disabled) || !L(p) || !_.value)
330
330
  return;
331
331
  const z = F(m), M = F(e).getBoundingClientRect();
332
- let { x: N, y: j } = y.value;
333
- (i === "x" || i === "both") && (N = p.clientX - _.value.x, z && (N = Math.min(Math.max(0, N), z.scrollWidth - M.width))), (i === "y" || i === "both") && (j = p.clientY - _.value.y, z && (j = Math.min(Math.max(0, j), z.scrollHeight - M.height))), y.value = {
334
- x: N,
335
- y: j
336
- }, b == null || b(y.value, p), I(p);
337
- }, P = (p) => {
338
- F(r.disabled) || !T(p) || _.value && (_.value = void 0, s == null || s(y.value, p), I(p));
332
+ let { x: P, y: T } = g.value;
333
+ (i === "x" || i === "both") && (P = p.clientX - _.value.x, z && (P = Math.min(Math.max(0, P), z.scrollWidth - M.width))), (i === "y" || i === "both") && (T = p.clientY - _.value.y, z && (T = Math.min(Math.max(0, T), z.scrollHeight - M.height))), g.value = {
334
+ x: P,
335
+ y: T
336
+ }, b == null || b(g.value, p), I(p);
337
+ }, N = (p) => {
338
+ F(r.disabled) || !L(p) || _.value && (_.value = void 0, s == null || s(g.value, p), I(p));
339
339
  };
340
- if (Te) {
340
+ if (Pe) {
341
341
  const p = { capture: (t = r.capture) != null ? t : !0 };
342
- se(k, "pointerdown", g, p), se(h, "pointermove", $, p), se(h, "pointerup", P, p);
342
+ fe(w, "pointerdown", y, p), fe(h, "pointermove", $, p), fe(h, "pointerup", N, p);
343
343
  }
344
344
  return {
345
- ...Kt(y),
346
- position: y,
347
- isDragging: S(() => !!_.value),
348
- style: S(
349
- () => `left:${y.value.x}px;top:${y.value.y}px;`
345
+ ...Jt(g),
346
+ position: g,
347
+ isDragging: C(() => !!_.value),
348
+ style: C(
349
+ () => `left:${g.value.x}px;top:${g.value.y}px;`
350
350
  )
351
351
  };
352
352
  }
353
- function tr(e, r, n = {}) {
354
- const { window: t = oe, ...l } = n;
355
- let o;
356
- const a = Zt(() => t && "ResizeObserver" in t), d = () => {
357
- o && (o.disconnect(), o = void 0);
358
- }, b = S(() => Array.isArray(e) ? e.map((c) => D(c)) : [D(e)]), s = J(
353
+ function tr(e, r, l = {}) {
354
+ const { window: t = ue, ...a } = l;
355
+ let u;
356
+ const n = Zt(() => t && "ResizeObserver" in t), d = () => {
357
+ u && (u.disconnect(), u = void 0);
358
+ }, b = C(() => Array.isArray(e) ? e.map((c) => D(c)) : [D(e)]), s = Q(
359
359
  b,
360
360
  (c) => {
361
- if (d(), a.value && t) {
362
- o = new ResizeObserver(r);
361
+ if (d(), n.value && t) {
362
+ u = new ResizeObserver(r);
363
363
  for (const i of c)
364
- i && o.observe(i, l);
364
+ i && u.observe(i, a);
365
365
  }
366
366
  },
367
367
  { immediate: !0, flush: "post" }
368
- ), u = () => {
368
+ ), o = () => {
369
369
  d(), s();
370
370
  };
371
- return Le(u), {
372
- isSupported: a,
373
- stop: u
371
+ return ze(o), {
372
+ isSupported: n,
373
+ stop: o
374
374
  };
375
375
  }
376
- function G(e, r = { width: 0, height: 0 }, n = {}) {
377
- const { window: t = oe, box: l = "content-box" } = n, o = S(() => {
376
+ function G(e, r = { width: 0, height: 0 }, l = {}) {
377
+ const { window: t = ue, box: a = "content-box" } = l, u = C(() => {
378
378
  var c, i;
379
379
  return (i = (c = D(e)) == null ? void 0 : c.namespaceURI) == null ? void 0 : i.includes("svg");
380
- }), a = x(r.width), d = x(r.height), { stop: b } = tr(
380
+ }), n = x(r.width), d = x(r.height), { stop: b } = tr(
381
381
  e,
382
382
  ([c]) => {
383
- const i = l === "border-box" ? c.borderBoxSize : l === "content-box" ? c.contentBoxSize : c.devicePixelContentBoxSize;
384
- if (t && o.value) {
383
+ const i = a === "border-box" ? c.borderBoxSize : a === "content-box" ? c.contentBoxSize : c.devicePixelContentBoxSize;
384
+ if (t && u.value) {
385
385
  const h = D(e);
386
386
  if (h) {
387
387
  const m = t.getComputedStyle(h);
388
- a.value = Number.parseFloat(m.width), d.value = Number.parseFloat(m.height);
388
+ n.value = Number.parseFloat(m.width), d.value = Number.parseFloat(m.height);
389
389
  }
390
390
  } else if (i) {
391
391
  const h = Array.isArray(i) ? i : [i];
392
- a.value = h.reduce((m, { inlineSize: k }) => m + k, 0), d.value = h.reduce((m, { blockSize: k }) => m + k, 0);
392
+ n.value = h.reduce((m, { inlineSize: w }) => m + w, 0), d.value = h.reduce((m, { blockSize: w }) => m + w, 0);
393
393
  } else
394
- a.value = c.contentRect.width, d.value = c.contentRect.height;
394
+ n.value = c.contentRect.width, d.value = c.contentRect.height;
395
395
  },
396
- n
396
+ l
397
397
  );
398
- Jt(() => {
398
+ Qt(() => {
399
399
  const c = D(e);
400
- c && (a.value = "offsetWidth" in c ? c.offsetWidth : r.width, d.value = "offsetHeight" in c ? c.offsetHeight : r.height);
400
+ c && (n.value = "offsetWidth" in c ? c.offsetWidth : r.width, d.value = "offsetHeight" in c ? c.offsetHeight : r.height);
401
401
  });
402
- const s = J(
402
+ const s = Q(
403
403
  () => D(e),
404
404
  (c) => {
405
- a.value = c ? r.width : 0, d.value = c ? r.height : 0;
405
+ n.value = c ? r.width : 0, d.value = c ? r.height : 0;
406
406
  }
407
407
  );
408
- function u() {
408
+ function o() {
409
409
  b(), s();
410
410
  }
411
411
  return {
412
- width: a,
412
+ width: n,
413
413
  height: d,
414
- stop: u
414
+ stop: o
415
415
  };
416
416
  }
417
- const rr = (e) => (rt("data-v-9a7af353"), e = e(), nt(), e), nr = { class: "title text-16px font-bold" }, lr = { class: "action" }, ar = ["form"], ur = {
417
+ const rr = (e) => (Me("data-v-9a7af353"), e = e(), Te(), e), lr = { class: "title text-16px font-bold" }, nr = { class: "action" }, ar = ["form"], or = {
418
418
  key: 2,
419
419
  class: "modal-loading"
420
- }, or = /* @__PURE__ */ rr(() => /* @__PURE__ */ w("div", { class: "lds-ring" }, [
421
- /* @__PURE__ */ w("div"),
422
- /* @__PURE__ */ w("div"),
423
- /* @__PURE__ */ w("div"),
424
- /* @__PURE__ */ w("div")
420
+ }, ur = /* @__PURE__ */ rr(() => /* @__PURE__ */ k("div", { class: "lds-ring" }, [
421
+ /* @__PURE__ */ k("div"),
422
+ /* @__PURE__ */ k("div"),
423
+ /* @__PURE__ */ k("div"),
424
+ /* @__PURE__ */ k("div")
425
425
  ], -1)), cr = [
426
- or
426
+ ur
427
427
  ], ir = {
428
428
  name: "ModalContainer",
429
429
  inheritAttrs: !0
430
- }, dr = /* @__PURE__ */ R({
430
+ }, dr = /* @__PURE__ */ V({
431
431
  ...ir,
432
432
  props: {
433
433
  id: {},
@@ -459,22 +459,22 @@ const rr = (e) => (rt("data-v-9a7af353"), e = e(), nt(), e), nr = { class: "titl
459
459
  zIndex: { default: 1e3 }
460
460
  },
461
461
  emits: ["submit"],
462
- setup(e, { expose: r, emit: n }) {
463
- Ge((f) => ({
462
+ setup(e, { expose: r, emit: l }) {
463
+ Ye((f) => ({
464
464
  "5751bf6b": f.zIndex
465
465
  }));
466
- const t = e, l = n, o = ne(ue), a = x(!1);
466
+ const t = e, a = l, u = le(oe), n = x(!1);
467
467
  let d = 0, b = 0;
468
- const s = E(), u = E(), c = E(), i = E(), h = E(), m = E(), { height: k } = G(s), { height: y } = G(c, void 0, { box: "border-box" }), { height: _ } = G(i, void 0, { box: "border-box" }), { height: T } = G(h), { height: I } = G(m), { x: g, y: $ } = er(c, {
468
+ const s = R(), o = R(), c = R(), i = R(), h = R(), m = R(), { height: w } = G(s), { height: g } = G(c, void 0, { box: "border-box" }), { height: _ } = G(i, void 0, { box: "border-box" }), { height: L } = G(h), { height: I } = G(m), { x: y, y: $ } = er(c, {
469
469
  initialValue: { x: 0, y: 0 }
470
470
  });
471
- function P() {
472
- o == null || o.close(t.id);
471
+ function N() {
472
+ u == null || u.close(t.id);
473
473
  }
474
474
  function p(f) {
475
475
  return typeof f == "number" ? `${f}px` : f;
476
476
  }
477
- const z = S(() => {
477
+ const z = C(() => {
478
478
  const f = {};
479
479
  return t.mode === "dialog" && (f.justifyContent = "center"), t.mode === "drawer" && (f.justifyContent = {
480
480
  left: "flex-start",
@@ -487,130 +487,130 @@ const rr = (e) => (rt("data-v-9a7af353"), e = e(), nt(), e), nr = { class: "titl
487
487
  top: "column",
488
488
  bottom: "column"
489
489
  }[t.position]), f;
490
- }), M = S(() => {
490
+ }), M = C(() => {
491
491
  const f = {};
492
- return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? f.maxHeight = p(t.maxHeight) : (f.width = p(t.sizes[t.size]), f.maxWidth = p(t.maxWidth)), t.width && (f.width = p(t.width)), t.height && (f.height = p(t.height)), 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 - b}px, 0px)`), t.mode === "drawer" && (f.borderRadius = 0, ["left", "right"].includes(t.position) ? f.height = "100%" : f.width = "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;
493
- }), N = S(() => {
492
+ return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? f.maxHeight = p(t.maxHeight) : (f.width = p(t.sizes[t.size]), f.maxWidth = p(t.maxWidth)), t.width && (f.width = p(t.width)), t.height && (f.height = p(t.height)), 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(${y.value - d}px, ${$.value - b}px, 0px)`), t.mode === "drawer" && (f.borderRadius = 0, ["left", "right"].includes(t.position) ? f.height = "100%" : f.width = "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;
493
+ }), P = C(() => {
494
494
  const f = {};
495
495
  return t.draggable && !t.fullscreen && t.mode === "dialog" && (f.cursor = "move"), f;
496
- }), j = S(() => {
497
- const f = {}, L = T.value + I.value + y.value + _.value, Se = Math.floor(k.value * (Number(p(t.maxHeight).replace("%", "")) / 100));
498
- return t.maxHeight && (f.maxHeight = `${Se - L}px`), t.mode === "drawer" && (f.maxHeight = "unset", ["left", "right"].includes(t.position) && (f.height = `${k.value - L}px`)), t.fullscreen && (f.maxHeight = "unset", f.height = `calc(100% - ${L}px)`), t.type !== "component" && (f.padding = "0"), t.bodyStyle && Object.assign(f, t.bodyStyle), f;
496
+ }), T = C(() => {
497
+ const f = {}, j = L.value + I.value + g.value + _.value, Se = Math.floor(w.value * (Number(p(t.maxHeight).replace("%", "")) / 100));
498
+ return t.maxHeight && (f.maxHeight = `${Se - j}px`), t.mode === "drawer" && (f.maxHeight = "unset", ["left", "right"].includes(t.position) && (f.height = `${w.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;
499
499
  });
500
- function Q() {
501
- const f = u.value;
500
+ function K() {
501
+ const f = o.value;
502
502
  if (t.form && f) {
503
- const L = f.querySelector(`form[name="${t.form}"]`);
504
- L && L.dispatchEvent(new Event("submit"));
503
+ const j = f.querySelector(`form[name="${t.form}"]`);
504
+ j && j.dispatchEvent(new Event("submit"));
505
505
  }
506
- l("submit");
506
+ a("submit");
507
507
  }
508
508
  function Ne() {
509
- o == null || o.close(t.id);
509
+ u == null || u.close(t.id);
510
510
  }
511
- function Pe() {
511
+ function Ae() {
512
512
  window && window.addEventListener("resize", () => {
513
- K(s), K(u), u.value && (d = u.value.offsetLeft, b = u.value.offsetTop);
513
+ J(s), J(o), o.value && (d = o.value.offsetLeft, b = o.value.offsetTop);
514
514
  });
515
515
  }
516
- function Ve() {
516
+ function Ee() {
517
517
  if (t.closeable && t.esc) {
518
- const f = ({ key: L }) => {
519
- L === "Escape" && (o == null || o.close(t.id), window.removeEventListener("keydown", f));
518
+ const f = ({ key: j }) => {
519
+ j === "Escape" && (u == null || u.close(t.id), window.removeEventListener("keydown", f));
520
520
  };
521
521
  window.addEventListener("keydown", f);
522
522
  }
523
523
  }
524
524
  function Re() {
525
- d = u.value.offsetLeft, b = u.value.offsetTop;
525
+ d = o.value.offsetLeft, b = o.value.offsetTop;
526
526
  }
527
527
  B(() => {
528
- Ve(), Pe();
529
- }), He(() => {
528
+ Ee(), Ae();
529
+ }), Xe(() => {
530
530
  });
531
- function Ee() {
532
- return a.value = !0, () => we();
531
+ function De() {
532
+ return n.value = !0, () => we();
533
533
  }
534
534
  function we() {
535
- a.value = !1;
535
+ n.value = !1;
536
536
  }
537
537
  return r({
538
- showLoading: Ee,
538
+ showLoading: De,
539
539
  hideLoading: we
540
- }), (f, L) => (C(), O("div", {
540
+ }), (f, j) => (S(), O("div", {
541
541
  ref_key: "wrapperRef",
542
542
  ref: s,
543
543
  class: "modal-wrapper",
544
- style: V(z.value),
545
- onClick: L[0] || (L[0] = Ye((Se) => f.maskClosable && P(), ["self"]))
544
+ style: A(z.value),
545
+ onClick: j[0] || (j[0] = Je((Se) => f.maskClosable && N(), ["self"]))
546
546
  }, [
547
- w("div", {
547
+ k("div", {
548
548
  ref_key: "contentRef",
549
- ref: u,
550
- class: le(["modal-content", { [`${f.mode}-mode`]: !0, [`${f.position}-position`]: !0 }]),
551
- style: V(M.value)
549
+ ref: o,
550
+ class: ne(["modal-content", { [`${f.mode}-mode`]: !0, [`${f.position}-position`]: !0 }]),
551
+ style: A(M.value)
552
552
  }, [
553
- f.header ? (C(), O("div", {
553
+ f.header ? (S(), O("div", {
554
554
  key: 0,
555
555
  ref_key: "headerRef",
556
556
  ref: c,
557
557
  class: "modal-header",
558
- style: V(N.value),
558
+ style: A(P.value),
559
559
  onMousedown: Re
560
560
  }, [
561
- w("div", nr, A(f.title), 1),
562
- w("div", lr, [
563
- f.closeable ? (C(), O("div", {
561
+ k("div", lr, E(f.title), 1),
562
+ k("div", nr, [
563
+ f.closeable ? (S(), O("div", {
564
564
  key: 0,
565
565
  class: "i-icon-park-outline:close block cursor-pointer",
566
- onClick: P
566
+ onClick: N
567
567
  })) : q("", !0)
568
568
  ])
569
569
  ], 36)) : q("", !0),
570
- w("div", {
570
+ k("div", {
571
571
  id: "modal-header-slot",
572
572
  ref_key: "headerSlotRef",
573
573
  ref: h
574
574
  }, null, 512),
575
- w("div", {
575
+ k("div", {
576
576
  class: "modal-body",
577
- style: V(j.value)
577
+ style: A(T.value)
578
578
  }, [
579
- (C(), re(_e(f.component), Xe(Ke(f.componentProps)), null, 16))
579
+ (S(), re(_e(f.component), Qe(Ke(f.componentProps)), null, 16))
580
580
  ], 4),
581
- w("div", {
581
+ k("div", {
582
582
  id: "modal-footer-slot",
583
583
  ref_key: "footerSlotRef",
584
584
  ref: m
585
585
  }, null, 512),
586
- f.footer ? (C(), O("div", {
586
+ f.footer ? (S(), O("div", {
587
587
  key: 1,
588
588
  ref_key: "footerRef",
589
589
  ref: i,
590
590
  class: "modal-footer space-x-2"
591
591
  }, [
592
- w("button", {
592
+ k("button", {
593
593
  class: "cancel-button",
594
594
  type: "button",
595
595
  onClick: Ne
596
- }, A(f.cancelText), 1),
597
- w("button", {
596
+ }, E(f.cancelText), 1),
597
+ k("button", {
598
598
  class: "submit-button",
599
599
  form: f.form,
600
600
  type: "submit",
601
- onClick: Q
602
- }, A(f.submitText), 9, ar)
601
+ onClick: K
602
+ }, E(f.submitText), 9, ar)
603
603
  ], 512)) : q("", !0),
604
- a.value ? (C(), O("div", ur, cr)) : q("", !0)
604
+ n.value ? (S(), O("div", or, cr)) : q("", !0)
605
605
  ], 6)
606
606
  ], 4));
607
607
  }
608
- }), be = (e, r) => {
609
- const n = e.__vccOpts || e;
610
- for (const [t, l] of r)
611
- n[t] = l;
612
- return n;
613
- }, sr = /* @__PURE__ */ be(dr, [["__scopeId", "data-v-9a7af353"]]), fr = { class: "modal-dialog" }, mr = { class: "dialog-body" }, hr = { class: "dialog-title" }, vr = { class: "dialog-content" }, yr = /* @__PURE__ */ R({
608
+ }), ce = (e, r) => {
609
+ const l = e.__vccOpts || e;
610
+ for (const [t, a] of r)
611
+ l[t] = a;
612
+ return l;
613
+ }, sr = /* @__PURE__ */ ce(dr, [["__scopeId", "data-v-9a7af353"]]), fr = { class: "modal-dialog" }, mr = { class: "dialog-body" }, hr = { class: "dialog-title" }, vr = { class: "dialog-content" }, gr = /* @__PURE__ */ V({
614
614
  __name: "modal-dialog",
615
615
  props: {
616
616
  type: {},
@@ -623,52 +623,70 @@ const rr = (e) => (rt("data-v-9a7af353"), e = e(), nt(), e), nr = { class: "titl
623
623
  footer: {}
624
624
  },
625
625
  setup(e) {
626
- const r = e, n = ze(), t = S(() => r.title ? r.title : {
626
+ const r = e, l = Ve(), t = C(() => r.title ? r.title : {
627
627
  confirm: "提示",
628
628
  info: "提示",
629
629
  warning: "警告",
630
630
  error: "错误",
631
631
  success: "成功"
632
632
  }[r.type]);
633
- async function l() {
634
- r.onOk && await r.onOk(), n.close();
633
+ async function a() {
634
+ r.onOk && await r.onOk(), l.close();
635
635
  }
636
- async function o() {
637
- r.onCancel && await r.onCancel(), n.close();
636
+ async function u() {
637
+ r.onCancel && await r.onCancel(), l.close();
638
638
  }
639
- return (a, d) => (C(), O("section", fr, [
640
- w("div", mr, [
641
- w("div", hr, A(t.value), 1),
642
- w("div", vr, A(a.content), 1)
639
+ return (n, d) => (S(), O("section", fr, [
640
+ k("div", mr, [
641
+ k("div", hr, E(t.value), 1),
642
+ k("div", vr, E(n.content), 1)
643
643
  ]),
644
- w("div", {
644
+ k("div", {
645
645
  class: "dialog-footer space-x-2",
646
- style: V(a.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
646
+ style: A(n.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
647
647
  }, [
648
- a.footer ? (C(), re(_e(a.footer), { key: 0 })) : (C(), O(me, { key: 1 }, [
649
- w("button", {
648
+ n.footer ? (S(), re(_e(n.footer), { key: 0 })) : (S(), O(he, { key: 1 }, [
649
+ k("button", {
650
650
  class: "submit-button",
651
651
  type: "submit",
652
- onClick: l
653
- }, A(a.okText), 1),
654
- a.type === "confirm" ? (C(), O("button", {
652
+ onClick: a
653
+ }, E(n.okText), 1),
654
+ n.type === "confirm" ? (S(), O("button", {
655
655
  key: 0,
656
656
  class: "cancel-button",
657
657
  type: "button",
658
- onClick: o
659
- }, A(a.cancelText), 1)) : q("", !0)
658
+ onClick: u
659
+ }, E(n.cancelText), 1)) : q("", !0)
660
660
  ], 64))
661
661
  ], 4)
662
662
  ]));
663
663
  }
664
- }), gr = /* @__PURE__ */ be(yr, [["__scopeId", "data-v-0c6b8db2"]]), pr = {
664
+ }), yr = /* @__PURE__ */ ce(gr, [["__scopeId", "data-v-0c6b8db2"]]), pr = (e) => (Me("data-v-559bdf2e"), e = e(), Te(), e), br = { class: "flex-center" }, kr = /* @__PURE__ */ pr(() => /* @__PURE__ */ k("div", { class: "modal-loading" }, [
665
+ /* @__PURE__ */ k("div", { class: "lds-ring" }, [
666
+ /* @__PURE__ */ k("div"),
667
+ /* @__PURE__ */ k("div"),
668
+ /* @__PURE__ */ k("div"),
669
+ /* @__PURE__ */ k("div")
670
+ ])
671
+ ], -1)), wr = { class: "modal-loading-text" }, Sr = /* @__PURE__ */ V({
672
+ __name: "modal-loading",
673
+ props: {
674
+ text: { default: "加载中" }
675
+ },
676
+ setup(e) {
677
+ return (r, l) => (S(), O("section", br, [
678
+ kr,
679
+ k("div", wr, E(r.text), 1)
680
+ ]));
681
+ }
682
+ }), Cr = /* @__PURE__ */ ce(Sr, [["__scopeId", "data-v-559bdf2e"]]), xr = {
665
683
  key: 0,
666
684
  class: "modal-teleport"
667
- }, br = {
685
+ }, $r = {
668
686
  name: "ModalProvider",
669
687
  inheritAttrs: !0
670
- }, kr = /* @__PURE__ */ R({
671
- ...br,
688
+ }, Fr = /* @__PURE__ */ V({
689
+ ...$r,
672
690
  props: {
673
691
  appendToBody: { type: [Boolean, String], default: !1 },
674
692
  sizes: { default: () => ({
@@ -681,106 +699,124 @@ const rr = (e) => (rt("data-v-9a7af353"), e = e(), nt(), e), nr = { class: "titl
681
699
  offset: { default: () => ({ x: 0, y: 0 }) }
682
700
  },
683
701
  setup(e, { expose: r }) {
684
- const n = E([]), t = x(!1), l = U();
685
- function o(i, h = {}, m = {}) {
686
- const k = qe(
687
- () => Promise.resolve(typeof i == "string" ? gr : i)
702
+ const l = R([]), t = x(!1), a = U();
703
+ function u(i, h = {}, m = {}) {
704
+ const w = He(
705
+ () => Promise.resolve(typeof i == "string" ? yr : i)
688
706
  );
689
707
  typeof i == "string" && (h.type = i, m.size = "small", m.fullscreen = !1, m.mode = "dialog", m.footer = !1, m.header = !1);
690
- const y = Math.random().toString(32).slice(2), _ = Object.assign({
708
+ const g = Math.random().toString(32).slice(2), _ = Object.assign({
691
709
  zIndex: typeof i == "string" ? 1100 : 1e3
692
- }, m), T = new Promise((I, g) => {
693
- n.value.push({
694
- id: y,
695
- component: k,
710
+ }, m), L = new Promise((I, y) => {
711
+ l.value.push({
712
+ id: g,
713
+ component: w,
696
714
  props: h || {},
697
715
  options: {
698
716
  ..._,
699
717
  type: typeof i == "string" ? i : "component"
700
718
  },
701
719
  resolve: I,
702
- reject: g,
720
+ reject: y,
703
721
  listeners: []
704
- }), K(n);
722
+ }), J(l);
705
723
  }).catch((I) => I === "CANCEL" ? new Promise(() => {
706
724
  }) : Promise.reject(I));
707
- return Object.assign(T, {
708
- close: () => a(y)
725
+ return Object.assign(L, {
726
+ close: () => n(g)
709
727
  });
710
728
  }
711
- function a(i, h) {
712
- const m = n.value.findIndex((y) => y.id === i);
729
+ function n(i, h) {
730
+ const m = l.value.findIndex((g) => g.id === i);
713
731
  if (m < 0)
714
732
  return;
715
- const k = n.value[m];
716
- h === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(h), n.value.splice(m, 1), K(n);
733
+ const w = l.value[m];
734
+ h === void 0 ? w == null || w.reject("CANCEL") : w == null || w.resolve(h), l.value.splice(m, 1), J(l);
717
735
  }
718
736
  function d() {
719
- !n.value || n.value.length === 0 || (n.value.forEach((i) => {
737
+ !l.value || l.value.length === 0 || (l.value.forEach((i) => {
720
738
  i == null || i.reject("CANCEL");
721
- }), n.value = [], K(n));
739
+ }), l.value = [], J(l));
722
740
  }
723
741
  function b(i, h) {
724
- const m = n.value.find((y) => y.id === i);
742
+ const m = l.value.find((g) => g.id === i);
725
743
  if (!m)
726
744
  return;
727
- const k = m.listeners.find((y) => y.event === h);
728
- k && k.callback({
729
- open: o,
730
- close: (y) => a(m.id, y),
745
+ const w = m.listeners.find((g) => g.event === h);
746
+ w && w.callback({
747
+ open: u,
748
+ close: (g) => n(m.id, g),
731
749
  closeAll: d,
732
750
  showLoading: () => s(m.id),
733
- hideLoading: () => u(m.id),
734
- confirm: (y) => o("confirm", y),
735
- success: (y) => o("success", y),
736
- error: (y) => o("error", y),
737
- warning: (y) => o("warning", y),
738
- info: (y) => o("info", y)
751
+ hideLoading: () => o(m.id),
752
+ confirm: (g) => u("confirm", g),
753
+ success: (g) => u("success", g),
754
+ error: (g) => u("error", g),
755
+ warning: (g) => u("warning", g),
756
+ info: (g) => u("info", g)
739
757
  });
740
758
  }
741
- function s(i) {
742
- if (!l)
759
+ function s(i, h) {
760
+ if (!a)
743
761
  return;
744
- const [h] = l.refs[`modal-container_${i}`];
745
- if (h)
746
- return h.showLoading();
762
+ const [m] = a.refs[`modal-container_${i}`] || [];
763
+ if (m)
764
+ return m.showLoading();
765
+ {
766
+ const { close: w } = u(Cr, {
767
+ text: h == null ? void 0 : h.text
768
+ }, {
769
+ footer: !1,
770
+ header: !1,
771
+ closeable: !1,
772
+ backgroundColor: "transparent"
773
+ });
774
+ return h != null && h.duration && setTimeout(
775
+ () => {
776
+ w();
777
+ },
778
+ h == null ? void 0 : h.duration
779
+ ), w;
780
+ }
747
781
  }
748
- function u(i) {
749
- if (!l)
782
+ function o(i) {
783
+ if (!a)
750
784
  return;
751
- const [h] = l.refs[`modal-container_${i}`];
785
+ const [h] = a.refs[`modal-container_${i}`];
752
786
  if (h)
753
787
  return h.hideLoading();
754
788
  }
755
789
  function c(i, h, m) {
756
- const k = n.value.find((y) => y.id === i);
757
- k && k.listeners.push({
790
+ const w = l.value.find((g) => g.id === i);
791
+ w && w.listeners.push({
758
792
  event: h,
759
793
  callback: m
760
794
  });
761
795
  }
762
- return fe(ue, {
763
- open: o,
764
- close: a,
796
+ return me(oe, {
797
+ open: u,
798
+ close: n,
765
799
  closeAll: d,
766
- addEventListener: c
800
+ addEventListener: c,
801
+ showLoading: s,
802
+ hideLoading: o
767
803
  }), r({
768
- elements: n,
769
- open: o,
770
- close: a,
804
+ elements: l,
805
+ open: u,
806
+ close: n,
771
807
  closeAll: d
772
808
  }), B(() => {
773
809
  t.value = !0;
774
- }), (i, h) => (C(), O(me, null, [
775
- Ae(i.$slots, "default", {}, void 0, !0),
776
- t.value ? (C(), O("div", pr, [
777
- (C(), re(De, {
810
+ }), (i, h) => (S(), O(he, null, [
811
+ Be(i.$slots, "default", {}, void 0, !0),
812
+ t.value ? (S(), O("div", xr, [
813
+ (S(), re(Ue, {
778
814
  disabled: !i.appendToBody,
779
815
  to: typeof i.appendToBody == "string" ? i.appendToBody : "body"
780
816
  }, [
781
- v(Be, { name: "modal-fade" }, {
782
- default: Ue(() => [
783
- (C(!0), O(me, null, We(n.value, (m) => (C(), re(sr, Oe({
817
+ v(We, { name: "modal-fade" }, {
818
+ default: qe(() => [
819
+ (S(!0), O(he, null, Ge(l.value, (m) => (S(), re(sr, Oe({
784
820
  id: m.id,
785
821
  key: m.id,
786
822
  ref_for: !0,
@@ -801,54 +837,50 @@ const rr = (e) => (rt("data-v-9a7af353"), e = e(), nt(), e), nr = { class: "titl
801
837
  ])) : q("", !0)
802
838
  ], 64));
803
839
  }
804
- }), wr = /* @__PURE__ */ be(kr, [["__scopeId", "data-v-756481fe"]]);
840
+ }), Or = /* @__PURE__ */ ce(Fr, [["__scopeId", "data-v-60414811"]]);
805
841
  function te(e, r) {
806
- var n, t;
807
- let l = e == null ? void 0 : e.parent;
808
- for (; l && ((n = l == null ? void 0 : l.type) == null ? void 0 : n.name) !== r; )
809
- l = l.parent;
810
- return ((t = l == null ? void 0 : l.type) == null ? void 0 : t.name) === r ? l : null;
842
+ var l, t;
843
+ let a = e == null ? void 0 : e.parent;
844
+ for (; a && ((l = a == null ? void 0 : a.type) == null ? void 0 : l.name) !== r; )
845
+ a = a.parent;
846
+ return ((t = a == null ? void 0 : a.type) == null ? void 0 : t.name) === r ? a : null;
811
847
  }
812
- function ze() {
813
- const e = ne(ue), r = U();
814
- function n(t, l, o) {
848
+ function Ve() {
849
+ const e = le(oe), r = U();
850
+ function l(t, a, u) {
815
851
  if (!e)
816
852
  throw new Error("Not Found Modal Provider Component");
817
- return e.open(t, l, o);
853
+ return e.open(t, a, u);
818
854
  }
819
855
  return {
820
- open: n,
856
+ open: l,
821
857
  close(t) {
822
- var l;
858
+ var a;
823
859
  if (!e)
824
860
  throw new Error("Not Found Modal Provider Component");
825
- const o = te(r, "ModalContainer"), a = (l = o == null ? void 0 : o.props) == null ? void 0 : l.id;
826
- if (!a)
861
+ const u = te(r, "ModalContainer"), n = (a = u == null ? void 0 : u.props) == null ? void 0 : a.id;
862
+ if (!n)
827
863
  throw new Error("Not Found Current Modal Container");
828
- e.close(a, t);
864
+ e.close(n, t);
829
865
  },
830
866
  closeAll() {
831
867
  if (!e)
832
868
  throw new Error("Not Found Modal Provider Component");
833
869
  e.closeAll();
834
870
  },
835
- showLoading() {
836
- var t;
871
+ showLoading(t) {
872
+ var a;
837
873
  if (!e)
838
874
  throw new Error("Not Found Modal Provider Component");
839
- const l = te(r, "ModalContainer");
840
- if (!((t = l == null ? void 0 : l.props) != null && t.id))
841
- throw new Error("Not Found Current Modal Container");
842
- l != null && l.exposed && (l == null || l.exposed.showLoading());
875
+ const u = te(r, "ModalContainer"), n = (a = u == null ? void 0 : u.props) == null ? void 0 : a.id;
876
+ return e.showLoading(n, t);
843
877
  },
844
878
  hideLoading() {
845
879
  var t;
846
880
  if (!e)
847
881
  throw new Error("Not Found Modal Provider Component");
848
- const l = te(r, "ModalContainer");
849
- if (!((t = l == null ? void 0 : l.props) != null && t.id))
850
- throw new Error("Not Found Current Modal Container");
851
- l != null && l.exposed && (l == null || l.exposed.hideLoading());
882
+ const a = te(r, "ModalContainer"), u = (t = a == null ? void 0 : a.props) == null ? void 0 : t.id;
883
+ return e.hideLoading(u);
852
884
  },
853
885
  confirm(t) {
854
886
  return this.open("confirm", t);
@@ -867,68 +899,68 @@ function ze() {
867
899
  }
868
900
  };
869
901
  }
870
- function Sr(e) {
902
+ function _r(e) {
871
903
  var r;
872
- const n = ne(ue), t = U(), l = te(t, "ModalContainer"), o = (r = l == null ? void 0 : l.props) == null ? void 0 : r.id;
873
- n && o && n.addEventListener(o, "submit", e);
904
+ const l = le(oe), t = U(), a = te(t, "ModalContainer"), u = (r = a == null ? void 0 : a.props) == null ? void 0 : r.id;
905
+ l && u && l.addEventListener(u, "submit", e);
874
906
  }
875
907
  const $e = {
876
908
  id: Symbol("ID"),
877
909
  source: Symbol("Source")
878
910
  };
879
- function Cr(e, r) {
880
- const n = x({});
881
- return e == null || e.forEach((l) => {
882
- let o = null;
883
- l.default && (o = (typeof l.default == "function" ? l.default() : l.default) || null), r && r[l.key] !== void 0 && (o = r[l.key]), n.value[l.key] = o;
884
- }), [n, (l) => {
885
- n.value = l;
911
+ function Ir(e, r) {
912
+ const l = x({});
913
+ return e == null || e.forEach((a) => {
914
+ let u = null;
915
+ a.default && (u = (typeof a.default == "function" ? a.default() : a.default) || null), r && r[a.key] !== void 0 && (u = r[a.key]), l.value[a.key] = u;
916
+ }), [l, (a) => {
917
+ l.value = a;
886
918
  }];
887
919
  }
888
- function xr(e) {
889
- function r(n, t) {
890
- return e != null && e.disabledDate ? e.disabledDate(n, t) : !1;
920
+ function Mr(e) {
921
+ function r(l, t) {
922
+ return e != null && e.disabledDate ? e.disabledDate(l, t) : !1;
891
923
  }
892
- return (n, t) => {
924
+ return (l, t) => {
893
925
  switch (e == null ? void 0 : e.type) {
894
926
  case "week":
895
927
  return v(dt, {
896
- modelValue: n[t.key],
897
- "onUpdate:modelValue": (l) => n[t.key] = l,
928
+ modelValue: l[t.key],
929
+ "onUpdate:modelValue": (a) => l[t.key] = a,
898
930
  "disabled-date": r,
899
931
  format: e == null ? void 0 : e.labelFormat,
900
932
  "value-format": e == null ? void 0 : e.valueFormat
901
933
  }, null);
902
934
  case "month":
903
935
  return v(it, {
904
- modelValue: n[t.key],
905
- "onUpdate:modelValue": (l) => n[t.key] = l,
936
+ modelValue: l[t.key],
937
+ "onUpdate:modelValue": (a) => l[t.key] = a,
906
938
  "disabled-date": r,
907
939
  format: e == null ? void 0 : e.labelFormat,
908
940
  "value-format": e == null ? void 0 : e.valueFormat
909
941
  }, null);
910
942
  case "quarter":
911
943
  return v(ct, {
912
- modelValue: n[t.key],
913
- "onUpdate:modelValue": (l) => n[t.key] = l,
944
+ modelValue: l[t.key],
945
+ "onUpdate:modelValue": (a) => l[t.key] = a,
914
946
  "disabled-date": r,
915
947
  format: e == null ? void 0 : e.labelFormat,
916
948
  "value-format": e == null ? void 0 : e.valueFormat
917
949
  }, null);
918
950
  case "year":
919
- return v(ot, {
920
- modelValue: n[t.key],
921
- "onUpdate:modelValue": (l) => n[t.key] = l,
951
+ return v(ut, {
952
+ modelValue: l[t.key],
953
+ "onUpdate:modelValue": (a) => l[t.key] = a,
922
954
  "disabled-date": r,
923
955
  format: e == null ? void 0 : e.labelFormat,
924
956
  "value-format": e == null ? void 0 : e.valueFormat
925
957
  }, null);
926
958
  case "date":
927
959
  default:
928
- return v(ut, {
960
+ return v(ot, {
929
961
  "disabled-input": !0,
930
- modelValue: n[t.key],
931
- "onUpdate:modelValue": (l) => n[t.key] = l,
962
+ modelValue: l[t.key],
963
+ "onUpdate:modelValue": (a) => l[t.key] = a,
932
964
  "disabled-date": r,
933
965
  format: e == null ? void 0 : e.labelFormat,
934
966
  "value-format": e == null ? void 0 : e.valueFormat
@@ -936,13 +968,13 @@ function xr(e) {
936
968
  }
937
969
  };
938
970
  }
939
- function $r(e) {
940
- return (r, n) => {
971
+ function Tr(e) {
972
+ return (r, l) => {
941
973
  switch (e == null ? void 0 : e.type) {
942
974
  case "number":
943
- return v(Me, {
944
- modelValue: r[n.key],
945
- "onUpdate:modelValue": (t) => r[n.key] = t,
975
+ return v(je, {
976
+ modelValue: r[l.key],
977
+ "onUpdate:modelValue": (t) => r[l.key] = t,
946
978
  hideButton: !0,
947
979
  "read-only": e == null ? void 0 : e.readonly,
948
980
  placeholder: e == null ? void 0 : e.placeholder,
@@ -951,8 +983,8 @@ function $r(e) {
951
983
  case "string":
952
984
  default:
953
985
  return v(st, {
954
- modelValue: r[n.key],
955
- "onUpdate:modelValue": (t) => r[n.key] = t,
986
+ modelValue: r[l.key],
987
+ "onUpdate:modelValue": (t) => r[l.key] = t,
956
988
  placeholder: e == null ? void 0 : e.placeholder,
957
989
  readonly: e == null ? void 0 : e.readonly,
958
990
  allowClear: e == null ? void 0 : e.clearable
@@ -961,47 +993,47 @@ function $r(e) {
961
993
  };
962
994
  }
963
995
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
964
- function ke(e, r, n) {
965
- const t = J(e, (...l) => (Ie(() => t()), r(...l)), n);
996
+ function ke(e, r, l) {
997
+ const t = Q(e, (...a) => (Ie(() => t()), r(...a)), l);
966
998
  return t;
967
999
  }
968
- function Fr(e) {
969
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ve(e);
1000
+ function jr(e) {
1001
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
970
1002
  }
971
1003
  const H = /* @__PURE__ */ new WeakMap();
972
- function Or() {
1004
+ function Lr() {
973
1005
  const e = x(/* @__PURE__ */ new Map());
974
- return [e, (n) => e.value = n];
1006
+ return [e, (l) => e.value = l];
975
1007
  }
976
- function _r(e) {
977
- let r, n = !1;
978
- const [t, l] = Or(), o = (s) => {
1008
+ function zr(e) {
1009
+ let r, l = !1;
1010
+ const [t, a] = Lr(), u = (s) => {
979
1011
  if (e.onChange && e.onChange(s), !e.autoSumbit || !r)
980
1012
  return;
981
- let u = r;
982
- for (; u && u.$el.tagName !== "FORM"; )
983
- u = u.$parent;
984
- u && u.$el && u.$el.dispatchEvent(new Event("submit"));
985
- }, a = (s, u) => {
1013
+ let o = r;
1014
+ for (; o && o.$el.tagName !== "FORM"; )
1015
+ o = o.$parent;
1016
+ o && o.$el && o.$el.dispatchEvent(new Event("submit"));
1017
+ }, n = (s, o) => {
986
1018
  const c = s();
987
- c instanceof Promise ? c.then(u) : u(c);
1019
+ c instanceof Promise ? c.then(o) : o(c);
988
1020
  }, d = async () => {
989
1021
  const s = H.get(e.options);
990
1022
  switch (typeof s) {
991
1023
  case "function":
992
- H.set(e.options, l);
1024
+ H.set(e.options, a);
993
1025
  return;
994
1026
  case "object":
995
- l(s);
1027
+ a(s);
996
1028
  return;
997
1029
  }
998
- H.set(e.options, l), a(e.options, (u) => {
1030
+ H.set(e.options, a), n(e.options, (o) => {
999
1031
  const c = H.get(e.options);
1000
- H.set(e.options, u), c(u);
1032
+ H.set(e.options, o), c(o);
1001
1033
  });
1002
1034
  }, b = () => {
1003
- a(e.options, (s) => {
1004
- l(s);
1035
+ n(e.options, (s) => {
1036
+ a(s);
1005
1037
  });
1006
1038
  };
1007
1039
  switch (!0) {
@@ -1011,7 +1043,7 @@ function _r(e) {
1011
1043
  }
1012
1044
  case ae(e.options): {
1013
1045
  ke(() => e.options, () => {
1014
- l(e.options.value);
1046
+ a(e.options.value);
1015
1047
  }, {
1016
1048
  immediate: !0
1017
1049
  });
@@ -1020,20 +1052,20 @@ function _r(e) {
1020
1052
  default:
1021
1053
  t.value = e.options;
1022
1054
  }
1023
- return (s, u) => {
1055
+ return (s, o) => {
1024
1056
  let c;
1025
- return e.default && !n && (s[u.key] = e.default, n = !0), v(ft, {
1057
+ return e.default && !l && (s[o.key] = e.default, l = !0), v(ft, {
1026
1058
  ref: (i) => r = i,
1027
1059
  multiple: e.multiple,
1028
- modelValue: s[u.key],
1029
- "onUpdate:modelValue": (i) => s[u.key] = i,
1060
+ modelValue: s[o.key],
1061
+ "onUpdate:modelValue": (i) => s[o.key] = i,
1030
1062
  placeholder: e.placeholder,
1031
1063
  allowClear: e.clearable,
1032
1064
  allowSearch: e.searchable,
1033
1065
  "allow-create": e.createable,
1034
1066
  maxTagCount: e.maxTagCount ?? 2,
1035
- onChange: o
1036
- }, Fr(c = Array.from(t.value.entries()).map(([i, h]) => v(mt, {
1067
+ onChange: u
1068
+ }, jr(c = Array.from(t.value.entries()).map(([i, h]) => v(mt, {
1037
1069
  key: i,
1038
1070
  value: i,
1039
1071
  label: h
@@ -1042,13 +1074,13 @@ function _r(e) {
1042
1074
  });
1043
1075
  };
1044
1076
  }
1045
- function Ir(e) {
1077
+ function Pr(e) {
1046
1078
  function r() {
1047
1079
  e != null && e.autoSumbit;
1048
1080
  }
1049
- return (n, t) => (e != null && e.default && (n[t.key] = e.default), v(ht, {
1050
- modelValue: n[t.key],
1051
- "onUpdate:modelValue": (l) => n[t.key] = l,
1081
+ return (l, t) => (e != null && e.default && (l[t.key] = e.default), v(ht, {
1082
+ modelValue: l[t.key],
1083
+ "onUpdate:modelValue": (a) => l[t.key] = a,
1052
1084
  checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
1053
1085
  uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
1054
1086
  checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
@@ -1056,19 +1088,19 @@ function Ir(e) {
1056
1088
  onChange: r
1057
1089
  }, null));
1058
1090
  }
1059
- function Mr(e) {
1060
- return (r, n) => {
1091
+ function Vr(e) {
1092
+ return (r, l) => {
1061
1093
  let t = [];
1062
- function l(d) {
1094
+ function a(d) {
1063
1095
  t = d;
1064
1096
  }
1065
- function o(d) {
1097
+ function u(d) {
1066
1098
  if (d && d.length === 2) {
1067
- const [b, s] = d.sort(), u = xe(b).startOf("days"), c = xe(s).endOf("days");
1068
- r[n.key] = [u.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), c.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
1099
+ const [b, s] = d.sort(), o = xe(b).startOf("days"), c = xe(s).endOf("days");
1100
+ r[l.key] = [o.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), c.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
1069
1101
  }
1070
1102
  }
1071
- function a(d) {
1103
+ function n(d) {
1072
1104
  return e != null && e.disabledDate ? e.disabledDate(t.filter(Boolean), d) : !1;
1073
1105
  }
1074
1106
  return v("div", null, [v(vt, {
@@ -1076,61 +1108,61 @@ function Mr(e) {
1076
1108
  style: {
1077
1109
  width: "300px"
1078
1110
  },
1079
- modelValue: r[n.key],
1080
- "onUpdate:modelValue": (d) => r[n.key] = d,
1081
- onSelect: l,
1082
- onChange: o,
1111
+ modelValue: r[l.key],
1112
+ "onUpdate:modelValue": (d) => r[l.key] = d,
1113
+ onSelect: a,
1114
+ onChange: u,
1083
1115
  mode: e == null ? void 0 : e.type,
1084
1116
  allowClear: e == null ? void 0 : e.clearable,
1085
- "disabled-date": a,
1117
+ "disabled-date": n,
1086
1118
  format: e == null ? void 0 : e.labelFormat,
1087
1119
  "value-format": e == null ? void 0 : e.valueFormat
1088
1120
  }, null)]);
1089
1121
  };
1090
1122
  }
1091
- function jr(e) {
1092
- return (r, n) => v(yt, {
1093
- modelValue: r[n.key],
1094
- "onUpdate:modelValue": (t) => r[n.key] = t,
1123
+ function Nr(e) {
1124
+ return (r, l) => v(gt, {
1125
+ modelValue: r[l.key],
1126
+ "onUpdate:modelValue": (t) => r[l.key] = t,
1095
1127
  placeholder: e == null ? void 0 : e.placeholder,
1096
1128
  autoSize: e == null ? void 0 : e.autosize,
1097
1129
  maxLength: e == null ? void 0 : e.maxLength
1098
1130
  }, null);
1099
1131
  }
1100
1132
  const Y = /* @__PURE__ */ new WeakMap();
1101
- function Lr() {
1133
+ function Ar() {
1102
1134
  const e = x([]);
1103
- return [e, (n) => e.value = n];
1135
+ return [e, (l) => e.value = l];
1104
1136
  }
1105
- function Tr(e) {
1106
- let r, n = !1;
1107
- const [t, l] = Lr(), o = () => {
1137
+ function Er(e) {
1138
+ let r, l = !1;
1139
+ const [t, a] = Ar(), u = () => {
1108
1140
  if (!e.autoSumbit || !r)
1109
1141
  return;
1110
- let u = r;
1111
- for (; u && u.$el.tagName !== "FORM"; )
1112
- u = u.$parent;
1113
- u && u.$el && u.$el.dispatchEvent(new Event("submit"));
1114
- }, a = (u, c) => {
1115
- const i = u();
1142
+ let o = r;
1143
+ for (; o && o.$el.tagName !== "FORM"; )
1144
+ o = o.$parent;
1145
+ o && o.$el && o.$el.dispatchEvent(new Event("submit"));
1146
+ }, n = (o, c) => {
1147
+ const i = o();
1116
1148
  i instanceof Promise ? i.then(c) : c(i);
1117
1149
  }, d = async () => {
1118
- const u = Y.get(e.options);
1119
- switch (typeof u) {
1150
+ const o = Y.get(e.options);
1151
+ switch (typeof o) {
1120
1152
  case "function":
1121
- Y.set(e.options, l);
1153
+ Y.set(e.options, a);
1122
1154
  return;
1123
1155
  case "object":
1124
- l(u);
1156
+ a(o);
1125
1157
  return;
1126
1158
  }
1127
- Y.set(e.options, l), a(e.options, (c) => {
1159
+ Y.set(e.options, a), n(e.options, (c) => {
1128
1160
  const i = Y.get(e.options);
1129
1161
  Y.set(e.options, c), i(c);
1130
1162
  });
1131
1163
  }, b = () => {
1132
- a(e.options, (u) => {
1133
- l(u);
1164
+ n(e.options, (o) => {
1165
+ a(o);
1134
1166
  });
1135
1167
  };
1136
1168
  switch (!0) {
@@ -1140,7 +1172,7 @@ function Tr(e) {
1140
1172
  }
1141
1173
  case ae(e.options): {
1142
1174
  ke(e.options, () => {
1143
- l(e.options.value);
1175
+ a(e.options.value);
1144
1176
  }, {
1145
1177
  immediate: !0
1146
1178
  });
@@ -1149,21 +1181,21 @@ function Tr(e) {
1149
1181
  default:
1150
1182
  t.value = e.options;
1151
1183
  }
1152
- function s(u, c) {
1184
+ function s(o, c) {
1153
1185
  var m;
1154
1186
  const i = ((m = e.fieldNames) == null ? void 0 : m.title) || "title", h = c[i];
1155
- return h ? h.toLowerCase().includes(u.toLowerCase()) : !1;
1187
+ return h ? h.toLowerCase().includes(o.toLowerCase()) : !1;
1156
1188
  }
1157
- return (u, c) => (e.default && !n && (u[c.key] = e.default, n = !0), v(gt, {
1189
+ return (o, c) => (e.default && !l && (o[c.key] = e.default, l = !0), v(yt, {
1158
1190
  ref: (i) => r = i,
1159
1191
  multiple: e.multiple,
1160
- modelValue: u[c.key],
1161
- "onUpdate:modelValue": (i) => u[c.key] = i,
1192
+ modelValue: o[c.key],
1193
+ "onUpdate:modelValue": (i) => o[c.key] = i,
1162
1194
  placeholder: e.placeholder,
1163
1195
  allowClear: e.clearable,
1164
1196
  allowSearch: e.searchable,
1165
1197
  maxTagCount: e.maxTagCount ?? 2,
1166
- onChange: o,
1198
+ onChange: u,
1167
1199
  filterTreeNode: s,
1168
1200
  data: t.value,
1169
1201
  fieldNames: e.fieldNames,
@@ -1173,39 +1205,39 @@ function Tr(e) {
1173
1205
  }));
1174
1206
  }
1175
1207
  const X = /* @__PURE__ */ new WeakMap();
1176
- function zr() {
1208
+ function Rr() {
1177
1209
  const e = x([]);
1178
- return [e, (n) => e.value = n];
1210
+ return [e, (l) => e.value = l];
1179
1211
  }
1180
- function Nr(e) {
1181
- let r, n = !1;
1182
- const [t, l] = zr(), o = () => {
1212
+ function Dr(e) {
1213
+ let r, l = !1;
1214
+ const [t, a] = Rr(), u = () => {
1183
1215
  if (!e.autoSumbit || !r)
1184
1216
  return;
1185
1217
  let s = r;
1186
1218
  for (; s && s.$el.tagName !== "FORM"; )
1187
1219
  s = s.$parent;
1188
1220
  s && s.$el && s.$el.dispatchEvent(new Event("submit"));
1189
- }, a = (s, u) => {
1221
+ }, n = (s, o) => {
1190
1222
  const c = s();
1191
- c instanceof Promise ? c.then(u) : u(c);
1223
+ c instanceof Promise ? c.then(o) : o(c);
1192
1224
  }, d = async () => {
1193
1225
  const s = X.get(e.options);
1194
1226
  switch (typeof s) {
1195
1227
  case "function":
1196
- X.set(e.options, l);
1228
+ X.set(e.options, a);
1197
1229
  return;
1198
1230
  case "object":
1199
- l(s);
1231
+ a(s);
1200
1232
  return;
1201
1233
  }
1202
- X.set(e.options, l), a(e.options, (u) => {
1234
+ X.set(e.options, a), n(e.options, (o) => {
1203
1235
  const c = X.get(e.options);
1204
- X.set(e.options, u), c(u);
1236
+ X.set(e.options, o), c(o);
1205
1237
  });
1206
1238
  }, b = () => {
1207
- a(e.options, (s) => {
1208
- l(s);
1239
+ n(e.options, (s) => {
1240
+ a(s);
1209
1241
  });
1210
1242
  };
1211
1243
  switch (!0) {
@@ -1215,7 +1247,7 @@ function Nr(e) {
1215
1247
  }
1216
1248
  case ae(e.options): {
1217
1249
  ke(e.options, () => {
1218
- l(e.options.value);
1250
+ a(e.options.value);
1219
1251
  }, {
1220
1252
  immediate: !0
1221
1253
  });
@@ -1224,24 +1256,24 @@ function Nr(e) {
1224
1256
  default:
1225
1257
  t.value = e.options;
1226
1258
  }
1227
- return (s, u) => (e.default && !n && (s[u.key] = e.default, n = !0), v(pt, {
1259
+ return (s, o) => (e.default && !l && (s[o.key] = e.default, l = !0), v(pt, {
1228
1260
  pathMode: e.pathMode,
1229
1261
  ref: (c) => r = c,
1230
1262
  multiple: e.multiple,
1231
- modelValue: s[u.key],
1232
- "onUpdate:modelValue": (c) => s[u.key] = c,
1263
+ modelValue: s[o.key],
1264
+ "onUpdate:modelValue": (c) => s[o.key] = c,
1233
1265
  placeholder: e.placeholder,
1234
1266
  allowClear: e.clearable,
1235
1267
  allowSearch: e.searchable,
1236
1268
  maxTagCount: e.maxTagCount ?? 2,
1237
- onChange: o,
1269
+ onChange: u,
1238
1270
  options: t.value
1239
1271
  }, null));
1240
1272
  }
1241
- function Pr(e) {
1273
+ function Br(e) {
1242
1274
  return (r) => e(r);
1243
1275
  }
1244
- const Vr = {
1276
+ const Ur = {
1245
1277
  thousands: !0,
1246
1278
  inputUnit: "元",
1247
1279
  outputUnit: "元"
@@ -1250,41 +1282,41 @@ const Vr = {
1250
1282
  元: 10 ** 2,
1251
1283
  万: 10 ** 4
1252
1284
  };
1253
- function Rr(e) {
1285
+ function Wr(e) {
1254
1286
  e = {
1255
- ...Vr,
1287
+ ...Ur,
1256
1288
  ...e || {}
1257
1289
  };
1258
- const r = (a) => {
1259
- if (a == null)
1290
+ const r = (n) => {
1291
+ if (n == null)
1260
1292
  return;
1261
1293
  if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
1262
- return a;
1294
+ return n;
1263
1295
  const d = ee[e.outputUnit] / ee[e.inputUnit];
1264
- return a * d;
1265
- }, n = (a) => {
1266
- if (a == null)
1296
+ return n * d;
1297
+ }, l = (n) => {
1298
+ if (n == null)
1267
1299
  return;
1268
1300
  if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
1269
- return a;
1301
+ return n;
1270
1302
  const d = ee[e.inputUnit] / ee[e.outputUnit];
1271
- return a * d;
1272
- }, t = (a) => {
1273
- const d = a.split(".");
1303
+ return n * d;
1304
+ }, t = (n) => {
1305
+ const d = n.split(".");
1274
1306
  return d[0] = d[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), d.join(".");
1275
- }, l = (a) => {
1276
- const d = a;
1307
+ }, a = (n) => {
1308
+ const d = n;
1277
1309
  return e != null && e.thousands ? t(d) : d;
1278
- }, o = (a) => a.replace(/,/g, "");
1279
- return (a, d) => {
1280
- const b = x(r(a[d.key]));
1281
- return J(b, (s) => {
1282
- a[d.key] = n(s);
1283
- }), v(Me, {
1310
+ }, u = (n) => n.replace(/,/g, "");
1311
+ return (n, d) => {
1312
+ const b = x(r(n[d.key]));
1313
+ return Q(b, (s) => {
1314
+ n[d.key] = l(s);
1315
+ }), v(je, {
1284
1316
  modelValue: b.value,
1285
1317
  "onUpdate:modelValue": (s) => b.value = s,
1286
- formatter: l,
1287
- parser: o,
1318
+ formatter: a,
1319
+ parser: u,
1288
1320
  precision: e == null ? void 0 : e.precision,
1289
1321
  hideButton: !0,
1290
1322
  "read-only": e == null ? void 0 : e.readonly,
@@ -1296,39 +1328,39 @@ function Rr(e) {
1296
1328
  });
1297
1329
  };
1298
1330
  }
1299
- function Er() {
1331
+ function qr() {
1300
1332
  return {
1301
- input: $r,
1302
- textarea: jr,
1303
- select: _r,
1304
- treeSelect: Tr,
1305
- date: xr,
1306
- switch: Ir,
1307
- dateRange: Mr,
1308
- render: Pr,
1309
- cascader: Nr,
1310
- currency: Rr
1333
+ input: Tr,
1334
+ textarea: Nr,
1335
+ select: zr,
1336
+ treeSelect: Er,
1337
+ date: Mr,
1338
+ switch: Pr,
1339
+ dateRange: Vr,
1340
+ render: Br,
1341
+ cascader: Dr,
1342
+ currency: Wr
1311
1343
  };
1312
1344
  }
1313
- function Ar(e, r) {
1345
+ function Gr(e, r) {
1314
1346
  r.render || (r.render = (t) => t.input());
1315
- const n = r.render({
1316
- ...Er()
1347
+ const l = r.render({
1348
+ ...qr()
1317
1349
  });
1318
1350
  return {
1319
- default: () => n(e, r)
1351
+ default: () => l(e, r)
1320
1352
  };
1321
1353
  }
1322
- function Dr(e, r) {
1323
- return lt(je, {
1354
+ function Hr(e, r) {
1355
+ return nt(Le, {
1324
1356
  field: r.key,
1325
1357
  label: r.title
1326
- }, Ar(e, r));
1358
+ }, Gr(e, r));
1327
1359
  }
1328
- function Br(e) {
1329
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ve(e);
1360
+ function Yr(e) {
1361
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
1330
1362
  }
1331
- const Ur = /* @__PURE__ */ R({
1363
+ const Xr = /* @__PURE__ */ V({
1332
1364
  props: {
1333
1365
  form: {
1334
1366
  type: Object,
@@ -1336,30 +1368,30 @@ const Ur = /* @__PURE__ */ R({
1336
1368
  }
1337
1369
  },
1338
1370
  setup(e) {
1339
- const r = ze(), n = e.form.map((a) => ({
1340
- ...a,
1371
+ const r = Ve(), l = e.form.map((n) => ({
1372
+ ...n,
1341
1373
  collapsed: !1
1342
- })), t = Array.from(new Set(n.map((a) => a.group).flat().filter(Boolean))), l = n.reduce((a, d) => ((d.group ? [d.group].flat() : ["默认"]).forEach((b) => {
1343
- let s = a.find((u) => u.group === b);
1374
+ })), t = Array.from(new Set(l.map((n) => n.group).flat().filter(Boolean))), a = l.reduce((n, d) => ((d.group ? [d.group].flat() : ["默认"]).forEach((b) => {
1375
+ let s = n.find((o) => o.group === b);
1344
1376
  s || (s = {
1345
1377
  group: b,
1346
1378
  instance: void 0,
1347
1379
  form: []
1348
- }, a.push(s)), s.form.push(d);
1349
- }), a), []).sort((a, d) => a.group === "默认" ? -1 : d.group === "默认" ? 1 : a.group > d.group ? -1 : 1), o = x("默认");
1350
- return Sr(() => {
1351
- const a = l.find((d) => d.group === o.value);
1352
- if (a && a.instance) {
1353
- const d = a.instance.formSource;
1354
- a.instance.validate().then(() => {
1380
+ }, n.push(s)), s.form.push(d);
1381
+ }), n), []).sort((n, d) => n.group === "默认" ? -1 : d.group === "默认" ? 1 : n.group > d.group ? -1 : 1), u = x("默认");
1382
+ return _r(() => {
1383
+ const n = a.find((d) => d.group === u.value);
1384
+ if (n && n.instance) {
1385
+ const d = n.instance.formSource;
1386
+ n.instance.validate().then(() => {
1355
1387
  r.close(d);
1356
1388
  });
1357
1389
  }
1358
1390
  }), {
1359
- formItems: n,
1391
+ formItems: l,
1360
1392
  groups: t,
1361
- groupForms: l,
1362
- activeTab: o
1393
+ groupForms: a,
1394
+ activeTab: u
1363
1395
  };
1364
1396
  },
1365
1397
  render() {
@@ -1368,29 +1400,29 @@ const Ur = /* @__PURE__ */ R({
1368
1400
  let r;
1369
1401
  return v(bt, {
1370
1402
  "active-key": this.activeTab,
1371
- "onUpdate:active-key": (n) => this.activeTab = n
1372
- }, Br(r = this.groupForms.map((n) => v(kt, {
1373
- title: n.group,
1374
- key: n.group
1403
+ "onUpdate:active-key": (l) => this.activeTab = l
1404
+ }, Yr(r = this.groupForms.map((l) => v(kt, {
1405
+ title: l.group,
1406
+ key: l.group
1375
1407
  }, {
1376
- default: () => [v(he, {
1377
- form: n.form,
1378
- ref: (t) => n.instance = t
1408
+ default: () => [v(ve, {
1409
+ form: l.form,
1410
+ ref: (t) => l.instance = t
1379
1411
  }, null)]
1380
1412
  }))) ? r : {
1381
1413
  default: () => [r]
1382
1414
  });
1383
1415
  } else
1384
- return v(he, {
1416
+ return v(ve, {
1385
1417
  form: this.formItems,
1386
1418
  ref: (r) => e.instance = r
1387
1419
  }, null);
1388
1420
  }
1389
1421
  });
1390
1422
  function Fe(e) {
1391
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ve(e);
1423
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
1392
1424
  }
1393
- const he = /* @__PURE__ */ R({
1425
+ const ve = /* @__PURE__ */ V({
1394
1426
  props: {
1395
1427
  form: {
1396
1428
  type: Object,
@@ -1454,93 +1486,93 @@ const he = /* @__PURE__ */ R({
1454
1486
  setup(e, {
1455
1487
  emit: r
1456
1488
  }) {
1457
- const n = x(), [t, l] = Cr(e.form, e.modelValue || e.value), o = x(e.columns || 0), a = x(!0), d = x(), b = () => a.value = !a.value;
1458
- fe($e.id, e.id), fe($e.source, t);
1489
+ const l = x(), [t, a] = Ir(e.form, e.modelValue || e.value), u = x(e.columns || 0), n = x(!0), d = x(), b = () => n.value = !n.value;
1490
+ me($e.id, e.id), me($e.source, t);
1459
1491
  const s = () => {
1460
1492
  r("submit", t.value), r("update:model-value", t.value);
1461
- }, u = S(() => e.form.filter((g) => a.value ? !g.collapsed : !0).filter((g) => {
1493
+ }, o = C(() => e.form.filter((y) => n.value ? !y.collapsed : !0).filter((y) => {
1462
1494
  switch (!0) {
1463
- case typeof g.visiable == "boolean":
1464
- return g.visiable;
1465
- case typeof g.visiable == "function":
1466
- return g.visiable(t.value);
1495
+ case typeof y.visiable == "boolean":
1496
+ return y.visiable;
1497
+ case typeof y.visiable == "function":
1498
+ return y.visiable(t.value);
1467
1499
  default:
1468
1500
  return !0;
1469
1501
  }
1470
- })), c = S(() => {
1471
- if (!o.value)
1502
+ })), c = C(() => {
1503
+ if (!u.value)
1472
1504
  return 1;
1473
- const g = u.value.reduce(($, P) => $ + ((P == null ? void 0 : P.span) || 1), 0);
1474
- return o.value - g % o.value;
1475
- }), i = S(() => e.form.reduce((g, $) => ($.rule && (g[$.key] = $.rule), g), {}));
1505
+ const y = o.value.reduce(($, N) => $ + ((N == null ? void 0 : N.span) || 1), 0);
1506
+ return u.value - y % u.value;
1507
+ }), i = C(() => e.form.reduce((y, $) => ($.rule && (y[$.key] = $.rule), y), {}));
1476
1508
  function h() {
1477
1509
  var $;
1478
1510
  if (e.columns)
1479
1511
  return;
1480
- const g = ($ = n.value) == null ? void 0 : $.$el;
1481
- g && (o.value = Math.max(Math.floor(g.offsetWidth / e.minWidth), 1));
1512
+ const y = ($ = l.value) == null ? void 0 : $.$el;
1513
+ y && (u.value = Math.max(Math.floor(y.offsetWidth / e.minWidth), 1));
1482
1514
  }
1483
1515
  function m() {
1484
1516
  var $;
1485
- const g = ($ = n.value) == null ? void 0 : $.$el;
1486
- g && (g.id = e.id);
1517
+ const y = ($ = l.value) == null ? void 0 : $.$el;
1518
+ y && (y.id = e.id);
1487
1519
  }
1488
- function k() {
1489
- d.value.open(Ur, {
1520
+ function w() {
1521
+ d.value.open(Xr, {
1490
1522
  form: e.form
1491
1523
  }, {
1492
1524
  title: "高级搜索",
1493
1525
  footer: !0,
1494
1526
  submitText: "搜索"
1495
- }).then((g) => {
1496
- g && (y(g), s());
1527
+ }).then((y) => {
1528
+ y && (g(y), s());
1497
1529
  });
1498
1530
  }
1499
1531
  B(() => {
1500
1532
  h(), m();
1501
1533
  });
1502
- function y(g) {
1503
- l({
1534
+ function g(y) {
1535
+ a({
1504
1536
  ...t.value,
1505
- ...g || {}
1537
+ ...y || {}
1506
1538
  });
1507
1539
  }
1508
- function _(g, $) {
1509
- t.value[g] = $, y({
1540
+ function _(y, $) {
1541
+ t.value[y] = $, g({
1510
1542
  ...t.value
1511
1543
  });
1512
1544
  }
1513
- function T() {
1514
- var g;
1515
- (g = n.value) == null || g.resetFields();
1545
+ function L() {
1546
+ var y;
1547
+ (y = l.value) == null || y.resetFields();
1516
1548
  }
1517
1549
  function I() {
1518
- var g;
1519
- return (g = n.value) == null ? void 0 : g.validate();
1550
+ var y;
1551
+ return (y = l.value) == null ? void 0 : y.validate();
1520
1552
  }
1521
1553
  return B(() => {
1522
1554
  window && window.addEventListener("resize", h);
1523
1555
  }), {
1524
1556
  formSource: t,
1525
- formInstance: n,
1526
- formColumns: o,
1557
+ formInstance: l,
1558
+ formColumns: u,
1527
1559
  formRules: i,
1528
- formCollspased: a,
1560
+ formCollspased: n,
1529
1561
  formActiosSpan: c,
1530
- formItems: u,
1562
+ formItems: o,
1531
1563
  toggleFormCollapsed: b,
1532
1564
  updateFormField: _,
1533
- updateFormSource: y,
1534
- reset: T,
1565
+ updateFormSource: g,
1566
+ reset: L,
1535
1567
  validate: I,
1536
1568
  onSubmitSuccess: s,
1537
- openCollapsedDialog: k,
1569
+ openCollapsedDialog: w,
1538
1570
  modalInstance: d
1539
1571
  };
1540
1572
  },
1541
1573
  render() {
1542
1574
  const e = () => {
1543
- const r = [], n = this.footer ? {
1575
+ const r = [], l = this.footer ? {
1544
1576
  span: this.formColumns
1545
1577
  } : {
1546
1578
  span: this.formActiosSpan
@@ -1572,15 +1604,15 @@ const he = /* @__PURE__ */ R({
1572
1604
  onClick: this.toggleFormCollapsed
1573
1605
  }, {
1574
1606
  default: () => this.formCollspased ? "展开" : "收起",
1575
- icon: () => this.formCollspased ? v(Tt, null, null) : v(Et, null, null)
1607
+ icon: () => this.formCollspased ? v(Lt, null, null) : v(Et, null, null)
1576
1608
  })), this.collapsedMode === "dialog" && r.push(v(W, {
1577
1609
  onClick: this.openCollapsedDialog
1578
1610
  }, {
1579
1611
  default: () => "高级搜索",
1580
1612
  icon: () => v(qt, null, null)
1581
1613
  }))), this.$slots.actions && r.push(...this.$slots.actions()), r.length)
1582
- return v(Ce, n, {
1583
- default: () => [v(je, {
1614
+ return v(Ce, l, {
1615
+ default: () => [v(Le, {
1584
1616
  contentClass: this.footer ? "form-footer" : ""
1585
1617
  }, {
1586
1618
  default: () => [v(Ct, null, Fe(r) ? r : {
@@ -1591,7 +1623,7 @@ const he = /* @__PURE__ */ R({
1591
1623
  };
1592
1624
  return v("div", {
1593
1625
  class: "form-render"
1594
- }, [v(wr, {
1626
+ }, [v(Or, {
1595
1627
  ref: (r) => this.modalInstance = r
1596
1628
  }, {
1597
1629
  default: () => [v(wt, Oe({
@@ -1611,11 +1643,11 @@ const he = /* @__PURE__ */ R({
1611
1643
  "rol-gap": 10
1612
1644
  }, {
1613
1645
  default: () => [this.formItems.filter(() => this.formColumns !== 0).map((r) => {
1614
- let n;
1646
+ let l;
1615
1647
  return v(Ce, {
1616
1648
  span: r.span
1617
- }, Fe(n = Dr(this.formSource, r)) ? n : {
1618
- default: () => [n]
1649
+ }, Fe(l = Hr(this.formSource, r)) ? l : {
1650
+ default: () => [l]
1619
1651
  });
1620
1652
  }), e()]
1621
1653
  })]
@@ -1623,27 +1655,27 @@ const he = /* @__PURE__ */ R({
1623
1655
  })]);
1624
1656
  }
1625
1657
  });
1626
- function Hr(e) {
1658
+ function Zr(e) {
1627
1659
  return e;
1628
1660
  }
1629
- function Yr(e) {
1630
- const r = U(), n = x();
1661
+ function el(e) {
1662
+ const r = U(), l = x();
1631
1663
  function t() {
1632
- var o, a;
1633
- const l = (a = (o = r == null ? void 0 : r.proxy) == null ? void 0 : o.$refs) == null ? void 0 : a[e];
1634
- l && (n.value = l);
1664
+ var u, n;
1665
+ const a = (n = (u = r == null ? void 0 : r.proxy) == null ? void 0 : u.$refs) == null ? void 0 : n[e];
1666
+ a && (l.value = a);
1635
1667
  }
1636
- return B(t), at(t), n;
1668
+ return B(t), at(t), l;
1637
1669
  }
1638
- const Xr = {
1670
+ const tl = {
1639
1671
  install(e, r) {
1640
- e.component("FormRender", he);
1672
+ e.component("FormRender", ve);
1641
1673
  }
1642
1674
  };
1643
1675
  export {
1644
- he as FormRender,
1645
- Qr as FormRenderResolver,
1646
- Xr as default,
1647
- Hr as defineForm,
1648
- Yr as useForm
1676
+ ve as FormRender,
1677
+ nl as FormRenderResolver,
1678
+ tl as default,
1679
+ Zr as defineForm,
1680
+ el as useForm
1649
1681
  };