@gopowerteam/form-render 0.0.60 → 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 N, 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 G, 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: N(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
- }), Pt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Vt = /* @__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
130
  }, null, -1), Nt = [Vt];
131
- function Rt(e, r, n, t, l, o) {
132
- return C(), O("svg", {
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: N(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))
142
+ onClick: r[0] || (r[0] = (...n) => e.onClick && e.onClick(...n))
143
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: N(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), P = (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 - P.left + M.scrollLeft : j.left),
325
- y: p.clientY - (M ? j.top - P.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: P, y: j } = y.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") && (j = p.clientY - _.value.y, z && (j = Math.min(Math.max(0, j), z.scrollHeight - M.height))), y.value = {
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
334
  x: P,
335
- y: j
336
- }, b == null || b(y.value, p), I(p);
337
- }, V = (p) => {
338
- F(r.disabled) || !T(p) || _.value && (_.value = void 0, s == null || s(y.value, p), I(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", V, 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 q(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-8d442648"), 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,24 +459,22 @@ const rr = (e) => (rt("data-v-8d442648"), 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) => ({
464
- "8796093c": f.zIndex
462
+ setup(e, { expose: r, emit: l }) {
463
+ Ye((f) => ({
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 } = q(s);
469
- q(u);
470
- const { height: y } = q(c, void 0, { box: "border-box" }), { height: _ } = q(i, void 0, { box: "border-box" }), { height: T } = q(h), { height: I } = q(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, {
471
469
  initialValue: { x: 0, y: 0 }
472
470
  });
473
- function V() {
474
- o == null || o.close(t.id);
471
+ function N() {
472
+ u == null || u.close(t.id);
475
473
  }
476
474
  function p(f) {
477
475
  return typeof f == "number" ? `${f}px` : f;
478
476
  }
479
- const z = S(() => {
477
+ const z = C(() => {
480
478
  const f = {};
481
479
  return t.mode === "dialog" && (f.justifyContent = "center"), t.mode === "drawer" && (f.justifyContent = {
482
480
  left: "flex-start",
@@ -489,130 +487,130 @@ const rr = (e) => (rt("data-v-8d442648"), e = e(), nt(), e), nr = { class: "titl
489
487
  top: "column",
490
488
  bottom: "column"
491
489
  }[t.position]), f;
492
- }), M = S(() => {
490
+ }), M = C(() => {
493
491
  const f = {};
494
- 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;
495
- }), P = 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(() => {
496
494
  const f = {};
497
495
  return t.draggable && !t.fullscreen && t.mode === "dialog" && (f.cursor = "move"), f;
498
- }), j = S(() => {
499
- const f = {}, L = T.value + I.value + y.value + _.value, Se = Math.floor(k.value * (Number(p(t.maxHeight).replace("%", "")) / 100));
500
- 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;
501
499
  });
502
- function Q() {
503
- const f = u.value;
500
+ function K() {
501
+ const f = o.value;
504
502
  if (t.form && f) {
505
- const L = f.querySelector(`form[name="${t.form}"]`);
506
- L && L.dispatchEvent(new Event("submit"));
503
+ const j = f.querySelector(`form[name="${t.form}"]`);
504
+ j && j.dispatchEvent(new Event("submit"));
507
505
  }
508
- l("submit");
506
+ a("submit");
509
507
  }
510
- function Pe() {
511
- o == null || o.close(t.id);
508
+ function Ne() {
509
+ u == null || u.close(t.id);
512
510
  }
513
- function Ve() {
511
+ function Ae() {
514
512
  window && window.addEventListener("resize", () => {
515
- 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);
516
514
  });
517
515
  }
518
- function Ne() {
516
+ function Ee() {
519
517
  if (t.closeable && t.esc) {
520
- const f = ({ key: L }) => {
521
- 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));
522
520
  };
523
521
  window.addEventListener("keydown", f);
524
522
  }
525
523
  }
526
524
  function Re() {
527
- d = u.value.offsetLeft, b = u.value.offsetTop;
525
+ d = o.value.offsetLeft, b = o.value.offsetTop;
528
526
  }
529
527
  B(() => {
530
- Ne(), Ve();
531
- }), He(() => {
528
+ Ee(), Ae();
529
+ }), Xe(() => {
532
530
  });
533
- function Ee() {
534
- return a.value = !0, () => we();
531
+ function De() {
532
+ return n.value = !0, () => we();
535
533
  }
536
534
  function we() {
537
- a.value = !1;
535
+ n.value = !1;
538
536
  }
539
537
  return r({
540
- showLoading: Ee,
538
+ showLoading: De,
541
539
  hideLoading: we
542
- }), (f, L) => (C(), O("div", {
540
+ }), (f, j) => (S(), O("div", {
543
541
  ref_key: "wrapperRef",
544
542
  ref: s,
545
543
  class: "modal-wrapper",
546
- style: N(z.value),
547
- onClick: L[0] || (L[0] = Ye((Se) => f.maskClosable && V(), ["self"]))
544
+ style: A(z.value),
545
+ onClick: j[0] || (j[0] = Je((Se) => f.maskClosable && N(), ["self"]))
548
546
  }, [
549
- w("div", {
547
+ k("div", {
550
548
  ref_key: "contentRef",
551
- ref: u,
552
- class: le(["modal-content", { [`${f.mode}-mode`]: !0, [`${f.position}-position`]: !0 }]),
553
- style: N(M.value)
549
+ ref: o,
550
+ class: ne(["modal-content", { [`${f.mode}-mode`]: !0, [`${f.position}-position`]: !0 }]),
551
+ style: A(M.value)
554
552
  }, [
555
- f.header ? (C(), O("div", {
553
+ f.header ? (S(), O("div", {
556
554
  key: 0,
557
555
  ref_key: "headerRef",
558
556
  ref: c,
559
557
  class: "modal-header",
560
- style: N(P.value),
558
+ style: A(P.value),
561
559
  onMousedown: Re
562
560
  }, [
563
- w("div", nr, A(f.title), 1),
564
- w("div", lr, [
565
- f.closeable ? (C(), O("div", {
561
+ k("div", lr, E(f.title), 1),
562
+ k("div", nr, [
563
+ f.closeable ? (S(), O("div", {
566
564
  key: 0,
567
565
  class: "i-icon-park-outline:close block cursor-pointer",
568
- onClick: V
569
- })) : G("", !0)
566
+ onClick: N
567
+ })) : q("", !0)
570
568
  ])
571
- ], 36)) : G("", !0),
572
- w("div", {
569
+ ], 36)) : q("", !0),
570
+ k("div", {
573
571
  id: "modal-header-slot",
574
572
  ref_key: "headerSlotRef",
575
573
  ref: h
576
574
  }, null, 512),
577
- w("div", {
575
+ k("div", {
578
576
  class: "modal-body",
579
- style: N(j.value)
577
+ style: A(T.value)
580
578
  }, [
581
- (C(), re(_e(f.component), Xe(Ke(f.componentProps)), null, 16))
579
+ (S(), re(_e(f.component), Qe(Ke(f.componentProps)), null, 16))
582
580
  ], 4),
583
- w("div", {
581
+ k("div", {
584
582
  id: "modal-footer-slot",
585
583
  ref_key: "footerSlotRef",
586
584
  ref: m
587
585
  }, null, 512),
588
- f.footer ? (C(), O("div", {
586
+ f.footer ? (S(), O("div", {
589
587
  key: 1,
590
588
  ref_key: "footerRef",
591
589
  ref: i,
592
590
  class: "modal-footer space-x-2"
593
591
  }, [
594
- w("button", {
592
+ k("button", {
595
593
  class: "cancel-button",
596
594
  type: "button",
597
- onClick: Pe
598
- }, A(f.cancelText), 1),
599
- w("button", {
595
+ onClick: Ne
596
+ }, E(f.cancelText), 1),
597
+ k("button", {
600
598
  class: "submit-button",
601
599
  form: f.form,
602
600
  type: "submit",
603
- onClick: Q
604
- }, A(f.submitText), 9, ar)
605
- ], 512)) : G("", !0),
606
- a.value ? (C(), O("div", ur, cr)) : G("", !0)
601
+ onClick: K
602
+ }, E(f.submitText), 9, ar)
603
+ ], 512)) : q("", !0),
604
+ n.value ? (S(), O("div", or, cr)) : q("", !0)
607
605
  ], 6)
608
606
  ], 4));
609
607
  }
610
- }), be = (e, r) => {
611
- const n = e.__vccOpts || e;
612
- for (const [t, l] of r)
613
- n[t] = l;
614
- return n;
615
- }, sr = /* @__PURE__ */ be(dr, [["__scopeId", "data-v-8d442648"]]), 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({
616
614
  __name: "modal-dialog",
617
615
  props: {
618
616
  type: {},
@@ -625,52 +623,70 @@ const rr = (e) => (rt("data-v-8d442648"), e = e(), nt(), e), nr = { class: "titl
625
623
  footer: {}
626
624
  },
627
625
  setup(e) {
628
- const r = e, n = ze(), t = S(() => r.title ? r.title : {
626
+ const r = e, l = Ve(), t = C(() => r.title ? r.title : {
629
627
  confirm: "提示",
630
628
  info: "提示",
631
629
  warning: "警告",
632
630
  error: "错误",
633
631
  success: "成功"
634
632
  }[r.type]);
635
- async function l() {
636
- r.onOk && await r.onOk(), n.close();
633
+ async function a() {
634
+ r.onOk && await r.onOk(), l.close();
637
635
  }
638
- async function o() {
639
- r.onCancel && await r.onCancel(), n.close();
636
+ async function u() {
637
+ r.onCancel && await r.onCancel(), l.close();
640
638
  }
641
- return (a, d) => (C(), O("section", fr, [
642
- w("div", mr, [
643
- w("div", hr, A(t.value), 1),
644
- 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)
645
643
  ]),
646
- w("div", {
644
+ k("div", {
647
645
  class: "dialog-footer space-x-2",
648
- style: N(a.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
646
+ style: A(n.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
649
647
  }, [
650
- a.footer ? (C(), re(_e(a.footer), { key: 0 })) : (C(), O(me, { key: 1 }, [
651
- w("button", {
648
+ n.footer ? (S(), re(_e(n.footer), { key: 0 })) : (S(), O(he, { key: 1 }, [
649
+ k("button", {
652
650
  class: "submit-button",
653
651
  type: "submit",
654
- onClick: l
655
- }, A(a.okText), 1),
656
- a.type === "confirm" ? (C(), O("button", {
652
+ onClick: a
653
+ }, E(n.okText), 1),
654
+ n.type === "confirm" ? (S(), O("button", {
657
655
  key: 0,
658
656
  class: "cancel-button",
659
657
  type: "button",
660
- onClick: o
661
- }, A(a.cancelText), 1)) : G("", !0)
658
+ onClick: u
659
+ }, E(n.cancelText), 1)) : q("", !0)
662
660
  ], 64))
663
661
  ], 4)
664
662
  ]));
665
663
  }
666
- }), 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 = {
667
683
  key: 0,
668
684
  class: "modal-teleport"
669
- }, br = {
685
+ }, $r = {
670
686
  name: "ModalProvider",
671
687
  inheritAttrs: !0
672
- }, kr = /* @__PURE__ */ R({
673
- ...br,
688
+ }, Fr = /* @__PURE__ */ V({
689
+ ...$r,
674
690
  props: {
675
691
  appendToBody: { type: [Boolean, String], default: !1 },
676
692
  sizes: { default: () => ({
@@ -683,106 +699,124 @@ const rr = (e) => (rt("data-v-8d442648"), e = e(), nt(), e), nr = { class: "titl
683
699
  offset: { default: () => ({ x: 0, y: 0 }) }
684
700
  },
685
701
  setup(e, { expose: r }) {
686
- const n = E([]), t = x(!1), l = U();
687
- function o(i, h = {}, m = {}) {
688
- const k = qe(
689
- () => 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)
690
706
  );
691
707
  typeof i == "string" && (h.type = i, m.size = "small", m.fullscreen = !1, m.mode = "dialog", m.footer = !1, m.header = !1);
692
- const y = Math.random().toString(32).slice(2), _ = Object.assign({
708
+ const g = Math.random().toString(32).slice(2), _ = Object.assign({
693
709
  zIndex: typeof i == "string" ? 1100 : 1e3
694
- }, m), T = new Promise((I, g) => {
695
- n.value.push({
696
- id: y,
697
- component: k,
710
+ }, m), L = new Promise((I, y) => {
711
+ l.value.push({
712
+ id: g,
713
+ component: w,
698
714
  props: h || {},
699
715
  options: {
700
716
  ..._,
701
717
  type: typeof i == "string" ? i : "component"
702
718
  },
703
719
  resolve: I,
704
- reject: g,
720
+ reject: y,
705
721
  listeners: []
706
- }), K(n);
722
+ }), J(l);
707
723
  }).catch((I) => I === "CANCEL" ? new Promise(() => {
708
724
  }) : Promise.reject(I));
709
- return Object.assign(T, {
710
- close: () => a(y)
725
+ return Object.assign(L, {
726
+ close: () => n(g)
711
727
  });
712
728
  }
713
- function a(i, h) {
714
- const m = n.value.findIndex((y) => y.id === i);
729
+ function n(i, h) {
730
+ const m = l.value.findIndex((g) => g.id === i);
715
731
  if (m < 0)
716
732
  return;
717
- const k = n.value[m];
718
- 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);
719
735
  }
720
736
  function d() {
721
- !n.value || n.value.length === 0 || (n.value.forEach((i) => {
737
+ !l.value || l.value.length === 0 || (l.value.forEach((i) => {
722
738
  i == null || i.reject("CANCEL");
723
- }), n.value = [], K(n));
739
+ }), l.value = [], J(l));
724
740
  }
725
741
  function b(i, h) {
726
- const m = n.value.find((y) => y.id === i);
742
+ const m = l.value.find((g) => g.id === i);
727
743
  if (!m)
728
744
  return;
729
- const k = m.listeners.find((y) => y.event === h);
730
- k && k.callback({
731
- open: o,
732
- 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),
733
749
  closeAll: d,
734
750
  showLoading: () => s(m.id),
735
- hideLoading: () => u(m.id),
736
- confirm: (y) => o("confirm", y),
737
- success: (y) => o("success", y),
738
- error: (y) => o("error", y),
739
- warning: (y) => o("warning", y),
740
- 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)
741
757
  });
742
758
  }
743
- function s(i) {
744
- if (!l)
759
+ function s(i, h) {
760
+ if (!a)
745
761
  return;
746
- const [h] = l.refs[`modal-container_${i}`];
747
- if (h)
748
- 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
+ }
749
781
  }
750
- function u(i) {
751
- if (!l)
782
+ function o(i) {
783
+ if (!a)
752
784
  return;
753
- const [h] = l.refs[`modal-container_${i}`];
785
+ const [h] = a.refs[`modal-container_${i}`];
754
786
  if (h)
755
787
  return h.hideLoading();
756
788
  }
757
789
  function c(i, h, m) {
758
- const k = n.value.find((y) => y.id === i);
759
- k && k.listeners.push({
790
+ const w = l.value.find((g) => g.id === i);
791
+ w && w.listeners.push({
760
792
  event: h,
761
793
  callback: m
762
794
  });
763
795
  }
764
- return fe(ue, {
765
- open: o,
766
- close: a,
796
+ return me(oe, {
797
+ open: u,
798
+ close: n,
767
799
  closeAll: d,
768
- addEventListener: c
800
+ addEventListener: c,
801
+ showLoading: s,
802
+ hideLoading: o
769
803
  }), r({
770
- elements: n,
771
- open: o,
772
- close: a,
804
+ elements: l,
805
+ open: u,
806
+ close: n,
773
807
  closeAll: d
774
808
  }), B(() => {
775
809
  t.value = !0;
776
- }), (i, h) => (C(), O(me, null, [
777
- Ae(i.$slots, "default", {}, void 0, !0),
778
- t.value ? (C(), O("div", pr, [
779
- (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, {
780
814
  disabled: !i.appendToBody,
781
815
  to: typeof i.appendToBody == "string" ? i.appendToBody : "body"
782
816
  }, [
783
- v(Be, { name: "modal-fade" }, {
784
- default: Ue(() => [
785
- (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({
786
820
  id: m.id,
787
821
  key: m.id,
788
822
  ref_for: !0,
@@ -800,57 +834,53 @@ const rr = (e) => (rt("data-v-8d442648"), e = e(), nt(), e), nr = { class: "titl
800
834
  _: 1
801
835
  })
802
836
  ], 8, ["disabled", "to"]))
803
- ])) : G("", !0)
837
+ ])) : q("", !0)
804
838
  ], 64));
805
839
  }
806
- }), wr = /* @__PURE__ */ be(kr, [["__scopeId", "data-v-756481fe"]]);
840
+ }), Or = /* @__PURE__ */ ce(Fr, [["__scopeId", "data-v-60414811"]]);
807
841
  function te(e, r) {
808
- var n, t;
809
- let l = e == null ? void 0 : e.parent;
810
- for (; l && ((n = l == null ? void 0 : l.type) == null ? void 0 : n.name) !== r; )
811
- l = l.parent;
812
- 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;
813
847
  }
814
- function ze() {
815
- const e = ne(ue), r = U();
816
- function n(t, l, o) {
848
+ function Ve() {
849
+ const e = le(oe), r = U();
850
+ function l(t, a, u) {
817
851
  if (!e)
818
852
  throw new Error("Not Found Modal Provider Component");
819
- return e.open(t, l, o);
853
+ return e.open(t, a, u);
820
854
  }
821
855
  return {
822
- open: n,
856
+ open: l,
823
857
  close(t) {
824
- var l;
858
+ var a;
825
859
  if (!e)
826
860
  throw new Error("Not Found Modal Provider Component");
827
- const o = te(r, "ModalContainer"), a = (l = o == null ? void 0 : o.props) == null ? void 0 : l.id;
828
- if (!a)
861
+ const u = te(r, "ModalContainer"), n = (a = u == null ? void 0 : u.props) == null ? void 0 : a.id;
862
+ if (!n)
829
863
  throw new Error("Not Found Current Modal Container");
830
- e.close(a, t);
864
+ e.close(n, t);
831
865
  },
832
866
  closeAll() {
833
867
  if (!e)
834
868
  throw new Error("Not Found Modal Provider Component");
835
869
  e.closeAll();
836
870
  },
837
- showLoading() {
838
- var t;
871
+ showLoading(t) {
872
+ var a;
839
873
  if (!e)
840
874
  throw new Error("Not Found Modal Provider Component");
841
- const l = te(r, "ModalContainer");
842
- if (!((t = l == null ? void 0 : l.props) != null && t.id))
843
- throw new Error("Not Found Current Modal Container");
844
- 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);
845
877
  },
846
878
  hideLoading() {
847
879
  var t;
848
880
  if (!e)
849
881
  throw new Error("Not Found Modal Provider Component");
850
- const l = te(r, "ModalContainer");
851
- if (!((t = l == null ? void 0 : l.props) != null && t.id))
852
- throw new Error("Not Found Current Modal Container");
853
- 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);
854
884
  },
855
885
  confirm(t) {
856
886
  return this.open("confirm", t);
@@ -869,68 +899,68 @@ function ze() {
869
899
  }
870
900
  };
871
901
  }
872
- function Sr(e) {
902
+ function _r(e) {
873
903
  var r;
874
- const n = ne(ue), t = U(), l = te(t, "ModalContainer"), o = (r = l == null ? void 0 : l.props) == null ? void 0 : r.id;
875
- 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);
876
906
  }
877
907
  const $e = {
878
908
  id: Symbol("ID"),
879
909
  source: Symbol("Source")
880
910
  };
881
- function Cr(e, r) {
882
- const n = x({});
883
- return e == null || e.forEach((l) => {
884
- let o = null;
885
- 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;
886
- }), [n, (l) => {
887
- 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;
888
918
  }];
889
919
  }
890
- function xr(e) {
891
- function r(n, t) {
892
- 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;
893
923
  }
894
- return (n, t) => {
924
+ return (l, t) => {
895
925
  switch (e == null ? void 0 : e.type) {
896
926
  case "week":
897
927
  return v(dt, {
898
- modelValue: n[t.key],
899
- "onUpdate:modelValue": (l) => n[t.key] = l,
928
+ modelValue: l[t.key],
929
+ "onUpdate:modelValue": (a) => l[t.key] = a,
900
930
  "disabled-date": r,
901
931
  format: e == null ? void 0 : e.labelFormat,
902
932
  "value-format": e == null ? void 0 : e.valueFormat
903
933
  }, null);
904
934
  case "month":
905
935
  return v(it, {
906
- modelValue: n[t.key],
907
- "onUpdate:modelValue": (l) => n[t.key] = l,
936
+ modelValue: l[t.key],
937
+ "onUpdate:modelValue": (a) => l[t.key] = a,
908
938
  "disabled-date": r,
909
939
  format: e == null ? void 0 : e.labelFormat,
910
940
  "value-format": e == null ? void 0 : e.valueFormat
911
941
  }, null);
912
942
  case "quarter":
913
943
  return v(ct, {
914
- modelValue: n[t.key],
915
- "onUpdate:modelValue": (l) => n[t.key] = l,
944
+ modelValue: l[t.key],
945
+ "onUpdate:modelValue": (a) => l[t.key] = a,
916
946
  "disabled-date": r,
917
947
  format: e == null ? void 0 : e.labelFormat,
918
948
  "value-format": e == null ? void 0 : e.valueFormat
919
949
  }, null);
920
950
  case "year":
921
- return v(ot, {
922
- modelValue: n[t.key],
923
- "onUpdate:modelValue": (l) => n[t.key] = l,
951
+ return v(ut, {
952
+ modelValue: l[t.key],
953
+ "onUpdate:modelValue": (a) => l[t.key] = a,
924
954
  "disabled-date": r,
925
955
  format: e == null ? void 0 : e.labelFormat,
926
956
  "value-format": e == null ? void 0 : e.valueFormat
927
957
  }, null);
928
958
  case "date":
929
959
  default:
930
- return v(ut, {
960
+ return v(ot, {
931
961
  "disabled-input": !0,
932
- modelValue: n[t.key],
933
- "onUpdate:modelValue": (l) => n[t.key] = l,
962
+ modelValue: l[t.key],
963
+ "onUpdate:modelValue": (a) => l[t.key] = a,
934
964
  "disabled-date": r,
935
965
  format: e == null ? void 0 : e.labelFormat,
936
966
  "value-format": e == null ? void 0 : e.valueFormat
@@ -938,13 +968,13 @@ function xr(e) {
938
968
  }
939
969
  };
940
970
  }
941
- function $r(e) {
942
- return (r, n) => {
971
+ function Tr(e) {
972
+ return (r, l) => {
943
973
  switch (e == null ? void 0 : e.type) {
944
974
  case "number":
945
- return v(Me, {
946
- modelValue: r[n.key],
947
- "onUpdate:modelValue": (t) => r[n.key] = t,
975
+ return v(je, {
976
+ modelValue: r[l.key],
977
+ "onUpdate:modelValue": (t) => r[l.key] = t,
948
978
  hideButton: !0,
949
979
  "read-only": e == null ? void 0 : e.readonly,
950
980
  placeholder: e == null ? void 0 : e.placeholder,
@@ -953,8 +983,8 @@ function $r(e) {
953
983
  case "string":
954
984
  default:
955
985
  return v(st, {
956
- modelValue: r[n.key],
957
- "onUpdate:modelValue": (t) => r[n.key] = t,
986
+ modelValue: r[l.key],
987
+ "onUpdate:modelValue": (t) => r[l.key] = t,
958
988
  placeholder: e == null ? void 0 : e.placeholder,
959
989
  readonly: e == null ? void 0 : e.readonly,
960
990
  allowClear: e == null ? void 0 : e.clearable
@@ -963,47 +993,47 @@ function $r(e) {
963
993
  };
964
994
  }
965
995
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
966
- function ke(e, r, n) {
967
- 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);
968
998
  return t;
969
999
  }
970
- function Fr(e) {
971
- 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);
972
1002
  }
973
1003
  const H = /* @__PURE__ */ new WeakMap();
974
- function Or() {
1004
+ function Lr() {
975
1005
  const e = x(/* @__PURE__ */ new Map());
976
- return [e, (n) => e.value = n];
1006
+ return [e, (l) => e.value = l];
977
1007
  }
978
- function _r(e) {
979
- let r, n = !1;
980
- const [t, l] = Or(), o = (s) => {
1008
+ function zr(e) {
1009
+ let r, l = !1;
1010
+ const [t, a] = Lr(), u = (s) => {
981
1011
  if (e.onChange && e.onChange(s), !e.autoSumbit || !r)
982
1012
  return;
983
- let u = r;
984
- for (; u && u.$el.tagName !== "FORM"; )
985
- u = u.$parent;
986
- u && u.$el && u.$el.dispatchEvent(new Event("submit"));
987
- }, 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) => {
988
1018
  const c = s();
989
- c instanceof Promise ? c.then(u) : u(c);
1019
+ c instanceof Promise ? c.then(o) : o(c);
990
1020
  }, d = async () => {
991
1021
  const s = H.get(e.options);
992
1022
  switch (typeof s) {
993
1023
  case "function":
994
- H.set(e.options, l);
1024
+ H.set(e.options, a);
995
1025
  return;
996
1026
  case "object":
997
- l(s);
1027
+ a(s);
998
1028
  return;
999
1029
  }
1000
- H.set(e.options, l), a(e.options, (u) => {
1030
+ H.set(e.options, a), n(e.options, (o) => {
1001
1031
  const c = H.get(e.options);
1002
- H.set(e.options, u), c(u);
1032
+ H.set(e.options, o), c(o);
1003
1033
  });
1004
1034
  }, b = () => {
1005
- a(e.options, (s) => {
1006
- l(s);
1035
+ n(e.options, (s) => {
1036
+ a(s);
1007
1037
  });
1008
1038
  };
1009
1039
  switch (!0) {
@@ -1013,7 +1043,7 @@ function _r(e) {
1013
1043
  }
1014
1044
  case ae(e.options): {
1015
1045
  ke(() => e.options, () => {
1016
- l(e.options.value);
1046
+ a(e.options.value);
1017
1047
  }, {
1018
1048
  immediate: !0
1019
1049
  });
@@ -1022,20 +1052,20 @@ function _r(e) {
1022
1052
  default:
1023
1053
  t.value = e.options;
1024
1054
  }
1025
- return (s, u) => {
1055
+ return (s, o) => {
1026
1056
  let c;
1027
- 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, {
1028
1058
  ref: (i) => r = i,
1029
1059
  multiple: e.multiple,
1030
- modelValue: s[u.key],
1031
- "onUpdate:modelValue": (i) => s[u.key] = i,
1060
+ modelValue: s[o.key],
1061
+ "onUpdate:modelValue": (i) => s[o.key] = i,
1032
1062
  placeholder: e.placeholder,
1033
1063
  allowClear: e.clearable,
1034
1064
  allowSearch: e.searchable,
1035
1065
  "allow-create": e.createable,
1036
1066
  maxTagCount: e.maxTagCount ?? 2,
1037
- onChange: o
1038
- }, 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, {
1039
1069
  key: i,
1040
1070
  value: i,
1041
1071
  label: h
@@ -1044,13 +1074,13 @@ function _r(e) {
1044
1074
  });
1045
1075
  };
1046
1076
  }
1047
- function Ir(e) {
1077
+ function Pr(e) {
1048
1078
  function r() {
1049
1079
  e != null && e.autoSumbit;
1050
1080
  }
1051
- return (n, t) => (e != null && e.default && (n[t.key] = e.default), v(ht, {
1052
- modelValue: n[t.key],
1053
- "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,
1054
1084
  checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
1055
1085
  uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
1056
1086
  checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
@@ -1058,19 +1088,19 @@ function Ir(e) {
1058
1088
  onChange: r
1059
1089
  }, null));
1060
1090
  }
1061
- function Mr(e) {
1062
- return (r, n) => {
1091
+ function Vr(e) {
1092
+ return (r, l) => {
1063
1093
  let t = [];
1064
- function l(d) {
1094
+ function a(d) {
1065
1095
  t = d;
1066
1096
  }
1067
- function o(d) {
1097
+ function u(d) {
1068
1098
  if (d && d.length === 2) {
1069
- const [b, s] = d.sort(), u = xe(b).startOf("days"), c = xe(s).endOf("days");
1070
- 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")];
1071
1101
  }
1072
1102
  }
1073
- function a(d) {
1103
+ function n(d) {
1074
1104
  return e != null && e.disabledDate ? e.disabledDate(t.filter(Boolean), d) : !1;
1075
1105
  }
1076
1106
  return v("div", null, [v(vt, {
@@ -1078,61 +1108,61 @@ function Mr(e) {
1078
1108
  style: {
1079
1109
  width: "300px"
1080
1110
  },
1081
- modelValue: r[n.key],
1082
- "onUpdate:modelValue": (d) => r[n.key] = d,
1083
- onSelect: l,
1084
- onChange: o,
1111
+ modelValue: r[l.key],
1112
+ "onUpdate:modelValue": (d) => r[l.key] = d,
1113
+ onSelect: a,
1114
+ onChange: u,
1085
1115
  mode: e == null ? void 0 : e.type,
1086
1116
  allowClear: e == null ? void 0 : e.clearable,
1087
- "disabled-date": a,
1117
+ "disabled-date": n,
1088
1118
  format: e == null ? void 0 : e.labelFormat,
1089
1119
  "value-format": e == null ? void 0 : e.valueFormat
1090
1120
  }, null)]);
1091
1121
  };
1092
1122
  }
1093
- function jr(e) {
1094
- return (r, n) => v(yt, {
1095
- modelValue: r[n.key],
1096
- "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,
1097
1127
  placeholder: e == null ? void 0 : e.placeholder,
1098
1128
  autoSize: e == null ? void 0 : e.autosize,
1099
1129
  maxLength: e == null ? void 0 : e.maxLength
1100
1130
  }, null);
1101
1131
  }
1102
1132
  const Y = /* @__PURE__ */ new WeakMap();
1103
- function Lr() {
1133
+ function Ar() {
1104
1134
  const e = x([]);
1105
- return [e, (n) => e.value = n];
1135
+ return [e, (l) => e.value = l];
1106
1136
  }
1107
- function Tr(e) {
1108
- let r, n = !1;
1109
- const [t, l] = Lr(), o = () => {
1137
+ function Er(e) {
1138
+ let r, l = !1;
1139
+ const [t, a] = Ar(), u = () => {
1110
1140
  if (!e.autoSumbit || !r)
1111
1141
  return;
1112
- let u = r;
1113
- for (; u && u.$el.tagName !== "FORM"; )
1114
- u = u.$parent;
1115
- u && u.$el && u.$el.dispatchEvent(new Event("submit"));
1116
- }, a = (u, c) => {
1117
- 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();
1118
1148
  i instanceof Promise ? i.then(c) : c(i);
1119
1149
  }, d = async () => {
1120
- const u = Y.get(e.options);
1121
- switch (typeof u) {
1150
+ const o = Y.get(e.options);
1151
+ switch (typeof o) {
1122
1152
  case "function":
1123
- Y.set(e.options, l);
1153
+ Y.set(e.options, a);
1124
1154
  return;
1125
1155
  case "object":
1126
- l(u);
1156
+ a(o);
1127
1157
  return;
1128
1158
  }
1129
- Y.set(e.options, l), a(e.options, (c) => {
1159
+ Y.set(e.options, a), n(e.options, (c) => {
1130
1160
  const i = Y.get(e.options);
1131
1161
  Y.set(e.options, c), i(c);
1132
1162
  });
1133
1163
  }, b = () => {
1134
- a(e.options, (u) => {
1135
- l(u);
1164
+ n(e.options, (o) => {
1165
+ a(o);
1136
1166
  });
1137
1167
  };
1138
1168
  switch (!0) {
@@ -1142,7 +1172,7 @@ function Tr(e) {
1142
1172
  }
1143
1173
  case ae(e.options): {
1144
1174
  ke(e.options, () => {
1145
- l(e.options.value);
1175
+ a(e.options.value);
1146
1176
  }, {
1147
1177
  immediate: !0
1148
1178
  });
@@ -1151,21 +1181,21 @@ function Tr(e) {
1151
1181
  default:
1152
1182
  t.value = e.options;
1153
1183
  }
1154
- function s(u, c) {
1184
+ function s(o, c) {
1155
1185
  var m;
1156
1186
  const i = ((m = e.fieldNames) == null ? void 0 : m.title) || "title", h = c[i];
1157
- return h ? h.toLowerCase().includes(u.toLowerCase()) : !1;
1187
+ return h ? h.toLowerCase().includes(o.toLowerCase()) : !1;
1158
1188
  }
1159
- 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, {
1160
1190
  ref: (i) => r = i,
1161
1191
  multiple: e.multiple,
1162
- modelValue: u[c.key],
1163
- "onUpdate:modelValue": (i) => u[c.key] = i,
1192
+ modelValue: o[c.key],
1193
+ "onUpdate:modelValue": (i) => o[c.key] = i,
1164
1194
  placeholder: e.placeholder,
1165
1195
  allowClear: e.clearable,
1166
1196
  allowSearch: e.searchable,
1167
1197
  maxTagCount: e.maxTagCount ?? 2,
1168
- onChange: o,
1198
+ onChange: u,
1169
1199
  filterTreeNode: s,
1170
1200
  data: t.value,
1171
1201
  fieldNames: e.fieldNames,
@@ -1175,39 +1205,39 @@ function Tr(e) {
1175
1205
  }));
1176
1206
  }
1177
1207
  const X = /* @__PURE__ */ new WeakMap();
1178
- function zr() {
1208
+ function Rr() {
1179
1209
  const e = x([]);
1180
- return [e, (n) => e.value = n];
1210
+ return [e, (l) => e.value = l];
1181
1211
  }
1182
- function Pr(e) {
1183
- let r, n = !1;
1184
- const [t, l] = zr(), o = () => {
1212
+ function Dr(e) {
1213
+ let r, l = !1;
1214
+ const [t, a] = Rr(), u = () => {
1185
1215
  if (!e.autoSumbit || !r)
1186
1216
  return;
1187
1217
  let s = r;
1188
1218
  for (; s && s.$el.tagName !== "FORM"; )
1189
1219
  s = s.$parent;
1190
1220
  s && s.$el && s.$el.dispatchEvent(new Event("submit"));
1191
- }, a = (s, u) => {
1221
+ }, n = (s, o) => {
1192
1222
  const c = s();
1193
- c instanceof Promise ? c.then(u) : u(c);
1223
+ c instanceof Promise ? c.then(o) : o(c);
1194
1224
  }, d = async () => {
1195
1225
  const s = X.get(e.options);
1196
1226
  switch (typeof s) {
1197
1227
  case "function":
1198
- X.set(e.options, l);
1228
+ X.set(e.options, a);
1199
1229
  return;
1200
1230
  case "object":
1201
- l(s);
1231
+ a(s);
1202
1232
  return;
1203
1233
  }
1204
- X.set(e.options, l), a(e.options, (u) => {
1234
+ X.set(e.options, a), n(e.options, (o) => {
1205
1235
  const c = X.get(e.options);
1206
- X.set(e.options, u), c(u);
1236
+ X.set(e.options, o), c(o);
1207
1237
  });
1208
1238
  }, b = () => {
1209
- a(e.options, (s) => {
1210
- l(s);
1239
+ n(e.options, (s) => {
1240
+ a(s);
1211
1241
  });
1212
1242
  };
1213
1243
  switch (!0) {
@@ -1217,7 +1247,7 @@ function Pr(e) {
1217
1247
  }
1218
1248
  case ae(e.options): {
1219
1249
  ke(e.options, () => {
1220
- l(e.options.value);
1250
+ a(e.options.value);
1221
1251
  }, {
1222
1252
  immediate: !0
1223
1253
  });
@@ -1226,24 +1256,24 @@ function Pr(e) {
1226
1256
  default:
1227
1257
  t.value = e.options;
1228
1258
  }
1229
- 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, {
1230
1260
  pathMode: e.pathMode,
1231
1261
  ref: (c) => r = c,
1232
1262
  multiple: e.multiple,
1233
- modelValue: s[u.key],
1234
- "onUpdate:modelValue": (c) => s[u.key] = c,
1263
+ modelValue: s[o.key],
1264
+ "onUpdate:modelValue": (c) => s[o.key] = c,
1235
1265
  placeholder: e.placeholder,
1236
1266
  allowClear: e.clearable,
1237
1267
  allowSearch: e.searchable,
1238
1268
  maxTagCount: e.maxTagCount ?? 2,
1239
- onChange: o,
1269
+ onChange: u,
1240
1270
  options: t.value
1241
1271
  }, null));
1242
1272
  }
1243
- function Vr(e) {
1273
+ function Br(e) {
1244
1274
  return (r) => e(r);
1245
1275
  }
1246
- const Nr = {
1276
+ const Ur = {
1247
1277
  thousands: !0,
1248
1278
  inputUnit: "元",
1249
1279
  outputUnit: "元"
@@ -1252,41 +1282,41 @@ const Nr = {
1252
1282
  元: 10 ** 2,
1253
1283
  万: 10 ** 4
1254
1284
  };
1255
- function Rr(e) {
1285
+ function Wr(e) {
1256
1286
  e = {
1257
- ...Nr,
1287
+ ...Ur,
1258
1288
  ...e || {}
1259
1289
  };
1260
- const r = (a) => {
1261
- if (a == null)
1290
+ const r = (n) => {
1291
+ if (n == null)
1262
1292
  return;
1263
1293
  if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
1264
- return a;
1294
+ return n;
1265
1295
  const d = ee[e.outputUnit] / ee[e.inputUnit];
1266
- return a * d;
1267
- }, n = (a) => {
1268
- if (a == null)
1296
+ return n * d;
1297
+ }, l = (n) => {
1298
+ if (n == null)
1269
1299
  return;
1270
1300
  if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
1271
- return a;
1301
+ return n;
1272
1302
  const d = ee[e.inputUnit] / ee[e.outputUnit];
1273
- return a * d;
1274
- }, t = (a) => {
1275
- const d = a.split(".");
1303
+ return n * d;
1304
+ }, t = (n) => {
1305
+ const d = n.split(".");
1276
1306
  return d[0] = d[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), d.join(".");
1277
- }, l = (a) => {
1278
- const d = a;
1307
+ }, a = (n) => {
1308
+ const d = n;
1279
1309
  return e != null && e.thousands ? t(d) : d;
1280
- }, o = (a) => a.replace(/,/g, "");
1281
- return (a, d) => {
1282
- const b = x(r(a[d.key]));
1283
- return J(b, (s) => {
1284
- a[d.key] = n(s);
1285
- }), 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, {
1286
1316
  modelValue: b.value,
1287
1317
  "onUpdate:modelValue": (s) => b.value = s,
1288
- formatter: l,
1289
- parser: o,
1318
+ formatter: a,
1319
+ parser: u,
1290
1320
  precision: e == null ? void 0 : e.precision,
1291
1321
  hideButton: !0,
1292
1322
  "read-only": e == null ? void 0 : e.readonly,
@@ -1298,39 +1328,39 @@ function Rr(e) {
1298
1328
  });
1299
1329
  };
1300
1330
  }
1301
- function Er() {
1331
+ function qr() {
1302
1332
  return {
1303
- input: $r,
1304
- textarea: jr,
1305
- select: _r,
1306
- treeSelect: Tr,
1307
- date: xr,
1308
- switch: Ir,
1309
- dateRange: Mr,
1310
- render: Vr,
1311
- cascader: Pr,
1312
- 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
1313
1343
  };
1314
1344
  }
1315
- function Ar(e, r) {
1345
+ function Gr(e, r) {
1316
1346
  r.render || (r.render = (t) => t.input());
1317
- const n = r.render({
1318
- ...Er()
1347
+ const l = r.render({
1348
+ ...qr()
1319
1349
  });
1320
1350
  return {
1321
- default: () => n(e, r)
1351
+ default: () => l(e, r)
1322
1352
  };
1323
1353
  }
1324
- function Dr(e, r) {
1325
- return lt(je, {
1354
+ function Hr(e, r) {
1355
+ return nt(Le, {
1326
1356
  field: r.key,
1327
1357
  label: r.title
1328
- }, Ar(e, r));
1358
+ }, Gr(e, r));
1329
1359
  }
1330
- function Br(e) {
1331
- 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);
1332
1362
  }
1333
- const Ur = /* @__PURE__ */ R({
1363
+ const Xr = /* @__PURE__ */ V({
1334
1364
  props: {
1335
1365
  form: {
1336
1366
  type: Object,
@@ -1338,30 +1368,30 @@ const Ur = /* @__PURE__ */ R({
1338
1368
  }
1339
1369
  },
1340
1370
  setup(e) {
1341
- const r = ze(), n = e.form.map((a) => ({
1342
- ...a,
1371
+ const r = Ve(), l = e.form.map((n) => ({
1372
+ ...n,
1343
1373
  collapsed: !1
1344
- })), 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) => {
1345
- 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);
1346
1376
  s || (s = {
1347
1377
  group: b,
1348
1378
  instance: void 0,
1349
1379
  form: []
1350
- }, a.push(s)), s.form.push(d);
1351
- }), a), []).sort((a, d) => a.group === "默认" ? -1 : d.group === "默认" ? 1 : a.group > d.group ? -1 : 1), o = x("默认");
1352
- return Sr(() => {
1353
- const a = l.find((d) => d.group === o.value);
1354
- if (a && a.instance) {
1355
- const d = a.instance.formSource;
1356
- 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(() => {
1357
1387
  r.close(d);
1358
1388
  });
1359
1389
  }
1360
1390
  }), {
1361
- formItems: n,
1391
+ formItems: l,
1362
1392
  groups: t,
1363
- groupForms: l,
1364
- activeTab: o
1393
+ groupForms: a,
1394
+ activeTab: u
1365
1395
  };
1366
1396
  },
1367
1397
  render() {
@@ -1370,29 +1400,29 @@ const Ur = /* @__PURE__ */ R({
1370
1400
  let r;
1371
1401
  return v(bt, {
1372
1402
  "active-key": this.activeTab,
1373
- "onUpdate:active-key": (n) => this.activeTab = n
1374
- }, Br(r = this.groupForms.map((n) => v(kt, {
1375
- title: n.group,
1376
- 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
1377
1407
  }, {
1378
- default: () => [v(he, {
1379
- form: n.form,
1380
- ref: (t) => n.instance = t
1408
+ default: () => [v(ve, {
1409
+ form: l.form,
1410
+ ref: (t) => l.instance = t
1381
1411
  }, null)]
1382
1412
  }))) ? r : {
1383
1413
  default: () => [r]
1384
1414
  });
1385
1415
  } else
1386
- return v(he, {
1416
+ return v(ve, {
1387
1417
  form: this.formItems,
1388
1418
  ref: (r) => e.instance = r
1389
1419
  }, null);
1390
1420
  }
1391
1421
  });
1392
1422
  function Fe(e) {
1393
- 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);
1394
1424
  }
1395
- const he = /* @__PURE__ */ R({
1425
+ const ve = /* @__PURE__ */ V({
1396
1426
  props: {
1397
1427
  form: {
1398
1428
  type: Object,
@@ -1456,93 +1486,93 @@ const he = /* @__PURE__ */ R({
1456
1486
  setup(e, {
1457
1487
  emit: r
1458
1488
  }) {
1459
- 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;
1460
- 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);
1461
1491
  const s = () => {
1462
1492
  r("submit", t.value), r("update:model-value", t.value);
1463
- }, 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) => {
1464
1494
  switch (!0) {
1465
- case typeof g.visiable == "boolean":
1466
- return g.visiable;
1467
- case typeof g.visiable == "function":
1468
- 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);
1469
1499
  default:
1470
1500
  return !0;
1471
1501
  }
1472
- })), c = S(() => {
1473
- if (!o.value)
1502
+ })), c = C(() => {
1503
+ if (!u.value)
1474
1504
  return 1;
1475
- const g = u.value.reduce(($, V) => $ + ((V == null ? void 0 : V.span) || 1), 0);
1476
- return o.value - g % o.value;
1477
- }), 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), {}));
1478
1508
  function h() {
1479
1509
  var $;
1480
1510
  if (e.columns)
1481
1511
  return;
1482
- const g = ($ = n.value) == null ? void 0 : $.$el;
1483
- 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));
1484
1514
  }
1485
1515
  function m() {
1486
1516
  var $;
1487
- const g = ($ = n.value) == null ? void 0 : $.$el;
1488
- g && (g.id = e.id);
1517
+ const y = ($ = l.value) == null ? void 0 : $.$el;
1518
+ y && (y.id = e.id);
1489
1519
  }
1490
- function k() {
1491
- d.value.open(Ur, {
1520
+ function w() {
1521
+ d.value.open(Xr, {
1492
1522
  form: e.form
1493
1523
  }, {
1494
1524
  title: "高级搜索",
1495
1525
  footer: !0,
1496
1526
  submitText: "搜索"
1497
- }).then((g) => {
1498
- g && (y(g), s());
1527
+ }).then((y) => {
1528
+ y && (g(y), s());
1499
1529
  });
1500
1530
  }
1501
1531
  B(() => {
1502
1532
  h(), m();
1503
1533
  });
1504
- function y(g) {
1505
- l({
1534
+ function g(y) {
1535
+ a({
1506
1536
  ...t.value,
1507
- ...g || {}
1537
+ ...y || {}
1508
1538
  });
1509
1539
  }
1510
- function _(g, $) {
1511
- t.value[g] = $, y({
1540
+ function _(y, $) {
1541
+ t.value[y] = $, g({
1512
1542
  ...t.value
1513
1543
  });
1514
1544
  }
1515
- function T() {
1516
- var g;
1517
- (g = n.value) == null || g.resetFields();
1545
+ function L() {
1546
+ var y;
1547
+ (y = l.value) == null || y.resetFields();
1518
1548
  }
1519
1549
  function I() {
1520
- var g;
1521
- return (g = n.value) == null ? void 0 : g.validate();
1550
+ var y;
1551
+ return (y = l.value) == null ? void 0 : y.validate();
1522
1552
  }
1523
1553
  return B(() => {
1524
1554
  window && window.addEventListener("resize", h);
1525
1555
  }), {
1526
1556
  formSource: t,
1527
- formInstance: n,
1528
- formColumns: o,
1557
+ formInstance: l,
1558
+ formColumns: u,
1529
1559
  formRules: i,
1530
- formCollspased: a,
1560
+ formCollspased: n,
1531
1561
  formActiosSpan: c,
1532
- formItems: u,
1562
+ formItems: o,
1533
1563
  toggleFormCollapsed: b,
1534
1564
  updateFormField: _,
1535
- updateFormSource: y,
1536
- reset: T,
1565
+ updateFormSource: g,
1566
+ reset: L,
1537
1567
  validate: I,
1538
1568
  onSubmitSuccess: s,
1539
- openCollapsedDialog: k,
1569
+ openCollapsedDialog: w,
1540
1570
  modalInstance: d
1541
1571
  };
1542
1572
  },
1543
1573
  render() {
1544
1574
  const e = () => {
1545
- const r = [], n = this.footer ? {
1575
+ const r = [], l = this.footer ? {
1546
1576
  span: this.formColumns
1547
1577
  } : {
1548
1578
  span: this.formActiosSpan
@@ -1574,15 +1604,15 @@ const he = /* @__PURE__ */ R({
1574
1604
  onClick: this.toggleFormCollapsed
1575
1605
  }, {
1576
1606
  default: () => this.formCollspased ? "展开" : "收起",
1577
- icon: () => this.formCollspased ? v(Tt, null, null) : v(Et, null, null)
1607
+ icon: () => this.formCollspased ? v(Lt, null, null) : v(Et, null, null)
1578
1608
  })), this.collapsedMode === "dialog" && r.push(v(W, {
1579
1609
  onClick: this.openCollapsedDialog
1580
1610
  }, {
1581
1611
  default: () => "高级搜索",
1582
1612
  icon: () => v(qt, null, null)
1583
1613
  }))), this.$slots.actions && r.push(...this.$slots.actions()), r.length)
1584
- return v(Ce, n, {
1585
- default: () => [v(je, {
1614
+ return v(Ce, l, {
1615
+ default: () => [v(Le, {
1586
1616
  contentClass: this.footer ? "form-footer" : ""
1587
1617
  }, {
1588
1618
  default: () => [v(Ct, null, Fe(r) ? r : {
@@ -1593,7 +1623,7 @@ const he = /* @__PURE__ */ R({
1593
1623
  };
1594
1624
  return v("div", {
1595
1625
  class: "form-render"
1596
- }, [v(wr, {
1626
+ }, [v(Or, {
1597
1627
  ref: (r) => this.modalInstance = r
1598
1628
  }, {
1599
1629
  default: () => [v(wt, Oe({
@@ -1613,11 +1643,11 @@ const he = /* @__PURE__ */ R({
1613
1643
  "rol-gap": 10
1614
1644
  }, {
1615
1645
  default: () => [this.formItems.filter(() => this.formColumns !== 0).map((r) => {
1616
- let n;
1646
+ let l;
1617
1647
  return v(Ce, {
1618
1648
  span: r.span
1619
- }, Fe(n = Dr(this.formSource, r)) ? n : {
1620
- default: () => [n]
1649
+ }, Fe(l = Hr(this.formSource, r)) ? l : {
1650
+ default: () => [l]
1621
1651
  });
1622
1652
  }), e()]
1623
1653
  })]
@@ -1625,27 +1655,27 @@ const he = /* @__PURE__ */ R({
1625
1655
  })]);
1626
1656
  }
1627
1657
  });
1628
- function Hr(e) {
1658
+ function Zr(e) {
1629
1659
  return e;
1630
1660
  }
1631
- function Yr(e) {
1632
- const r = U(), n = x();
1661
+ function el(e) {
1662
+ const r = U(), l = x();
1633
1663
  function t() {
1634
- var o, a;
1635
- const l = (a = (o = r == null ? void 0 : r.proxy) == null ? void 0 : o.$refs) == null ? void 0 : a[e];
1636
- 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);
1637
1667
  }
1638
- return B(t), at(t), n;
1668
+ return B(t), at(t), l;
1639
1669
  }
1640
- const Xr = {
1670
+ const tl = {
1641
1671
  install(e, r) {
1642
- e.component("FormRender", he);
1672
+ e.component("FormRender", ve);
1643
1673
  }
1644
1674
  };
1645
1675
  export {
1646
- he as FormRender,
1647
- Qr as FormRenderResolver,
1648
- Xr as default,
1649
- Hr as defineForm,
1650
- Yr as useForm
1676
+ ve as FormRender,
1677
+ nl as FormRenderResolver,
1678
+ tl as default,
1679
+ Zr as defineForm,
1680
+ el as useForm
1651
1681
  };