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