@gopowerteam/form-render 0.0.91 → 0.0.93

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 q, inject as be, defineComponent as R, computed as O, openBlock as $, createElementBlock as T, normalizeClass as ue, normalizeStyle as z, createElementVNode as x, shallowRef as N, ref as S, provide as pe, onMounted as W, Fragment as le, renderSlot as nt, createBlock as ae, Teleport as rt, createVNode as m, TransitionGroup as lt, withCtx as at, renderList as ut, mergeProps as ke, createCommentVNode as U, defineAsyncComponent as ot, triggerRef as Z, useCssVars as ct, onUnmounted as it, withModifiers as st, toDisplayString as A, resolveDynamicComponent as Ee, normalizeProps as dt, guardReactiveProps as ft, watch as ee, unref as ze, isRef as te, toRefs as mt, customRef as ht, nextTick as Ae, getCurrentScope as vt, onScopeDispose as pt, pushScopeId as Ne, popScopeId as Ve, isVNode as we, createTextVNode as D, h as Ye, onUpdated as yt } from "vue";
2
- import { DatePicker as gt, YearPicker as bt, QuarterPicker as kt, MonthPicker as wt, WeekPicker as xt, Input as Ct, InputNumber as Be, Select as St, Option as _t, Switch as $t, RangePicker as Ot, Textarea as Ft, TreeSelect as Yt, Cascader as Mt, RadioGroup as Tt, FormItem as ye, Divider as Me, Button as I, Tabs as Pt, TabPane as jt, Form as Lt, Grid as Dt, GridItem as se, Space as Te, Tag as It } from "@arco-design/web-vue";
3
- import _ from "dayjs";
4
- import { FormRenderResolver as Or } from "./resolver.mjs";
5
- const Rt = Symbol("ArcoConfigProvider"), Et = "arco", zt = "$arco", xe = (e) => {
6
- var r, n, t;
7
- const l = q(), o = be(Rt, void 0);
8
- return `${(t = (n = o == null ? void 0 : o.prefixCls) != null ? n : (r = l == null ? void 0 : l.appContext.config.globalProperties[zt]) == null ? void 0 : r.classPrefix) != null ? t : Et}-${e}`;
9
- }, At = Object.prototype.toString;
10
- function Ce(e) {
11
- return At.call(e) === "[object Number]" && e === e;
1
+ import { getCurrentInstance as q, inject as ke, defineComponent as I, computed as $, openBlock as _, createElementBlock as M, normalizeClass as ue, normalizeStyle as z, createElementVNode as C, shallowRef as V, ref as O, provide as pe, onMounted as W, Fragment as le, renderSlot as nt, createBlock as ae, Teleport as lt, createVNode as f, TransitionGroup as at, withCtx as ut, renderList as ot, mergeProps as we, createCommentVNode as U, defineAsyncComponent as ct, triggerRef as Z, useCssVars as st, onUnmounted as it, withModifiers as dt, toDisplayString as A, resolveDynamicComponent as ze, normalizeProps as ft, guardReactiveProps as mt, watch as ee, unref as Ae, isRef as te, toRefs as ht, customRef as vt, nextTick as Ne, getCurrentScope as yt, onScopeDispose as pt, pushScopeId as Ve, popScopeId as Be, isVNode as xe, createTextVNode as j, h as De, onUpdated as gt } from "vue";
2
+ import { DatePicker as bt, YearPicker as kt, QuarterPicker as wt, MonthPicker as xt, WeekPicker as Ct, Input as St, InputNumber as Ue, Select as Ot, Option as _t, Switch as $t, RangePicker as Ft, Textarea as Yt, TreeSelect as Dt, Cascader as Mt, RadioGroup as Tt, FormItem as ge, Divider as Me, Button as R, Tabs as Lt, TabPane as Pt, Form as jt, Grid as Rt, GridItem as de, Space as Te, Tag as It } from "@arco-design/web-vue";
3
+ import b from "dayjs";
4
+ import { FormRenderResolver as Dn } from "./resolver.mjs";
5
+ const Et = Symbol("ArcoConfigProvider"), zt = "arco", At = "$arco", Ce = (e) => {
6
+ var n, r, t;
7
+ const l = q(), u = ke(Et, void 0);
8
+ return `${(t = (r = u == null ? void 0 : u.prefixCls) != null ? r : (n = l == null ? void 0 : l.appContext.config.globalProperties[At]) == null ? void 0 : n.classPrefix) != null ? t : zt}-${e}`;
9
+ }, Nt = Object.prototype.toString;
10
+ function Se(e) {
11
+ return Nt.call(e) === "[object Number]" && e === e;
12
12
  }
13
- var Se = (e, r) => {
14
- for (const [n, t] of r)
15
- e[n] = t;
13
+ var Oe = (e, n) => {
14
+ for (const [r, t] of n)
15
+ e[r] = t;
16
16
  return e;
17
17
  };
18
- const Nt = R({
18
+ const Vt = I({
19
19
  name: "IconDown",
20
20
  props: {
21
21
  size: {
@@ -42,27 +42,27 @@ const Nt = R({
42
42
  click: (e) => !0
43
43
  },
44
44
  setup(e, {
45
- emit: r
45
+ emit: n
46
46
  }) {
47
- const n = xe("icon"), t = O(() => [n, `${n}-down`, {
48
- [`${n}-spin`]: e.spin
49
- }]), l = O(() => {
47
+ const r = Ce("icon"), t = $(() => [r, `${r}-down`, {
48
+ [`${r}-spin`]: e.spin
49
+ }]), l = $(() => {
50
50
  const a = {};
51
- return e.size && (a.fontSize = Ce(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
51
+ return e.size && (a.fontSize = Se(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
52
52
  });
53
53
  return {
54
54
  cls: t,
55
55
  innerStyle: l,
56
56
  onClick: (a) => {
57
- r("click", a);
57
+ n("click", a);
58
58
  }
59
59
  };
60
60
  }
61
- }), Vt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Bt = /* @__PURE__ */ x("path", {
61
+ }), Bt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Ut = /* @__PURE__ */ C("path", {
62
62
  d: "M39.6 17.443 24.043 33 8.487 17.443"
63
- }, null, -1), Ut = [Bt];
64
- function qt(e, r, n, t, l, o) {
65
- return $(), T("svg", {
63
+ }, null, -1), qt = [Ut];
64
+ function Wt(e, n, r, t, l, u) {
65
+ return _(), M("svg", {
66
66
  viewBox: "0 0 48 48",
67
67
  fill: "none",
68
68
  xmlns: "http://www.w3.org/2000/svg",
@@ -72,17 +72,17 @@ function qt(e, r, n, t, l, o) {
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
- }, Ut, 14, Vt);
75
+ onClick: n[0] || (n[0] = (...a) => e.onClick && e.onClick(...a))
76
+ }, qt, 14, Bt);
77
77
  }
78
- var de = /* @__PURE__ */ Se(Nt, [["render", qt]]);
79
- const Wt = Object.assign(de, {
80
- install: (e, r) => {
81
- var n;
82
- const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
83
- e.component(t + de.name, de);
78
+ var fe = /* @__PURE__ */ Oe(Vt, [["render", Wt]]);
79
+ const Ht = Object.assign(fe, {
80
+ install: (e, n) => {
81
+ var r;
82
+ const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
83
+ e.component(t + fe.name, fe);
84
84
  }
85
- }), Ht = R({
85
+ }), Gt = I({
86
86
  name: "IconUp",
87
87
  props: {
88
88
  size: {
@@ -109,27 +109,27 @@ const Wt = Object.assign(de, {
109
109
  click: (e) => !0
110
110
  },
111
111
  setup(e, {
112
- emit: r
112
+ emit: n
113
113
  }) {
114
- const n = xe("icon"), t = O(() => [n, `${n}-up`, {
115
- [`${n}-spin`]: e.spin
116
- }]), l = O(() => {
114
+ const r = Ce("icon"), t = $(() => [r, `${r}-up`, {
115
+ [`${r}-spin`]: e.spin
116
+ }]), l = $(() => {
117
117
  const a = {};
118
- return e.size && (a.fontSize = Ce(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
118
+ return e.size && (a.fontSize = Se(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
119
119
  });
120
120
  return {
121
121
  cls: t,
122
122
  innerStyle: l,
123
123
  onClick: (a) => {
124
- r("click", a);
124
+ n("click", a);
125
125
  }
126
126
  };
127
127
  }
128
- }), Gt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Kt = /* @__PURE__ */ x("path", {
128
+ }), Kt = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Xt = /* @__PURE__ */ C("path", {
129
129
  d: "M39.6 30.557 24.043 15 8.487 30.557"
130
- }, null, -1), Xt = [Kt];
131
- function Jt(e, r, n, t, l, o) {
132
- return $(), T("svg", {
130
+ }, null, -1), Jt = [Xt];
131
+ function Qt(e, n, r, t, l, u) {
132
+ return _(), M("svg", {
133
133
  viewBox: "0 0 48 48",
134
134
  fill: "none",
135
135
  xmlns: "http://www.w3.org/2000/svg",
@@ -139,17 +139,17 @@ function Jt(e, r, n, t, l, o) {
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
- }, Xt, 14, Gt);
142
+ onClick: n[0] || (n[0] = (...a) => e.onClick && e.onClick(...a))
143
+ }, Jt, 14, Kt);
144
144
  }
145
- var fe = /* @__PURE__ */ Se(Ht, [["render", Jt]]);
146
- const Qt = Object.assign(fe, {
147
- install: (e, r) => {
148
- var n;
149
- const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
150
- e.component(t + fe.name, fe);
145
+ var me = /* @__PURE__ */ Oe(Gt, [["render", Qt]]);
146
+ const Zt = Object.assign(me, {
147
+ install: (e, n) => {
148
+ var r;
149
+ const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
150
+ e.component(t + me.name, me);
151
151
  }
152
- }), Zt = R({
152
+ }), er = I({
153
153
  name: "IconSearch",
154
154
  props: {
155
155
  size: {
@@ -176,27 +176,27 @@ const Qt = Object.assign(fe, {
176
176
  click: (e) => !0
177
177
  },
178
178
  setup(e, {
179
- emit: r
179
+ emit: n
180
180
  }) {
181
- const n = xe("icon"), t = O(() => [n, `${n}-search`, {
182
- [`${n}-spin`]: e.spin
183
- }]), l = O(() => {
181
+ const r = Ce("icon"), t = $(() => [r, `${r}-search`, {
182
+ [`${r}-spin`]: e.spin
183
+ }]), l = $(() => {
184
184
  const a = {};
185
- return e.size && (a.fontSize = Ce(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
185
+ return e.size && (a.fontSize = Se(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
186
186
  });
187
187
  return {
188
188
  cls: t,
189
189
  innerStyle: l,
190
190
  onClick: (a) => {
191
- r("click", a);
191
+ n("click", a);
192
192
  }
193
193
  };
194
194
  }
195
- }), en = ["stroke-width", "stroke-linecap", "stroke-linejoin"], tn = /* @__PURE__ */ x("path", {
195
+ }), tr = ["stroke-width", "stroke-linecap", "stroke-linejoin"], rr = /* @__PURE__ */ C("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
- }, null, -1), nn = [tn];
198
- function rn(e, r, n, t, l, o) {
199
- return $(), T("svg", {
197
+ }, null, -1), nr = [rr];
198
+ function lr(e, n, r, t, l, u) {
199
+ return _(), M("svg", {
200
200
  viewBox: "0 0 48 48",
201
201
  fill: "none",
202
202
  xmlns: "http://www.w3.org/2000/svg",
@@ -206,42 +206,42 @@ function rn(e, r, n, t, l, o) {
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))
210
- }, nn, 14, en);
209
+ onClick: n[0] || (n[0] = (...a) => e.onClick && e.onClick(...a))
210
+ }, nr, 14, tr);
211
211
  }
212
- var me = /* @__PURE__ */ Se(Zt, [["render", rn]]);
213
- const ln = Object.assign(me, {
214
- install: (e, r) => {
215
- var n;
216
- const t = (n = r == null ? void 0 : r.iconPrefix) != null ? n : "";
217
- e.component(t + me.name, me);
212
+ var he = /* @__PURE__ */ Oe(er, [["render", lr]]);
213
+ const ar = Object.assign(he, {
214
+ install: (e, n) => {
215
+ var r;
216
+ const t = (r = n == null ? void 0 : n.iconPrefix) != null ? r : "";
217
+ e.component(t + he.name, he);
218
218
  }
219
219
  }), _e = Symbol("__MODAL__");
220
- function Ue(e) {
221
- return vt() ? (pt(e), !0) : !1;
220
+ function qe(e) {
221
+ return yt() ? (pt(e), !0) : !1;
222
222
  }
223
- function M(e) {
224
- return typeof e == "function" ? e() : ze(e);
223
+ function D(e) {
224
+ return typeof e == "function" ? e() : Ae(e);
225
225
  }
226
- const qe = typeof window < "u" && typeof document < "u";
226
+ const We = typeof window < "u" && typeof document < "u";
227
227
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
228
- const an = Object.prototype.toString, un = (e) => an.call(e) === "[object Object]", on = () => {
228
+ const ur = Object.prototype.toString, or = (e) => ur.call(e) === "[object Object]", cr = () => {
229
229
  };
230
- function cn(e) {
230
+ function sr(e) {
231
231
  return q();
232
232
  }
233
- function sn(e, r = {}) {
233
+ function ir(e, n = {}) {
234
234
  if (!te(e))
235
- return mt(e);
236
- const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
235
+ return ht(e);
236
+ const r = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
237
237
  for (const t in e.value)
238
- n[t] = ht(() => ({
238
+ r[t] = vt(() => ({
239
239
  get() {
240
240
  return e.value[t];
241
241
  },
242
242
  set(l) {
243
- var o;
244
- if ((o = M(r.replaceRef)) == null || o)
243
+ var u;
244
+ if ((u = D(n.replaceRef)) == null || u)
245
245
  if (Array.isArray(e.value)) {
246
246
  const a = [...e.value];
247
247
  a[t] = l, e.value = a;
@@ -253,182 +253,182 @@ function sn(e, r = {}) {
253
253
  e.value[t] = l;
254
254
  }
255
255
  }));
256
- return n;
256
+ return r;
257
257
  }
258
- function dn(e, r = !0, n) {
259
- cn() ? W(e, n) : r ? e() : Ae(e);
258
+ function dr(e, n = !0, r) {
259
+ sr() ? W(e, r) : n ? e() : Ne(e);
260
260
  }
261
- function V(e) {
262
- var r;
263
- const n = M(e);
264
- return (r = n == null ? void 0 : n.$el) != null ? r : n;
261
+ function B(e) {
262
+ var n;
263
+ const r = D(e);
264
+ return (n = r == null ? void 0 : r.$el) != null ? n : r;
265
265
  }
266
- const oe = qe ? window : void 0;
267
- function he(...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)
270
- return on;
271
- Array.isArray(n) || (n = [n]), Array.isArray(t) || (t = [t]);
272
- const o = [], a = () => {
273
- o.forEach((u) => u()), o.length = 0;
274
- }, s = (u, i, f, d) => (u.addEventListener(i, f, d), () => u.removeEventListener(i, f, d)), h = ee(
275
- () => [V(r), M(l)],
276
- ([u, i]) => {
277
- if (a(), !u)
266
+ const oe = We ? window : void 0;
267
+ function ve(...e) {
268
+ let n, r, t, l;
269
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, t, l] = e, n = oe) : [n, r, t, l] = e, !n)
270
+ return cr;
271
+ Array.isArray(r) || (r = [r]), Array.isArray(t) || (t = [t]);
272
+ const u = [], a = () => {
273
+ u.forEach((o) => o()), u.length = 0;
274
+ }, i = (o, s, d, m) => (o.addEventListener(s, d, m), () => o.removeEventListener(s, d, m)), v = ee(
275
+ () => [B(n), D(l)],
276
+ ([o, s]) => {
277
+ if (a(), !o)
278
278
  return;
279
- const f = un(i) ? { ...i } : i;
280
- o.push(
281
- ...n.flatMap((d) => t.map((v) => s(u, d, v, f)))
279
+ const d = or(s) ? { ...s } : s;
280
+ u.push(
281
+ ...r.flatMap((m) => t.map((h) => i(o, m, h, d)))
282
282
  );
283
283
  },
284
284
  { immediate: !0, flush: "post" }
285
285
  ), c = () => {
286
- h(), a();
286
+ v(), a();
287
287
  };
288
- return Ue(c), c;
288
+ return qe(c), c;
289
289
  }
290
- function fn() {
291
- const e = S(!1), r = q();
292
- return r && W(() => {
290
+ function fr() {
291
+ const e = O(!1), n = q();
292
+ return n && W(() => {
293
293
  e.value = !0;
294
- }, r), e;
294
+ }, n), e;
295
295
  }
296
- function mn(e) {
297
- const r = fn();
298
- return O(() => (r.value, !!e()));
296
+ function mr(e) {
297
+ const n = fr();
298
+ return $(() => (n.value, !!e()));
299
299
  }
300
- function hn(e, r = {}) {
301
- var n, t;
300
+ function hr(e, n = {}) {
301
+ var r, t;
302
302
  const {
303
303
  pointerTypes: l,
304
- preventDefault: o,
304
+ preventDefault: u,
305
305
  stopPropagation: a,
306
- exact: s,
307
- onMove: h,
306
+ exact: i,
307
+ onMove: v,
308
308
  onEnd: c,
309
- onStart: u,
310
- initialValue: i,
311
- axis: f = "both",
312
- draggingElement: d = oe,
313
- containerElement: v,
314
- handle: w = e
315
- } = r, y = S(
316
- (n = M(i)) != null ? n : { x: 0, y: 0 }
317
- ), C = S(), j = (b) => l ? l.includes(b.pointerType) : !0, P = (b) => {
318
- M(o) && b.preventDefault(), M(a) && b.stopPropagation();
319
- }, E = (b) => {
309
+ onStart: o,
310
+ initialValue: s,
311
+ axis: d = "both",
312
+ draggingElement: m = oe,
313
+ containerElement: h,
314
+ handle: k = e
315
+ } = n, y = O(
316
+ (r = D(s)) != null ? r : { x: 0, y: 0 }
317
+ ), S = O(), L = (w) => l ? l.includes(w.pointerType) : !0, T = (w) => {
318
+ D(u) && w.preventDefault(), D(a) && w.stopPropagation();
319
+ }, E = (w) => {
320
320
  var g;
321
- if (b.button !== 0 || M(r.disabled) || !j(b) || M(s) && b.target !== M(e))
321
+ if (w.button !== 0 || D(n.disabled) || !L(w) || D(i) && w.target !== D(e))
322
322
  return;
323
- const k = M(v), F = (g = k == null ? void 0 : k.getBoundingClientRect) == null ? void 0 : g.call(k), Y = M(e).getBoundingClientRect(), ne = {
324
- x: b.clientX - (k ? Y.left - F.left + k.scrollLeft : Y.left),
325
- y: b.clientY - (k ? Y.top - F.top + k.scrollTop : Y.top)
323
+ const x = D(h), F = (g = x == null ? void 0 : x.getBoundingClientRect) == null ? void 0 : g.call(x), Y = D(e).getBoundingClientRect(), re = {
324
+ x: w.clientX - (x ? Y.left - F.left + x.scrollLeft : Y.left),
325
+ y: w.clientY - (x ? Y.top - F.top + x.scrollTop : Y.top)
326
326
  };
327
- (u == null ? void 0 : u(ne, b)) !== !1 && (C.value = ne, P(b));
328
- }, H = (b) => {
329
- if (M(r.disabled) || !j(b) || !C.value)
327
+ (o == null ? void 0 : o(re, w)) !== !1 && (S.value = re, T(w));
328
+ }, H = (w) => {
329
+ if (D(n.disabled) || !L(w) || !S.value)
330
330
  return;
331
- const g = M(v), k = M(e).getBoundingClientRect();
331
+ const g = D(h), x = D(e).getBoundingClientRect();
332
332
  let { x: F, y: Y } = y.value;
333
- (f === "x" || f === "both") && (F = b.clientX - C.value.x, g && (F = Math.min(Math.max(0, F), g.scrollWidth - k.width))), (f === "y" || f === "both") && (Y = b.clientY - C.value.y, g && (Y = Math.min(Math.max(0, Y), g.scrollHeight - k.height))), y.value = {
333
+ (d === "x" || d === "both") && (F = w.clientX - S.value.x, g && (F = Math.min(Math.max(0, F), g.scrollWidth - x.width))), (d === "y" || d === "both") && (Y = w.clientY - S.value.y, g && (Y = Math.min(Math.max(0, Y), g.scrollHeight - x.height))), y.value = {
334
334
  x: F,
335
335
  y: Y
336
- }, h == null || h(y.value, b), P(b);
337
- }, B = (b) => {
338
- M(r.disabled) || !j(b) || C.value && (C.value = void 0, c == null || c(y.value, b), P(b));
336
+ }, v == null || v(y.value, w), T(w);
337
+ }, N = (w) => {
338
+ D(n.disabled) || !L(w) || S.value && (S.value = void 0, c == null || c(y.value, w), T(w));
339
339
  };
340
- if (qe) {
341
- const b = { capture: (t = r.capture) != null ? t : !0 };
342
- he(w, "pointerdown", E, b), he(d, "pointermove", H, b), he(d, "pointerup", B, b);
340
+ if (We) {
341
+ const w = { capture: (t = n.capture) != null ? t : !0 };
342
+ ve(k, "pointerdown", E, w), ve(m, "pointermove", H, w), ve(m, "pointerup", N, w);
343
343
  }
344
344
  return {
345
- ...sn(y),
345
+ ...ir(y),
346
346
  position: y,
347
- isDragging: O(() => !!C.value),
348
- style: O(
347
+ isDragging: $(() => !!S.value),
348
+ style: $(
349
349
  () => `left:${y.value.x}px;top:${y.value.y}px;`
350
350
  )
351
351
  };
352
352
  }
353
- function vn(e, r, n = {}) {
354
- const { window: t = oe, ...l } = n;
355
- let o;
356
- const a = mn(() => t && "ResizeObserver" in t), s = () => {
357
- o && (o.disconnect(), o = void 0);
358
- }, h = O(() => Array.isArray(e) ? e.map((i) => V(i)) : [V(e)]), c = ee(
359
- h,
360
- (i) => {
361
- if (s(), a.value && t) {
362
- o = new ResizeObserver(r);
363
- for (const f of i)
364
- f && o.observe(f, l);
353
+ function vr(e, n, r = {}) {
354
+ const { window: t = oe, ...l } = r;
355
+ let u;
356
+ const a = mr(() => t && "ResizeObserver" in t), i = () => {
357
+ u && (u.disconnect(), u = void 0);
358
+ }, v = $(() => Array.isArray(e) ? e.map((s) => B(s)) : [B(e)]), c = ee(
359
+ v,
360
+ (s) => {
361
+ if (i(), a.value && t) {
362
+ u = new ResizeObserver(n);
363
+ for (const d of s)
364
+ d && u.observe(d, l);
365
365
  }
366
366
  },
367
367
  { immediate: !0, flush: "post" }
368
- ), u = () => {
369
- s(), c();
368
+ ), o = () => {
369
+ i(), c();
370
370
  };
371
- return Ue(u), {
371
+ return qe(o), {
372
372
  isSupported: a,
373
- stop: u
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 = O(() => {
378
- var i, f;
379
- return (f = (i = V(e)) == null ? void 0 : i.namespaceURI) == null ? void 0 : f.includes("svg");
380
- }), a = S(r.width), s = S(r.height), { stop: h } = vn(
376
+ function G(e, n = { width: 0, height: 0 }, r = {}) {
377
+ const { window: t = oe, box: l = "content-box" } = r, u = $(() => {
378
+ var s, d;
379
+ return (d = (s = B(e)) == null ? void 0 : s.namespaceURI) == null ? void 0 : d.includes("svg");
380
+ }), a = O(n.width), i = O(n.height), { stop: v } = vr(
381
381
  e,
382
- ([i]) => {
383
- const f = l === "border-box" ? i.borderBoxSize : l === "content-box" ? i.contentBoxSize : i.devicePixelContentBoxSize;
384
- if (t && o.value) {
385
- const d = V(e);
386
- if (d) {
387
- const v = d.getBoundingClientRect();
388
- a.value = v.width, s.value = v.height;
382
+ ([s]) => {
383
+ const d = l === "border-box" ? s.borderBoxSize : l === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
384
+ if (t && u.value) {
385
+ const m = B(e);
386
+ if (m) {
387
+ const h = m.getBoundingClientRect();
388
+ a.value = h.width, i.value = h.height;
389
389
  }
390
- } else if (f) {
391
- const d = Array.isArray(f) ? f : [f];
392
- a.value = d.reduce((v, { inlineSize: w }) => v + w, 0), s.value = d.reduce((v, { blockSize: w }) => v + w, 0);
390
+ } else if (d) {
391
+ const m = Array.isArray(d) ? d : [d];
392
+ a.value = m.reduce((h, { inlineSize: k }) => h + k, 0), i.value = m.reduce((h, { blockSize: k }) => h + k, 0);
393
393
  } else
394
- a.value = i.contentRect.width, s.value = i.contentRect.height;
394
+ a.value = s.contentRect.width, i.value = s.contentRect.height;
395
395
  },
396
- n
396
+ r
397
397
  );
398
- dn(() => {
399
- const i = V(e);
400
- i && (a.value = "offsetWidth" in i ? i.offsetWidth : r.width, s.value = "offsetHeight" in i ? i.offsetHeight : r.height);
398
+ dr(() => {
399
+ const s = B(e);
400
+ s && (a.value = "offsetWidth" in s ? s.offsetWidth : n.width, i.value = "offsetHeight" in s ? s.offsetHeight : n.height);
401
401
  });
402
402
  const c = ee(
403
- () => V(e),
404
- (i) => {
405
- a.value = i ? r.width : 0, s.value = i ? r.height : 0;
403
+ () => B(e),
404
+ (s) => {
405
+ a.value = s ? n.width : 0, i.value = s ? n.height : 0;
406
406
  }
407
407
  );
408
- function u() {
409
- h(), c();
408
+ function o() {
409
+ v(), c();
410
410
  }
411
411
  return {
412
412
  width: a,
413
- height: s,
414
- stop: u
413
+ height: i,
414
+ stop: o
415
415
  };
416
416
  }
417
- const pn = (e) => (Ne("data-v-37f80068"), e = e(), Ve(), e), yn = { class: "title text-16px font-bold" }, gn = { class: "action" }, bn = ["form"], kn = {
417
+ const yr = (e) => (Ve("data-v-37f80068"), e = e(), Be(), e), pr = { class: "title text-16px font-bold" }, gr = { class: "action" }, br = ["form"], kr = {
418
418
  key: 2,
419
419
  class: "modal-loading"
420
- }, wn = /* @__PURE__ */ pn(() => /* @__PURE__ */ x("div", { class: "lds-ring" }, [
421
- /* @__PURE__ */ x("div"),
422
- /* @__PURE__ */ x("div"),
423
- /* @__PURE__ */ x("div"),
424
- /* @__PURE__ */ x("div")
425
- ], -1)), xn = [
426
- wn
427
- ], Cn = {
420
+ }, wr = /* @__PURE__ */ yr(() => /* @__PURE__ */ C("div", { class: "lds-ring" }, [
421
+ /* @__PURE__ */ C("div"),
422
+ /* @__PURE__ */ C("div"),
423
+ /* @__PURE__ */ C("div"),
424
+ /* @__PURE__ */ C("div")
425
+ ], -1)), xr = [
426
+ wr
427
+ ], Cr = {
428
428
  name: "ModalContainer",
429
429
  inheritAttrs: !1
430
- }, Sn = /* @__PURE__ */ R({
431
- ...Cn,
430
+ }, Sr = /* @__PURE__ */ I({
431
+ ...Cr,
432
432
  props: {
433
433
  id: {},
434
434
  form: {},
@@ -461,22 +461,22 @@ const pn = (e) => (Ne("data-v-37f80068"), e = e(), Ve(), e), yn = { class: "titl
461
461
  onCancel: {}
462
462
  },
463
463
  emits: ["submit"],
464
- setup(e, { expose: r, emit: n }) {
465
- ct((p) => ({
464
+ setup(e, { expose: n, emit: r }) {
465
+ st((p) => ({
466
466
  b09c48b4: p.zIndex
467
467
  }));
468
- const t = e, l = n, o = be(_e), a = S(!1);
469
- let s = 0, h = 0;
470
- const c = N(), u = N(), i = N(), f = N(), d = N(), v = N(), { height: w } = G(c), { height: y } = G(i, void 0, { box: "border-box" }), { height: C } = G(f, void 0, { box: "border-box" }), { height: j } = G(d), { height: P } = G(v), { x: E, y: H } = hn(i, {
468
+ const t = e, l = r, u = ke(_e), a = O(!1);
469
+ let i = 0, v = 0;
470
+ const c = V(), o = V(), s = V(), d = V(), m = V(), h = V(), { height: k } = G(c), { height: y } = G(s, void 0, { box: "border-box" }), { height: S } = G(d, void 0, { box: "border-box" }), { height: L } = G(m), { height: T } = G(h), { x: E, y: H } = hr(s, {
471
471
  initialValue: { x: 0, y: 0 }
472
472
  });
473
- function B() {
474
- o == null || o.close(t.id);
473
+ function N() {
474
+ u == null || u.close(t.id);
475
475
  }
476
- function b(p) {
476
+ function w(p) {
477
477
  return typeof p == "number" ? `${p}px` : p;
478
478
  }
479
- const g = O(() => {
479
+ const g = $(() => {
480
480
  const p = {};
481
481
  return t.mode === "dialog" && (p.justifyContent = "center"), t.mode === "drawer" && (p.justifyContent = {
482
482
  left: "flex-start",
@@ -489,132 +489,132 @@ const pn = (e) => (Ne("data-v-37f80068"), e = e(), Ve(), e), yn = { class: "titl
489
489
  top: "column",
490
490
  bottom: "column"
491
491
  }[t.position]), p;
492
- }), k = O(() => {
492
+ }), x = $(() => {
493
493
  const p = {};
494
- return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight = b(t.maxHeight) : (p.width = b(t.sizes[t.size]), p.maxWidth = b(t.maxWidth)), t.width && (p.width = b(t.width)), t.height && (p.height = b(t.height)), t.fullscreen && (p.maxWidth = "unset", p.width = "100%", p.position = "fixed", p.top = 0, p.left = 0, p.bottom = 0, p.right = 0, p.borderRadius = 0), t.draggable && !t.fullscreen && t.mode === "dialog" && (p.transform = `translate3d(${E.value - s}px, ${H.value - h}px, 0px)`), t.mode === "drawer" && (p.borderRadius = 0, ["left", "right"].includes(t.position) ? p.height = "100%" : p.width = "100%"), t.offset && t.mode === "dialog" && (p.marginLeft = `${t.offset.x || 0}px`, p.marginTop = `${t.offset.y || 0}px`), t.backgroundColor && (p.backgroundColor = t.backgroundColor), p;
495
- }), F = O(() => {
494
+ return t.mode === "drawer" && ["top", "bottom"].includes(t.position) ? p.maxHeight = w(t.maxHeight) : (p.width = w(t.sizes[t.size]), p.maxWidth = w(t.maxWidth)), t.width && (p.width = w(t.width)), t.height && (p.height = w(t.height)), t.fullscreen && (p.maxWidth = "unset", p.width = "100%", p.position = "fixed", p.top = 0, p.left = 0, p.bottom = 0, p.right = 0, p.borderRadius = 0), t.draggable && !t.fullscreen && t.mode === "dialog" && (p.transform = `translate3d(${E.value - i}px, ${H.value - v}px, 0px)`), t.mode === "drawer" && (p.borderRadius = 0, ["left", "right"].includes(t.position) ? p.height = "100%" : p.width = "100%"), t.offset && t.mode === "dialog" && (p.marginLeft = `${t.offset.x || 0}px`, p.marginTop = `${t.offset.y || 0}px`), t.backgroundColor && (p.backgroundColor = t.backgroundColor), p;
495
+ }), F = $(() => {
496
496
  const p = {};
497
497
  return t.draggable && !t.fullscreen && t.mode === "dialog" && (p.cursor = "move"), p;
498
- }), Y = O(() => {
499
- const p = {}, L = j.value + P.value + y.value + C.value, Fe = Math.floor(w.value * (Number(b(t.maxHeight).replace("%", "")) / 100));
500
- return t.maxHeight && (p.maxHeight = `${Fe - L}px`), t.mode === "drawer" && (p.maxHeight = "unset", ["left", "right"].includes(t.position) && (p.height = `${w.value - L}px`)), t.fullscreen && (p.maxHeight = "unset", p.height = `calc(100% - ${L}px)`), t.type !== "component" && (p.padding = "0"), t.bodyStyle && Object.assign(p, t.bodyStyle), p;
498
+ }), Y = $(() => {
499
+ const p = {}, P = L.value + T.value + y.value + S.value, Ye = Math.floor(k.value * (Number(w(t.maxHeight).replace("%", "")) / 100));
500
+ return t.maxHeight && (p.maxHeight = `${Ye - P}px`), t.mode === "drawer" && (p.maxHeight = "unset", ["left", "right"].includes(t.position) && (p.height = `${k.value - P}px`)), t.fullscreen && (p.maxHeight = "unset", p.height = `calc(100% - ${P}px)`), t.type !== "component" && (p.padding = "0"), t.bodyStyle && Object.assign(p, t.bodyStyle), p;
501
501
  });
502
- function ne() {
503
- const p = u.value;
502
+ function re() {
503
+ const p = o.value;
504
504
  if (t.form && p) {
505
- const L = p.querySelector(`form[name="${t.form}"]`);
506
- L && L.dispatchEvent(new Event("submit"));
505
+ const P = p.querySelector(`form[name="${t.form}"]`);
506
+ P && P.dispatchEvent(new Event("submit"));
507
507
  }
508
508
  t.onOk && t.onOk({
509
- close: () => o == null ? void 0 : o.close(t.id)
509
+ close: () => u == null ? void 0 : u.close(t.id)
510
510
  }), l("submit");
511
511
  }
512
- function Je() {
513
- o == null || o.close(t.id), t != null && t.onCancel && t.onCancel();
514
- }
515
512
  function Qe() {
513
+ u == null || u.close(t.id), t != null && t.onCancel && t.onCancel();
514
+ }
515
+ function Ze() {
516
516
  window && window.addEventListener("resize", () => {
517
- Z(c), Z(u), u.value && (s = u.value.offsetLeft, h = u.value.offsetTop);
517
+ Z(c), Z(o), o.value && (i = o.value.offsetLeft, v = o.value.offsetTop);
518
518
  });
519
519
  }
520
- function Ze() {
520
+ function et() {
521
521
  if (t.closeable && t.esc) {
522
- const p = ({ key: L }) => {
523
- L === "Escape" && (o == null || o.close(t.id), window.removeEventListener("keydown", p));
522
+ const p = ({ key: P }) => {
523
+ P === "Escape" && (u == null || u.close(t.id), window.removeEventListener("keydown", p));
524
524
  };
525
525
  window.addEventListener("keydown", p);
526
526
  }
527
527
  }
528
- function et() {
529
- s = u.value.offsetLeft, h = u.value.offsetTop;
528
+ function tt() {
529
+ i = o.value.offsetLeft, v = o.value.offsetTop;
530
530
  }
531
531
  W(() => {
532
- Ze(), Qe();
532
+ et(), Ze();
533
533
  }), it(() => {
534
534
  });
535
- function tt() {
536
- return a.value = !0, () => Oe();
535
+ function rt() {
536
+ return a.value = !0, () => Fe();
537
537
  }
538
- function Oe() {
538
+ function Fe() {
539
539
  a.value = !1;
540
540
  }
541
- return r({
542
- showLoading: tt,
543
- hideLoading: Oe
544
- }), (p, L) => ($(), T("div", {
541
+ return n({
542
+ showLoading: rt,
543
+ hideLoading: Fe
544
+ }), (p, P) => (_(), M("div", {
545
545
  ref_key: "wrapperRef",
546
546
  ref: c,
547
547
  class: "modal-wrapper",
548
548
  style: z(g.value),
549
- onClick: L[0] || (L[0] = st((Fe) => p.maskClosable && B(), ["self"]))
549
+ onClick: P[0] || (P[0] = dt((Ye) => p.maskClosable && N(), ["self"]))
550
550
  }, [
551
- x("div", {
551
+ C("div", {
552
552
  ref_key: "contentRef",
553
- ref: u,
553
+ ref: o,
554
554
  class: ue(["modal-content", { [`${p.mode}-mode`]: !0, [`${p.position}-position`]: !0 }]),
555
- style: z(k.value)
555
+ style: z(x.value)
556
556
  }, [
557
- p.header ? ($(), T("div", {
557
+ p.header ? (_(), M("div", {
558
558
  key: 0,
559
559
  ref_key: "headerRef",
560
- ref: i,
560
+ ref: s,
561
561
  class: "modal-header",
562
562
  style: z(F.value),
563
- onMousedown: et
563
+ onMousedown: tt
564
564
  }, [
565
- x("div", yn, A(p.title), 1),
566
- x("div", gn, [
567
- p.closeable ? ($(), T("div", {
565
+ C("div", pr, A(p.title), 1),
566
+ C("div", gr, [
567
+ p.closeable ? (_(), M("div", {
568
568
  key: 0,
569
569
  class: "i-icon-park-outline:close block cursor-pointer",
570
- onClick: B
570
+ onClick: N
571
571
  })) : U("", !0)
572
572
  ])
573
573
  ], 36)) : U("", !0),
574
- x("div", {
574
+ C("div", {
575
575
  id: "modal-header-slot",
576
576
  ref_key: "headerSlotRef",
577
- ref: d
577
+ ref: m
578
578
  }, null, 512),
579
- x("div", {
579
+ C("div", {
580
580
  class: "modal-body",
581
581
  style: z(Y.value)
582
582
  }, [
583
- ($(), ae(Ee(p.component), dt(ft(p.componentProps)), null, 16))
583
+ (_(), ae(ze(p.component), ft(mt(p.componentProps)), null, 16))
584
584
  ], 4),
585
- x("div", {
585
+ C("div", {
586
586
  id: "modal-footer-slot",
587
587
  ref_key: "footerSlotRef",
588
- ref: v
588
+ ref: h
589
589
  }, null, 512),
590
- p.footer ? ($(), T("div", {
590
+ p.footer ? (_(), M("div", {
591
591
  key: 1,
592
592
  ref_key: "footerRef",
593
- ref: f,
593
+ ref: d,
594
594
  class: "modal-footer space-x-2"
595
595
  }, [
596
- x("button", {
596
+ C("button", {
597
597
  class: "cancel-button",
598
598
  type: "button",
599
- onClick: Je
599
+ onClick: Qe
600
600
  }, A(p.cancelText), 1),
601
- x("button", {
601
+ C("button", {
602
602
  class: "submit-button",
603
603
  form: p.form,
604
604
  type: "submit",
605
- onClick: ne
606
- }, A(p.submitText), 9, bn)
605
+ onClick: re
606
+ }, A(p.submitText), 9, br)
607
607
  ], 512)) : U("", !0),
608
- a.value ? ($(), T("div", kn, xn)) : U("", !0)
608
+ a.value ? (_(), M("div", kr, xr)) : U("", !0)
609
609
  ], 6)
610
610
  ], 4));
611
611
  }
612
- }), ce = (e, r) => {
613
- const n = e.__vccOpts || e;
614
- for (const [t, l] of r)
615
- n[t] = l;
616
- return n;
617
- }, _n = /* @__PURE__ */ ce(Sn, [["__scopeId", "data-v-37f80068"]]), $n = { class: "modal-dialog" }, On = { class: "dialog-body" }, Fn = { class: "dialog-title" }, Yn = { class: "dialog-content" }, Mn = /* @__PURE__ */ R({
612
+ }), ce = (e, n) => {
613
+ const r = e.__vccOpts || e;
614
+ for (const [t, l] of n)
615
+ r[t] = l;
616
+ return r;
617
+ }, Or = /* @__PURE__ */ ce(Sr, [["__scopeId", "data-v-37f80068"]]), _r = { class: "modal-dialog" }, $r = { class: "dialog-body" }, Fr = { class: "dialog-title" }, Yr = { class: "dialog-content" }, Dr = /* @__PURE__ */ I({
618
618
  __name: "modal-dialog",
619
619
  props: {
620
620
  type: {},
@@ -627,70 +627,70 @@ const pn = (e) => (Ne("data-v-37f80068"), e = e(), Ve(), e), yn = { class: "titl
627
627
  footer: {}
628
628
  },
629
629
  setup(e) {
630
- const r = e, n = We(), t = O(() => r.title ? r.title : {
630
+ const n = e, r = He(), t = $(() => n.title ? n.title : {
631
631
  confirm: "提示",
632
632
  info: "提示",
633
633
  warning: "警告",
634
634
  error: "错误",
635
635
  success: "成功"
636
- }[r.type]);
636
+ }[n.type]);
637
637
  async function l() {
638
- r.onOk && await r.onOk(), n.close();
638
+ n.onOk && await n.onOk(), r.close();
639
639
  }
640
- async function o() {
641
- r.onCancel && await r.onCancel(), n.close();
640
+ async function u() {
641
+ n.onCancel && await n.onCancel(), r.close();
642
642
  }
643
- return (a, s) => ($(), T("section", $n, [
644
- x("div", On, [
645
- x("div", Fn, A(t.value), 1),
646
- x("div", Yn, A(a.content), 1)
643
+ return (a, i) => (_(), M("section", _r, [
644
+ C("div", $r, [
645
+ C("div", Fr, A(t.value), 1),
646
+ C("div", Yr, A(a.content), 1)
647
647
  ]),
648
- x("div", {
648
+ C("div", {
649
649
  class: "dialog-footer space-x-2",
650
650
  style: z(a.type === "confirm" ? { "justify-content": "end" } : { "border-top": "none" })
651
651
  }, [
652
- a.footer ? ($(), ae(Ee(a.footer), { key: 0 })) : ($(), T(le, { key: 1 }, [
653
- x("button", {
652
+ a.footer ? (_(), ae(ze(a.footer), { key: 0 })) : (_(), M(le, { key: 1 }, [
653
+ C("button", {
654
654
  class: "submit-button",
655
655
  type: "button",
656
656
  onClick: l
657
657
  }, A(a.okText), 1),
658
- a.type === "confirm" ? ($(), T("button", {
658
+ a.type === "confirm" ? (_(), M("button", {
659
659
  key: 0,
660
660
  class: "cancel-button",
661
661
  type: "button",
662
- onClick: o
662
+ onClick: u
663
663
  }, A(a.cancelText), 1)) : U("", !0)
664
664
  ], 64))
665
665
  ], 4)
666
666
  ]));
667
667
  }
668
- }), Tn = /* @__PURE__ */ ce(Mn, [["__scopeId", "data-v-3efc8aed"]]), Pn = (e) => (Ne("data-v-559bdf2e"), e = e(), Ve(), e), jn = { class: "flex-center" }, Ln = /* @__PURE__ */ Pn(() => /* @__PURE__ */ x("div", { class: "modal-loading" }, [
669
- /* @__PURE__ */ x("div", { class: "lds-ring" }, [
670
- /* @__PURE__ */ x("div"),
671
- /* @__PURE__ */ x("div"),
672
- /* @__PURE__ */ x("div"),
673
- /* @__PURE__ */ x("div")
668
+ }), Mr = /* @__PURE__ */ ce(Dr, [["__scopeId", "data-v-3efc8aed"]]), Tr = (e) => (Ve("data-v-559bdf2e"), e = e(), Be(), e), Lr = { class: "flex-center" }, Pr = /* @__PURE__ */ Tr(() => /* @__PURE__ */ C("div", { class: "modal-loading" }, [
669
+ /* @__PURE__ */ C("div", { class: "lds-ring" }, [
670
+ /* @__PURE__ */ C("div"),
671
+ /* @__PURE__ */ C("div"),
672
+ /* @__PURE__ */ C("div"),
673
+ /* @__PURE__ */ C("div")
674
674
  ])
675
- ], -1)), Dn = { class: "modal-loading-text" }, In = /* @__PURE__ */ R({
675
+ ], -1)), jr = { class: "modal-loading-text" }, Rr = /* @__PURE__ */ I({
676
676
  __name: "modal-loading",
677
677
  props: {
678
678
  text: { default: "加载中" }
679
679
  },
680
680
  setup(e) {
681
- return (r, n) => ($(), T("section", jn, [
682
- Ln,
683
- x("div", Dn, A(r.text), 1)
681
+ return (n, r) => (_(), M("section", Lr, [
682
+ Pr,
683
+ C("div", jr, A(n.text), 1)
684
684
  ]));
685
685
  }
686
- }), Rn = /* @__PURE__ */ ce(In, [["__scopeId", "data-v-559bdf2e"]]), En = {
686
+ }), Ir = /* @__PURE__ */ ce(Rr, [["__scopeId", "data-v-559bdf2e"]]), Er = {
687
687
  key: 0,
688
688
  class: "modal-teleport"
689
- }, zn = {
689
+ }, zr = {
690
690
  name: "ModalProvider",
691
691
  inheritAttrs: !1
692
- }, An = /* @__PURE__ */ R({
693
- ...zn,
692
+ }, Ar = /* @__PURE__ */ I({
693
+ ...zr,
694
694
  props: {
695
695
  appendToBody: { type: [Boolean, String], default: !1 },
696
696
  sizes: { default: () => ({
@@ -702,137 +702,137 @@ const pn = (e) => (Ne("data-v-37f80068"), e = e(), Ve(), e), yn = { class: "titl
702
702
  maxHeight: { default: "90%" },
703
703
  offset: { default: () => ({ x: 0, y: 0 }) }
704
704
  },
705
- setup(e, { expose: r }) {
706
- const n = N([]), t = S(!1), l = q();
707
- function o(f, d = {}, v = {}) {
708
- const w = ot(
709
- () => Promise.resolve(typeof f == "string" ? Tn : f)
705
+ setup(e, { expose: n }) {
706
+ const r = V([]), t = O(!1), l = q();
707
+ function u(d, m = {}, h = {}) {
708
+ const k = ct(
709
+ () => Promise.resolve(typeof d == "string" ? Mr : d)
710
710
  );
711
- typeof f == "string" && (d.type = f, v.size = "small", v.fullscreen = !1, v.mode = "dialog", v.footer = !1, v.header = !1);
712
- const y = Math.random().toString(32).slice(2), C = Object.assign({
713
- zIndex: typeof f == "string" ? 1100 : 1e3
714
- }, v), j = new Promise((P, E) => {
715
- n.value.push({
711
+ typeof d == "string" && (m.type = d, h.size = "small", h.fullscreen = !1, h.mode = "dialog", h.footer = !1, h.header = !1);
712
+ const y = Math.random().toString(32).slice(2), S = Object.assign({
713
+ zIndex: typeof d == "string" ? 1100 : 1e3
714
+ }, h), L = new Promise((T, E) => {
715
+ r.value.push({
716
716
  id: y,
717
- component: w,
718
- props: d || {},
717
+ component: k,
718
+ props: m || {},
719
719
  options: {
720
- ...C,
721
- type: typeof f == "string" ? f : "component"
720
+ ...S,
721
+ type: typeof d == "string" ? d : "component"
722
722
  },
723
- resolve: P,
723
+ resolve: T,
724
724
  reject: E,
725
725
  listeners: []
726
- }), Z(n);
727
- }).catch((P) => P === "CANCEL" ? new Promise(() => {
728
- }) : Promise.reject(P));
729
- return Object.assign(j, {
726
+ }), Z(r);
727
+ }).catch((T) => T === "CANCEL" ? new Promise(() => {
728
+ }) : Promise.reject(T));
729
+ return Object.assign(L, {
730
730
  close: () => a(y)
731
731
  });
732
732
  }
733
- function a(f, d) {
734
- const v = n.value.findIndex((y) => y.id === f);
735
- if (v < 0)
733
+ function a(d, m) {
734
+ const h = r.value.findIndex((y) => y.id === d);
735
+ if (h < 0)
736
736
  return;
737
- const w = n.value[v];
738
- d === void 0 ? w == null || w.reject("CANCEL") : w == null || w.resolve(d), n.value.splice(v, 1), Z(n);
737
+ const k = r.value[h];
738
+ m === void 0 ? k == null || k.reject("CANCEL") : k == null || k.resolve(m), r.value.splice(h, 1), Z(r);
739
739
  }
740
- function s() {
741
- !n.value || n.value.length === 0 || (n.value.forEach((f) => {
742
- f == null || f.reject("CANCEL");
743
- }), n.value = [], Z(n));
740
+ function i() {
741
+ !r.value || r.value.length === 0 || (r.value.forEach((d) => {
742
+ d == null || d.reject("CANCEL");
743
+ }), r.value = [], Z(r));
744
744
  }
745
- function h(f, d) {
746
- const v = n.value.find((y) => y.id === f);
747
- if (!v)
745
+ function v(d, m) {
746
+ const h = r.value.find((y) => y.id === d);
747
+ if (!h)
748
748
  return;
749
- const w = v.listeners.find((y) => y.event === d);
750
- w && w.callback({
751
- open: o,
752
- close: (y) => a(v.id, y),
753
- closeAll: s,
754
- showLoading: () => c(v.id),
755
- hideLoading: () => u(v.id),
756
- confirm: (y) => o("confirm", y),
757
- success: (y) => o("success", y),
758
- error: (y) => o("error", y),
759
- warning: (y) => o("warning", y),
760
- info: (y) => o("info", y)
749
+ const k = h.listeners.find((y) => y.event === m);
750
+ k && k.callback({
751
+ open: u,
752
+ close: (y) => a(h.id, y),
753
+ closeAll: i,
754
+ showLoading: () => c(h.id),
755
+ hideLoading: () => o(h.id),
756
+ confirm: (y) => u("confirm", y),
757
+ success: (y) => u("success", y),
758
+ error: (y) => u("error", y),
759
+ warning: (y) => u("warning", y),
760
+ info: (y) => u("info", y)
761
761
  });
762
762
  }
763
- function c(f, d) {
763
+ function c(d, m) {
764
764
  if (!l)
765
765
  return;
766
- const [v] = l.refs[`modal-container_${f}`] || [];
767
- if (v)
768
- return v.showLoading();
766
+ const [h] = l.refs[`modal-container_${d}`] || [];
767
+ if (h)
768
+ return h.showLoading();
769
769
  {
770
- const { close: w } = o(Rn, {
771
- text: d == null ? void 0 : d.text
770
+ const { close: k } = u(Ir, {
771
+ text: m == null ? void 0 : m.text
772
772
  }, {
773
773
  footer: !1,
774
774
  header: !1,
775
775
  closeable: !1,
776
776
  backgroundColor: "transparent"
777
777
  });
778
- return d != null && d.duration && setTimeout(
778
+ return m != null && m.duration && setTimeout(
779
779
  () => {
780
- w();
780
+ k();
781
781
  },
782
- d == null ? void 0 : d.duration
783
- ), w;
782
+ m == null ? void 0 : m.duration
783
+ ), k;
784
784
  }
785
785
  }
786
- function u(f) {
786
+ function o(d) {
787
787
  if (!l)
788
788
  return;
789
- const [d] = l.refs[`modal-container_${f}`];
790
- if (d)
791
- return d.hideLoading();
792
- }
793
- function i(f, d, v) {
794
- const w = n.value.find((y) => y.id === f);
795
- w && w.listeners.push({
796
- event: d,
797
- callback: v
789
+ const [m] = l.refs[`modal-container_${d}`];
790
+ if (m)
791
+ return m.hideLoading();
792
+ }
793
+ function s(d, m, h) {
794
+ const k = r.value.find((y) => y.id === d);
795
+ k && k.listeners.push({
796
+ event: m,
797
+ callback: h
798
798
  });
799
799
  }
800
800
  return pe(_e, {
801
- open: o,
801
+ open: u,
802
802
  close: a,
803
- closeAll: s,
804
- addEventListener: i,
803
+ closeAll: i,
804
+ addEventListener: s,
805
805
  showLoading: c,
806
- hideLoading: u
807
- }), r({
808
- elements: n,
809
- open: o,
806
+ hideLoading: o
807
+ }), n({
808
+ elements: r,
809
+ open: u,
810
810
  close: a,
811
- closeAll: s
811
+ closeAll: i
812
812
  }), W(() => {
813
813
  t.value = !0;
814
- }), (f, d) => ($(), T(le, null, [
815
- nt(f.$slots, "default", {}, void 0, !0),
816
- t.value ? ($(), T("div", En, [
817
- ($(), ae(rt, {
818
- disabled: !f.appendToBody,
819
- to: typeof f.appendToBody == "string" ? f.appendToBody : "body"
814
+ }), (d, m) => (_(), M(le, null, [
815
+ nt(d.$slots, "default", {}, void 0, !0),
816
+ t.value ? (_(), M("div", Er, [
817
+ (_(), ae(lt, {
818
+ disabled: !d.appendToBody,
819
+ to: typeof d.appendToBody == "string" ? d.appendToBody : "body"
820
820
  }, [
821
- m(lt, { name: "modal-fade" }, {
822
- default: at(() => [
823
- ($(!0), T(le, null, ut(n.value, (v) => ($(), ae(_n, ke({
824
- id: v.id,
825
- key: v.id,
821
+ f(at, { name: "modal-fade" }, {
822
+ default: ut(() => [
823
+ (_(!0), M(le, null, ot(r.value, (h) => (_(), ae(Or, we({
824
+ id: h.id,
825
+ key: h.id,
826
826
  ref_for: !0,
827
- ref: `modal-container_${v.id}`,
828
- component: v.component,
829
- "component-props": v.props,
830
- "max-height": f.maxHeight,
831
- "max-width": f.maxWidth,
832
- offset: f.offset,
833
- sizes: f.sizes
834
- }, v.options, {
835
- onSubmit: () => h(v.id, "submit")
827
+ ref: `modal-container_${h.id}`,
828
+ component: h.component,
829
+ "component-props": h.props,
830
+ "max-height": d.maxHeight,
831
+ "max-width": d.maxWidth,
832
+ offset: d.offset,
833
+ sizes: d.sizes
834
+ }, h.options, {
835
+ onSubmit: () => v(h.id, "submit")
836
836
  }), null, 16, ["id", "component", "component-props", "max-height", "max-width", "offset", "sizes", "onSubmit"]))), 128))
837
837
  ]),
838
838
  _: 1
@@ -841,28 +841,28 @@ const pn = (e) => (Ne("data-v-37f80068"), e = e(), Ve(), e), yn = { class: "titl
841
841
  ])) : U("", !0)
842
842
  ], 64));
843
843
  }
844
- }), Nn = /* @__PURE__ */ ce(An, [["__scopeId", "data-v-448d3772"]]);
845
- function ve(e, r) {
846
- var n, t;
844
+ }), Nr = /* @__PURE__ */ ce(Ar, [["__scopeId", "data-v-448d3772"]]);
845
+ function ye(e, n) {
846
+ var r, t;
847
847
  let l = e == null ? void 0 : e.parent;
848
- for (; l && ((n = l == null ? void 0 : l.type) == null ? void 0 : n.name) !== r; )
848
+ for (; l && ((r = l == null ? void 0 : l.type) == null ? void 0 : r.name) !== n; )
849
849
  l = l.parent;
850
- return ((t = l == null ? void 0 : l.type) == null ? void 0 : t.name) === r ? l : null;
850
+ return ((t = l == null ? void 0 : l.type) == null ? void 0 : t.name) === n ? l : null;
851
851
  }
852
- function We() {
853
- const e = be(_e), r = q();
854
- function n(t, l, o) {
852
+ function He() {
853
+ const e = ke(_e), n = q();
854
+ function r(t, l, u) {
855
855
  if (!e)
856
856
  throw new Error("Not Found Modal Provider Component");
857
- return e.open(t, l, o);
857
+ return e.open(t, l, u);
858
858
  }
859
859
  return {
860
- open: n,
860
+ open: r,
861
861
  close(t) {
862
862
  var l;
863
863
  if (!e)
864
864
  throw new Error("Not Found Modal Provider Component");
865
- const o = ve(r, "ModalContainer"), a = (l = o == null ? void 0 : o.props) == null ? void 0 : l.id;
865
+ const u = ye(n, "ModalContainer"), a = (l = u == null ? void 0 : u.props) == null ? void 0 : l.id;
866
866
  if (!a)
867
867
  throw new Error("Not Found Current Modal Container");
868
868
  e.close(a, t);
@@ -876,15 +876,15 @@ function We() {
876
876
  var l;
877
877
  if (!e)
878
878
  throw new Error("Not Found Modal Provider Component");
879
- const o = ve(r, "ModalContainer"), a = (l = o == null ? void 0 : o.props) == null ? void 0 : l.id;
879
+ const u = ye(n, "ModalContainer"), a = (l = u == null ? void 0 : u.props) == null ? void 0 : l.id;
880
880
  return e.showLoading(a, t);
881
881
  },
882
882
  hideLoading() {
883
883
  var t;
884
884
  if (!e)
885
885
  throw new Error("Not Found Modal Provider Component");
886
- const l = ve(r, "ModalContainer"), o = (t = l == null ? void 0 : l.props) == null ? void 0 : t.id;
887
- return e.hideLoading(o);
886
+ const l = ye(n, "ModalContainer"), u = (t = l == null ? void 0 : l.props) == null ? void 0 : t.id;
887
+ return e.hideLoading(u);
888
888
  },
889
889
  confirm(t) {
890
890
  return this.open("confirm", t);
@@ -903,42 +903,42 @@ function We() {
903
903
  }
904
904
  };
905
905
  }
906
- const Pe = {
906
+ const Le = {
907
907
  id: Symbol("ID"),
908
908
  source: Symbol("Source")
909
909
  };
910
- function Vn(e, r) {
911
- const n = S({});
910
+ function Vr(e, n) {
911
+ const r = O({});
912
912
  return e == null || e.forEach((l) => {
913
- let o = null;
914
- 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;
915
- }), [n, (l) => {
916
- n.value = l;
913
+ let u = null;
914
+ l.default && (u = (typeof l.default == "function" ? l.default() : l.default) || null), n && n[l.key] !== void 0 && (u = n[l.key]), r.value[l.key] = u;
915
+ }), [r, (l) => {
916
+ r.value = l;
917
917
  }];
918
918
  }
919
- var $e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
920
- function He(e) {
919
+ var se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
920
+ function $e(e) {
921
921
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
922
922
  }
923
- var Bn = { exports: {} };
924
- (function(e, r) {
925
- (function(n, t) {
926
- e.exports = t(_);
927
- })($e, function(n) {
923
+ var Br = { exports: {} };
924
+ (function(e, n) {
925
+ (function(r, t) {
926
+ e.exports = t(b);
927
+ })(se, function(r) {
928
928
  function t(a) {
929
929
  return a && typeof a == "object" && "default" in a ? a : {
930
930
  default: a
931
931
  };
932
932
  }
933
- var l = t(n), o = {
933
+ var l = t(r), u = {
934
934
  name: "zh-cn",
935
935
  weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
936
936
  weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
937
937
  weekdaysMin: "日_一_二_三_四_五_六".split("_"),
938
938
  months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
939
939
  monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
940
- ordinal: function(a, s) {
941
- return s === "W" ? a + "周" : a + "日";
940
+ ordinal: function(a, i) {
941
+ return i === "W" ? a + "周" : a + "日";
942
942
  },
943
943
  weekStart: 1,
944
944
  yearStart: 4,
@@ -969,138 +969,138 @@ var Bn = { exports: {} };
969
969
  y: "1 年",
970
970
  yy: "%d 年"
971
971
  },
972
- meridiem: function(a, s) {
973
- var h = 100 * a + s;
974
- return h < 600 ? "凌晨" : h < 900 ? "早上" : h < 1100 ? "上午" : h < 1300 ? "中午" : h < 1800 ? "下午" : "晚上";
972
+ meridiem: function(a, i) {
973
+ var v = 100 * a + i;
974
+ return v < 600 ? "凌晨" : v < 900 ? "早上" : v < 1100 ? "上午" : v < 1300 ? "中午" : v < 1800 ? "下午" : "晚上";
975
975
  }
976
976
  };
977
- return l.default.locale(o, null, !0), o;
977
+ return l.default.locale(u, null, !0), u;
978
978
  });
979
- })(Bn);
979
+ })(Br);
980
980
  var Ge = { exports: {} };
981
- (function(e, r) {
982
- (function(n, t) {
981
+ (function(e, n) {
982
+ (function(r, t) {
983
983
  e.exports = t();
984
- })($e, function() {
985
- var n = "week", t = "year";
986
- return function(l, o, a) {
987
- var s = o.prototype;
988
- s.week = function(h) {
989
- if (h === void 0 && (h = null), h !== null)
990
- return this.add(7 * (h - this.week()), "day");
984
+ })(se, function() {
985
+ var r = "week", t = "year";
986
+ return function(l, u, a) {
987
+ var i = u.prototype;
988
+ i.week = function(v) {
989
+ if (v === void 0 && (v = null), v !== null)
990
+ return this.add(7 * (v - this.week()), "day");
991
991
  var c = this.$locale().yearStart || 1;
992
992
  if (this.month() === 11 && this.date() > 25) {
993
- var u = a(this).startOf(t).add(1, t).date(c), i = a(this).endOf(n);
994
- if (u.isBefore(i))
993
+ var o = a(this).startOf(t).add(1, t).date(c), s = a(this).endOf(r);
994
+ if (o.isBefore(s))
995
995
  return 1;
996
996
  }
997
- var f = a(this).startOf(t).date(c).startOf(n).subtract(1, "millisecond"), d = this.diff(f, n, !0);
998
- return d < 0 ? a(this).startOf("week").week() : Math.ceil(d);
999
- }, s.weeks = function(h) {
1000
- return h === void 0 && (h = null), this.week(h);
997
+ var d = a(this).startOf(t).date(c).startOf(r).subtract(1, "millisecond"), m = this.diff(d, r, !0);
998
+ return m < 0 ? a(this).startOf("week").week() : Math.ceil(m);
999
+ }, i.weeks = function(v) {
1000
+ return v === void 0 && (v = null), this.week(v);
1001
1001
  };
1002
1002
  };
1003
1003
  });
1004
1004
  })(Ge);
1005
- var Un = Ge.exports;
1006
- const qn = /* @__PURE__ */ He(Un);
1005
+ var Ur = Ge.exports;
1006
+ const qr = /* @__PURE__ */ $e(Ur);
1007
1007
  var Ke = { exports: {} };
1008
- (function(e, r) {
1009
- (function(n, t) {
1008
+ (function(e, n) {
1009
+ (function(r, t) {
1010
1010
  e.exports = t();
1011
- })($e, function() {
1012
- var n = "month", t = "quarter";
1013
- return function(l, o) {
1014
- var a = o.prototype;
1011
+ })(se, function() {
1012
+ var r = "month", t = "quarter";
1013
+ return function(l, u) {
1014
+ var a = u.prototype;
1015
1015
  a.quarter = function(c) {
1016
1016
  return this.$utils().u(c) ? Math.ceil((this.month() + 1) / 3) : this.month(this.month() % 3 + 3 * (c - 1));
1017
1017
  };
1018
- var s = a.add;
1019
- a.add = function(c, u) {
1020
- return c = Number(c), this.$utils().p(u) === t ? this.add(3 * c, n) : s.bind(this)(c, u);
1018
+ var i = a.add;
1019
+ a.add = function(c, o) {
1020
+ return c = Number(c), this.$utils().p(o) === t ? this.add(3 * c, r) : i.bind(this)(c, o);
1021
1021
  };
1022
- var h = a.startOf;
1023
- a.startOf = function(c, u) {
1024
- var i = this.$utils(), f = !!i.u(u) || u;
1025
- if (i.p(c) === t) {
1026
- var d = this.quarter() - 1;
1027
- return f ? this.month(3 * d).startOf(n).startOf("day") : this.month(3 * d + 2).endOf(n).endOf("day");
1022
+ var v = a.startOf;
1023
+ a.startOf = function(c, o) {
1024
+ var s = this.$utils(), d = !!s.u(o) || o;
1025
+ if (s.p(c) === t) {
1026
+ var m = this.quarter() - 1;
1027
+ return d ? this.month(3 * m).startOf(r).startOf("day") : this.month(3 * m + 2).endOf(r).endOf("day");
1028
1028
  }
1029
- return h.bind(this)(c, u);
1029
+ return v.bind(this)(c, o);
1030
1030
  };
1031
1031
  };
1032
1032
  });
1033
1033
  })(Ke);
1034
- var Wn = Ke.exports;
1035
- const Hn = /* @__PURE__ */ He(Wn);
1036
- _.extend(qn);
1037
- _.extend(Hn);
1038
- _.locale("zh-cn", {
1034
+ var Wr = Ke.exports;
1035
+ const Hr = /* @__PURE__ */ $e(Wr);
1036
+ b.extend(qr);
1037
+ b.extend(Hr);
1038
+ b.locale("zh-cn", {
1039
1039
  weekStart: 1
1040
1040
  });
1041
- function Gn(e) {
1042
- function r(n, t) {
1043
- return e != null && e.disabledDate ? e.disabledDate(n, t) : !1;
1041
+ function Gr(e) {
1042
+ function n(r, t) {
1043
+ return e != null && e.disabledDate ? e.disabledDate(r, t) : !1;
1044
1044
  }
1045
- return (n, t) => {
1045
+ return (r, t) => {
1046
1046
  function l() {
1047
- const a = n[t.key];
1047
+ const a = r[t.key];
1048
1048
  switch (e == null ? void 0 : e.type) {
1049
1049
  case "week":
1050
- return m("span", null, [`${_(a).format("YYYY年")}${_(a).week()}周`]);
1050
+ return f("span", null, [`${b(a).format("YYYY年")}${b(a).week()}周`]);
1051
1051
  case "month":
1052
- return m("span", null, [_(a).format("YYYY年MM月")]);
1052
+ return f("span", null, [b(a).format("YYYY年MM月")]);
1053
1053
  case "quarter":
1054
- return m("span", null, [`${_(a).format("YYYY年")}${_(a).quarter()}季度`]);
1054
+ return f("span", null, [`${b(a).format("YYYY年")}${b(a).quarter()}季度`]);
1055
1055
  case "year":
1056
- return m("span", null, [_(a).format("YYYY年")]);
1056
+ return f("span", null, [b(a).format("YYYY年")]);
1057
1057
  case "date":
1058
1058
  default:
1059
- return m("span", null, [_(a).format(e != null && e.showTime ? "YYYY年MM月DD日 HH:mm:ss" : "YYYY年MM月DD日")]);
1059
+ return f("span", null, [b(a).format(e != null && e.showTime ? "YYYY年MM月DD日 HH:mm:ss" : "YYYY年MM月DD日")]);
1060
1060
  }
1061
1061
  }
1062
- function o() {
1062
+ function u() {
1063
1063
  switch (e == null ? void 0 : e.type) {
1064
1064
  case "week":
1065
- return m(xt, {
1065
+ return f(Ct, {
1066
1066
  "day-start-of-week": 1,
1067
- modelValue: n[t.key],
1068
- "onUpdate:modelValue": (a) => n[t.key] = a,
1069
- "disabled-date": r,
1067
+ modelValue: r[t.key],
1068
+ "onUpdate:modelValue": (a) => r[t.key] = a,
1069
+ "disabled-date": n,
1070
1070
  format: e == null ? void 0 : e.labelFormat,
1071
1071
  "value-format": e == null ? void 0 : e.valueFormat
1072
1072
  }, null);
1073
1073
  case "month":
1074
- return m(wt, {
1075
- modelValue: n[t.key],
1076
- "onUpdate:modelValue": (a) => n[t.key] = a,
1077
- "disabled-date": r,
1074
+ return f(xt, {
1075
+ modelValue: r[t.key],
1076
+ "onUpdate:modelValue": (a) => r[t.key] = a,
1077
+ "disabled-date": n,
1078
1078
  format: e == null ? void 0 : e.labelFormat,
1079
1079
  "value-format": e == null ? void 0 : e.valueFormat
1080
1080
  }, null);
1081
1081
  case "quarter":
1082
- return m(kt, {
1083
- modelValue: n[t.key],
1084
- "onUpdate:modelValue": (a) => n[t.key] = a,
1085
- "disabled-date": r,
1082
+ return f(wt, {
1083
+ modelValue: r[t.key],
1084
+ "onUpdate:modelValue": (a) => r[t.key] = a,
1085
+ "disabled-date": n,
1086
1086
  format: e == null ? void 0 : e.labelFormat,
1087
1087
  "value-format": e == null ? void 0 : e.valueFormat
1088
1088
  }, null);
1089
1089
  case "year":
1090
- return m(bt, {
1091
- modelValue: n[t.key],
1092
- "onUpdate:modelValue": (a) => n[t.key] = a,
1093
- "disabled-date": r,
1090
+ return f(kt, {
1091
+ modelValue: r[t.key],
1092
+ "onUpdate:modelValue": (a) => r[t.key] = a,
1093
+ "disabled-date": n,
1094
1094
  format: e == null ? void 0 : e.labelFormat,
1095
1095
  "value-format": e == null ? void 0 : e.valueFormat
1096
1096
  }, null);
1097
1097
  case "date":
1098
1098
  default:
1099
- return m(gt, ke({
1099
+ return f(bt, we({
1100
1100
  "disabled-input": !0,
1101
- modelValue: n[t.key],
1102
- "onUpdate:modelValue": (a) => n[t.key] = a,
1103
- "disabled-date": r,
1101
+ modelValue: r[t.key],
1102
+ "onUpdate:modelValue": (a) => r[t.key] = a,
1103
+ "disabled-date": n,
1104
1104
  format: e == null ? void 0 : e.labelFormat,
1105
1105
  "value-format": e == null ? void 0 : e.valueFormat,
1106
1106
  "show-time": e == null ? void 0 : e.showTime
@@ -1114,94 +1114,94 @@ function Gn(e) {
1114
1114
  return l();
1115
1115
  case "component":
1116
1116
  default:
1117
- return o();
1117
+ return u();
1118
1118
  }
1119
1119
  };
1120
1120
  }
1121
- function je(e) {
1122
- return typeof e == "function" ? e() : ze(e);
1121
+ function Pe(e) {
1122
+ return typeof e == "function" ? e() : Ae(e);
1123
1123
  }
1124
1124
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
1125
- const Le = () => {
1125
+ const je = () => {
1126
1126
  };
1127
- function Kn(e, r) {
1128
- function n(...t) {
1129
- return new Promise((l, o) => {
1130
- Promise.resolve(e(() => r.apply(this, t), { fn: r, thisArg: this, args: t })).then(l).catch(o);
1127
+ function Kr(e, n) {
1128
+ function r(...t) {
1129
+ return new Promise((l, u) => {
1130
+ Promise.resolve(e(() => n.apply(this, t), { fn: n, thisArg: this, args: t })).then(l).catch(u);
1131
1131
  });
1132
1132
  }
1133
- return n;
1133
+ return r;
1134
1134
  }
1135
- function Xn(e, r = {}) {
1136
- let n, t, l = Le;
1137
- const o = (s) => {
1138
- clearTimeout(s), l(), l = Le;
1135
+ function Xr(e, n = {}) {
1136
+ let r, t, l = je;
1137
+ const u = (i) => {
1138
+ clearTimeout(i), l(), l = je;
1139
1139
  };
1140
- return (s) => {
1141
- const h = je(e), c = je(r.maxWait);
1142
- return n && o(n), h <= 0 || c !== void 0 && c <= 0 ? (t && (o(t), t = null), Promise.resolve(s())) : new Promise((u, i) => {
1143
- l = r.rejectOnCancel ? i : u, c && !t && (t = setTimeout(() => {
1144
- n && o(n), t = null, u(s());
1145
- }, c)), n = setTimeout(() => {
1146
- t && o(t), t = null, u(s());
1147
- }, h);
1140
+ return (i) => {
1141
+ const v = Pe(e), c = Pe(n.maxWait);
1142
+ return r && u(r), v <= 0 || c !== void 0 && c <= 0 ? (t && (u(t), t = null), Promise.resolve(i())) : new Promise((o, s) => {
1143
+ l = n.rejectOnCancel ? s : o, c && !t && (t = setTimeout(() => {
1144
+ r && u(r), t = null, o(i());
1145
+ }, c)), r = setTimeout(() => {
1146
+ t && u(t), t = null, o(i());
1147
+ }, v);
1148
1148
  });
1149
1149
  };
1150
1150
  }
1151
- function Jn(e, r = 200, n = {}) {
1152
- return Kn(
1153
- Xn(r, n),
1151
+ function Jr(e, n = 200, r = {}) {
1152
+ return Kr(
1153
+ Xr(n, r),
1154
1154
  e
1155
1155
  );
1156
1156
  }
1157
- function ie(e, r, n) {
1158
- const t = ee(e, (...l) => (Ae(() => t()), r(...l)), n);
1157
+ function ie(e, n, r) {
1158
+ const t = ee(e, (...l) => (Ne(() => t()), n(...l)), r);
1159
1159
  return t;
1160
1160
  }
1161
- const Qn = Jn((e) => {
1161
+ const Qr = Jr((e) => {
1162
1162
  e && e.dispatchEvent(new Event("submit"));
1163
1163
  }, 1e3);
1164
- function Zn(e) {
1165
- let r;
1166
- return (n, t) => {
1164
+ function Zr(e) {
1165
+ let n;
1166
+ return (r, t) => {
1167
1167
  function l() {
1168
- return m("span", null, [n[t.key]]);
1168
+ return f("span", null, [r[t.key]]);
1169
1169
  }
1170
- function o() {
1170
+ function u() {
1171
1171
  if (!(e != null && e.autoSubmit))
1172
1172
  return;
1173
- let s = r;
1174
- for (; s && s.$el.tagName !== "FORM"; )
1175
- s = s.$parent;
1176
- if (s && s.$el) {
1177
- const h = s.$el;
1178
- Qn(h);
1173
+ let i = n;
1174
+ for (; i && i.$el.tagName !== "FORM"; )
1175
+ i = i.$parent;
1176
+ if (i && i.$el) {
1177
+ const v = i.$el;
1178
+ Qr(v);
1179
1179
  }
1180
1180
  }
1181
1181
  function a() {
1182
1182
  switch (e == null ? void 0 : e.type) {
1183
1183
  case "number":
1184
- return m(Be, {
1185
- ref: (s) => r = s,
1186
- modelValue: n[t.key],
1187
- "onUpdate:modelValue": (s) => n[t.key] = s,
1184
+ return f(Ue, {
1185
+ ref: (i) => n = i,
1186
+ modelValue: r[t.key],
1187
+ "onUpdate:modelValue": (i) => r[t.key] = i,
1188
1188
  hideButton: !0,
1189
1189
  "read-only": e == null ? void 0 : e.readonly,
1190
1190
  placeholder: e == null ? void 0 : e.placeholder,
1191
- onInput: o,
1192
- onClear: () => o(),
1191
+ onInput: u,
1192
+ onClear: () => u(),
1193
1193
  allowClear: e == null ? void 0 : e.clearable
1194
1194
  }, null);
1195
1195
  case "string":
1196
1196
  default:
1197
- return m(Ct, {
1198
- ref: (s) => r = s,
1199
- modelValue: n[t.key],
1200
- "onUpdate:modelValue": (s) => n[t.key] = s,
1197
+ return f(St, {
1198
+ ref: (i) => n = i,
1199
+ modelValue: r[t.key],
1200
+ "onUpdate:modelValue": (i) => r[t.key] = i,
1201
1201
  placeholder: e == null ? void 0 : e.placeholder,
1202
1202
  readonly: e == null ? void 0 : e.readonly,
1203
- onInput: o,
1204
- onClear: () => o(),
1203
+ onInput: u,
1204
+ onClear: () => u(),
1205
1205
  allowClear: e == null ? void 0 : e.clearable
1206
1206
  }, null);
1207
1207
  }
@@ -1215,27 +1215,27 @@ function Zn(e) {
1215
1215
  }
1216
1216
  };
1217
1217
  }
1218
- function er(e) {
1219
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !we(e);
1218
+ function en(e) {
1219
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !xe(e);
1220
1220
  }
1221
1221
  const K = /* @__PURE__ */ new WeakMap();
1222
- function tr() {
1223
- const e = S(/* @__PURE__ */ new Map());
1224
- return [e, (n) => e.value = n];
1222
+ function tn() {
1223
+ const e = O(/* @__PURE__ */ new Map());
1224
+ return [e, (r) => e.value = r];
1225
1225
  }
1226
- function nr(e) {
1227
- let r, n = !1;
1228
- const [t, l] = tr(), o = (c) => {
1229
- if (e.onChange && e.onChange(c), !e.autoSubmit || !r)
1226
+ function rn(e) {
1227
+ let n, r = !1;
1228
+ const [t, l] = tn(), u = (c) => {
1229
+ if (e.onChange && e.onChange(c), !e.autoSubmit || !n)
1230
1230
  return;
1231
- let u = r;
1232
- for (; u && u.$el.tagName !== "FORM"; )
1233
- u = u.$parent;
1234
- u && u.$el && u.$el.dispatchEvent(new Event("submit"));
1235
- }, a = (c, u) => {
1236
- const i = c();
1237
- i instanceof Promise ? i.then(u) : u(i);
1238
- }, s = async () => {
1231
+ let o = n;
1232
+ for (; o && o.$el.tagName !== "FORM"; )
1233
+ o = o.$parent;
1234
+ o && o.$el && o.$el.dispatchEvent(new Event("submit"));
1235
+ }, a = (c, o) => {
1236
+ const s = c();
1237
+ s instanceof Promise ? s.then(o) : o(s);
1238
+ }, i = async () => {
1239
1239
  const c = K.get(e.options);
1240
1240
  switch (typeof c) {
1241
1241
  case "function":
@@ -1245,18 +1245,18 @@ function nr(e) {
1245
1245
  l(c);
1246
1246
  return;
1247
1247
  }
1248
- K.set(e.options, l), a(e.options, (u) => {
1249
- const i = K.get(e.options);
1250
- K.set(e.options, u), i(u);
1248
+ K.set(e.options, l), a(e.options, (o) => {
1249
+ const s = K.get(e.options);
1250
+ K.set(e.options, o), s(o);
1251
1251
  });
1252
- }, h = () => {
1252
+ }, v = () => {
1253
1253
  a(e.options, (c) => {
1254
1254
  l(c);
1255
1255
  });
1256
1256
  };
1257
1257
  switch (!0) {
1258
1258
  case e.options instanceof Function: {
1259
- e.cache !== !1 ? s() : h();
1259
+ e.cache !== !1 ? i() : v();
1260
1260
  break;
1261
1261
  }
1262
1262
  case te(e.options): {
@@ -1270,155 +1270,245 @@ function nr(e) {
1270
1270
  default:
1271
1271
  t.value = e.options;
1272
1272
  }
1273
- return (c, u) => {
1274
- e.default && !n && (c[u.key] = e.default, n = !0);
1275
- function i() {
1276
- const d = c[u.key];
1277
- return e.multiple ? m("span", null, [d.map((v) => t.value.get(v)).join(" ,")]) : m("span", null, [t.value.get(d)]);
1273
+ return (c, o) => {
1274
+ e.default && !r && (c[o.key] = e.default, r = !0);
1275
+ function s() {
1276
+ const m = c[o.key];
1277
+ return e.multiple ? f("span", null, [m.map((h) => t.value.get(h)).join(" ,")]) : f("span", null, [t.value.get(m)]);
1278
1278
  }
1279
- function f() {
1280
- let d;
1281
- return m(St, {
1282
- ref: (v) => r = v,
1279
+ function d() {
1280
+ let m;
1281
+ return f(Ot, {
1282
+ ref: (h) => n = h,
1283
1283
  multiple: e.multiple,
1284
- modelValue: c[u.key],
1285
- "onUpdate:modelValue": (v) => c[u.key] = v,
1284
+ modelValue: c[o.key],
1285
+ "onUpdate:modelValue": (h) => c[o.key] = h,
1286
1286
  placeholder: e.placeholder,
1287
1287
  allowClear: e.clearable,
1288
1288
  allowSearch: e.searchable,
1289
1289
  "allow-create": e.createable,
1290
1290
  maxTagCount: e.maxTagCount ?? 2,
1291
- onChange: o
1292
- }, er(d = Array.from(t.value.entries()).map(([v, w], y) => m(_t, {
1291
+ onChange: u
1292
+ }, en(m = Array.from(t.value.entries()).map(([h, k], y) => f(_t, {
1293
1293
  key: y,
1294
- value: v,
1295
- label: w
1296
- }, null))) ? d : {
1297
- default: () => [d]
1294
+ value: h,
1295
+ label: k
1296
+ }, null))) ? m : {
1297
+ default: () => [m]
1298
1298
  });
1299
1299
  }
1300
- switch (u.mode) {
1300
+ switch (o.mode) {
1301
1301
  case "text":
1302
- return i();
1302
+ return s();
1303
1303
  case "component":
1304
1304
  default:
1305
- return f();
1305
+ return d();
1306
1306
  }
1307
1307
  };
1308
1308
  }
1309
- function rr(e) {
1310
- let r;
1311
- function n() {
1312
- if (!(e != null && e.autoSubmit) || !r)
1309
+ function nn(e) {
1310
+ let n;
1311
+ function r() {
1312
+ if (!(e != null && e.autoSubmit) || !n)
1313
1313
  return;
1314
- let t = r;
1314
+ let t = n;
1315
1315
  for (; t && t.$el.tagName !== "FORM"; )
1316
1316
  t = t.$parent;
1317
1317
  t && t.$el && t.$el.dispatchEvent(new Event("submit"));
1318
1318
  }
1319
1319
  return (t, l) => {
1320
1320
  e != null && e.default && (t[l.key] = e.default);
1321
- function o() {
1322
- const s = t[l.key];
1323
- return m("span", null, [s ? (e == null ? void 0 : e.openLabel) ?? "是" : (e == null ? void 0 : e.closeLabel) ?? "否"]);
1321
+ function u() {
1322
+ const i = t[l.key];
1323
+ return f("span", null, [i ? (e == null ? void 0 : e.openLabel) ?? "是" : (e == null ? void 0 : e.closeLabel) ?? "否"]);
1324
1324
  }
1325
1325
  function a() {
1326
- return m($t, {
1327
- ref: (s) => r = s,
1326
+ return f($t, {
1327
+ ref: (i) => n = i,
1328
1328
  modelValue: t[l.key],
1329
- "onUpdate:modelValue": (s) => t[l.key] = s,
1329
+ "onUpdate:modelValue": (i) => t[l.key] = i,
1330
1330
  checkedText: (e == null ? void 0 : e.openLabel) ?? "是",
1331
1331
  uncheckedText: (e == null ? void 0 : e.closeLabel) ?? "否",
1332
1332
  checkedValue: (e == null ? void 0 : e.openValue) ?? !0,
1333
1333
  uncheckedValue: (e == null ? void 0 : e.closeValue) ?? !1,
1334
- onChange: n
1334
+ onChange: r
1335
1335
  }, null);
1336
1336
  }
1337
1337
  switch (l.mode) {
1338
1338
  case "text":
1339
- return o();
1339
+ return u();
1340
1340
  case "component":
1341
1341
  default:
1342
1342
  return a();
1343
1343
  }
1344
1344
  };
1345
1345
  }
1346
- function lr(e) {
1347
- return (r, n) => {
1348
- let t = [];
1349
- function l(c) {
1350
- t = c;
1351
- }
1352
- function o(c) {
1353
- if (c && c.length === 2) {
1354
- const [u, i] = c.sort(), f = _(u).startOf("days"), d = _(i).endOf("days");
1355
- r[n.key] = [f.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD"), d.format((e == null ? void 0 : e.valueFormat) || "YYYY-MM-DD")];
1346
+ var Xe = { exports: {} };
1347
+ (function(e, n) {
1348
+ (function(r, t) {
1349
+ e.exports = t();
1350
+ })(se, function() {
1351
+ return function(r, t, l) {
1352
+ l.updateLocale = function(u, a) {
1353
+ var i = l.Ls[u];
1354
+ if (i)
1355
+ return (a ? Object.keys(a) : []).forEach(function(v) {
1356
+ i[v] = a[v];
1357
+ }), i;
1358
+ };
1359
+ };
1360
+ });
1361
+ })(Xe);
1362
+ var ln = Xe.exports;
1363
+ const an = /* @__PURE__ */ $e(ln);
1364
+ function un(e) {
1365
+ b.extend(an);
1366
+ const n = "YYYY-MM-DD HH:mm:ss", r = [{
1367
+ label: "默认",
1368
+ value: () => {
1369
+ const t = b().startOf("month").toDate(), l = b().endOf("date").toDate();
1370
+ return [t, l];
1371
+ }
1372
+ }, {
1373
+ label: "今天",
1374
+ value: () => {
1375
+ const t = b().startOf("date").toDate(), l = b().endOf("date").toDate();
1376
+ return [t, l];
1377
+ }
1378
+ }, {
1379
+ label: "昨天",
1380
+ value: () => {
1381
+ const t = b().subtract(1, "day").startOf("date").toDate(), l = b().subtract(1, "day").endOf("date").toDate();
1382
+ return console.log([t, l]), [t, l];
1383
+ }
1384
+ }, {
1385
+ label: "本周",
1386
+ value: () => {
1387
+ b.updateLocale("zh-cn", {
1388
+ weekStart: 1
1389
+ });
1390
+ const t = b().startOf("week").toDate(), l = b().endOf("week").toDate();
1391
+ return [t, l];
1392
+ }
1393
+ }, {
1394
+ label: "上周",
1395
+ value: () => {
1396
+ b.updateLocale("zh-cn", {
1397
+ weekStart: 1
1398
+ });
1399
+ const t = b().subtract(1, "week").startOf("week").toDate(), l = b().subtract(1, "week").endOf("week").toDate();
1400
+ return [t, l];
1401
+ }
1402
+ }, {
1403
+ label: "本月",
1404
+ value: () => {
1405
+ const t = b().startOf("month").toDate(), l = b().endOf("month").toDate();
1406
+ return [t, l];
1407
+ }
1408
+ }, {
1409
+ label: "上月",
1410
+ value: () => {
1411
+ const t = b().subtract(1, "month").startOf("month").toDate(), l = b().subtract(1, "month").endOf("month").toDate();
1412
+ return [t, l];
1413
+ }
1414
+ }, {
1415
+ label: "本年",
1416
+ value: () => {
1417
+ const t = b().startOf("year").toDate(), l = b().endOf("year").toDate();
1418
+ return [t, l];
1419
+ }
1420
+ }, {
1421
+ label: "去年",
1422
+ value: () => {
1423
+ const t = b().subtract(1, "year").startOf("year").toDate(), l = b().subtract(1, "year").endOf("year").toDate();
1424
+ return [t, l];
1425
+ }
1426
+ }];
1427
+ return (t, l) => {
1428
+ let u = [];
1429
+ function a(d) {
1430
+ u = d;
1431
+ }
1432
+ function i(d) {
1433
+ if (d && d.length === 2) {
1434
+ const [m, h] = d.sort(), k = b(m).startOf("days"), y = b(h).endOf("days");
1435
+ t[l.key] = [k.format((e == null ? void 0 : e.valueFormat) || n), y.format((e == null ? void 0 : e.valueFormat) || n)];
1356
1436
  }
1357
1437
  }
1358
- function a(c) {
1359
- return e != null && e.disabledDate ? e.disabledDate(t.filter(Boolean), c) : !1;
1438
+ function v(d) {
1439
+ return e != null && e.disabledDate ? e.disabledDate(u.filter(Boolean), d) : !1;
1360
1440
  }
1361
- function s() {
1362
- const c = r[n.key], [u, i] = c, f = (d) => {
1441
+ function c() {
1442
+ const d = t[l.key], [m, h] = d, k = (y) => {
1363
1443
  switch (e == null ? void 0 : e.type) {
1364
1444
  case "week":
1365
- return m("span", null, [`${_(d).format("YYYY年")}${_(d).week()}周`]);
1445
+ return f("span", null, [`${b(y).format("YYYY年")}${b(y).week()}周`]);
1366
1446
  case "month":
1367
- return m("span", null, [_(d).format("YYYY年MM月")]);
1447
+ return f("span", null, [b(y).format("YYYY年MM月")]);
1368
1448
  case "quarter":
1369
- return m("span", null, [`${_(d).format("YYYY年")}${_(d).quarter()}季度`]);
1449
+ return f("span", null, [`${b(y).format("YYYY年")}${b(y).quarter()}季度`]);
1370
1450
  case "year":
1371
- return m("span", null, [_(d).format("YYYY年")]);
1451
+ return f("span", null, [b(y).format("YYYY年")]);
1372
1452
  case "date":
1373
1453
  default:
1374
- return m("span", null, [_(d).format("YYYY年MM月DD日")]);
1454
+ return f("span", null, [b(y).format("YYYY年MM月DD日")]);
1375
1455
  }
1376
1456
  };
1377
- return m("span", null, [f(u), D(" - "), f(i)]);
1457
+ return f("span", null, [k(m), j(" - "), k(h)]);
1458
+ }
1459
+ function o() {
1460
+ switch (!0) {
1461
+ case !!(e != null && e.shortcuts):
1462
+ return e == null ? void 0 : e.shortcuts;
1463
+ case (e == null ? void 0 : e.type) === "date":
1464
+ case (e == null ? void 0 : e.type) === void 0:
1465
+ return r;
1466
+ }
1378
1467
  }
1379
- function h() {
1380
- return m("div", null, [m(Ot, {
1468
+ console.log(o());
1469
+ function s() {
1470
+ return f("div", null, [f(Ft, {
1381
1471
  "disabled-input": !0,
1382
1472
  style: {
1383
1473
  width: "300px"
1384
1474
  },
1385
- modelValue: r[n.key],
1386
- "onUpdate:modelValue": (c) => r[n.key] = c,
1387
- onSelect: l,
1388
- onChange: o,
1475
+ modelValue: t[l.key],
1476
+ "onUpdate:modelValue": (d) => t[l.key] = d,
1477
+ onSelect: a,
1478
+ onChange: i,
1389
1479
  mode: e == null ? void 0 : e.type,
1390
1480
  placeholder: e == null ? void 0 : e.placeholder,
1391
- shortcuts: e == null ? void 0 : e.shortcuts,
1481
+ shortcuts: o(),
1392
1482
  allowClear: e == null ? void 0 : e.clearable,
1393
- "disabled-date": a,
1483
+ "disabled-date": v,
1394
1484
  format: e == null ? void 0 : e.labelFormat,
1395
- "value-format": e == null ? void 0 : e.valueFormat
1485
+ "value-format": (e == null ? void 0 : e.valueFormat) ?? n
1396
1486
  }, null)]);
1397
1487
  }
1398
- switch (n.mode) {
1488
+ switch (l.mode) {
1399
1489
  case "text":
1400
- return s();
1490
+ return c();
1401
1491
  case "component":
1402
1492
  default:
1403
- return h();
1493
+ return s();
1404
1494
  }
1405
1495
  };
1406
1496
  }
1407
- function ar(e) {
1408
- return (r, n) => {
1497
+ function on(e) {
1498
+ return (n, r) => {
1409
1499
  function t() {
1410
- return m("span", null, [r[n.key]]);
1500
+ return f("span", null, [n[r.key]]);
1411
1501
  }
1412
1502
  function l() {
1413
- return m(Ft, {
1414
- modelValue: r[n.key],
1415
- "onUpdate:modelValue": (o) => r[n.key] = o,
1503
+ return f(Yt, {
1504
+ modelValue: n[r.key],
1505
+ "onUpdate:modelValue": (u) => n[r.key] = u,
1416
1506
  placeholder: e == null ? void 0 : e.placeholder,
1417
1507
  autoSize: e == null ? void 0 : e.autosize,
1418
1508
  maxLength: e == null ? void 0 : e.maxLength
1419
1509
  }, null);
1420
1510
  }
1421
- switch (n.mode) {
1511
+ switch (r.mode) {
1422
1512
  case "text":
1423
1513
  return t();
1424
1514
  case "component":
@@ -1427,68 +1517,68 @@ function ar(e) {
1427
1517
  }
1428
1518
  };
1429
1519
  }
1430
- function Xe(e) {
1431
- let r = !1;
1432
- const n = [], t = (l) => {
1433
- var o;
1434
- if (!r) {
1435
- if (n.push(l), l[e.valueProp] === e.key) {
1436
- r = !0;
1520
+ function Je(e) {
1521
+ let n = !1;
1522
+ const r = [], t = (l) => {
1523
+ var u;
1524
+ if (!n) {
1525
+ if (r.push(l), l[e.valueProp] === e.key) {
1526
+ n = !0;
1437
1527
  return;
1438
1528
  }
1439
- (o = l.children) != null && o.length && l.children.forEach(t), r || n.pop();
1529
+ (u = l.children) != null && u.length && l.children.forEach(t), n || r.pop();
1440
1530
  }
1441
1531
  };
1442
- return e.data.forEach(t), n;
1532
+ return e.data.forEach(t), r;
1443
1533
  }
1444
- function ur(e) {
1445
- let r = e.data;
1446
- const n = [];
1534
+ function cn(e) {
1535
+ let n = e.data;
1536
+ const r = [];
1447
1537
  return e.path.forEach((t) => {
1448
- var o;
1449
- const l = r.find((a) => a[e.valueProp] === t);
1450
- l && n.push(l), l && ((o = l.children) != null && o.length) && (r = l.children);
1451
- }), n;
1538
+ var u;
1539
+ const l = n.find((a) => a[e.valueProp] === t);
1540
+ l && r.push(l), l && ((u = l.children) != null && u.length) && (n = l.children);
1541
+ }), r;
1452
1542
  }
1453
1543
  const X = /* @__PURE__ */ new WeakMap();
1454
- function or() {
1455
- const e = S([]);
1456
- return [e, (n) => e.value = n];
1544
+ function sn() {
1545
+ const e = O([]);
1546
+ return [e, (r) => e.value = r];
1457
1547
  }
1458
- function cr(e) {
1459
- let r, n = !1;
1460
- const [t, l] = or(), o = () => {
1461
- if (!e.autoSubmit || !r)
1548
+ function dn(e) {
1549
+ let n, r = !1;
1550
+ const [t, l] = sn(), u = () => {
1551
+ if (!e.autoSubmit || !n)
1462
1552
  return;
1463
- let u = r;
1464
- for (; u && u.$el.tagName !== "FORM"; )
1465
- u = u.$parent;
1466
- u && u.$el && u.$el.dispatchEvent(new Event("submit"));
1467
- }, a = (u, i) => {
1468
- const f = u();
1469
- f instanceof Promise ? f.then(i) : i(f);
1470
- }, s = async () => {
1471
- const u = X.get(e.options);
1472
- switch (typeof u) {
1553
+ let o = n;
1554
+ for (; o && o.$el.tagName !== "FORM"; )
1555
+ o = o.$parent;
1556
+ o && o.$el && o.$el.dispatchEvent(new Event("submit"));
1557
+ }, a = (o, s) => {
1558
+ const d = o();
1559
+ d instanceof Promise ? d.then(s) : s(d);
1560
+ }, i = async () => {
1561
+ const o = X.get(e.options);
1562
+ switch (typeof o) {
1473
1563
  case "function":
1474
1564
  X.set(e.options, l);
1475
1565
  return;
1476
1566
  case "object":
1477
- l(u);
1567
+ l(o);
1478
1568
  return;
1479
1569
  }
1480
- X.set(e.options, l), a(e.options, (i) => {
1481
- const f = X.get(e.options);
1482
- X.set(e.options, i), f(i);
1570
+ X.set(e.options, l), a(e.options, (s) => {
1571
+ const d = X.get(e.options);
1572
+ X.set(e.options, s), d(s);
1483
1573
  });
1484
- }, h = () => {
1485
- a(e.options, (u) => {
1486
- l(u);
1574
+ }, v = () => {
1575
+ a(e.options, (o) => {
1576
+ l(o);
1487
1577
  });
1488
1578
  };
1489
1579
  switch (!0) {
1490
1580
  case e.options instanceof Function: {
1491
- e.cache !== !1 ? s() : h();
1581
+ e.cache !== !1 ? i() : v();
1492
1582
  break;
1493
1583
  }
1494
1584
  case te(e.options): {
@@ -1502,42 +1592,42 @@ function cr(e) {
1502
1592
  default:
1503
1593
  t.value = e.options;
1504
1594
  }
1505
- function c(u, i) {
1506
- var v;
1507
- const f = ((v = e.fieldNames) == null ? void 0 : v.title) || "title", d = i[f];
1508
- return d ? d.toLowerCase().includes(u.toLowerCase()) : !1;
1595
+ function c(o, s) {
1596
+ var h;
1597
+ const d = ((h = e.fieldNames) == null ? void 0 : h.title) || "title", m = s[d];
1598
+ return m ? m.toLowerCase().includes(o.toLowerCase()) : !1;
1509
1599
  }
1510
- return (u, i) => {
1511
- e.default && !n && (u[i.key] = e.default, n = !0);
1512
- function f() {
1513
- const v = u[i.key], w = (y) => {
1514
- const [C] = Xe({
1600
+ return (o, s) => {
1601
+ e.default && !r && (o[s.key] = e.default, r = !0);
1602
+ function d() {
1603
+ const h = o[s.key], k = (y) => {
1604
+ const [S] = Je({
1515
1605
  data: t.value,
1516
1606
  labelProp: "title",
1517
1607
  valueProp: "key",
1518
1608
  key: y
1519
1609
  }).reverse() || [];
1520
- return C == null ? void 0 : C.title;
1610
+ return S == null ? void 0 : S.title;
1521
1611
  };
1522
1612
  if (e.multiple) {
1523
- const y = v.map((C) => w(C));
1524
- return m("span", null, [y.join(", ")]);
1613
+ const y = h.map((S) => k(S));
1614
+ return f("span", null, [y.join(", ")]);
1525
1615
  } else {
1526
- const y = w(v);
1527
- return m("span", null, [y]);
1616
+ const y = k(h);
1617
+ return f("span", null, [y]);
1528
1618
  }
1529
1619
  }
1530
- function d() {
1531
- return m(Yt, {
1532
- ref: (v) => r = v,
1620
+ function m() {
1621
+ return f(Dt, {
1622
+ ref: (h) => n = h,
1533
1623
  multiple: e.multiple,
1534
- modelValue: u[i.key],
1535
- "onUpdate:modelValue": (v) => u[i.key] = v,
1624
+ modelValue: o[s.key],
1625
+ "onUpdate:modelValue": (h) => o[s.key] = h,
1536
1626
  placeholder: e.placeholder,
1537
1627
  allowClear: e.clearable,
1538
1628
  allowSearch: e.searchable,
1539
1629
  maxTagCount: e.maxTagCount ?? 2,
1540
- onChange: o,
1630
+ onChange: u,
1541
1631
  filterTreeNode: c,
1542
1632
  data: t.value,
1543
1633
  fieldNames: e.fieldNames,
@@ -1548,33 +1638,33 @@ function cr(e) {
1548
1638
  ...e.slots
1549
1639
  });
1550
1640
  }
1551
- switch (i.mode) {
1641
+ switch (s.mode) {
1552
1642
  case "text":
1553
- return f();
1643
+ return d();
1554
1644
  case "component":
1555
1645
  default:
1556
- return d();
1646
+ return m();
1557
1647
  }
1558
1648
  };
1559
1649
  }
1560
1650
  const J = /* @__PURE__ */ new WeakMap();
1561
- function ir() {
1562
- const e = S([]);
1563
- return [e, (n) => e.value = n];
1651
+ function fn() {
1652
+ const e = O([]);
1653
+ return [e, (r) => e.value = r];
1564
1654
  }
1565
- function sr(e) {
1566
- let r, n = !1;
1567
- const [t, l] = ir(), o = () => {
1568
- if (!e.autoSubmit || !r)
1655
+ function mn(e) {
1656
+ let n, r = !1;
1657
+ const [t, l] = fn(), u = () => {
1658
+ if (!e.autoSubmit || !n)
1569
1659
  return;
1570
- let c = r;
1660
+ let c = n;
1571
1661
  for (; c && c.$el.tagName !== "FORM"; )
1572
1662
  c = c.$parent;
1573
1663
  c && c.$el && c.$el.dispatchEvent(new Event("submit"));
1574
- }, a = (c, u) => {
1575
- const i = c();
1576
- i instanceof Promise ? i.then(u) : u(i);
1577
- }, s = async () => {
1664
+ }, a = (c, o) => {
1665
+ const s = c();
1666
+ s instanceof Promise ? s.then(o) : o(s);
1667
+ }, i = async () => {
1578
1668
  const c = J.get(e.options);
1579
1669
  switch (typeof c) {
1580
1670
  case "function":
@@ -1584,18 +1674,18 @@ function sr(e) {
1584
1674
  l(c);
1585
1675
  return;
1586
1676
  }
1587
- J.set(e.options, l), a(e.options, (u) => {
1588
- const i = J.get(e.options);
1589
- J.set(e.options, u), i(u);
1677
+ J.set(e.options, l), a(e.options, (o) => {
1678
+ const s = J.get(e.options);
1679
+ J.set(e.options, o), s(o);
1590
1680
  });
1591
- }, h = () => {
1681
+ }, v = () => {
1592
1682
  a(e.options, (c) => {
1593
1683
  l(c);
1594
1684
  });
1595
1685
  };
1596
1686
  switch (!0) {
1597
1687
  case e.options instanceof Function: {
1598
- e.cache !== !1 ? s() : h();
1688
+ e.cache !== !1 ? i() : v();
1599
1689
  break;
1600
1690
  }
1601
1691
  case te(e.options): {
@@ -1609,120 +1699,120 @@ function sr(e) {
1609
1699
  default:
1610
1700
  t.value = e.options;
1611
1701
  }
1612
- return (c, u) => {
1613
- e.default && !n && (c[u.key] = e.default, n = !0);
1614
- function i() {
1615
- const d = c[u.key], v = (y) => Xe({
1702
+ return (c, o) => {
1703
+ e.default && !r && (c[o.key] = e.default, r = !0);
1704
+ function s() {
1705
+ const m = c[o.key], h = (y) => Je({
1616
1706
  data: t.value,
1617
1707
  labelProp: "label",
1618
1708
  valueProp: "value",
1619
1709
  key: y
1620
- }).map((j) => j.label).join("/"), w = (y) => ur({
1710
+ }).map((L) => L.label).join("/"), k = (y) => cn({
1621
1711
  data: t.value,
1622
1712
  labelProp: "label",
1623
1713
  valueProp: "value",
1624
1714
  path: y
1625
- }).map((j) => j.label).join("/");
1715
+ }).map((L) => L.label).join("/");
1626
1716
  switch (!0) {
1627
1717
  case (!e.pathMode && !e.multiple): {
1628
- const y = v(d);
1629
- return m("span", null, [y]);
1718
+ const y = h(m);
1719
+ return f("span", null, [y]);
1630
1720
  }
1631
1721
  case (!e.pathMode && e.multiple): {
1632
- const y = d.map((C) => v(C));
1633
- return m("span", null, [y.join(", ")]);
1722
+ const y = m.map((S) => h(S));
1723
+ return f("span", null, [y.join(", ")]);
1634
1724
  }
1635
1725
  case (e.pathMode && !e.multiple): {
1636
- const y = w(d);
1637
- return m("span", null, [y]);
1726
+ const y = k(m);
1727
+ return f("span", null, [y]);
1638
1728
  }
1639
1729
  case (e.pathMode && e.multiple): {
1640
- const y = d.map((C) => w(C));
1641
- return m("span", null, [y.join(", ")]);
1730
+ const y = m.map((S) => k(S));
1731
+ return f("span", null, [y.join(", ")]);
1642
1732
  }
1643
1733
  default:
1644
- return m("span", null, null);
1734
+ return f("span", null, null);
1645
1735
  }
1646
1736
  }
1647
- function f() {
1648
- return m(Mt, {
1737
+ function d() {
1738
+ return f(Mt, {
1649
1739
  pathMode: e.pathMode,
1650
- ref: (d) => r = d,
1740
+ ref: (m) => n = m,
1651
1741
  multiple: e.multiple,
1652
- modelValue: c[u.key],
1653
- "onUpdate:modelValue": (d) => c[u.key] = d,
1742
+ modelValue: c[o.key],
1743
+ "onUpdate:modelValue": (m) => c[o.key] = m,
1654
1744
  placeholder: e.placeholder,
1655
1745
  allowClear: e.clearable,
1656
1746
  allowSearch: e.searchable,
1657
1747
  maxTagCount: e.maxTagCount ?? 2,
1658
- onChange: o,
1748
+ onChange: u,
1659
1749
  checkStrictly: e.checkStrictly,
1660
1750
  triggerProps: e.triggerProps,
1661
1751
  options: t.value
1662
1752
  }, null);
1663
1753
  }
1664
- switch (u.mode) {
1754
+ switch (o.mode) {
1665
1755
  case "text":
1666
- return i();
1756
+ return s();
1667
1757
  case "component":
1668
1758
  default:
1669
- return f();
1759
+ return d();
1670
1760
  }
1671
1761
  };
1672
1762
  }
1673
- function dr(e) {
1674
- return (r, n) => e(r, n);
1763
+ function hn(e) {
1764
+ return (n, r) => e(n, r);
1675
1765
  }
1676
- const fr = {
1766
+ const vn = {
1677
1767
  thousands: !0,
1678
1768
  inputUnit: "元",
1679
1769
  outputUnit: "元"
1680
- }, re = {
1770
+ }, ne = {
1681
1771
  分: 10 ** 0,
1682
1772
  元: 10 ** 2,
1683
1773
  万: 10 ** 4
1684
1774
  };
1685
- function mr(e) {
1775
+ function yn(e) {
1686
1776
  e = {
1687
- ...fr,
1777
+ ...vn,
1688
1778
  ...e || {}
1689
1779
  };
1690
- const r = (a) => {
1780
+ const n = (a) => {
1691
1781
  if (a == null)
1692
1782
  return;
1693
1783
  if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
1694
1784
  return a;
1695
- const s = re[e.outputUnit] / re[e.inputUnit];
1696
- return parseFloat((a * s).toFixed(10));
1697
- }, n = (a) => {
1785
+ const i = ne[e.outputUnit] / ne[e.inputUnit];
1786
+ return parseFloat((a * i).toFixed(10));
1787
+ }, r = (a) => {
1698
1788
  if (a == null)
1699
1789
  return;
1700
1790
  if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
1701
1791
  return a;
1702
- const s = re[e.inputUnit] / re[e.outputUnit];
1703
- return parseFloat((a * s).toFixed(10));
1792
+ const i = ne[e.inputUnit] / ne[e.outputUnit];
1793
+ return parseFloat((a * i).toFixed(10));
1704
1794
  }, t = (a) => {
1705
- const s = a.split(".");
1706
- return s[0] = s[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), s.join(".");
1795
+ const i = a.split(".");
1796
+ return i[0] = i[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), i.join(".");
1707
1797
  }, l = (a) => {
1708
- const s = a;
1709
- return e != null && e.thousands ? t(s) : s;
1710
- }, o = (a) => a.replace(/,/g, "");
1711
- return (a, s) => {
1712
- const h = S(r(a[s.key]));
1713
- ee(h, (d) => {
1714
- a[s.key] = n(d);
1798
+ const i = a;
1799
+ return e != null && e.thousands ? t(i) : i;
1800
+ }, u = (a) => a.replace(/,/g, "");
1801
+ return (a, i) => {
1802
+ const v = O(n(a[i.key]));
1803
+ ee(v, (m) => {
1804
+ a[i.key] = r(m);
1715
1805
  });
1716
- const c = (e == null ? void 0 : e.prefix) && (() => typeof (e == null ? void 0 : e.prefix) == "string" ? m("span", null, [e.prefix]) : e.prefix()), u = () => typeof (e == null ? void 0 : e.suffix) == "string" ? m("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? e.suffix() : e == null ? void 0 : e.inputUnit;
1717
- function i() {
1718
- return m("span", null, [l(h.value.toString()), u()]);
1806
+ const c = (e == null ? void 0 : e.prefix) && (() => typeof (e == null ? void 0 : e.prefix) == "string" ? f("span", null, [e.prefix]) : e.prefix()), o = () => typeof (e == null ? void 0 : e.suffix) == "string" ? f("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? e.suffix() : e == null ? void 0 : e.inputUnit;
1807
+ function s() {
1808
+ return f("span", null, [l(v.value.toString()), o()]);
1719
1809
  }
1720
- function f() {
1721
- return m(Be, {
1722
- modelValue: h.value,
1723
- "onUpdate:modelValue": (d) => h.value = d,
1810
+ function d() {
1811
+ return f(Ue, {
1812
+ modelValue: v.value,
1813
+ "onUpdate:modelValue": (m) => v.value = m,
1724
1814
  formatter: l,
1725
- parser: o,
1815
+ parser: u,
1726
1816
  precision: e == null ? void 0 : e.precision,
1727
1817
  hideButton: !0,
1728
1818
  "read-only": e == null ? void 0 : e.readonly,
@@ -1730,36 +1820,36 @@ function mr(e) {
1730
1820
  allowClear: e == null ? void 0 : e.clearable
1731
1821
  }, {
1732
1822
  prefix: c,
1733
- suffix: u
1823
+ suffix: o
1734
1824
  });
1735
1825
  }
1736
- switch (s.mode) {
1826
+ switch (i.mode) {
1737
1827
  case "text":
1738
- return i();
1828
+ return s();
1739
1829
  case "component":
1740
1830
  default:
1741
- return f();
1831
+ return d();
1742
1832
  }
1743
1833
  };
1744
1834
  }
1745
1835
  const Q = /* @__PURE__ */ new WeakMap();
1746
- function hr() {
1747
- const e = S(/* @__PURE__ */ new Map());
1748
- return [e, (n) => e.value = n];
1836
+ function pn() {
1837
+ const e = O(/* @__PURE__ */ new Map());
1838
+ return [e, (r) => e.value = r];
1749
1839
  }
1750
- function vr(e) {
1751
- let r, n = !1;
1752
- const [t, l] = hr(), o = (c) => {
1753
- if (e.onChange && e.onChange(c), !e.autoSubmit || !r)
1840
+ function gn(e) {
1841
+ let n, r = !1;
1842
+ const [t, l] = pn(), u = (c) => {
1843
+ if (e.onChange && e.onChange(c), !e.autoSubmit || !n)
1754
1844
  return;
1755
- let u = r;
1756
- for (; u && u.$el.tagName !== "FORM"; )
1757
- u = u.$parent;
1758
- u && u.$el && u.$el.dispatchEvent(new Event("submit"));
1759
- }, a = (c, u) => {
1760
- const i = c();
1761
- i instanceof Promise ? i.then(u) : u(i);
1762
- }, s = async () => {
1845
+ let o = n;
1846
+ for (; o && o.$el.tagName !== "FORM"; )
1847
+ o = o.$parent;
1848
+ o && o.$el && o.$el.dispatchEvent(new Event("submit"));
1849
+ }, a = (c, o) => {
1850
+ const s = c();
1851
+ s instanceof Promise ? s.then(o) : o(s);
1852
+ }, i = async () => {
1763
1853
  const c = Q.get(e.options);
1764
1854
  switch (typeof c) {
1765
1855
  case "function":
@@ -1769,18 +1859,18 @@ function vr(e) {
1769
1859
  l(c);
1770
1860
  return;
1771
1861
  }
1772
- Q.set(e.options, l), a(e.options, (u) => {
1773
- const i = Q.get(e.options);
1774
- Q.set(e.options, u), i(u);
1862
+ Q.set(e.options, l), a(e.options, (o) => {
1863
+ const s = Q.get(e.options);
1864
+ Q.set(e.options, o), s(o);
1775
1865
  });
1776
- }, h = () => {
1866
+ }, v = () => {
1777
1867
  a(e.options, (c) => {
1778
1868
  l(c);
1779
1869
  });
1780
1870
  };
1781
1871
  switch (!0) {
1782
1872
  case e.options instanceof Function: {
1783
- e.cache !== !1 ? s() : h();
1873
+ e.cache !== !1 ? i() : v();
1784
1874
  break;
1785
1875
  }
1786
1876
  case te(e.options): {
@@ -1794,78 +1884,80 @@ function vr(e) {
1794
1884
  default:
1795
1885
  t.value = e.options;
1796
1886
  }
1797
- return (c, u) => {
1798
- e.default && !n && (c[u.key] = e.default, n = !0);
1799
- function i() {
1800
- const d = c[u.key];
1801
- return m("span", null, [t.value.get(d)]);
1887
+ return (c, o) => {
1888
+ e.default && !r && (c[o.key] = e.default, r = !0);
1889
+ function s() {
1890
+ var h;
1891
+ const m = c[o.key];
1892
+ return f("span", null, [(h = t.value) == null ? void 0 : h.get(m)]);
1802
1893
  }
1803
- function f() {
1804
- return m(Tt, {
1894
+ function d() {
1895
+ return f(Tt, {
1805
1896
  type: e.type || "radio",
1806
1897
  size: e.size,
1807
- ref: (d) => r = d,
1808
- modelValue: c[u.key],
1809
- "onUpdate:modelValue": (d) => c[u.key] = d,
1810
- onChange: o,
1811
- options: Array.from(t.value.entries()).map(([d, v]) => ({
1812
- label: v,
1813
- value: d
1898
+ ref: (m) => n = m,
1899
+ modelValue: c[o.key],
1900
+ "onUpdate:modelValue": (m) => c[o.key] = m,
1901
+ onChange: u,
1902
+ options: Array.from(t.value.entries()).map(([m, h]) => ({
1903
+ label: h,
1904
+ value: m
1814
1905
  }))
1815
1906
  }, null);
1816
1907
  }
1817
- switch (u.mode) {
1908
+ switch (o.mode) {
1818
1909
  case "text":
1819
- return i();
1910
+ return s();
1820
1911
  case "component":
1821
1912
  default:
1822
- return f();
1913
+ return d();
1823
1914
  }
1824
1915
  };
1825
1916
  }
1826
- function pr() {
1917
+ function bn() {
1827
1918
  return {
1828
- input: Zn,
1829
- textarea: ar,
1830
- select: nr,
1831
- treeSelect: cr,
1832
- date: Gn,
1833
- switch: rr,
1834
- dateRange: lr,
1835
- render: dr,
1836
- cascader: sr,
1837
- currency: mr,
1838
- radio: vr
1919
+ input: Zr,
1920
+ textarea: on,
1921
+ select: rn,
1922
+ treeSelect: dn,
1923
+ date: Gr,
1924
+ switch: nn,
1925
+ dateRange: un,
1926
+ render: hn,
1927
+ cascader: mn,
1928
+ currency: yn,
1929
+ radio: gn
1839
1930
  };
1840
1931
  }
1841
- function De(e, r) {
1842
- r.render || (r.render = (t) => t.input());
1843
- const n = r.render({
1844
- ...pr()
1932
+ function Re(e, n) {
1933
+ n.render || (n.render = (t) => t.input());
1934
+ const r = n.render({
1935
+ ...bn()
1845
1936
  });
1846
1937
  return {
1847
- default: () => n(e, r)
1938
+ default: () => r(e, n)
1848
1939
  };
1849
1940
  }
1850
- function Ie(e, r) {
1851
- switch (r.mode) {
1941
+ function Ie(e, n) {
1942
+ switch (n.mode) {
1852
1943
  case "text":
1853
- return Ye(De(e, r).default);
1944
+ return De(Re(e, n).default);
1854
1945
  case "component":
1855
1946
  default:
1856
- return Ye(ye, {
1857
- field: r.key,
1858
- label: r.title,
1859
- hideLabel: r.hideLabel,
1860
- labelColStyle: r.labelStyle,
1861
- wrapperColStyle: r.contentStyle
1862
- }, De(e, r));
1947
+ return De(ge, {
1948
+ key: n.key,
1949
+ field: n.key,
1950
+ label: n.title,
1951
+ hideLabel: n.hideLabel,
1952
+ labelColStyle: n.labelStyle,
1953
+ wrapperColStyle: n.contentStyle
1954
+ }, Re(e, n));
1863
1955
  }
1864
1956
  }
1865
- function yr(e) {
1866
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !we(e);
1957
+ function kn(e) {
1958
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !xe(e);
1867
1959
  }
1868
- const gr = /* @__PURE__ */ R({
1960
+ const wn = /* @__PURE__ */ I({
1869
1961
  props: {
1870
1962
  form: {
1871
1963
  type: Object,
@@ -1873,101 +1965,107 @@ const gr = /* @__PURE__ */ R({
1873
1965
  },
1874
1966
  value: {
1875
1967
  type: Object
1968
+ },
1969
+ columns: {
1970
+ type: Number,
1971
+ default: 2
1876
1972
  }
1877
1973
  },
1878
1974
  setup(e) {
1879
- const r = We(), n = e.form.map((h) => ({
1880
- ...h,
1975
+ const n = He(), r = e.form.map((v) => ({
1976
+ ...v,
1881
1977
  collapsed: !1
1882
- })), t = Array.from(new Set(n.map((h) => h.group).flat().filter(Boolean))), l = n.reduce((h, c) => ((c.group ? [c.group].flat() : ["默认"]).forEach((u) => {
1883
- let i = h.find((f) => f.group === u);
1884
- i || (i = {
1885
- group: u,
1978
+ })), t = Array.from(new Set(r.map((v) => v.group).flat().filter(Boolean))), l = r.reduce((v, c) => ((c.group ? [c.group].flat() : ["默认"]).forEach((o) => {
1979
+ let s = v.find((d) => d.group === o);
1980
+ s || (s = {
1981
+ group: o,
1886
1982
  instance: void 0,
1887
1983
  form: []
1888
- }, h.push(i)), i.form.push(c);
1889
- }), h), []).sort((h, c) => h.group === "默认" ? -1 : c.group === "默认" ? 1 : h.group > c.group ? -1 : 1), o = S("默认");
1984
+ }, v.push(s)), s.form.push(c);
1985
+ }), v), []).sort((v, c) => v.group === "默认" ? -1 : c.group === "默认" ? 1 : v.group > c.group ? -1 : 1), u = O("默认");
1890
1986
  return {
1891
- formItems: n,
1987
+ formItems: r,
1892
1988
  groups: t,
1893
1989
  groupForms: l,
1894
- activeTab: o,
1990
+ activeTab: u,
1895
1991
  onSubmit: () => {
1896
- const h = l.find((c) => c.group === o.value);
1897
- if (h && h.instance) {
1898
- const c = h.instance.formSource;
1899
- h.instance.validate().then((u) => {
1900
- u || r.close(c);
1992
+ const v = l.find((c) => c.group === u.value);
1993
+ if (v && v.instance) {
1994
+ const c = v.instance.formSource;
1995
+ v.instance.validate().then((o) => {
1996
+ o || n.close(c);
1901
1997
  });
1902
1998
  }
1903
1999
  },
1904
2000
  onReset: () => {
1905
- const h = l.find((c) => c.group === o.value);
1906
- h && h.instance && h.instance.reset();
2001
+ const v = l.find((c) => c.group === u.value);
2002
+ v && v.instance && v.instance.reset();
1907
2003
  }
1908
2004
  };
1909
2005
  },
1910
2006
  render() {
1911
- const e = this.groupForms.find((r) => r.group === this.activeTab);
2007
+ const e = this.groupForms.find((n) => n.group === this.activeTab);
1912
2008
  if (this.groups.length) {
1913
- let r;
1914
- return m(Pt, {
2009
+ let n;
2010
+ return f(Lt, {
1915
2011
  "active-key": this.activeTab,
1916
- "onUpdate:active-key": (n) => this.activeTab = n
1917
- }, yr(r = this.groupForms.map((n) => m(jt, {
1918
- title: n.group,
1919
- key: n.group
2012
+ "onUpdate:active-key": (r) => this.activeTab = r
2013
+ }, kn(n = this.groupForms.map((r) => f(Pt, {
2014
+ title: r.group,
2015
+ key: r.group
1920
2016
  }, {
1921
- default: () => [m(ge, {
1922
- form: n.form,
2017
+ default: () => [f(be, {
2018
+ columns: this.columns,
2019
+ form: r.form,
1923
2020
  value: this.value,
1924
- ref: (t) => n.instance = t
1925
- }, null), m(Me, null, null), m("div", {
2021
+ ref: (t) => r.instance = t
2022
+ }, null), f(Me, null, null), f("div", {
1926
2023
  class: "flex items-center justify-between space-x-2"
1927
- }, [m(I, {
2024
+ }, [f(R, {
1928
2025
  type: "secondary",
1929
2026
  size: "large",
1930
2027
  onClick: this.onReset
1931
2028
  }, {
1932
- default: () => [D("重置")]
1933
- }), m(I, {
2029
+ default: () => [j("重置")]
2030
+ }), f(R, {
1934
2031
  class: "w-100px",
1935
2032
  type: "primary",
1936
2033
  size: "large",
1937
2034
  onClick: this.onSubmit
1938
2035
  }, {
1939
- default: () => [D("搜索")]
2036
+ default: () => [j("搜索")]
1940
2037
  })])]
1941
- }))) ? r : {
1942
- default: () => [r]
2038
+ }))) ? n : {
2039
+ default: () => [n]
1943
2040
  });
1944
2041
  } else
1945
- return m(le, null, [m(ge, {
2042
+ return f(le, null, [f(be, {
2043
+ columns: this.columns,
1946
2044
  form: this.formItems,
1947
2045
  value: this.value,
1948
- ref: (r) => e.instance = r
1949
- }, null), m(Me, null, null), m("div", {
2046
+ ref: (n) => e.instance = n
2047
+ }, null), f(Me, null, null), f("div", {
1950
2048
  class: "flex items-center justify-between space-x-2"
1951
- }, [m(I, {
2049
+ }, [f(R, {
1952
2050
  type: "secondary",
1953
2051
  size: "large",
1954
2052
  onClick: this.onReset
1955
2053
  }, {
1956
- default: () => [D("重置")]
1957
- }), m(I, {
2054
+ default: () => [j("重置")]
2055
+ }), f(R, {
1958
2056
  class: "w-100px",
1959
2057
  type: "primary",
1960
2058
  size: "large",
1961
2059
  onClick: this.onSubmit
1962
2060
  }, {
1963
- default: () => [D("搜索")]
2061
+ default: () => [j("搜索")]
1964
2062
  })])]);
1965
2063
  }
1966
2064
  });
1967
- function Re(e) {
1968
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !we(e);
2065
+ function Ee(e) {
2066
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !xe(e);
1969
2067
  }
1970
- const ge = /* @__PURE__ */ R({
2068
+ const be = /* @__PURE__ */ I({
1971
2069
  props: {
1972
2070
  form: {
1973
2071
  type: Object,
@@ -2008,6 +2106,11 @@ const ge = /* @__PURE__ */ R({
2008
2106
  required: !1,
2009
2107
  default: "append"
2010
2108
  },
2109
+ collapsedDialogColumns: {
2110
+ type: Number,
2111
+ required: !1,
2112
+ default: 2
2113
+ },
2011
2114
  showFormResult: {
2012
2115
  type: Boolean,
2013
2116
  required: !1,
@@ -2047,13 +2150,13 @@ const ge = /* @__PURE__ */ R({
2047
2150
  emits: ["submit", "cancel", "update:model-value"],
2048
2151
  expose: ["formSource", "updateFormField", "updateFormSource", "reset", "validate"],
2049
2152
  setup(e, {
2050
- emit: r
2153
+ emit: n
2051
2154
  }) {
2052
- const n = S(), [t, l] = Vn(e.form, e.modelValue || e.value), o = S(e.columns || 0), a = S(!0), s = S(), h = () => a.value = !a.value, c = S(""), u = S("");
2053
- pe(Pe.id, c), pe(Pe.source, t);
2054
- const i = () => {
2055
- r("submit", t.value), r("update:model-value", t.value);
2056
- }, f = O(() => e.form.filter((g) => a.value ? !g.collapsed : !0).filter((g) => {
2155
+ const r = O(), [t, l] = Vr(e.form, e.modelValue || e.value), u = O(e.columns || 0), a = O(!0), i = O(), v = () => a.value = !a.value, c = O(""), o = O("");
2156
+ pe(Le.id, c), pe(Le.source, t);
2157
+ const s = () => {
2158
+ n("submit", t.value), n("update:model-value", t.value);
2159
+ }, d = $(() => e.form.filter((g) => a.value ? !g.collapsed : !0).filter((g) => {
2057
2160
  switch (!0) {
2058
2161
  case typeof g.visiable == "boolean":
2059
2162
  return g.visiable;
@@ -2062,205 +2165,203 @@ const ge = /* @__PURE__ */ R({
2062
2165
  default:
2063
2166
  return !0;
2064
2167
  }
2065
- })), d = O(() => {
2066
- if (!o.value)
2168
+ })), m = $(() => {
2169
+ if (!u.value)
2067
2170
  return 1;
2068
- const g = f.value.reduce((k, F) => k + ((F == null ? void 0 : F.span) || 1), 0);
2069
- return o.value - g % o.value;
2070
- }), v = (g) => g != null && g.validator ? {
2171
+ const g = d.value.reduce((x, F) => x + ((F == null ? void 0 : F.span) || 1), 0);
2172
+ return u.value - g % u.value;
2173
+ }), h = (g) => g != null && g.validator ? {
2071
2174
  ...g,
2072
- validator: (k, F) => {
2073
- const Y = g.validator(k, F);
2175
+ validator: (x, F) => {
2176
+ const Y = g.validator(x, F);
2074
2177
  if (typeof Y == "function")
2075
2178
  return Y(t.value);
2076
2179
  }
2077
- } : g, w = O(() => e.form.reduce((g, k) => (k.rule && (Array.isArray(k.rule) ? g[k.key] = k.rule.map(v) : g[k.key] = v(k.rule)), g), {}));
2180
+ } : g, k = $(() => e.form.reduce((g, x) => (x.rule && (Array.isArray(x.rule) ? g[x.key] = x.rule.map(h) : g[x.key] = h(x.rule)), g), {}));
2078
2181
  function y() {
2079
- var k;
2182
+ var x;
2080
2183
  if (e.columns)
2081
2184
  return;
2082
- const g = (k = n.value) == null ? void 0 : k.$el;
2083
- g && (o.value = Math.max(Math.floor(g.offsetWidth / e.minWidth), 1));
2185
+ const g = (x = r.value) == null ? void 0 : x.$el;
2186
+ g && (u.value = Math.max(Math.floor(g.offsetWidth / e.minWidth), 1));
2084
2187
  }
2085
- function C() {
2086
- var k;
2087
- const g = (k = n.value) == null ? void 0 : k.$el;
2188
+ function S() {
2189
+ var x;
2190
+ const g = (x = r.value) == null ? void 0 : x.$el;
2088
2191
  g && (g.id = c.value);
2089
2192
  }
2090
- function j() {
2091
- s.value.open(gr, {
2193
+ function L() {
2194
+ i.value.open(wn, {
2092
2195
  form: e.form,
2093
- value: t.value
2196
+ value: t.value,
2197
+ columns: e.collapsedDialogColumns
2094
2198
  }, {
2095
2199
  title: "高级搜索",
2096
2200
  footer: !1,
2097
2201
  submitText: "搜索"
2098
2202
  }).then((g) => {
2099
- g && (P(g), i());
2203
+ g && (T(g), s());
2100
2204
  });
2101
2205
  }
2102
2206
  W(() => {
2103
2207
  const g = Math.random().toString(32).slice(2);
2104
- c.value = e.id ?? g, u.value = e.name ?? g, y(), C(), window && window.addEventListener("resize", y);
2208
+ c.value = e.id ?? g, o.value = e.name ?? g, y(), S(), window && window.addEventListener("resize", y);
2105
2209
  });
2106
- function P(g) {
2210
+ function T(g) {
2107
2211
  l({
2108
2212
  ...t.value,
2109
2213
  ...g || {}
2110
2214
  });
2111
2215
  }
2112
- function E(g, k) {
2113
- t.value[g] = k, P({
2216
+ function E(g, x) {
2217
+ t.value[g] = x, T({
2114
2218
  ...t.value
2115
2219
  });
2116
2220
  }
2117
2221
  function H(g) {
2118
- const k = e.form.find((Y) => Y.key === g), F = (typeof k.default == "function" ? k.default() : k.default) || null;
2222
+ const x = e.form.find((Y) => Y.key === g), F = (typeof x.default == "function" ? x.default() : x.default) || null;
2119
2223
  E(g, F);
2120
2224
  }
2121
- function B() {
2122
- var g;
2123
- (g = n.value) == null || g.resetFields();
2225
+ function N() {
2226
+ r.value && r.value.resetFields();
2124
2227
  }
2125
- function b() {
2228
+ function w() {
2126
2229
  var g;
2127
- return (g = n.value) == null ? void 0 : g.validate();
2230
+ return (g = r.value) == null ? void 0 : g.validate();
2128
2231
  }
2129
2232
  return {
2130
2233
  formId: c,
2131
- formName: u,
2234
+ formName: o,
2132
2235
  formSource: t,
2133
- formInstance: n,
2134
- formColumns: o,
2135
- formRules: w,
2236
+ formInstance: r,
2237
+ formColumns: u,
2238
+ formRules: k,
2136
2239
  formCollspased: a,
2137
- formActiosSpan: d,
2138
- formItems: f,
2139
- toggleFormCollapsed: h,
2240
+ formActiosSpan: m,
2241
+ formItems: d,
2242
+ toggleFormCollapsed: v,
2140
2243
  updateFormField: E,
2141
2244
  resetFormField: H,
2142
- updateFormSource: P,
2143
- reset: B,
2144
- validate: b,
2145
- onSubmitSuccess: i,
2146
- openCollapsedDialog: j,
2147
- modalInstance: s
2245
+ resetFormFields: N,
2246
+ updateFormSource: T,
2247
+ reset: N,
2248
+ validate: w,
2249
+ onSubmitSuccess: s,
2250
+ openCollapsedDialog: L,
2251
+ modalInstance: i
2148
2252
  };
2149
2253
  },
2150
2254
  render() {
2151
2255
  const e = () => {
2152
2256
  if (!this.showFormResult)
2153
2257
  return;
2154
- const n = this.form.filter((l) => {
2155
- const o = this.formSource[l.key];
2258
+ const r = this.form.filter((l) => {
2259
+ const u = this.formSource[l.key];
2156
2260
  switch (!0) {
2157
- case typeof o == "string":
2158
- return o !== "";
2159
- case Array.isArray(o):
2160
- return o.length !== 0;
2261
+ case typeof u == "string":
2262
+ return u !== "";
2263
+ case Array.isArray(u):
2264
+ return u.length !== 0;
2161
2265
  default:
2162
- return o != null;
2266
+ return u != null;
2163
2267
  }
2164
2268
  }), t = (l) => {
2165
2269
  var a;
2166
- const o = this.formItems.find((s) => s.key === l);
2167
- o && !(o != null && o.collapsed) ? (a = this.formInstance) == null || a.resetFields(l) : this.resetFormField(l);
2270
+ const u = this.formItems.find((i) => i.key === l);
2271
+ u && !(u != null && u.collapsed) ? (a = this.formInstance) == null || a.resetFields(l) : this.resetFormField(l);
2168
2272
  };
2169
- return m(se, {
2273
+ return f(de, {
2170
2274
  span: this.formColumns
2171
2275
  }, {
2172
- default: () => [m(ye, {
2276
+ default: () => [f(ge, {
2173
2277
  label: "搜索条件",
2174
2278
  class: "mb-0!"
2175
2279
  }, {
2176
- default: () => [m("div", {
2280
+ default: () => [f("div", {
2177
2281
  class: "w-full mt-5px text-left"
2178
- }, [m(Te, {
2282
+ }, [f(Te, {
2179
2283
  wrap: !0,
2180
2284
  align: "center"
2181
2285
  }, {
2182
- default: () => [n.length > 0 ? n.map((l) => m(It, {
2286
+ default: () => [r.length > 0 ? r.map((l) => f(It, {
2183
2287
  key: l.key,
2184
2288
  closable: !0,
2185
2289
  onClose: () => t(l.key)
2186
2290
  }, {
2187
- default: () => [m("div", {
2291
+ default: () => [f("div", {
2188
2292
  class: "flex space-x-2"
2189
- }, [m("div", {
2293
+ }, [f("div", {
2190
2294
  class: "text-#999"
2191
- }, [l.title, D(":")]), m("div", {
2295
+ }, [l.title, j(":")]), f("div", {
2192
2296
  class: "text-#333"
2193
2297
  }, [Ie(this.formSource, {
2194
2298
  ...l,
2195
2299
  key: l.key,
2196
2300
  mode: "text"
2197
2301
  })])])]
2198
- })) : m("div", {
2302
+ })) : f("div", {
2199
2303
  class: "text-#999"
2200
- }, [D("暂无搜索条件")])]
2304
+ }, [j("暂无搜索条件")])]
2201
2305
  })])]
2202
2306
  })]
2203
2307
  });
2204
- }, r = () => {
2205
- const n = [], t = this.footer ? {
2308
+ }, n = () => {
2309
+ const r = [], t = this.footer ? {
2206
2310
  span: this.formColumns
2207
2311
  } : {
2208
2312
  span: this.formActiosSpan
2209
2313
  };
2210
- if (this.searchable && (n.push(m(I, {
2314
+ if (this.searchable && (r.push(f(R, {
2211
2315
  type: "primary",
2212
2316
  htmlType: "submit"
2213
2317
  }, {
2214
- default: () => [D("搜索")]
2215
- })), this.resetable && n.push(m(I, {
2318
+ default: () => [j("搜索")]
2319
+ })), this.resetable && r.push(f(R, {
2216
2320
  type: "secondary",
2217
- onClick: () => {
2218
- var l;
2219
- return (l = this.formInstance) == null ? void 0 : l.resetFields();
2220
- }
2321
+ onClick: () => this.resetFormFields()
2221
2322
  }, {
2222
- default: () => [D("重置")]
2223
- }))), this.submitable && (n.push(m(I, {
2323
+ default: () => [j("重置")]
2324
+ }))), this.submitable && (r.push(f(R, {
2224
2325
  type: "primary",
2225
2326
  htmlType: "submit"
2226
2327
  }, {
2227
- default: () => [D("提交")]
2228
- })), n.push(m(I, {
2328
+ default: () => [j("提交")]
2329
+ })), r.push(f(R, {
2229
2330
  type: "secondary",
2230
2331
  onClick: () => this.$emit("cancel")
2231
2332
  }, {
2232
- default: () => [D("取消")]
2233
- }))), this.form.some((l) => !!l.collapsed) && (this.collapsedMode === "append" && n.push(m(I, {
2333
+ default: () => [j("取消")]
2334
+ }))), this.form.some((l) => !!l.collapsed) && (this.collapsedMode === "append" && r.push(f(R, {
2234
2335
  onClick: this.toggleFormCollapsed
2235
2336
  }, {
2236
2337
  default: () => this.formCollspased ? "展开" : "收起",
2237
- icon: () => this.formCollspased ? m(Wt, null, null) : m(Qt, null, null)
2238
- })), this.collapsedMode === "dialog" && n.push(m(I, {
2338
+ icon: () => this.formCollspased ? f(Ht, null, null) : f(Zt, null, null)
2339
+ })), this.collapsedMode === "dialog" && r.push(f(R, {
2239
2340
  onClick: this.openCollapsedDialog
2240
2341
  }, {
2241
2342
  default: () => "高级搜索",
2242
- icon: () => m(ln, null, null)
2243
- }))), this.$slots.actions && n.push(...this.$slots.actions()), n.length)
2244
- return m(se, t, {
2245
- default: () => [m(ye, {
2343
+ icon: () => f(ar, null, null)
2344
+ }))), this.$slots.actions && r.push(...this.$slots.actions()), r.length)
2345
+ return f(de, t, {
2346
+ default: () => [f(ge, {
2246
2347
  hideLabel: this.formItems.every((l) => !!l.hideLabel),
2247
2348
  contentClass: this.footer ? "form-footer" : ""
2248
2349
  }, {
2249
- default: () => [m(Te, null, Re(n) ? n : {
2250
- default: () => [n]
2350
+ default: () => [f(Te, null, Ee(r) ? r : {
2351
+ default: () => [r]
2251
2352
  })]
2252
2353
  })]
2253
2354
  });
2254
2355
  };
2255
- return m("div", {
2356
+ return f("div", {
2256
2357
  class: {
2257
2358
  "form-render": !0,
2258
2359
  "no-rules": Object.keys(this.formRules).length === 0
2259
2360
  }
2260
- }, [m(Nn, {
2261
- ref: (n) => this.modalInstance = n
2361
+ }, [f(Nr, {
2362
+ ref: (r) => this.modalInstance = r
2262
2363
  }, {
2263
- default: () => [m(Lt, ke({
2364
+ default: () => [f(jt, we({
2264
2365
  name: this.formName
2265
2366
  }, {
2266
2367
  labelAlign: "right",
@@ -2268,48 +2369,49 @@ const ge = /* @__PURE__ */ R({
2268
2369
  rules: this.formRules,
2269
2370
  onSubmitSuccess: this.onSubmitSuccess,
2270
2371
  "auto-label-width": !0,
2271
- ref: (n) => this.formInstance = n,
2372
+ ref: (r) => this.formInstance = r,
2272
2373
  model: this.formSource
2273
2374
  }), {
2274
- default: () => [m(Dt, {
2375
+ default: () => [f(Rt, {
2275
2376
  cols: this.formColumns,
2276
2377
  "col-gap": this.$props.colGap,
2277
2378
  "row-gap": this.$props.rowGap
2278
2379
  }, {
2279
- default: () => [this.formItems.filter(() => this.formColumns !== 0).map((n) => {
2380
+ default: () => [this.formItems.filter(() => this.formColumns !== 0).map((r) => {
2280
2381
  let t;
2281
- return m(se, {
2282
- span: n.span
2283
- }, Re(t = Ie(this.formSource, n)) ? t : {
2382
+ return f(de, {
2383
+ span: r.span,
2384
+ key: r.key
2385
+ }, Ee(t = Ie(this.formSource, r)) ? t : {
2284
2386
  default: () => [t]
2285
2387
  });
2286
- }), r(), e()]
2388
+ }), n(), e()]
2287
2389
  })]
2288
2390
  })]
2289
2391
  })]);
2290
2392
  }
2291
2393
  });
2292
- function xr(e) {
2394
+ function On(e) {
2293
2395
  return e;
2294
2396
  }
2295
- function Cr(e) {
2296
- const r = q(), n = S();
2397
+ function _n(e) {
2398
+ const n = q(), r = O();
2297
2399
  function t() {
2298
- var o, a;
2299
- const l = (a = (o = r == null ? void 0 : r.proxy) == null ? void 0 : o.$refs) == null ? void 0 : a[e];
2300
- l && (n.value = l);
2400
+ var u, a;
2401
+ const l = (a = (u = n == null ? void 0 : n.proxy) == null ? void 0 : u.$refs) == null ? void 0 : a[e];
2402
+ l && (r.value = l);
2301
2403
  }
2302
- return W(t), yt(t), n;
2404
+ return W(t), gt(t), r;
2303
2405
  }
2304
- const Sr = {
2305
- install(e, r) {
2306
- e.component("FormRender", ge);
2406
+ const $n = {
2407
+ install(e, n) {
2408
+ e.component("FormRender", be);
2307
2409
  }
2308
2410
  };
2309
2411
  export {
2310
- ge as FormRender,
2311
- Or as FormRenderResolver,
2312
- Sr as default,
2313
- xr as defineForm,
2314
- Cr as useForm
2412
+ be as FormRender,
2413
+ Dn as FormRenderResolver,
2414
+ $n as default,
2415
+ On as defineForm,
2416
+ _n as useForm
2315
2417
  };