xdc-ui-lib 1.0.2 → 1.0.4
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/README.md +1110 -1110
- package/package.json +1 -1
- package/xdc-ui-lib.css +1 -1
- package/xdc-ui-lib.js +490 -484
- package/xdc-ui-lib.umd.cjs +4 -4
package/xdc-ui-lib.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { inject as ba, ref as D, h as It, getCurrentInstance as ya, nextTick as Se, reactive as
|
|
2
|
-
import { message as
|
|
3
|
-
import
|
|
1
|
+
import { inject as ba, ref as D, h as It, getCurrentInstance as ya, nextTick as Se, reactive as Me, defineComponent as Ue, createVNode as S, computed as $e, onMounted as $t, onUnmounted as ra, toRefs as Ca, watch as _e, resolveComponent as F, createElementBlock as R, openBlock as v, createCommentVNode as B, createElementVNode as V, unref as E, withCtx as x, createBlock as w, withModifiers as Y, Fragment as re, renderList as me, createTextVNode as L, toDisplayString as q, normalizeClass as le, normalizeStyle as Ge, renderSlot as W, resolveDynamicComponent as X, mergeProps as U, createSlots as Ke, normalizeProps as ka } from "vue";
|
|
2
|
+
import { message as Ee } from "ant-design-vue";
|
|
3
|
+
import qe from "dayjs";
|
|
4
4
|
import { throttle as wa } from "lodash-es";
|
|
5
5
|
import { defineStore as Oa } from "pinia";
|
|
6
|
-
function
|
|
6
|
+
function oe(e, a) {
|
|
7
7
|
Sa(e) && (e = "100%");
|
|
8
8
|
var t = xa(e);
|
|
9
9
|
return e = a === 360 ? e : Math.min(a, Math.max(0, parseFloat(e))), t && (e = parseInt(String(e * a), 10) / 100), Math.abs(e - a) < 1e-6 ? 1 : (a === 360 ? e = (e < 0 ? e % a + a : e % a) / parseFloat(String(a)) : e = e % a / parseFloat(String(a)), e);
|
|
@@ -17,7 +17,7 @@ function xa(e) {
|
|
|
17
17
|
function _a(e) {
|
|
18
18
|
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function We(e) {
|
|
21
21
|
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
|
|
22
22
|
}
|
|
23
23
|
function gt(e) {
|
|
@@ -25,9 +25,9 @@ function gt(e) {
|
|
|
25
25
|
}
|
|
26
26
|
function $a(e, a, t) {
|
|
27
27
|
return {
|
|
28
|
-
r:
|
|
29
|
-
g:
|
|
30
|
-
b:
|
|
28
|
+
r: oe(e, 255) * 255,
|
|
29
|
+
g: oe(a, 255) * 255,
|
|
30
|
+
b: oe(t, 255) * 255
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function bt(e, a, t) {
|
|
@@ -35,7 +35,7 @@ function bt(e, a, t) {
|
|
|
35
35
|
}
|
|
36
36
|
function ja(e, a, t) {
|
|
37
37
|
var l, o, u;
|
|
38
|
-
if (e =
|
|
38
|
+
if (e = oe(e, 360), a = oe(a, 100), t = oe(t, 100), a === 0)
|
|
39
39
|
o = t, u = t, l = t;
|
|
40
40
|
else {
|
|
41
41
|
var c = t < 0.5 ? t * (1 + a) : t + a - t * a, g = 2 * t - c;
|
|
@@ -44,7 +44,7 @@ function ja(e, a, t) {
|
|
|
44
44
|
return { r: l * 255, g: o * 255, b: u * 255 };
|
|
45
45
|
}
|
|
46
46
|
function Pa(e, a, t) {
|
|
47
|
-
e =
|
|
47
|
+
e = oe(e, 255), a = oe(a, 255), t = oe(t, 255);
|
|
48
48
|
var l = Math.max(e, a, t), o = Math.min(e, a, t), u = 0, c = l, g = l - o, d = l === 0 ? 0 : g / l;
|
|
49
49
|
if (l === o)
|
|
50
50
|
u = 0;
|
|
@@ -65,9 +65,9 @@ function Pa(e, a, t) {
|
|
|
65
65
|
return { h: u, s: d, v: c };
|
|
66
66
|
}
|
|
67
67
|
function Fa(e, a, t) {
|
|
68
|
-
e =
|
|
69
|
-
var l = Math.floor(e), o = e - l, u = t * (1 - a), c = t * (1 - o * a), g = t * (1 - (1 - o) * a), d = l % 6,
|
|
70
|
-
return { r:
|
|
68
|
+
e = oe(e, 360) * 6, a = oe(a, 100), t = oe(t, 100);
|
|
69
|
+
var l = Math.floor(e), o = e - l, u = t * (1 - a), c = t * (1 - o * a), g = t * (1 - (1 - o) * a), d = l % 6, k = [t, c, u, u, g, t][d], f = [g, t, t, c, u, u][d], C = [u, u, g, t, t, c][d];
|
|
70
|
+
return { r: k * 255, g: f * 255, b: C * 255 };
|
|
71
71
|
}
|
|
72
72
|
function Ta(e, a, t, l) {
|
|
73
73
|
var o = [
|
|
@@ -78,9 +78,9 @@ function Ta(e, a, t, l) {
|
|
|
78
78
|
return o.join("");
|
|
79
79
|
}
|
|
80
80
|
function Et(e) {
|
|
81
|
-
return
|
|
81
|
+
return Z(e) / 255;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Z(e) {
|
|
84
84
|
return parseInt(e, 16);
|
|
85
85
|
}
|
|
86
86
|
var Rt = {
|
|
@@ -235,7 +235,7 @@ var Rt = {
|
|
|
235
235
|
};
|
|
236
236
|
function Te(e) {
|
|
237
237
|
var a = { r: 0, g: 0, b: 0 }, t = 1, l = null, o = null, u = null, c = !1, g = !1;
|
|
238
|
-
return typeof e == "string" && (e = Ea(e)), typeof e == "object" && (he(e.r) && he(e.g) && he(e.b) ? (a = $a(e.r, e.g, e.b), c = !0, g = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : he(e.h) && he(e.s) && he(e.v) ? (l =
|
|
238
|
+
return typeof e == "string" && (e = Ea(e)), typeof e == "object" && (he(e.r) && he(e.g) && he(e.b) ? (a = $a(e.r, e.g, e.b), c = !0, g = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : he(e.h) && he(e.s) && he(e.v) ? (l = We(e.s), o = We(e.v), a = Fa(e.h, l, o), c = !0, g = "hsv") : he(e.h) && he(e.s) && he(e.l) && (l = We(e.s), u = We(e.l), a = ja(e.h, l, u), c = !0, g = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (t = e.a)), t = _a(t), {
|
|
239
239
|
ok: c,
|
|
240
240
|
format: e.format || g,
|
|
241
241
|
r: Math.min(255, Math.max(a.r, 0)),
|
|
@@ -267,33 +267,33 @@ function Ea(e) {
|
|
|
267
267
|
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
268
268
|
var t = ie.rgb.exec(e);
|
|
269
269
|
return t ? { r: t[1], g: t[2], b: t[3] } : (t = ie.rgba.exec(e), t ? { r: t[1], g: t[2], b: t[3], a: t[4] } : (t = ie.hsl.exec(e), t ? { h: t[1], s: t[2], l: t[3] } : (t = ie.hsla.exec(e), t ? { h: t[1], s: t[2], l: t[3], a: t[4] } : (t = ie.hsv.exec(e), t ? { h: t[1], s: t[2], v: t[3] } : (t = ie.hsva.exec(e), t ? { h: t[1], s: t[2], v: t[3], a: t[4] } : (t = ie.hex8.exec(e), t ? {
|
|
270
|
-
r:
|
|
271
|
-
g:
|
|
272
|
-
b:
|
|
270
|
+
r: Z(t[1]),
|
|
271
|
+
g: Z(t[2]),
|
|
272
|
+
b: Z(t[3]),
|
|
273
273
|
a: Et(t[4]),
|
|
274
274
|
format: a ? "name" : "hex8"
|
|
275
275
|
} : (t = ie.hex6.exec(e), t ? {
|
|
276
|
-
r:
|
|
277
|
-
g:
|
|
278
|
-
b:
|
|
276
|
+
r: Z(t[1]),
|
|
277
|
+
g: Z(t[2]),
|
|
278
|
+
b: Z(t[3]),
|
|
279
279
|
format: a ? "name" : "hex"
|
|
280
280
|
} : (t = ie.hex4.exec(e), t ? {
|
|
281
|
-
r:
|
|
282
|
-
g:
|
|
283
|
-
b:
|
|
281
|
+
r: Z(t[1] + t[1]),
|
|
282
|
+
g: Z(t[2] + t[2]),
|
|
283
|
+
b: Z(t[3] + t[3]),
|
|
284
284
|
a: Et(t[4] + t[4]),
|
|
285
285
|
format: a ? "name" : "hex8"
|
|
286
286
|
} : (t = ie.hex3.exec(e), t ? {
|
|
287
|
-
r:
|
|
288
|
-
g:
|
|
289
|
-
b:
|
|
287
|
+
r: Z(t[1] + t[1]),
|
|
288
|
+
g: Z(t[2] + t[2]),
|
|
289
|
+
b: Z(t[3] + t[3]),
|
|
290
290
|
format: a ? "name" : "hex"
|
|
291
291
|
} : !1)))))))));
|
|
292
292
|
}
|
|
293
293
|
function he(e) {
|
|
294
294
|
return !!ie.CSS_UNIT.exec(String(e));
|
|
295
295
|
}
|
|
296
|
-
var
|
|
296
|
+
var Qe = 2, Mt = 0.16, Ra = 0.05, Ma = 0.05, Ua = 0.15, oa = 5, sa = 4, za = [{
|
|
297
297
|
index: 7,
|
|
298
298
|
opacity: 0.15
|
|
299
299
|
}, {
|
|
@@ -332,11 +332,11 @@ function Ut(e) {
|
|
|
332
332
|
v: o.v
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Je(e) {
|
|
336
336
|
var a = e.r, t = e.g, l = e.b;
|
|
337
337
|
return "#".concat(Ta(a, t, l));
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function Va(e, a, t) {
|
|
340
340
|
var l = t / 100, o = {
|
|
341
341
|
r: (a.r - e.r) * l + e.r,
|
|
342
342
|
g: (a.g - e.g) * l + e.g,
|
|
@@ -344,11 +344,11 @@ function za(e, a, t) {
|
|
|
344
344
|
};
|
|
345
345
|
return o;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function zt(e, a, t) {
|
|
348
348
|
var l;
|
|
349
|
-
return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? l = t ? Math.round(e.h) -
|
|
349
|
+
return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? l = t ? Math.round(e.h) - Qe * a : Math.round(e.h) + Qe * a : l = t ? Math.round(e.h) + Qe * a : Math.round(e.h) - Qe * a, l < 0 ? l += 360 : l >= 360 && (l -= 360), l;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Vt(e, a, t) {
|
|
352
352
|
if (e.h === 0 && e.s === 0)
|
|
353
353
|
return e.s;
|
|
354
354
|
var l;
|
|
@@ -360,25 +360,25 @@ function Bt(e, a, t) {
|
|
|
360
360
|
}
|
|
361
361
|
function St(e) {
|
|
362
362
|
for (var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = [], l = Te(e), o = oa; o > 0; o -= 1) {
|
|
363
|
-
var u = Ut(l), c =
|
|
364
|
-
h:
|
|
365
|
-
s:
|
|
363
|
+
var u = Ut(l), c = Je(Te({
|
|
364
|
+
h: zt(u, o, !0),
|
|
365
|
+
s: Vt(u, o, !0),
|
|
366
366
|
v: Bt(u, o, !0)
|
|
367
367
|
}));
|
|
368
368
|
t.push(c);
|
|
369
369
|
}
|
|
370
|
-
t.push(
|
|
370
|
+
t.push(Je(l));
|
|
371
371
|
for (var g = 1; g <= sa; g += 1) {
|
|
372
|
-
var d = Ut(l),
|
|
373
|
-
h:
|
|
374
|
-
s:
|
|
372
|
+
var d = Ut(l), k = Je(Te({
|
|
373
|
+
h: zt(d, g),
|
|
374
|
+
s: Vt(d, g),
|
|
375
375
|
v: Bt(d, g)
|
|
376
376
|
}));
|
|
377
|
-
t.push(
|
|
377
|
+
t.push(k);
|
|
378
378
|
}
|
|
379
|
-
return a.theme === "dark" ?
|
|
380
|
-
var
|
|
381
|
-
return
|
|
379
|
+
return a.theme === "dark" ? za.map(function(f) {
|
|
380
|
+
var C = f.index, M = f.opacity, I = Je(Va(Te(a.backgroundColor || "#141414"), Te(t[C]), M * 100));
|
|
381
|
+
return I;
|
|
382
382
|
}) : t;
|
|
383
383
|
}
|
|
384
384
|
var kt = {
|
|
@@ -395,14 +395,14 @@ var kt = {
|
|
|
395
395
|
purple: "#722ED1",
|
|
396
396
|
magenta: "#EB2F96",
|
|
397
397
|
grey: "#666666"
|
|
398
|
-
},
|
|
398
|
+
}, Ze = {}, wt = {};
|
|
399
399
|
Object.keys(kt).forEach(function(e) {
|
|
400
|
-
|
|
400
|
+
Ze[e] = St(kt[e]), Ze[e].primary = Ze[e][5], wt[e] = St(kt[e], {
|
|
401
401
|
theme: "dark",
|
|
402
402
|
backgroundColor: "#141414"
|
|
403
403
|
}), wt[e].primary = wt[e][5];
|
|
404
404
|
});
|
|
405
|
-
var Ba =
|
|
405
|
+
var Ba = Ze.blue, Da = Symbol("iconContext"), ia = function() {
|
|
406
406
|
return ba(Da, {
|
|
407
407
|
prefixCls: D("anticon"),
|
|
408
408
|
rootClassName: D(""),
|
|
@@ -610,7 +610,7 @@ function nn(e, a) {
|
|
|
610
610
|
o = l[u], !(a.indexOf(o) >= 0) && (t[o] = e[o]);
|
|
611
611
|
return t;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Xe(e) {
|
|
614
614
|
for (var a = 1; a < arguments.length; a++) {
|
|
615
615
|
var t = arguments[a] != null ? Object(arguments[a]) : {}, l = Object.keys(t);
|
|
616
616
|
typeof Object.getOwnPropertySymbols == "function" && (l = l.concat(Object.getOwnPropertySymbols(t).filter(function(o) {
|
|
@@ -624,30 +624,30 @@ function Ze(e) {
|
|
|
624
624
|
function ln(e, a, t) {
|
|
625
625
|
return a in e ? Object.defineProperty(e, a, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[a] = t, e;
|
|
626
626
|
}
|
|
627
|
-
var
|
|
627
|
+
var Re = Me({
|
|
628
628
|
primaryColor: "#333",
|
|
629
629
|
secondaryColor: "#E6E6E6",
|
|
630
630
|
calculated: !1
|
|
631
631
|
});
|
|
632
632
|
function rn(e) {
|
|
633
633
|
var a = e.primaryColor, t = e.secondaryColor;
|
|
634
|
-
|
|
634
|
+
Re.primaryColor = a, Re.secondaryColor = t || fa(a), Re.calculated = !!t;
|
|
635
635
|
}
|
|
636
636
|
function on() {
|
|
637
|
-
return
|
|
637
|
+
return Xe({}, Re);
|
|
638
638
|
}
|
|
639
639
|
var Ce = function(a, t) {
|
|
640
|
-
var l =
|
|
640
|
+
var l = Xe({}, a, t.attrs), o = l.icon, u = l.primaryColor, c = l.secondaryColor, g = an(l, tn), d = Re;
|
|
641
641
|
if (u && (d = {
|
|
642
642
|
primaryColor: u,
|
|
643
643
|
secondaryColor: c || fa(u)
|
|
644
644
|
}), Ga(Nt(o), "icon should be icon definiton, but got ".concat(o)), !Nt(o))
|
|
645
645
|
return null;
|
|
646
|
-
var
|
|
647
|
-
return
|
|
648
|
-
icon:
|
|
649
|
-
})), _t(
|
|
650
|
-
"data-icon":
|
|
646
|
+
var k = o;
|
|
647
|
+
return k && typeof k.icon == "function" && (k = Xe({}, k, {
|
|
648
|
+
icon: k.icon(d.primaryColor, d.secondaryColor)
|
|
649
|
+
})), _t(k.icon, "svg-".concat(k.name), Xe({}, g, {
|
|
650
|
+
"data-icon": k.name,
|
|
651
651
|
width: "1em",
|
|
652
652
|
height: "1em",
|
|
653
653
|
fill: "currentColor",
|
|
@@ -718,7 +718,7 @@ function pn() {
|
|
|
718
718
|
var e = Ce.getTwoToneColors();
|
|
719
719
|
return e.calculated ? [e.primaryColor, e.secondaryColor] : e.primaryColor;
|
|
720
720
|
}
|
|
721
|
-
var vn =
|
|
721
|
+
var vn = Ue({
|
|
722
722
|
name: "InsertStyles",
|
|
723
723
|
setup: function() {
|
|
724
724
|
return en(), function() {
|
|
@@ -802,8 +802,8 @@ function wn(e, a) {
|
|
|
802
802
|
}
|
|
803
803
|
ha(Ba.primary);
|
|
804
804
|
var Q = function(a, t) {
|
|
805
|
-
var l, o = qt({}, a, t.attrs), u = o.class, c = o.icon, g = o.spin, d = o.rotate,
|
|
806
|
-
N === void 0 &&
|
|
805
|
+
var l, o = qt({}, a, t.attrs), u = o.class, c = o.icon, g = o.spin, d = o.rotate, k = o.tabindex, f = o.twoToneColor, C = o.onClick, M = kn(o, hn), I = ia(), J = I.prefixCls, j = I.rootClassName, ge = (l = {}, Ie(l, j.value, !!j.value), Ie(l, J.value, !0), Ie(l, "".concat(J.value, "-").concat(c.name), !!c.name), Ie(l, "".concat(J.value, "-spin"), !!g || c.name === "loading"), l), N = k;
|
|
806
|
+
N === void 0 && C && (N = -1);
|
|
807
807
|
var be = d ? {
|
|
808
808
|
msTransform: "rotate(".concat(d, "deg)"),
|
|
809
809
|
transform: "rotate(".concat(d, "deg)")
|
|
@@ -811,8 +811,8 @@ var Q = function(a, t) {
|
|
|
811
811
|
return S("span", qt({
|
|
812
812
|
role: "img",
|
|
813
813
|
"aria-label": c.name
|
|
814
|
-
},
|
|
815
|
-
onClick:
|
|
814
|
+
}, M, {
|
|
815
|
+
onClick: C,
|
|
816
816
|
class: [ge, u],
|
|
817
817
|
tabindex: N
|
|
818
818
|
}), [S(Ce, {
|
|
@@ -1000,12 +1000,12 @@ function ea(e) {
|
|
|
1000
1000
|
typeof Object.getOwnPropertySymbols == "function" && (l = l.concat(Object.getOwnPropertySymbols(t).filter(function(o) {
|
|
1001
1001
|
return Object.getOwnPropertyDescriptor(t, o).enumerable;
|
|
1002
1002
|
}))), l.forEach(function(o) {
|
|
1003
|
-
|
|
1003
|
+
zn(e, o, t[o]);
|
|
1004
1004
|
});
|
|
1005
1005
|
}
|
|
1006
1006
|
return e;
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function zn(e, a, t) {
|
|
1009
1009
|
return a in e ? Object.defineProperty(e, a, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[a] = t, e;
|
|
1010
1010
|
}
|
|
1011
1011
|
var nt = function(a, t) {
|
|
@@ -1016,7 +1016,7 @@ var nt = function(a, t) {
|
|
|
1016
1016
|
};
|
|
1017
1017
|
nt.displayName = "ReloadOutlined";
|
|
1018
1018
|
nt.inheritAttrs = !1;
|
|
1019
|
-
var
|
|
1019
|
+
var Vn = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z" } }] }, name: "save", theme: "outlined" };
|
|
1020
1020
|
function ta(e) {
|
|
1021
1021
|
for (var a = 1; a < arguments.length; a++) {
|
|
1022
1022
|
var t = arguments[a] != null ? Object(arguments[a]) : {}, l = Object.keys(t);
|
|
@@ -1034,7 +1034,7 @@ function Bn(e, a, t) {
|
|
|
1034
1034
|
var lt = function(a, t) {
|
|
1035
1035
|
var l = ta({}, a, t.attrs);
|
|
1036
1036
|
return S(Q, ta({}, l, {
|
|
1037
|
-
icon:
|
|
1037
|
+
icon: Vn
|
|
1038
1038
|
}), null);
|
|
1039
1039
|
};
|
|
1040
1040
|
lt.displayName = "SaveOutlined";
|
|
@@ -1172,7 +1172,7 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1172
1172
|
}, il = { class: "form-header" }, ul = {
|
|
1173
1173
|
key: 0,
|
|
1174
1174
|
class: "form-item number-range"
|
|
1175
|
-
}, cl = { class: "form-footer" }, dl = /* @__PURE__ */
|
|
1175
|
+
}, cl = { class: "form-footer" }, dl = /* @__PURE__ */ Ue({
|
|
1176
1176
|
name: "CategorySearch",
|
|
1177
1177
|
__name: "index",
|
|
1178
1178
|
props: {
|
|
@@ -1215,18 +1215,18 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1215
1215
|
year: "YYYY",
|
|
1216
1216
|
dateRange: "YYYY-MM-DD",
|
|
1217
1217
|
datetimeRange: "YYYY-MM-DD HH:mm:ss"
|
|
1218
|
-
}, u = e, c = t, g = D(!1), d = D({}),
|
|
1218
|
+
}, u = e, c = t, g = D(!1), d = D({}), k = Me({}), f = Me({}), C = D([]), M = D(-1), I = D(""), J = D(null);
|
|
1219
1219
|
D(!1);
|
|
1220
|
-
const
|
|
1220
|
+
const j = D([]), ge = D([]), N = D(), be = (r) => {
|
|
1221
1221
|
r && Array.isArray(r) ? N.value = r : N.value = null;
|
|
1222
1222
|
}, ke = (r, i) => {
|
|
1223
1223
|
if (!N.value || N.value.length === 0)
|
|
1224
1224
|
return !1;
|
|
1225
|
-
const h = N.value[0] && r.diff(
|
|
1226
|
-
return N.value[1] &&
|
|
1225
|
+
const h = N.value[0] && r.diff(qe(N.value[0]), "days") > i;
|
|
1226
|
+
return N.value[1] && qe(N.value[1]).diff(r, "days") > i - 1 || h;
|
|
1227
1227
|
}, ce = (r, i) => {
|
|
1228
1228
|
if (r.fixed = i, i) {
|
|
1229
|
-
const h =
|
|
1229
|
+
const h = j.value, b = h.findIndex((y) => y === r);
|
|
1230
1230
|
if (h.splice(b, 1), i === "left") {
|
|
1231
1231
|
const y = h.findIndex((O) => O.fixed !== "left");
|
|
1232
1232
|
h.splice(y === -1 ? 1 : y, 0, r);
|
|
@@ -1237,28 +1237,28 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1237
1237
|
}
|
|
1238
1238
|
de();
|
|
1239
1239
|
}, H = (r) => u.disabledColumns.includes(r.dataIndex || r.key), de = () => {
|
|
1240
|
-
const r =
|
|
1240
|
+
const r = j.value, i = r.filter((b) => b.checked).map(({ checked: b, ...y }) => y);
|
|
1241
1241
|
c("update:columns", i);
|
|
1242
1242
|
const h = fe();
|
|
1243
1243
|
l.saveColumns(h, r);
|
|
1244
1244
|
}, it = () => {
|
|
1245
1245
|
const r = fe(), { columns: i } = l.loadSearchFilters(r);
|
|
1246
|
-
i && i.length > 0 ?
|
|
1246
|
+
i && i.length > 0 ? j.value = i.map((h) => ({
|
|
1247
1247
|
...h,
|
|
1248
1248
|
checked: h.checked !== void 0 ? h.checked : !0
|
|
1249
|
-
})) :
|
|
1249
|
+
})) : j.value = u.columns.map((h) => ({
|
|
1250
1250
|
...h,
|
|
1251
1251
|
checked: !0
|
|
1252
1252
|
}));
|
|
1253
|
-
},
|
|
1253
|
+
}, ze = ({ newRow: r, oldRow: i, dragPos: h }) => {
|
|
1254
1254
|
if (!r || !i) return;
|
|
1255
|
-
const b =
|
|
1255
|
+
const b = j.value.findIndex((_) => _.title === i.title), y = j.value.findIndex((_) => _.title === r.title);
|
|
1256
1256
|
if (b === -1 || y === -1 || b === y) return;
|
|
1257
|
-
const [O] =
|
|
1257
|
+
const [O] = j.value.splice(b, 1);
|
|
1258
1258
|
let m;
|
|
1259
|
-
h === "top" ? b === y - 1 ? m = y - 1 : m = y : h === "bottom" && (m = y + 1),
|
|
1259
|
+
h === "top" ? b === y - 1 ? m = y - 1 : m = y : h === "bottom" && (m = y + 1), j.value.splice(m, 0, O), de();
|
|
1260
1260
|
}, Ve = () => {
|
|
1261
|
-
|
|
1261
|
+
j.value = ge.value.map((i) => ({
|
|
1262
1262
|
...i,
|
|
1263
1263
|
checked: !0
|
|
1264
1264
|
})), c("update:columns", ge.value);
|
|
@@ -1266,31 +1266,31 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1266
1266
|
l.saveColumns(r, []);
|
|
1267
1267
|
};
|
|
1268
1268
|
D(!1);
|
|
1269
|
-
const
|
|
1269
|
+
const Be = {
|
|
1270
1270
|
disabledMethod({ row: r }) {
|
|
1271
1271
|
return r.fixed === "left" || r.fixed === "right" || H(r);
|
|
1272
1272
|
},
|
|
1273
1273
|
async dragEndMethod({ newRow: r, oldRow: i, dragPos: h }) {
|
|
1274
|
-
const b =
|
|
1275
|
-
|
|
1274
|
+
const b = j.value.findLastIndex((z) => z.fixed === "left");
|
|
1275
|
+
j.value.findIndex((z) => z.fixed === "right");
|
|
1276
1276
|
const y = b === -1 ? 0 : b + 1;
|
|
1277
|
-
|
|
1278
|
-
const O =
|
|
1277
|
+
j.value.length - 1;
|
|
1278
|
+
const O = j.value.findIndex((z) => z.title === i.title), m = j.value.findIndex((z) => z.title === r.title);
|
|
1279
1279
|
if (r.fixed === "right")
|
|
1280
1280
|
return !1;
|
|
1281
1281
|
const _ = h === "bottom" ? m + 1 : m;
|
|
1282
1282
|
if (_ < y)
|
|
1283
1283
|
return !1;
|
|
1284
|
-
const [$] =
|
|
1285
|
-
return
|
|
1284
|
+
const [$] = j.value.splice(O, 1);
|
|
1285
|
+
return j.value.splice(_, 0, $), de(), !0;
|
|
1286
1286
|
}
|
|
1287
|
-
},
|
|
1288
|
-
|
|
1287
|
+
}, De = ({ checked: r }) => {
|
|
1288
|
+
j.value.slice(1).filter((h) => !H(h)).forEach((h) => {
|
|
1289
1289
|
h.checked = r;
|
|
1290
1290
|
}), Se(() => {
|
|
1291
1291
|
const h = p.value;
|
|
1292
1292
|
if (h) {
|
|
1293
|
-
const b =
|
|
1293
|
+
const b = j.value.filter((y) => y.checked || H(y));
|
|
1294
1294
|
h.setAllCheckboxRow(!1), b.forEach((y) => {
|
|
1295
1295
|
h.setCheckboxRow(y, !0);
|
|
1296
1296
|
});
|
|
@@ -1300,16 +1300,16 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1300
1300
|
H(r) || (r.checked = !r.checked, Se(() => {
|
|
1301
1301
|
const i = p.value;
|
|
1302
1302
|
if (i) {
|
|
1303
|
-
const h =
|
|
1303
|
+
const h = j.value.filter((b) => b.checked || H(b));
|
|
1304
1304
|
i.setAllCheckboxRow(!1), h.forEach((b) => {
|
|
1305
1305
|
i.setCheckboxRow(b, !0);
|
|
1306
1306
|
});
|
|
1307
1307
|
}
|
|
1308
1308
|
}), de());
|
|
1309
1309
|
}, A = $e(() => {
|
|
1310
|
-
const r =
|
|
1310
|
+
const r = C.value.map((i) => i.id);
|
|
1311
1311
|
return u.filterTypes.filter((i) => !r.includes(i.id));
|
|
1312
|
-
}),
|
|
1312
|
+
}), K = $e(() => u.storageKey ? u.storageKey : Oe()), Oe = () => {
|
|
1313
1313
|
const r = "CategorySearch";
|
|
1314
1314
|
let i = "";
|
|
1315
1315
|
try {
|
|
@@ -1319,9 +1319,9 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1319
1319
|
}
|
|
1320
1320
|
const h = u.filterTypes.map((O) => O.id).sort().join("_"), b = u.columns.map((O) => O.dataIndex || O.key).sort().join("_"), y = btoa(`${h}_${b}`).replace(/[^a-zA-Z0-9]/g, "").substring(0, 8);
|
|
1321
1321
|
return `${r}_${i}_${y}`;
|
|
1322
|
-
}, fe = () =>
|
|
1322
|
+
}, fe = () => K.value, je = (r = !1, i = !1) => {
|
|
1323
1323
|
const h = fe(), { filters: b, columns: y } = l.loadSearchFilters(h);
|
|
1324
|
-
if (
|
|
1324
|
+
if (C.value = b, u.type === "input" && b && b.length > 0) {
|
|
1325
1325
|
const O = {};
|
|
1326
1326
|
b.forEach((m) => {
|
|
1327
1327
|
if (m.value)
|
|
@@ -1357,7 +1357,7 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1357
1357
|
}), Object.keys(O).length > 0 && c("update:filterValue", O);
|
|
1358
1358
|
}
|
|
1359
1359
|
if (y && y.length > 0) {
|
|
1360
|
-
|
|
1360
|
+
j.value = y;
|
|
1361
1361
|
const O = y.filter((m) => m.checked).map(({ checked: m, ..._ }) => _);
|
|
1362
1362
|
c("update:columns", O);
|
|
1363
1363
|
}
|
|
@@ -1365,75 +1365,75 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1365
1365
|
pe();
|
|
1366
1366
|
}));
|
|
1367
1367
|
}, ut = () => {
|
|
1368
|
-
d.value = {},
|
|
1369
|
-
},
|
|
1370
|
-
|
|
1368
|
+
d.value = {}, M.value = -1, g.value = !g.value;
|
|
1369
|
+
}, Le = ({ target: r }) => {
|
|
1370
|
+
J.value?.$el?.contains?.(r) || r.closest(".dropdown-menu") || (g.value = !1, d.value = {});
|
|
1371
1371
|
};
|
|
1372
1372
|
$t(() => {
|
|
1373
|
-
ge.value = [...u.columns], it(), document.addEventListener("click",
|
|
1373
|
+
ge.value = [...u.columns], it(), document.addEventListener("click", Le), je(u.isDefaultSearch, !0);
|
|
1374
1374
|
}), ra(() => {
|
|
1375
|
-
document.removeEventListener("click",
|
|
1375
|
+
document.removeEventListener("click", Le);
|
|
1376
1376
|
});
|
|
1377
1377
|
const ct = (r) => {
|
|
1378
|
-
d.value = { ...r }, d.value.showSearch === void 0 && (d.value.showSearch = !1), d.value.multiple === void 0 && (d.value.multiple = !1), Object.keys(
|
|
1378
|
+
d.value = { ...r }, d.value.showSearch === void 0 && (d.value.showSearch = !1), d.value.multiple === void 0 && (d.value.multiple = !1), Object.keys(k).forEach((i) => delete k[i]), r.type === "select" && (k[r.id] = d.value.multiple ? [] : ""), (r.type === "dateRange" || r.type === "datetimeRange") && (k.dateRange = null, N.value = null);
|
|
1379
1379
|
}, dt = () => {
|
|
1380
1380
|
d.value = {};
|
|
1381
|
-
},
|
|
1381
|
+
}, ee = () => {
|
|
1382
1382
|
const r = {
|
|
1383
1383
|
...d.value,
|
|
1384
|
-
value: { ...
|
|
1384
|
+
value: { ...k }
|
|
1385
1385
|
};
|
|
1386
|
-
|
|
1387
|
-
},
|
|
1388
|
-
d.value = { ...r },
|
|
1386
|
+
M.value >= 0 ? (C.value[M.value] = r, M.value = -1) : C.value.push(r), g.value = !1, d.value = {}, Object.keys(k).forEach((i) => delete k[i]), pe();
|
|
1387
|
+
}, Ne = (r, i) => {
|
|
1388
|
+
d.value = { ...r }, M.value = i, Object.keys(k).forEach((h) => delete k[h]), r.type === "dateRange" || r.type === "datetimeRange" ? (N.value = null, k.dateRange = null) : Object.assign(k, r.value), g.value = !0;
|
|
1389
1389
|
}, ft = (r) => {
|
|
1390
|
-
r >= 0 && r <
|
|
1390
|
+
r >= 0 && r < C.value.length && (C.value = C.value.filter((i, h) => h !== r), Se(() => {
|
|
1391
1391
|
pe();
|
|
1392
1392
|
}));
|
|
1393
|
-
},
|
|
1393
|
+
}, te = (r) => r.parentNode, pt = (r) => {
|
|
1394
1394
|
if (!r?.value) return "";
|
|
1395
1395
|
const { type: i, value: h, options: b, format: y, treeData: O, fieldNames: m } = r;
|
|
1396
1396
|
if (["date", "datetime", "month", "week", "quarter", "year", "time"].includes(i)) {
|
|
1397
1397
|
const $ = h.date || h[i];
|
|
1398
|
-
return $ ? typeof $ == "string" ? $ :
|
|
1398
|
+
return $ ? typeof $ == "string" ? $ : qe($).format(y || o[i]) : "";
|
|
1399
1399
|
}
|
|
1400
1400
|
if (["dateRange", "datetimeRange"].includes(i)) {
|
|
1401
1401
|
const $ = h.dateRange;
|
|
1402
1402
|
if (!$ || !Array.isArray($)) return "";
|
|
1403
|
-
const [
|
|
1404
|
-
if (!
|
|
1405
|
-
const
|
|
1406
|
-
return `${se(
|
|
1403
|
+
const [z, ae] = $;
|
|
1404
|
+
if (!z || !ae) return "";
|
|
1405
|
+
const ne = y || o[i], se = (ue) => typeof ue == "string" ? ue : qe(ue).format(ne);
|
|
1406
|
+
return `${se(z)} ~ ${se(ae)}`;
|
|
1407
1407
|
}
|
|
1408
1408
|
if (i === "numberRange") {
|
|
1409
|
-
const { start: $ = "", end:
|
|
1410
|
-
return `${$} - ${
|
|
1409
|
+
const { start: $ = "", end: z = "" } = h;
|
|
1410
|
+
return `${$} - ${z}`;
|
|
1411
1411
|
}
|
|
1412
1412
|
if (i === "select")
|
|
1413
|
-
return b?.find((
|
|
1413
|
+
return b?.find((z) => z.value === h.select)?.[m?.label || "label"] || "";
|
|
1414
1414
|
if (i === "radio")
|
|
1415
1415
|
return b?.find(($) => $.value === h.radio)?.label || "";
|
|
1416
1416
|
if (i === "checkbox")
|
|
1417
|
-
return h.checkbox?.map(($) => b?.find((
|
|
1417
|
+
return h.checkbox?.map(($) => b?.find((z) => z.value === $)?.label).filter(Boolean).join(", ") || "";
|
|
1418
1418
|
if (i === "cascader") {
|
|
1419
|
-
const $ = (
|
|
1420
|
-
const
|
|
1421
|
-
let
|
|
1422
|
-
for (const se of
|
|
1423
|
-
const ue =
|
|
1424
|
-
ue ? (
|
|
1419
|
+
const $ = (z) => {
|
|
1420
|
+
const ae = [];
|
|
1421
|
+
let ne = b;
|
|
1422
|
+
for (const se of z) {
|
|
1423
|
+
const ue = ne?.find((ve) => ve.value === se);
|
|
1424
|
+
ue ? (ae.push(ue.label), ne = ue.children) : ae.push(se);
|
|
1425
1425
|
}
|
|
1426
|
-
return
|
|
1426
|
+
return ae;
|
|
1427
1427
|
};
|
|
1428
1428
|
return h.cascader ? $(h.cascader).join(" / ") : "";
|
|
1429
1429
|
}
|
|
1430
1430
|
if (i === "treeSelect") {
|
|
1431
|
-
const $ = (
|
|
1432
|
-
if (!
|
|
1433
|
-
for (const
|
|
1434
|
-
if (
|
|
1435
|
-
if (
|
|
1436
|
-
const se = $(
|
|
1431
|
+
const $ = (z, ae) => {
|
|
1432
|
+
if (!z) return "";
|
|
1433
|
+
for (const ne of z) {
|
|
1434
|
+
if (ne.value === ae) return ne.title;
|
|
1435
|
+
if (ne.children) {
|
|
1436
|
+
const se = $(ne.children, ae);
|
|
1437
1437
|
if (se) return se;
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
@@ -1471,7 +1471,7 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1471
1471
|
const y = f[b.id];
|
|
1472
1472
|
y != null && y !== "" && (i[b.id] = y);
|
|
1473
1473
|
}
|
|
1474
|
-
}) : i =
|
|
1474
|
+
}) : i = C.value.reduce((b, y) => {
|
|
1475
1475
|
const { id: O, type: m, value: _ } = y;
|
|
1476
1476
|
if (!O) return b;
|
|
1477
1477
|
let $ = _[O];
|
|
@@ -1480,16 +1480,16 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1480
1480
|
const h = r(i);
|
|
1481
1481
|
c("search", h), c("update:filterValue", i);
|
|
1482
1482
|
} catch {
|
|
1483
|
-
|
|
1483
|
+
Ee.error("搜索失败");
|
|
1484
1484
|
}
|
|
1485
1485
|
}, 800);
|
|
1486
|
-
function
|
|
1487
|
-
|
|
1486
|
+
function He() {
|
|
1487
|
+
C.value = [], u.type === "form" && Object.keys(f).forEach((r) => {
|
|
1488
1488
|
delete f[r];
|
|
1489
1489
|
}), je(!1), pe();
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1492
|
-
c("switch",
|
|
1491
|
+
function Ye() {
|
|
1492
|
+
c("switch", C.value);
|
|
1493
1493
|
}
|
|
1494
1494
|
function Pe() {
|
|
1495
1495
|
const r = fe();
|
|
@@ -1510,8 +1510,8 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1510
1510
|
});
|
|
1511
1511
|
}), l.saveSearchFilters(r, i);
|
|
1512
1512
|
} else
|
|
1513
|
-
l.saveSearchFilters(r,
|
|
1514
|
-
|
|
1513
|
+
l.saveSearchFilters(r, C.value);
|
|
1514
|
+
Ee.success("保存成功");
|
|
1515
1515
|
}
|
|
1516
1516
|
const Fe = () => {
|
|
1517
1517
|
const r = {};
|
|
@@ -1524,11 +1524,11 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1524
1524
|
h != null && h !== "" && (r[i.id] = h);
|
|
1525
1525
|
}
|
|
1526
1526
|
}), r;
|
|
1527
|
-
},
|
|
1527
|
+
}, G = () => {
|
|
1528
1528
|
const r = Fe();
|
|
1529
1529
|
c("update:filterValue", r);
|
|
1530
1530
|
}, vt = () => {
|
|
1531
|
-
|
|
1531
|
+
G();
|
|
1532
1532
|
const r = Fe();
|
|
1533
1533
|
c("search", r);
|
|
1534
1534
|
}, n = () => {
|
|
@@ -1576,41 +1576,41 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1576
1576
|
});
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
|
-
|
|
1579
|
+
C.value = i;
|
|
1580
1580
|
}
|
|
1581
1581
|
},
|
|
1582
1582
|
{ immediate: !0 }
|
|
1583
1583
|
), a({
|
|
1584
|
-
reset:
|
|
1584
|
+
reset: He,
|
|
1585
1585
|
search: pe
|
|
1586
1586
|
}), (r, i) => {
|
|
1587
|
-
const h =
|
|
1588
|
-
return v(),
|
|
1589
|
-
r.type === "input" ? (v(),
|
|
1587
|
+
const h = F("a-tag"), b = F("a-input"), y = F("vxe-column"), O = F("a-space"), m = F("vxe-table"), _ = F("a-popover"), $ = F("a-input-number"), z = F("a-switch"), ae = F("a-date-picker"), ne = F("a-time-picker"), se = F("a-range-picker"), ue = F("a-form-item"), ve = F("a-button"), ga = F("a-form");
|
|
1588
|
+
return v(), R("div", Qn, [
|
|
1589
|
+
r.type === "input" ? (v(), R("div", {
|
|
1590
1590
|
key: 0,
|
|
1591
1591
|
class: "search-wrapper",
|
|
1592
1592
|
onClick: ut
|
|
1593
1593
|
}, [
|
|
1594
1594
|
S(b, {
|
|
1595
1595
|
ref_key: "inputRef",
|
|
1596
|
-
ref:
|
|
1597
|
-
value:
|
|
1598
|
-
"onUpdate:value": i[0] || (i[0] = (s) =>
|
|
1596
|
+
ref: J,
|
|
1597
|
+
value: I.value,
|
|
1598
|
+
"onUpdate:value": i[0] || (i[0] = (s) => I.value = s),
|
|
1599
1599
|
placeholder: r.placeholder,
|
|
1600
1600
|
readonly: "",
|
|
1601
|
-
disabled:
|
|
1601
|
+
disabled: E(we),
|
|
1602
1602
|
allowClear: ""
|
|
1603
1603
|
}, {
|
|
1604
1604
|
prefix: x(() => [
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
S(
|
|
1608
|
-
(v(!0),
|
|
1605
|
+
V("div", Jn, [
|
|
1606
|
+
V("div", Gn, [
|
|
1607
|
+
S(E(rt), { style: { color: "#999" } }),
|
|
1608
|
+
(v(!0), R(re, null, me(C.value, (s, P) => (v(), w(h, {
|
|
1609
1609
|
key: s.id,
|
|
1610
1610
|
closable: "",
|
|
1611
1611
|
class: "tag-item",
|
|
1612
|
-
onClose: Y((mt) => ft(
|
|
1613
|
-
onClick: Y((mt) =>
|
|
1612
|
+
onClose: Y((mt) => ft(P), ["stop"]),
|
|
1613
|
+
onClick: Y((mt) => Ne(s, P), ["stop"])
|
|
1614
1614
|
}, {
|
|
1615
1615
|
default: x(() => [
|
|
1616
1616
|
L(q(s.label) + ": " + q(pt(s)), 1)
|
|
@@ -1621,47 +1621,47 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1621
1621
|
])
|
|
1622
1622
|
]),
|
|
1623
1623
|
suffix: x(() => [
|
|
1624
|
-
|
|
1624
|
+
C.value?.length ? (v(), w(E(Ft), {
|
|
1625
1625
|
key: 0,
|
|
1626
1626
|
style: { color: "#999" },
|
|
1627
|
-
onClick: Y(
|
|
1627
|
+
onClick: Y(He, ["stop"])
|
|
1628
1628
|
})) : B("", !0)
|
|
1629
1629
|
]),
|
|
1630
1630
|
_: 1
|
|
1631
1631
|
}, 8, ["value", "placeholder", "disabled"]),
|
|
1632
|
-
|
|
1633
|
-
r.hideRefresh ? B("", !0) : (v(),
|
|
1632
|
+
V("div", Zn, [
|
|
1633
|
+
r.hideRefresh ? B("", !0) : (v(), R("div", {
|
|
1634
1634
|
key: 0,
|
|
1635
|
-
class:
|
|
1635
|
+
class: le(["action-border", { "action-border-disabled": E(we) }]),
|
|
1636
1636
|
onClick: i[1] || (i[1] = Y(
|
|
1637
1637
|
//@ts-ignore
|
|
1638
|
-
(...s) =>
|
|
1638
|
+
(...s) => E(pe) && E(pe)(...s),
|
|
1639
1639
|
["stop"]
|
|
1640
1640
|
)),
|
|
1641
1641
|
title: "刷新"
|
|
1642
1642
|
}, [
|
|
1643
|
-
S(
|
|
1643
|
+
S(E(nt))
|
|
1644
1644
|
], 2)),
|
|
1645
|
-
r.showSwitch ? (v(),
|
|
1645
|
+
r.showSwitch ? (v(), R("div", {
|
|
1646
1646
|
key: 1,
|
|
1647
1647
|
class: "action-border",
|
|
1648
|
-
onClick: Y(
|
|
1648
|
+
onClick: Y(Ye, ["stop"]),
|
|
1649
1649
|
title: "切换显示"
|
|
1650
1650
|
}, [
|
|
1651
|
-
S(
|
|
1651
|
+
S(E(et))
|
|
1652
1652
|
])) : B("", !0),
|
|
1653
|
-
r.showSettingColumns ? (v(),
|
|
1653
|
+
r.showSettingColumns ? (v(), w(_, {
|
|
1654
1654
|
key: 2,
|
|
1655
1655
|
trigger: "click",
|
|
1656
1656
|
placement: "bottomRight",
|
|
1657
|
-
getPopupContainer:
|
|
1657
|
+
getPopupContainer: te,
|
|
1658
1658
|
mouseEnterDelay: 0,
|
|
1659
1659
|
mouseLeaveDelay: 0,
|
|
1660
1660
|
onClick: i[2] || (i[2] = Y(() => {
|
|
1661
1661
|
}, ["stop"]))
|
|
1662
1662
|
}, {
|
|
1663
1663
|
content: x(() => [
|
|
1664
|
-
|
|
1664
|
+
V("div", Xn, [
|
|
1665
1665
|
S(m, {
|
|
1666
1666
|
style: { color: "#000" },
|
|
1667
1667
|
border: "none",
|
|
@@ -1670,10 +1670,10 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1670
1670
|
ref: p,
|
|
1671
1671
|
"max-height": "400",
|
|
1672
1672
|
"row-config": { drag: !0 },
|
|
1673
|
-
"row-drag-config":
|
|
1674
|
-
data:
|
|
1675
|
-
onCheckboxAll:
|
|
1676
|
-
onRowDragend:
|
|
1673
|
+
"row-drag-config": Be,
|
|
1674
|
+
data: j.value.slice(1),
|
|
1675
|
+
onCheckboxAll: De,
|
|
1676
|
+
onRowDragend: ze,
|
|
1677
1677
|
"checkbox-config": {
|
|
1678
1678
|
checkField: "checked",
|
|
1679
1679
|
checkStrictly: !1,
|
|
@@ -1696,9 +1696,9 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1696
1696
|
title: "title"
|
|
1697
1697
|
}, {
|
|
1698
1698
|
header: x(() => [
|
|
1699
|
-
|
|
1700
|
-
i[16] || (i[16] =
|
|
1701
|
-
|
|
1699
|
+
V("div", { style: { display: "flex", "justify-content": "space-between", "align-items": "center", width: "100%" } }, [
|
|
1700
|
+
i[16] || (i[16] = V("span", null, "列展示/排序", -1)),
|
|
1701
|
+
V("a", {
|
|
1702
1702
|
style: { "font-size": "15px" },
|
|
1703
1703
|
size: "small",
|
|
1704
1704
|
onClick: Ve
|
|
@@ -1706,31 +1706,31 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1706
1706
|
])
|
|
1707
1707
|
]),
|
|
1708
1708
|
default: x(({ row: s }) => [
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
style:
|
|
1709
|
+
V("div", Kn, [
|
|
1710
|
+
V("span", {
|
|
1711
|
+
style: Ge({ opacity: s.checked ? 1 : 0.3, fontSize: "14px" })
|
|
1712
1712
|
}, q(s.title), 5),
|
|
1713
1713
|
S(O, null, {
|
|
1714
1714
|
default: x(() => [
|
|
1715
|
-
S(
|
|
1716
|
-
class:
|
|
1717
|
-
onClick: Y((
|
|
1715
|
+
S(E(xe), {
|
|
1716
|
+
class: le(["action-icon", { active: s.fixed === "left" }]),
|
|
1717
|
+
onClick: Y((P) => ce(s, s.fixed === "left" ? !1 : "left"), ["stop"]),
|
|
1718
1718
|
title: "固定到左侧"
|
|
1719
1719
|
}, null, 8, ["class", "onClick"]),
|
|
1720
|
-
S(
|
|
1721
|
-
class:
|
|
1720
|
+
S(E(xe), {
|
|
1721
|
+
class: le(["action-icon", { active: s.fixed === "right" }]),
|
|
1722
1722
|
rotate: 270,
|
|
1723
|
-
onClick: Y((
|
|
1723
|
+
onClick: Y((P) => ce(s, s.fixed === "right" ? !1 : "right"), ["stop"]),
|
|
1724
1724
|
title: "固定到右侧"
|
|
1725
1725
|
}, null, 8, ["class", "onClick"]),
|
|
1726
|
-
s.checked ? (v(),
|
|
1726
|
+
s.checked ? (v(), w(E(at), {
|
|
1727
1727
|
key: 1,
|
|
1728
|
-
class:
|
|
1729
|
-
onClick: Y((
|
|
1730
|
-
}, null, 8, ["class", "onClick"])) : (v(),
|
|
1728
|
+
class: le(["visibility-icon", { disabled: H(s) }]),
|
|
1729
|
+
onClick: Y((P) => !H(s) && T(s), ["stop"])
|
|
1730
|
+
}, null, 8, ["class", "onClick"])) : (v(), w(E(tt), {
|
|
1731
1731
|
key: 0,
|
|
1732
|
-
class:
|
|
1733
|
-
onClick: Y((
|
|
1732
|
+
class: le(["visibility-icon", { disabled: H(s) }]),
|
|
1733
|
+
onClick: Y((P) => !H(s) && T(s), ["stop"])
|
|
1734
1734
|
}, null, 8, ["class", "onClick"]))
|
|
1735
1735
|
]),
|
|
1736
1736
|
_: 2
|
|
@@ -1745,21 +1745,21 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1745
1745
|
])
|
|
1746
1746
|
]),
|
|
1747
1747
|
default: x(() => [
|
|
1748
|
-
|
|
1749
|
-
S(
|
|
1748
|
+
V("div", el, [
|
|
1749
|
+
S(E(ot))
|
|
1750
1750
|
])
|
|
1751
1751
|
]),
|
|
1752
1752
|
_: 1
|
|
1753
1753
|
})) : B("", !0),
|
|
1754
|
-
r.showSave ? (v(),
|
|
1754
|
+
r.showSave ? (v(), R("div", {
|
|
1755
1755
|
key: 3,
|
|
1756
1756
|
class: "action-border",
|
|
1757
1757
|
onClick: Y(Pe, ["stop"]),
|
|
1758
1758
|
title: "保存设置"
|
|
1759
1759
|
}, [
|
|
1760
|
-
S(
|
|
1760
|
+
S(E(lt))
|
|
1761
1761
|
])) : B("", !0),
|
|
1762
|
-
r.$slots.icon ? (v(),
|
|
1762
|
+
r.$slots.icon ? (v(), R("div", {
|
|
1763
1763
|
key: 4,
|
|
1764
1764
|
onClick: i[3] || (i[3] = Y(() => {
|
|
1765
1765
|
}, ["stop"]))
|
|
@@ -1767,187 +1767,184 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1767
1767
|
W(r.$slots, "icon", {}, void 0, !0)
|
|
1768
1768
|
])) : B("", !0)
|
|
1769
1769
|
])
|
|
1770
|
-
])) : r.type === "form" ? (v(),
|
|
1770
|
+
])) : r.type === "form" ? (v(), R("div", {
|
|
1771
1771
|
key: 1,
|
|
1772
|
-
class:
|
|
1773
|
-
style:
|
|
1772
|
+
class: le(["base-form-search", [`layout-${r.formLayout}`]]),
|
|
1773
|
+
style: Ge(r.formLayout === "grid" ? `--form-columns: ${r.formSpan}` : {})
|
|
1774
1774
|
}, [
|
|
1775
1775
|
S(ga, {
|
|
1776
1776
|
layout: r.formLayout === "grid" ? "horizontal" : r.formLayout,
|
|
1777
1777
|
colon: r.colon,
|
|
1778
|
-
class:
|
|
1778
|
+
class: le(r.labelBorder ? "grid-form" : ""),
|
|
1779
1779
|
"label-col": r.labelCol,
|
|
1780
1780
|
"wrapper-col": r.wrapperCol
|
|
1781
1781
|
}, {
|
|
1782
1782
|
default: x(() => [
|
|
1783
|
-
(v(!0),
|
|
1783
|
+
(v(!0), R(re, null, me(r.filterTypes, (s) => (v(), w(ue, {
|
|
1784
1784
|
key: s.id,
|
|
1785
1785
|
label: s.label
|
|
1786
1786
|
}, {
|
|
1787
1787
|
default: x(() => [
|
|
1788
|
-
s.type === "numberRange" ? (v(),
|
|
1788
|
+
s.type === "numberRange" ? (v(), R("div", tl, [
|
|
1789
1789
|
S($, {
|
|
1790
1790
|
value: f[s.id + "_start"],
|
|
1791
|
-
"onUpdate:value": (
|
|
1791
|
+
"onUpdate:value": (P) => f[s.id + "_start"] = P,
|
|
1792
1792
|
placeholder: "最小值",
|
|
1793
1793
|
min: 0,
|
|
1794
1794
|
style: { width: "120px" },
|
|
1795
|
-
onChange:
|
|
1795
|
+
onChange: G
|
|
1796
1796
|
}, null, 8, ["value", "onUpdate:value"]),
|
|
1797
|
-
i[17] || (i[17] =
|
|
1797
|
+
i[17] || (i[17] = V("span", { class: "separator" }, "-", -1)),
|
|
1798
1798
|
S($, {
|
|
1799
1799
|
value: f[s.id + "_end"],
|
|
1800
|
-
"onUpdate:value": (
|
|
1800
|
+
"onUpdate:value": (P) => f[s.id + "_end"] = P,
|
|
1801
1801
|
placeholder: "最大值",
|
|
1802
1802
|
min: 0,
|
|
1803
1803
|
style: { width: "120px" },
|
|
1804
|
-
onChange:
|
|
1804
|
+
onChange: G
|
|
1805
1805
|
}, null, 8, ["value", "onUpdate:value"])
|
|
1806
|
-
])) : ["select", "cascader", "treeSelect"].includes(s.type) ? (v(),
|
|
1806
|
+
])) : ["select", "cascader", "treeSelect"].includes(s.type) ? (v(), w(X(`a-${s.type === "treeSelect" ? "tree-select" : s.type}`), U({
|
|
1807
1807
|
key: 1,
|
|
1808
1808
|
value: f[s.id],
|
|
1809
|
-
"onUpdate:value": (
|
|
1809
|
+
"onUpdate:value": (P) => f[s.id] = P,
|
|
1810
1810
|
options: s.options,
|
|
1811
1811
|
"tree-data": s.treeData,
|
|
1812
1812
|
placeholder: s.placeholder || "请选择",
|
|
1813
1813
|
class: "form-item",
|
|
1814
|
-
getPopupContainer:
|
|
1815
|
-
onChange:
|
|
1814
|
+
getPopupContainer: te,
|
|
1815
|
+
onChange: G
|
|
1816
1816
|
}, { ref_for: !0 }, {
|
|
1817
1817
|
...s.showSearch ? { showSearch: !0 } : {},
|
|
1818
1818
|
...s.multiple ? { mode: "multiple" } : {}
|
|
1819
1819
|
}, {
|
|
1820
|
-
filterOption: s.showSearch ? (
|
|
1820
|
+
filterOption: s.showSearch ? (P, mt) => mt.label?.toLowerCase().includes(P.toLowerCase()) : void 0,
|
|
1821
1821
|
fieldNames: s.fieldNames
|
|
1822
|
-
}), null, 16, ["value", "onUpdate:value", "options", "tree-data", "placeholder", "filterOption", "fieldNames"])) : s.type === "checkbox" ? (v(),
|
|
1822
|
+
}), null, 16, ["value", "onUpdate:value", "options", "tree-data", "placeholder", "filterOption", "fieldNames"])) : s.type === "checkbox" ? (v(), w(X("a-checkbox-group"), {
|
|
1823
1823
|
key: 2,
|
|
1824
1824
|
value: f[s.id],
|
|
1825
|
-
"onUpdate:value": (
|
|
1825
|
+
"onUpdate:value": (P) => f[s.id] = P,
|
|
1826
1826
|
options: s.options,
|
|
1827
1827
|
class: "form-item",
|
|
1828
|
-
onChange:
|
|
1829
|
-
}, null, 40, ["value", "onUpdate:value", "options"])) : s.type === "radio" ? (v(),
|
|
1828
|
+
onChange: G
|
|
1829
|
+
}, null, 40, ["value", "onUpdate:value", "options"])) : s.type === "radio" ? (v(), w(X("a-radio-group"), {
|
|
1830
1830
|
key: 3,
|
|
1831
1831
|
value: f[s.id],
|
|
1832
|
-
"onUpdate:value": (
|
|
1832
|
+
"onUpdate:value": (P) => f[s.id] = P,
|
|
1833
1833
|
options: s.options,
|
|
1834
1834
|
class: "form-item",
|
|
1835
|
-
onChange:
|
|
1836
|
-
}, null, 40, ["value", "onUpdate:value", "options"])) : ["rate", "slider"].includes(s.type) ? (v(),
|
|
1835
|
+
onChange: G
|
|
1836
|
+
}, null, 40, ["value", "onUpdate:value", "options"])) : ["rate", "slider"].includes(s.type) ? (v(), w(X(`a-${s.type}`), U(
|
|
1837
1837
|
{
|
|
1838
1838
|
key: 4,
|
|
1839
1839
|
value: f[s.id],
|
|
1840
|
-
"onUpdate:value": (
|
|
1840
|
+
"onUpdate:value": (P) => f[s.id] = P
|
|
1841
1841
|
},
|
|
1842
1842
|
{ ref_for: !0 },
|
|
1843
1843
|
s.type === "slider" ? { min: s.min || 0, max: s.max || 100 } : {},
|
|
1844
1844
|
{
|
|
1845
1845
|
class: "form-item",
|
|
1846
|
-
onChange:
|
|
1846
|
+
onChange: G
|
|
1847
1847
|
}
|
|
1848
|
-
), null, 16, ["value", "onUpdate:value"])) : s.type === "switch" ? (v(),
|
|
1848
|
+
), null, 16, ["value", "onUpdate:value"])) : s.type === "switch" ? (v(), w(z, {
|
|
1849
1849
|
key: 5,
|
|
1850
1850
|
value: f[s.id],
|
|
1851
|
-
"onUpdate:value": (
|
|
1851
|
+
"onUpdate:value": (P) => f[s.id] = P,
|
|
1852
1852
|
class: "form-item",
|
|
1853
|
-
onChange:
|
|
1854
|
-
}, null, 8, ["value", "onUpdate:value"])) : ["input", "textarea"].includes(s.type) ? (v(),
|
|
1853
|
+
onChange: G
|
|
1854
|
+
}, null, 8, ["value", "onUpdate:value"])) : ["input", "textarea"].includes(s.type) ? (v(), w(X(`a-${s.type}`), {
|
|
1855
1855
|
key: 6,
|
|
1856
1856
|
value: f[s.id],
|
|
1857
|
-
"onUpdate:value": (
|
|
1857
|
+
"onUpdate:value": (P) => f[s.id] = P,
|
|
1858
1858
|
placeholder: s.placeholder || "请输入",
|
|
1859
1859
|
rows: s.type === "textarea" ? 4 : void 0,
|
|
1860
1860
|
class: "form-item",
|
|
1861
|
-
onChange:
|
|
1862
|
-
}, null, 40, ["value", "onUpdate:value", "placeholder", "rows"])) : ["date", "datetime", "month", "week", "quarter", "year"].includes(s.type) ? (v(),
|
|
1861
|
+
onChange: G
|
|
1862
|
+
}, null, 40, ["value", "onUpdate:value", "placeholder", "rows"])) : ["date", "datetime", "month", "week", "quarter", "year"].includes(s.type) ? (v(), w(ae, {
|
|
1863
1863
|
key: 7,
|
|
1864
1864
|
value: f[s.id],
|
|
1865
|
-
"onUpdate:value": (
|
|
1865
|
+
"onUpdate:value": (P) => f[s.id] = P,
|
|
1866
1866
|
format: s.format || o[s.type],
|
|
1867
1867
|
"show-time": s.type === "datetime",
|
|
1868
1868
|
picker: s.type === "date" || s.type === "datetime" ? void 0 : s.type,
|
|
1869
1869
|
"value-format": s.format || o[s.type],
|
|
1870
1870
|
class: "form-item",
|
|
1871
|
-
getPopupContainer:
|
|
1872
|
-
onChange:
|
|
1873
|
-
}, null, 8, ["value", "onUpdate:value", "format", "show-time", "picker", "value-format"])) : s.type === "time" ? (v(),
|
|
1871
|
+
getPopupContainer: te,
|
|
1872
|
+
onChange: G
|
|
1873
|
+
}, null, 8, ["value", "onUpdate:value", "format", "show-time", "picker", "value-format"])) : s.type === "time" ? (v(), w(ne, {
|
|
1874
1874
|
key: 8,
|
|
1875
1875
|
value: f[s.id],
|
|
1876
|
-
"onUpdate:value": (
|
|
1876
|
+
"onUpdate:value": (P) => f[s.id] = P,
|
|
1877
1877
|
format: s.format || "HH:mm:ss",
|
|
1878
1878
|
class: "form-item",
|
|
1879
|
-
getPopupContainer:
|
|
1880
|
-
onChange:
|
|
1881
|
-
}, null, 8, ["value", "onUpdate:value", "format"])) : s.type === "dateRange" || s.type === "datetimeRange" ? (v(),
|
|
1879
|
+
getPopupContainer: te,
|
|
1880
|
+
onChange: G
|
|
1881
|
+
}, null, 8, ["value", "onUpdate:value", "format"])) : s.type === "dateRange" || s.type === "datetimeRange" ? (v(), w(se, {
|
|
1882
1882
|
key: 9,
|
|
1883
1883
|
value: f[s.id],
|
|
1884
|
-
"onUpdate:value": (
|
|
1884
|
+
"onUpdate:value": (P) => f[s.id] = P,
|
|
1885
1885
|
format: s.format || (s.type === "datetimeRange" ? o.datetime : o.date),
|
|
1886
1886
|
"value-format": s.format || (s.type === "datetimeRange" ? o.datetime : o.date),
|
|
1887
1887
|
"show-time": s.type === "datetimeRange",
|
|
1888
1888
|
class: "form-item",
|
|
1889
|
-
getPopupContainer:
|
|
1890
|
-
onChange:
|
|
1891
|
-
"disabled-date": s?.maxDays ? (
|
|
1889
|
+
getPopupContainer: te,
|
|
1890
|
+
onChange: G,
|
|
1891
|
+
"disabled-date": s?.maxDays ? (P) => ke(P, s.maxDays) : null,
|
|
1892
1892
|
onCalendarChange: be
|
|
1893
1893
|
}, null, 8, ["value", "onUpdate:value", "format", "value-format", "show-time", "disabled-date"])) : B("", !0),
|
|
1894
1894
|
s.type === "slot" ? W(r.$slots, "filter-slots", {
|
|
1895
1895
|
key: 10,
|
|
1896
1896
|
filter: s,
|
|
1897
1897
|
filterTemp: f,
|
|
1898
|
-
confirm:
|
|
1898
|
+
confirm: G
|
|
1899
1899
|
}, void 0, !0) : B("", !0)
|
|
1900
1900
|
]),
|
|
1901
1901
|
_: 2
|
|
1902
1902
|
}, 1032, ["label"]))), 128)),
|
|
1903
1903
|
S(ue, { class: "form-actions-item" }, {
|
|
1904
1904
|
default: x(() => [
|
|
1905
|
-
|
|
1905
|
+
V("div", al, [
|
|
1906
1906
|
S(O, null, {
|
|
1907
1907
|
default: x(() => [
|
|
1908
|
-
r.hideRefresh ? B("", !0) : (v(),
|
|
1908
|
+
r.hideRefresh ? B("", !0) : (v(), w(ve, {
|
|
1909
1909
|
key: 0,
|
|
1910
1910
|
type: "primary",
|
|
1911
1911
|
onClick: vt,
|
|
1912
|
-
loading:
|
|
1913
|
-
disabled:
|
|
1912
|
+
loading: E(we),
|
|
1913
|
+
disabled: E(we)
|
|
1914
1914
|
}, {
|
|
1915
1915
|
default: x(() => [
|
|
1916
|
-
S(
|
|
1916
|
+
S(E(rt)),
|
|
1917
1917
|
i[18] || (i[18] = L(" 查询 ", -1))
|
|
1918
1918
|
]),
|
|
1919
|
-
_: 1
|
|
1920
|
-
__: [18]
|
|
1919
|
+
_: 1
|
|
1921
1920
|
}, 8, ["loading", "disabled"])),
|
|
1922
1921
|
S(ve, { onClick: n }, {
|
|
1923
1922
|
default: x(() => [
|
|
1924
|
-
S(
|
|
1923
|
+
S(E(nt)),
|
|
1925
1924
|
i[19] || (i[19] = L(" 重置 ", -1))
|
|
1926
1925
|
]),
|
|
1927
|
-
_: 1
|
|
1928
|
-
__: [19]
|
|
1926
|
+
_: 1
|
|
1929
1927
|
}),
|
|
1930
|
-
r.showSwitch ? (v(),
|
|
1928
|
+
r.showSwitch ? (v(), w(ve, {
|
|
1931
1929
|
key: 1,
|
|
1932
|
-
onClick:
|
|
1930
|
+
onClick: Ye
|
|
1933
1931
|
}, {
|
|
1934
1932
|
default: x(() => [
|
|
1935
|
-
S(
|
|
1933
|
+
S(E(et)),
|
|
1936
1934
|
i[20] || (i[20] = L(" 切换显示 ", -1))
|
|
1937
1935
|
]),
|
|
1938
|
-
_: 1
|
|
1939
|
-
__: [20]
|
|
1936
|
+
_: 1
|
|
1940
1937
|
})) : B("", !0),
|
|
1941
|
-
r.showSettingColumns ? (v(),
|
|
1938
|
+
r.showSettingColumns ? (v(), w(_, {
|
|
1942
1939
|
key: 2,
|
|
1943
1940
|
trigger: "click",
|
|
1944
1941
|
placement: "bottomLeft",
|
|
1945
|
-
getPopupContainer:
|
|
1942
|
+
getPopupContainer: te,
|
|
1946
1943
|
mouseEnterDelay: 0,
|
|
1947
1944
|
mouseLeaveDelay: 0
|
|
1948
1945
|
}, {
|
|
1949
1946
|
content: x(() => [
|
|
1950
|
-
|
|
1947
|
+
V("div", nl, [
|
|
1951
1948
|
S(m, {
|
|
1952
1949
|
style: { color: "#000" },
|
|
1953
1950
|
border: "none",
|
|
@@ -1956,10 +1953,10 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1956
1953
|
ref: p,
|
|
1957
1954
|
"max-height": "400",
|
|
1958
1955
|
"row-config": { drag: !0 },
|
|
1959
|
-
"row-drag-config":
|
|
1960
|
-
data:
|
|
1961
|
-
onCheckboxAll:
|
|
1962
|
-
onRowDragend:
|
|
1956
|
+
"row-drag-config": Be,
|
|
1957
|
+
data: j.value.slice(1),
|
|
1958
|
+
onCheckboxAll: De,
|
|
1959
|
+
onRowDragend: ze,
|
|
1963
1960
|
"checkbox-config": {
|
|
1964
1961
|
checkField: "checked",
|
|
1965
1962
|
checkStrictly: !1,
|
|
@@ -1982,9 +1979,9 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1982
1979
|
title: "title"
|
|
1983
1980
|
}, {
|
|
1984
1981
|
header: x(() => [
|
|
1985
|
-
|
|
1986
|
-
i[21] || (i[21] =
|
|
1987
|
-
|
|
1982
|
+
V("div", { style: { display: "flex", "justify-content": "space-between", "align-items": "center", width: "100%" } }, [
|
|
1983
|
+
i[21] || (i[21] = V("span", null, "列展示/排序", -1)),
|
|
1984
|
+
V("a", {
|
|
1988
1985
|
style: { "font-size": "15px" },
|
|
1989
1986
|
size: "small",
|
|
1990
1987
|
onClick: Ve
|
|
@@ -1992,31 +1989,31 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
1992
1989
|
])
|
|
1993
1990
|
]),
|
|
1994
1991
|
default: x(({ row: s }) => [
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
style:
|
|
1992
|
+
V("div", ll, [
|
|
1993
|
+
V("span", {
|
|
1994
|
+
style: Ge({ opacity: s.checked ? 1 : 0.3, fontSize: "14px" })
|
|
1998
1995
|
}, q(s.title), 5),
|
|
1999
1996
|
S(O, null, {
|
|
2000
1997
|
default: x(() => [
|
|
2001
|
-
S(
|
|
2002
|
-
class:
|
|
2003
|
-
onClick: Y((
|
|
1998
|
+
S(E(xe), {
|
|
1999
|
+
class: le(["action-icon", { active: s.fixed === "left" }]),
|
|
2000
|
+
onClick: Y((P) => ce(s, s.fixed === "left" ? !1 : "left"), ["stop"]),
|
|
2004
2001
|
title: "固定到左侧"
|
|
2005
2002
|
}, null, 8, ["class", "onClick"]),
|
|
2006
|
-
S(
|
|
2007
|
-
class:
|
|
2003
|
+
S(E(xe), {
|
|
2004
|
+
class: le(["action-icon", { active: s.fixed === "right" }]),
|
|
2008
2005
|
rotate: 270,
|
|
2009
|
-
onClick: Y((
|
|
2006
|
+
onClick: Y((P) => ce(s, s.fixed === "right" ? !1 : "right"), ["stop"]),
|
|
2010
2007
|
title: "固定到右侧"
|
|
2011
2008
|
}, null, 8, ["class", "onClick"]),
|
|
2012
|
-
s.checked ? (v(),
|
|
2009
|
+
s.checked ? (v(), w(E(at), {
|
|
2013
2010
|
key: 1,
|
|
2014
|
-
class:
|
|
2015
|
-
onClick: Y((
|
|
2016
|
-
}, null, 8, ["class", "onClick"])) : (v(),
|
|
2011
|
+
class: le(["visibility-icon", { disabled: H(s) }]),
|
|
2012
|
+
onClick: Y((P) => !H(s) && T(s), ["stop"])
|
|
2013
|
+
}, null, 8, ["class", "onClick"])) : (v(), w(E(tt), {
|
|
2017
2014
|
key: 0,
|
|
2018
|
-
class:
|
|
2019
|
-
onClick: Y((
|
|
2015
|
+
class: le(["visibility-icon", { disabled: H(s) }]),
|
|
2016
|
+
onClick: Y((P) => !H(s) && T(s), ["stop"])
|
|
2020
2017
|
}, null, 8, ["class", "onClick"]))
|
|
2021
2018
|
]),
|
|
2022
2019
|
_: 2
|
|
@@ -2033,25 +2030,23 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
2033
2030
|
default: x(() => [
|
|
2034
2031
|
S(ve, null, {
|
|
2035
2032
|
default: x(() => [
|
|
2036
|
-
S(
|
|
2033
|
+
S(E(ot)),
|
|
2037
2034
|
i[22] || (i[22] = L(" 列设置 ", -1))
|
|
2038
2035
|
]),
|
|
2039
|
-
_: 1
|
|
2040
|
-
__: [22]
|
|
2036
|
+
_: 1
|
|
2041
2037
|
})
|
|
2042
2038
|
]),
|
|
2043
2039
|
_: 1
|
|
2044
2040
|
})) : B("", !0),
|
|
2045
|
-
r.showSave ? (v(),
|
|
2041
|
+
r.showSave ? (v(), w(ve, {
|
|
2046
2042
|
key: 3,
|
|
2047
2043
|
onClick: Pe
|
|
2048
2044
|
}, {
|
|
2049
2045
|
default: x(() => [
|
|
2050
|
-
S(
|
|
2046
|
+
S(E(lt)),
|
|
2051
2047
|
i[23] || (i[23] = L(" 保存设置 ", -1))
|
|
2052
2048
|
]),
|
|
2053
|
-
_: 1
|
|
2054
|
-
__: [23]
|
|
2049
|
+
_: 1
|
|
2055
2050
|
})) : B("", !0),
|
|
2056
2051
|
W(r.$slots, "icon", {}, void 0, !0)
|
|
2057
2052
|
]),
|
|
@@ -2065,134 +2060,133 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
2065
2060
|
_: 3
|
|
2066
2061
|
}, 8, ["layout", "colon", "class", "label-col", "wrapper-col"])
|
|
2067
2062
|
], 6)) : B("", !0),
|
|
2068
|
-
g.value ? (v(),
|
|
2063
|
+
g.value ? (v(), R("div", {
|
|
2069
2064
|
key: 2,
|
|
2070
2065
|
class: "dropdown-panel",
|
|
2071
2066
|
onClick: i[15] || (i[15] = Y(() => {
|
|
2072
2067
|
}, ["stop"]))
|
|
2073
2068
|
}, [
|
|
2074
|
-
d.value.type ? (v(),
|
|
2075
|
-
|
|
2069
|
+
d.value.type ? (v(), R("div", sl, [
|
|
2070
|
+
V("div", il, [
|
|
2076
2071
|
S(ve, {
|
|
2077
2072
|
type: "link",
|
|
2078
2073
|
onClick: dt
|
|
2079
2074
|
}, {
|
|
2080
2075
|
default: x(() => [
|
|
2081
|
-
S(
|
|
2076
|
+
S(E(At)),
|
|
2082
2077
|
i[24] || (i[24] = L(" 返回 ", -1))
|
|
2083
2078
|
]),
|
|
2084
|
-
_: 1
|
|
2085
|
-
__: [24]
|
|
2079
|
+
_: 1
|
|
2086
2080
|
}),
|
|
2087
|
-
|
|
2081
|
+
V("span", null, q(d.value.label), 1)
|
|
2088
2082
|
]),
|
|
2089
|
-
d.value.type === "numberRange" ? (v(),
|
|
2083
|
+
d.value.type === "numberRange" ? (v(), R("div", ul, [
|
|
2090
2084
|
S($, {
|
|
2091
|
-
value:
|
|
2092
|
-
"onUpdate:value": i[4] || (i[4] = (s) =>
|
|
2085
|
+
value: k.start,
|
|
2086
|
+
"onUpdate:value": i[4] || (i[4] = (s) => k.start = s),
|
|
2093
2087
|
placeholder: "最小值",
|
|
2094
2088
|
min: 0,
|
|
2095
2089
|
style: { width: "120px" },
|
|
2096
|
-
onPressEnter:
|
|
2090
|
+
onPressEnter: ee
|
|
2097
2091
|
}, null, 8, ["value"]),
|
|
2098
|
-
i[25] || (i[25] =
|
|
2092
|
+
i[25] || (i[25] = V("span", { class: "separator" }, "-", -1)),
|
|
2099
2093
|
S($, {
|
|
2100
|
-
value:
|
|
2101
|
-
"onUpdate:value": i[5] || (i[5] = (s) =>
|
|
2094
|
+
value: k.end,
|
|
2095
|
+
"onUpdate:value": i[5] || (i[5] = (s) => k.end = s),
|
|
2102
2096
|
placeholder: "最大值",
|
|
2103
2097
|
min: 0,
|
|
2104
2098
|
style: { width: "120px" },
|
|
2105
|
-
onPressEnter:
|
|
2099
|
+
onPressEnter: ee
|
|
2106
2100
|
}, null, 8, ["value"])
|
|
2107
|
-
])) : ["select", "cascader", "treeSelect"].includes(d.value.type) ? (v(),
|
|
2101
|
+
])) : ["select", "cascader", "treeSelect"].includes(d.value.type) ? (v(), w(X(`a-${d.value.type === "treeSelect" ? "tree-select" : d.value.type}`), U({
|
|
2108
2102
|
key: 1,
|
|
2109
|
-
value:
|
|
2110
|
-
"onUpdate:value": i[6] || (i[6] = (s) =>
|
|
2103
|
+
value: k[d.value.id],
|
|
2104
|
+
"onUpdate:value": i[6] || (i[6] = (s) => k[d.value.id] = s),
|
|
2111
2105
|
options: d.value.options,
|
|
2112
2106
|
"tree-data": d.value.treeData,
|
|
2113
2107
|
placeholder: d.value.placeholder || "请选择",
|
|
2114
2108
|
class: "form-item",
|
|
2115
|
-
getPopupContainer:
|
|
2116
|
-
onChange:
|
|
2109
|
+
getPopupContainer: te,
|
|
2110
|
+
onChange: ee
|
|
2117
2111
|
}, {
|
|
2118
2112
|
...d.value.showSearch ? { showSearch: !0 } : {},
|
|
2119
2113
|
...d.value.multiple ? { mode: "multiple" } : {}
|
|
2120
2114
|
}, {
|
|
2121
|
-
filterOption: d.value.showSearch ? (s,
|
|
2115
|
+
filterOption: d.value.showSearch ? (s, P) => P.label?.toLowerCase().includes(s.toLowerCase()) : void 0,
|
|
2122
2116
|
fieldNames: d.value.fieldNames
|
|
2123
|
-
}), null, 16, ["value", "options", "tree-data", "placeholder", "filterOption", "fieldNames"])) : d.value.type === "checkbox" ? (v(),
|
|
2117
|
+
}), null, 16, ["value", "options", "tree-data", "placeholder", "filterOption", "fieldNames"])) : d.value.type === "checkbox" ? (v(), w(X("a-checkbox-group"), {
|
|
2124
2118
|
key: 2,
|
|
2125
|
-
value:
|
|
2126
|
-
"onUpdate:value": i[7] || (i[7] = (s) =>
|
|
2119
|
+
value: k.checkbox,
|
|
2120
|
+
"onUpdate:value": i[7] || (i[7] = (s) => k.checkbox = s),
|
|
2127
2121
|
options: d.value.options,
|
|
2128
2122
|
class: "form-item"
|
|
2129
|
-
}, null, 40, ["value", "options"])) : d.value.type === "radio" ? (v(),
|
|
2123
|
+
}, null, 40, ["value", "options"])) : d.value.type === "radio" ? (v(), w(X("a-radio-group"), {
|
|
2130
2124
|
key: 3,
|
|
2131
|
-
value:
|
|
2132
|
-
"onUpdate:value": i[8] || (i[8] = (s) =>
|
|
2125
|
+
value: k.radio,
|
|
2126
|
+
"onUpdate:value": i[8] || (i[8] = (s) => k.radio = s),
|
|
2133
2127
|
options: d.value.options,
|
|
2134
2128
|
class: "form-item",
|
|
2135
|
-
onChange:
|
|
2136
|
-
}, null, 40, ["value", "options"])) : ["rate", "slider"].includes(d.value.type) ? (v(),
|
|
2129
|
+
onChange: ee
|
|
2130
|
+
}, null, 40, ["value", "options"])) : ["rate", "slider"].includes(d.value.type) ? (v(), w(X(`a-${d.value.type}`), U(
|
|
2137
2131
|
{
|
|
2138
2132
|
key: 4,
|
|
2139
|
-
value:
|
|
2140
|
-
"onUpdate:value": i[9] || (i[9] = (s) =>
|
|
2133
|
+
value: k[d.value.type],
|
|
2134
|
+
"onUpdate:value": i[9] || (i[9] = (s) => k[d.value.type] = s)
|
|
2141
2135
|
},
|
|
2142
2136
|
d.value.type === "slider" ? { min: d.value.min || 0, max: d.value.max || 100 } : {},
|
|
2143
2137
|
{ class: "form-item" }
|
|
2144
|
-
), null, 16, ["value"])) : d.value.type === "switch" ? (v(),
|
|
2138
|
+
), null, 16, ["value"])) : d.value.type === "switch" ? (v(), w(z, {
|
|
2145
2139
|
key: 5,
|
|
2146
|
-
value:
|
|
2147
|
-
"onUpdate:value": i[10] || (i[10] = (s) =>
|
|
2140
|
+
value: k.switch,
|
|
2141
|
+
"onUpdate:value": i[10] || (i[10] = (s) => k.switch = s),
|
|
2148
2142
|
class: "form-item"
|
|
2149
|
-
}, null, 8, ["value"])) : ["input", "textarea"].includes(d.value.type) ? (v(),
|
|
2143
|
+
}, null, 8, ["value"])) : ["input", "textarea"].includes(d.value.type) ? (v(), w(X(`a-${d.value.type}`), {
|
|
2150
2144
|
key: 6,
|
|
2151
|
-
value:
|
|
2152
|
-
"onUpdate:value": i[11] || (i[11] = (s) =>
|
|
2145
|
+
value: k[d.value.type],
|
|
2146
|
+
"onUpdate:value": i[11] || (i[11] = (s) => k[d.value.type] = s),
|
|
2153
2147
|
placeholder: d.value.placeholder || "请输入",
|
|
2154
2148
|
rows: d.value.type === "textarea" ? 4 : void 0,
|
|
2155
2149
|
class: "form-item",
|
|
2156
|
-
onPressEnter:
|
|
2157
|
-
}, null, 40, ["value", "placeholder", "rows"])) : ["date", "datetime", "month", "week", "quarter", "year"].includes(d.value.type) ? (v(),
|
|
2150
|
+
onPressEnter: ee
|
|
2151
|
+
}, null, 40, ["value", "placeholder", "rows"])) : ["date", "datetime", "month", "week", "quarter", "year"].includes(d.value.type) ? (v(), w(ae, {
|
|
2158
2152
|
key: 7,
|
|
2159
|
-
value:
|
|
2160
|
-
"onUpdate:value": i[12] || (i[12] = (s) =>
|
|
2153
|
+
value: k.date,
|
|
2154
|
+
"onUpdate:value": i[12] || (i[12] = (s) => k.date = s),
|
|
2161
2155
|
format: d.value.format || o[d.value.type],
|
|
2162
2156
|
"show-time": d.value.type === "datetime",
|
|
2163
2157
|
picker: d.value.type === "date" || d.value.type === "datetime" ? void 0 : d.value.type,
|
|
2164
2158
|
"value-format": d.value.format || o[d.value.type],
|
|
2165
2159
|
class: "form-item",
|
|
2166
|
-
getPopupContainer:
|
|
2167
|
-
onChange:
|
|
2168
|
-
}, null, 8, ["value", "format", "show-time", "picker", "value-format"])) : d.value.type === "time" ? (v(),
|
|
2160
|
+
getPopupContainer: te,
|
|
2161
|
+
onChange: ee
|
|
2162
|
+
}, null, 8, ["value", "format", "show-time", "picker", "value-format"])) : d.value.type === "time" ? (v(), w(ne, {
|
|
2169
2163
|
key: 8,
|
|
2170
|
-
value:
|
|
2171
|
-
"onUpdate:value": i[13] || (i[13] = (s) =>
|
|
2164
|
+
value: k.time,
|
|
2165
|
+
"onUpdate:value": i[13] || (i[13] = (s) => k.time = s),
|
|
2172
2166
|
format: d.value.format || "HH:mm:ss",
|
|
2173
2167
|
class: "form-item",
|
|
2174
|
-
getPopupContainer:
|
|
2175
|
-
onChange:
|
|
2176
|
-
}, null, 8, ["value", "format"])) : d.value.type === "dateRange" || d.value.type === "datetimeRange" ? (v(),
|
|
2168
|
+
getPopupContainer: te,
|
|
2169
|
+
onChange: ee
|
|
2170
|
+
}, null, 8, ["value", "format"])) : d.value.type === "dateRange" || d.value.type === "datetimeRange" ? (v(), w(se, {
|
|
2177
2171
|
key: 9,
|
|
2178
|
-
value:
|
|
2179
|
-
"onUpdate:value": i[14] || (i[14] = (s) =>
|
|
2172
|
+
value: k.dateRange,
|
|
2173
|
+
"onUpdate:value": i[14] || (i[14] = (s) => k.dateRange = s),
|
|
2180
2174
|
format: d.value.format || (d.value.type === "datetimeRange" ? o.datetime : o.date),
|
|
2181
2175
|
"value-format": d.value.format || (d.value.type === "datetimeRange" ? o.datetime : o.date),
|
|
2182
2176
|
"show-time": d.value.type === "datetimeRange",
|
|
2183
2177
|
class: "form-item",
|
|
2184
|
-
getPopupContainer:
|
|
2185
|
-
onChange:
|
|
2178
|
+
getPopupContainer: te,
|
|
2179
|
+
onChange: ee,
|
|
2186
2180
|
"disabled-date": d.value?.maxDays ? (s) => ke(s, d.value.maxDays) : null,
|
|
2187
2181
|
onCalendarChange: be
|
|
2188
2182
|
}, null, 8, ["value", "format", "value-format", "show-time", "disabled-date"])) : B("", !0),
|
|
2189
2183
|
d.value.type === "slot" ? W(r.$slots, "filter-slots", {
|
|
2190
2184
|
key: 10,
|
|
2191
2185
|
filter: d.value,
|
|
2192
|
-
filterTemp:
|
|
2193
|
-
confirm:
|
|
2186
|
+
filterTemp: k,
|
|
2187
|
+
confirm: ee
|
|
2194
2188
|
}, void 0, !0) : B("", !0),
|
|
2195
|
-
|
|
2189
|
+
V("div", cl, [
|
|
2196
2190
|
[
|
|
2197
2191
|
"select",
|
|
2198
2192
|
"cascader",
|
|
@@ -2207,24 +2201,23 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
2207
2201
|
"dateRange",
|
|
2208
2202
|
"datetimeRange",
|
|
2209
2203
|
"slot"
|
|
2210
|
-
].includes(d.value.type) ? B("", !0) : (v(),
|
|
2204
|
+
].includes(d.value.type) ? B("", !0) : (v(), w(ve, {
|
|
2211
2205
|
key: 0,
|
|
2212
2206
|
type: "primary",
|
|
2213
2207
|
size: "small",
|
|
2214
|
-
onClick:
|
|
2208
|
+
onClick: ee
|
|
2215
2209
|
}, {
|
|
2216
|
-
default: x(() => i[26] || (i[26] = [
|
|
2210
|
+
default: x(() => [...i[26] || (i[26] = [
|
|
2217
2211
|
L("确定", -1)
|
|
2218
|
-
])),
|
|
2219
|
-
_: 1
|
|
2220
|
-
__: [26]
|
|
2212
|
+
])]),
|
|
2213
|
+
_: 1
|
|
2221
2214
|
}))
|
|
2222
2215
|
])
|
|
2223
|
-
])) : (v(),
|
|
2224
|
-
(v(!0),
|
|
2216
|
+
])) : (v(), R("div", rl, [
|
|
2217
|
+
(v(!0), R(re, null, me(A.value, (s) => (v(), R("div", {
|
|
2225
2218
|
key: s.id,
|
|
2226
2219
|
class: "type-item",
|
|
2227
|
-
onClick: (
|
|
2220
|
+
onClick: (P) => ct(s)
|
|
2228
2221
|
}, q(s.label), 9, ol))), 128))
|
|
2229
2222
|
]))
|
|
2230
2223
|
])) : B("", !0)
|
|
@@ -2236,7 +2229,7 @@ const Ae = () => "XDC_search", Wn = Oa("categorySearch", {
|
|
|
2236
2229
|
for (const [l, o] of a)
|
|
2237
2230
|
t[l] = o;
|
|
2238
2231
|
return t;
|
|
2239
|
-
}, fl = /* @__PURE__ */ ma(dl, [["__scopeId", "data-v-7a0ce87e"]]), Ot =
|
|
2232
|
+
}, fl = /* @__PURE__ */ ma(dl, [["__scopeId", "data-v-7a0ce87e"]]), Ot = Me({});
|
|
2240
2233
|
function pl() {
|
|
2241
2234
|
return {
|
|
2242
2235
|
registerModal: (l, o) => {
|
|
@@ -2252,7 +2245,7 @@ function pl() {
|
|
|
2252
2245
|
}
|
|
2253
2246
|
};
|
|
2254
2247
|
}
|
|
2255
|
-
const vl = /* @__PURE__ */
|
|
2248
|
+
const vl = /* @__PURE__ */ Ue({
|
|
2256
2249
|
name: "BaseModal",
|
|
2257
2250
|
__name: "index",
|
|
2258
2251
|
props: {
|
|
@@ -2267,22 +2260,22 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2267
2260
|
set: (f) => {
|
|
2268
2261
|
l("update:open", f), l("update:modelValue", f);
|
|
2269
2262
|
}
|
|
2270
|
-
}), u = (f) => o.value = f, { registerModal: c, unregisterModal: g } = pl(), d = t.modalId,
|
|
2263
|
+
}), u = (f) => o.value = f, { registerModal: c, unregisterModal: g } = pl(), d = t.modalId, k = () => {
|
|
2271
2264
|
l("update:open", !1), l("update:modelValue", !1);
|
|
2272
2265
|
};
|
|
2273
2266
|
return $t(() => {
|
|
2274
|
-
d && c(d, { close:
|
|
2267
|
+
d && c(d, { close: k }), window.addEventListener("close-all-modals", k);
|
|
2275
2268
|
}), ra(() => {
|
|
2276
|
-
d && g(d), window.removeEventListener("close-all-modals",
|
|
2277
|
-
}), (f,
|
|
2278
|
-
const
|
|
2279
|
-
return v(),
|
|
2269
|
+
d && g(d), window.removeEventListener("close-all-modals", k);
|
|
2270
|
+
}), (f, C) => {
|
|
2271
|
+
const M = F("a-modal");
|
|
2272
|
+
return v(), w(M, U(f.$attrs, {
|
|
2280
2273
|
open: o.value,
|
|
2281
2274
|
"onUpdate:open": u,
|
|
2282
|
-
onAfterClose:
|
|
2283
|
-
onOk:
|
|
2284
|
-
onCancel:
|
|
2285
|
-
}),
|
|
2275
|
+
onAfterClose: C[0] || (C[0] = () => l("after-close")),
|
|
2276
|
+
onOk: C[1] || (C[1] = (I) => l("ok", I)),
|
|
2277
|
+
onCancel: C[2] || (C[2] = (I) => l("cancel", I))
|
|
2278
|
+
}), Ke({
|
|
2286
2279
|
title: x(() => [
|
|
2287
2280
|
W(f.$slots, "title", {}, () => [
|
|
2288
2281
|
L(q(f.$attrs.title), 1)
|
|
@@ -2297,7 +2290,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2297
2290
|
name: "footer",
|
|
2298
2291
|
fn: x(() => [
|
|
2299
2292
|
W(f.$slots, "footer", {}, () => [
|
|
2300
|
-
f.$attrs.footer !== void 0 ? (v(),
|
|
2293
|
+
f.$attrs.footer !== void 0 ? (v(), R(re, { key: 0 }, [
|
|
2301
2294
|
L(q(f.$attrs.footer), 1)
|
|
2302
2295
|
], 64)) : B("", !0)
|
|
2303
2296
|
])
|
|
@@ -2316,8 +2309,8 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2316
2309
|
}
|
|
2317
2310
|
}), hl = {
|
|
2318
2311
|
key: 0,
|
|
2319
|
-
style: { "margin-top": "8px" }
|
|
2320
|
-
}, ml = { style: { flex: "1" } }, gl = ["onClick"], bl = /* @__PURE__ */
|
|
2312
|
+
style: { "margin-top": "8px", "padding-left": "0" }
|
|
2313
|
+
}, ml = { style: { flex: "1" } }, gl = ["onClick"], bl = /* @__PURE__ */ Ue({
|
|
2321
2314
|
name: "FileUpload",
|
|
2322
2315
|
__name: "index",
|
|
2323
2316
|
props: {
|
|
@@ -2331,7 +2324,12 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2331
2324
|
// 由 limit 控制
|
|
2332
2325
|
disabled: { type: Boolean, default: !1 },
|
|
2333
2326
|
icon: { type: [Object, Function, null], default: void 0 },
|
|
2334
|
-
fileSizeLimit: {
|
|
2327
|
+
fileSizeLimit: {
|
|
2328
|
+
type: Number,
|
|
2329
|
+
default: 5242880,
|
|
2330
|
+
// 5MB
|
|
2331
|
+
validator: (e) => e >= 0
|
|
2332
|
+
},
|
|
2335
2333
|
modelValue: { type: [Array, Object, null], default: () => [] },
|
|
2336
2334
|
// v-model 支持
|
|
2337
2335
|
value: { type: [Array, Object, null], default: () => [] }
|
|
@@ -2343,39 +2341,47 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2343
2341
|
...l.btnProps,
|
|
2344
2342
|
disabled: l.disabled || l.btnProps.disabled
|
|
2345
2343
|
})), u = t, c = $e(() => l.multiple !== void 0 ? l.multiple : l.limit > 1), g = D([]);
|
|
2346
|
-
_e(() => l.modelValue !== void 0 ? l.modelValue : l.value, (
|
|
2347
|
-
(
|
|
2344
|
+
_e(() => l.modelValue !== void 0 ? l.modelValue : l.value, (C) => {
|
|
2345
|
+
(C === null || Array.isArray(C) && C.length === 0) && (g.value = []);
|
|
2348
2346
|
}, { immediate: !0 });
|
|
2349
|
-
const d = (
|
|
2350
|
-
if (l.
|
|
2351
|
-
const
|
|
2352
|
-
|
|
2347
|
+
const d = (C) => {
|
|
2348
|
+
if (l.accept && C.name) {
|
|
2349
|
+
const M = l.accept.split(",").map((j) => j.trim().toLowerCase()), I = C.name.toLowerCase().substring(C.name.lastIndexOf("."));
|
|
2350
|
+
if (!M.some((j) => j.startsWith(".") ? I === j : I === `.${j}`))
|
|
2351
|
+
return Ee.error(`不支持的文件类型,请选择以下格式:${l.accept}`), u("exceed", C), !1;
|
|
2352
|
+
}
|
|
2353
|
+
if (l.fileSizeLimit && C.size > l.fileSizeLimit) {
|
|
2354
|
+
let M = "";
|
|
2355
|
+
const I = l.fileSizeLimit / 1024 / 1024, J = l.fileSizeLimit / 1024;
|
|
2356
|
+
I >= 1 ? M = `${I.toFixed(2)}MB` : J >= 1 ? M = `${J.toFixed(2)}KB` : M = `${l.fileSizeLimit}字节`;
|
|
2357
|
+
const j = `文件大小不能超过${M}`;
|
|
2358
|
+
return Ee.error(j), u("exceed", C), !1;
|
|
2353
2359
|
}
|
|
2354
2360
|
if (c.value) {
|
|
2355
|
-
if (!g.value.find((
|
|
2361
|
+
if (!g.value.find((I) => I.name === C.name && I.size === C.size))
|
|
2356
2362
|
if (g.value.length < l.limit) {
|
|
2357
|
-
g.value.push(
|
|
2358
|
-
const
|
|
2359
|
-
u("select",
|
|
2363
|
+
g.value.push(C);
|
|
2364
|
+
const I = [...g.value];
|
|
2365
|
+
u("select", I), u("update:modelValue", I);
|
|
2360
2366
|
} else
|
|
2361
|
-
|
|
2367
|
+
Ee.warning(`最多只能选择${l.limit}个文件`);
|
|
2362
2368
|
} else
|
|
2363
|
-
g.value = [
|
|
2369
|
+
g.value = [C], u("select", C), u("update:modelValue", C);
|
|
2364
2370
|
return !1;
|
|
2365
|
-
},
|
|
2366
|
-
g.value = g.value.filter((
|
|
2367
|
-
const
|
|
2368
|
-
u("select",
|
|
2371
|
+
}, k = (C) => {
|
|
2372
|
+
g.value = g.value.filter((I) => I !== C);
|
|
2373
|
+
const M = [...g.value];
|
|
2374
|
+
u("select", M), u("update:modelValue", M);
|
|
2369
2375
|
};
|
|
2370
2376
|
return a({
|
|
2371
2377
|
clearFiles: () => {
|
|
2372
2378
|
g.value = [], u("select", []), u("update:modelValue", []);
|
|
2373
2379
|
},
|
|
2374
2380
|
selectedFiles: g
|
|
2375
|
-
}), (
|
|
2376
|
-
const
|
|
2377
|
-
return v(),
|
|
2378
|
-
S(
|
|
2381
|
+
}), (C, M) => {
|
|
2382
|
+
const I = F("a-button"), J = F("a-upload");
|
|
2383
|
+
return v(), R(re, null, [
|
|
2384
|
+
S(J, {
|
|
2379
2385
|
accept: e.accept,
|
|
2380
2386
|
"before-upload": d,
|
|
2381
2387
|
"show-upload-list": !1,
|
|
@@ -2384,9 +2390,9 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2384
2390
|
disabled: e.disabled
|
|
2385
2391
|
}, {
|
|
2386
2392
|
default: x(() => [
|
|
2387
|
-
e.btnType === "button" ? (v(),
|
|
2393
|
+
e.btnType === "button" ? (v(), w(I, ka(U({ key: 0 }, o.value)), Ke({
|
|
2388
2394
|
default: x(() => [
|
|
2389
|
-
W(
|
|
2395
|
+
W(C.$slots, "default", {}, () => [
|
|
2390
2396
|
L(q(e.btnTxt || "上传"), 1)
|
|
2391
2397
|
])
|
|
2392
2398
|
]),
|
|
@@ -2395,44 +2401,44 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2395
2401
|
e.icon !== null ? {
|
|
2396
2402
|
name: "icon",
|
|
2397
2403
|
fn: x(() => [
|
|
2398
|
-
e.icon ? (v(),
|
|
2404
|
+
e.icon ? (v(), w(X(e.icon), { key: 0 })) : (v(), w(E(st), { key: 1 }))
|
|
2399
2405
|
]),
|
|
2400
2406
|
key: "0"
|
|
2401
2407
|
} : void 0
|
|
2402
|
-
]), 1040)) : (v(),
|
|
2408
|
+
]), 1040)) : (v(), R("a", U({ key: 1 }, o.value, {
|
|
2403
2409
|
class: ["upload-link", e.btnProps.class],
|
|
2404
2410
|
style: e.btnProps.style,
|
|
2405
|
-
onClick:
|
|
2411
|
+
onClick: M[0] || (M[0] = Y(() => {
|
|
2406
2412
|
}, ["prevent"]))
|
|
2407
2413
|
}), [
|
|
2408
|
-
e.icon !== null ? (v(),
|
|
2409
|
-
e.icon ? (v(),
|
|
2414
|
+
e.icon !== null ? (v(), R(re, { key: 0 }, [
|
|
2415
|
+
e.icon ? (v(), w(X(e.icon), { key: 0 })) : (v(), w(E(st), { key: 1 }))
|
|
2410
2416
|
], 64)) : B("", !0),
|
|
2411
|
-
W(
|
|
2417
|
+
W(C.$slots, "default", {}, () => [
|
|
2412
2418
|
L(q(e.btnTxt || "上传"), 1)
|
|
2413
2419
|
])
|
|
2414
2420
|
], 16))
|
|
2415
2421
|
]),
|
|
2416
2422
|
_: 3
|
|
2417
2423
|
}, 8, ["accept", "multiple", "max-count", "disabled"]),
|
|
2418
|
-
c.value && g.value.length ? (v(),
|
|
2419
|
-
(v(!0),
|
|
2420
|
-
key:
|
|
2421
|
-
style: { display: "flex", "align-items": "center" }
|
|
2424
|
+
c.value && g.value.length ? (v(), R("ul", hl, [
|
|
2425
|
+
(v(!0), R(re, null, me(g.value, (j) => (v(), R("li", {
|
|
2426
|
+
key: j.uid || j.name,
|
|
2427
|
+
style: { display: "flex", "align-items": "center", "list-style": "none" }
|
|
2422
2428
|
}, [
|
|
2423
|
-
|
|
2424
|
-
|
|
2429
|
+
V("span", ml, q(j.name), 1),
|
|
2430
|
+
V("a", {
|
|
2425
2431
|
style: { "margin-left": "8px", color: "#ff4d4f", cursor: "pointer" },
|
|
2426
|
-
onClick: (ge) =>
|
|
2432
|
+
onClick: (ge) => k(j)
|
|
2427
2433
|
}, [
|
|
2428
|
-
S(
|
|
2434
|
+
S(E(Tt))
|
|
2429
2435
|
], 8, gl)
|
|
2430
2436
|
]))), 128))
|
|
2431
2437
|
])) : B("", !0)
|
|
2432
2438
|
], 64);
|
|
2433
2439
|
};
|
|
2434
2440
|
}
|
|
2435
|
-
}), yl = /* @__PURE__ */
|
|
2441
|
+
}), yl = /* @__PURE__ */ Ue({
|
|
2436
2442
|
name: "BaseForm",
|
|
2437
2443
|
inheritAttrs: !1,
|
|
2438
2444
|
__name: "index",
|
|
@@ -2457,7 +2463,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2457
2463
|
},
|
|
2458
2464
|
emits: ["update:modelValue", "submit", "reset", "finish", "finish-failed", "values-change", "field-change", "field-blur", "field-search", "field-press-enter"],
|
|
2459
2465
|
setup(e, { expose: a, emit: t }) {
|
|
2460
|
-
const l = e, o = t, u = D(), c =
|
|
2466
|
+
const l = e, o = t, u = D(), c = Me({
|
|
2461
2467
|
...l.initialValues,
|
|
2462
2468
|
...l.modelValue
|
|
2463
2469
|
}), g = D([...l.items]), d = $e(() => {
|
|
@@ -2485,33 +2491,33 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2485
2491
|
},
|
|
2486
2492
|
{ deep: !0, immediate: !0 }
|
|
2487
2493
|
);
|
|
2488
|
-
const
|
|
2494
|
+
const k = (p, T) => {
|
|
2489
2495
|
c[p] = T;
|
|
2490
2496
|
}, f = (p, T, A) => {
|
|
2491
|
-
|
|
2492
|
-
},
|
|
2497
|
+
k(p, T), o("field-change", p, T, A);
|
|
2498
|
+
}, C = (p, T, A) => {
|
|
2493
2499
|
o("field-blur", p, T, A);
|
|
2494
|
-
},
|
|
2500
|
+
}, M = (p, T, A) => {
|
|
2495
2501
|
o("field-search", p, T, A);
|
|
2496
|
-
},
|
|
2502
|
+
}, I = (p, T, A) => {
|
|
2497
2503
|
o("field-press-enter", p, T, A);
|
|
2498
|
-
},
|
|
2504
|
+
}, J = (p) => {
|
|
2499
2505
|
o("finish", p), o("submit", p);
|
|
2500
|
-
},
|
|
2506
|
+
}, j = (p) => {
|
|
2501
2507
|
o("finish-failed", p);
|
|
2502
2508
|
}, ge = (p, T) => {
|
|
2503
2509
|
o("values-change", p, T);
|
|
2504
2510
|
}, N = async () => {
|
|
2505
2511
|
try {
|
|
2506
2512
|
const p = await u.value?.validateFields();
|
|
2507
|
-
|
|
2513
|
+
J(p || c);
|
|
2508
2514
|
} catch (p) {
|
|
2509
|
-
|
|
2515
|
+
j(p);
|
|
2510
2516
|
}
|
|
2511
2517
|
}, be = () => {
|
|
2512
2518
|
u.value?.resetFields(), Object.keys(c).forEach((p) => {
|
|
2513
|
-
c[p]
|
|
2514
|
-
}), o("reset", { ...c });
|
|
2519
|
+
delete c[p];
|
|
2520
|
+
}), l.initialValues && Object.assign(c, l.initialValues), o("reset", { ...c });
|
|
2515
2521
|
}, ke = (p) => u.value?.validate(p), ce = (p) => u.value?.validateFields(p), H = (p) => {
|
|
2516
2522
|
u.value?.clearValidate(p);
|
|
2517
2523
|
}, de = (p) => {
|
|
@@ -2524,29 +2530,29 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2524
2530
|
}), T;
|
|
2525
2531
|
}
|
|
2526
2532
|
return { ...c };
|
|
2527
|
-
},
|
|
2528
|
-
const A = g.value.findIndex((
|
|
2533
|
+
}, ze = (p, T) => {
|
|
2534
|
+
const A = g.value.findIndex((K) => K.name === p);
|
|
2529
2535
|
A !== -1 && (g.value[A] = {
|
|
2530
2536
|
...g.value[A],
|
|
2531
2537
|
options: T
|
|
2532
2538
|
});
|
|
2533
2539
|
}, Ve = (p, T) => {
|
|
2534
|
-
const A = g.value.findIndex((
|
|
2540
|
+
const A = g.value.findIndex((K) => K.name === p);
|
|
2535
2541
|
A !== -1 && (g.value[A] = {
|
|
2536
2542
|
...g.value[A],
|
|
2537
2543
|
treeData: T
|
|
2538
2544
|
});
|
|
2539
|
-
},
|
|
2540
|
-
const A = g.value.findIndex((
|
|
2545
|
+
}, Be = (p, T) => {
|
|
2546
|
+
const A = g.value.findIndex((K) => K.name === p);
|
|
2541
2547
|
A !== -1 && (g.value[A] = {
|
|
2542
2548
|
...g.value[A],
|
|
2543
2549
|
...T
|
|
2544
2550
|
});
|
|
2545
|
-
},
|
|
2546
|
-
Object.entries(p).forEach(([A,
|
|
2547
|
-
if (c[A] =
|
|
2551
|
+
}, De = (p, T = !0) => {
|
|
2552
|
+
Object.entries(p).forEach(([A, K]) => {
|
|
2553
|
+
if (c[A] = K, T) {
|
|
2548
2554
|
const Oe = g.value.find((fe) => fe.name === A);
|
|
2549
|
-
Oe && o("field-change", A,
|
|
2555
|
+
Oe && o("field-change", A, K, Oe);
|
|
2550
2556
|
}
|
|
2551
2557
|
});
|
|
2552
2558
|
};
|
|
@@ -2564,19 +2570,19 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2564
2570
|
getFieldsValue: it,
|
|
2565
2571
|
handleSubmit: N,
|
|
2566
2572
|
handleReset: be,
|
|
2567
|
-
updateFieldValue:
|
|
2568
|
-
updateFieldOptions:
|
|
2573
|
+
updateFieldValue: k,
|
|
2574
|
+
updateFieldOptions: ze,
|
|
2569
2575
|
updateFieldTreeData: Ve,
|
|
2570
|
-
updateFieldConfig:
|
|
2571
|
-
setFieldsValueWithTrigger:
|
|
2576
|
+
updateFieldConfig: Be,
|
|
2577
|
+
setFieldsValueWithTrigger: De,
|
|
2572
2578
|
currentFormItems: g
|
|
2573
2579
|
}), (p, T) => {
|
|
2574
|
-
const A =
|
|
2575
|
-
return v(),
|
|
2576
|
-
class:
|
|
2577
|
-
style:
|
|
2580
|
+
const A = F("a-input"), K = F("a-input-password"), Oe = F("a-textarea"), fe = F("a-input-number"), je = F("a-select-option"), ut = F("a-select"), Le = F("a-tree-select"), ct = F("a-radio-button"), dt = F("a-radio"), ee = F("a-radio-group"), Ne = F("a-checkbox"), ft = F("a-checkbox-group"), te = F("a-switch"), pt = F("a-date-picker"), we = F("a-time-picker"), pe = F("a-range-picker"), He = F("a-slider"), Ye = F("a-rate"), Pe = F("a-form-item"), Fe = F("a-button"), G = F("a-space"), vt = F("a-form");
|
|
2581
|
+
return v(), R("div", {
|
|
2582
|
+
class: le(["base-form", [`layout-${p.layout}`]]),
|
|
2583
|
+
style: Ge(p.layout === "grid" ? `--form-columns: ${p.columns}` : {})
|
|
2578
2584
|
}, [
|
|
2579
|
-
S(vt,
|
|
2585
|
+
S(vt, U({
|
|
2580
2586
|
ref_key: "formRef",
|
|
2581
2587
|
ref: u,
|
|
2582
2588
|
model: c,
|
|
@@ -2588,18 +2594,18 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2588
2594
|
"label-align": p.labelAlign,
|
|
2589
2595
|
"scroll-to-first-error": p.scrollToFirstError
|
|
2590
2596
|
}, p.$attrs, {
|
|
2591
|
-
onFinish:
|
|
2592
|
-
onFinishFailed:
|
|
2597
|
+
onFinish: J,
|
|
2598
|
+
onFinishFailed: j,
|
|
2593
2599
|
onValuesChange: ge
|
|
2594
2600
|
}), {
|
|
2595
2601
|
default: x(() => [
|
|
2596
|
-
(v(!0),
|
|
2602
|
+
(v(!0), R(re, null, me(g.value, (n, ht) => W(p.$slots, `form-item-${n.name}`, {
|
|
2597
2603
|
key: n.name || ht,
|
|
2598
2604
|
item: n,
|
|
2599
2605
|
modelValue: c[n.name],
|
|
2600
|
-
updateValue: (r) =>
|
|
2606
|
+
updateValue: (r) => k(n.name, r)
|
|
2601
2607
|
}, () => [
|
|
2602
|
-
S(Pe,
|
|
2608
|
+
S(Pe, U({
|
|
2603
2609
|
name: n.name,
|
|
2604
2610
|
label: n.label,
|
|
2605
2611
|
rules: n.rules,
|
|
@@ -2609,14 +2615,14 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2609
2615
|
extra: n.extra,
|
|
2610
2616
|
required: n.required,
|
|
2611
2617
|
hidden: n.hidden
|
|
2612
|
-
}, { ref_for: !0 }, n.formItemProps),
|
|
2618
|
+
}, { ref_for: !0 }, n.formItemProps), Ke({
|
|
2613
2619
|
default: x(() => [
|
|
2614
2620
|
W(p.$slots, `field-${n.name}`, {
|
|
2615
2621
|
item: n,
|
|
2616
2622
|
modelValue: c[n.name],
|
|
2617
|
-
updateValue: (r) =>
|
|
2623
|
+
updateValue: (r) => k(n.name, r)
|
|
2618
2624
|
}, () => [
|
|
2619
|
-
n.type === "input" ? (v(),
|
|
2625
|
+
n.type === "input" ? (v(), w(A, U({
|
|
2620
2626
|
key: 0,
|
|
2621
2627
|
value: c[n.name],
|
|
2622
2628
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2631,9 +2637,9 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2631
2637
|
"addon-after": n.addonAfter
|
|
2632
2638
|
}, { ref_for: !0 }, n.props, {
|
|
2633
2639
|
onChange: (r) => f(n.name, r.target.value, n),
|
|
2634
|
-
onBlur: (r) =>
|
|
2635
|
-
onPressEnter: (r) =>
|
|
2636
|
-
}),
|
|
2640
|
+
onBlur: (r) => C(n.name, r.target.value, n),
|
|
2641
|
+
onPressEnter: (r) => I(n.name, r.target.value, n)
|
|
2642
|
+
}), Ke({ _: 2 }, [
|
|
2637
2643
|
p.$slots[`${n.name}-prefix`] ? {
|
|
2638
2644
|
name: "prefix",
|
|
2639
2645
|
fn: x(() => [
|
|
@@ -2648,7 +2654,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2648
2654
|
]),
|
|
2649
2655
|
key: "1"
|
|
2650
2656
|
} : void 0
|
|
2651
|
-
]), 1040, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "max-length", "show-count", "prefix", "suffix", "addon-before", "addon-after", "onChange", "onBlur", "onPressEnter"])) : n.type === "password" ? (v(),
|
|
2657
|
+
]), 1040, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "max-length", "show-count", "prefix", "suffix", "addon-before", "addon-after", "onChange", "onBlur", "onPressEnter"])) : n.type === "password" ? (v(), w(K, U({
|
|
2652
2658
|
key: 1,
|
|
2653
2659
|
value: c[n.name],
|
|
2654
2660
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2660,8 +2666,8 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2660
2666
|
"visibility-toggle": n.visibilityToggle !== !1
|
|
2661
2667
|
}, { ref_for: !0 }, n.props, {
|
|
2662
2668
|
onChange: (r) => f(n.name, r.target.value, n),
|
|
2663
|
-
onBlur: (r) =>
|
|
2664
|
-
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "max-length", "show-count", "visibility-toggle", "onChange", "onBlur"])) : n.type === "textarea" ? (v(),
|
|
2669
|
+
onBlur: (r) => C(n.name, r.target.value, n)
|
|
2670
|
+
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "max-length", "show-count", "visibility-toggle", "onChange", "onBlur"])) : n.type === "textarea" ? (v(), w(Oe, U({
|
|
2665
2671
|
key: 2,
|
|
2666
2672
|
value: c[n.name],
|
|
2667
2673
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2673,8 +2679,8 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2673
2679
|
"show-count": n.showCount
|
|
2674
2680
|
}, { ref_for: !0 }, n.props, {
|
|
2675
2681
|
onChange: (r) => f(n.name, r.target.value, n),
|
|
2676
|
-
onBlur: (r) =>
|
|
2677
|
-
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "auto-size", "max-length", "show-count", "onChange", "onBlur"])) : n.type === "number" ? (v(),
|
|
2682
|
+
onBlur: (r) => C(n.name, r.target.value, n)
|
|
2683
|
+
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "auto-size", "max-length", "show-count", "onChange", "onBlur"])) : n.type === "number" ? (v(), w(fe, U({
|
|
2678
2684
|
key: 3,
|
|
2679
2685
|
value: c[n.name],
|
|
2680
2686
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2690,8 +2696,8 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2690
2696
|
style: { width: "100%" }
|
|
2691
2697
|
}, { ref_for: !0 }, n.props, {
|
|
2692
2698
|
onChange: (r) => f(n.name, r, n),
|
|
2693
|
-
onBlur: () =>
|
|
2694
|
-
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "min", "max", "step", "precision", "formatter", "parser", "controls", "onChange", "onBlur"])) : n.type === "select" ? (v(),
|
|
2699
|
+
onBlur: () => C(n.name, c[n.name], n)
|
|
2700
|
+
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "min", "max", "step", "precision", "formatter", "parser", "controls", "onChange", "onBlur"])) : n.type === "select" ? (v(), w(ut, U({
|
|
2695
2701
|
key: 4,
|
|
2696
2702
|
value: c[n.name],
|
|
2697
2703
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2706,11 +2712,11 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2706
2712
|
loading: n.loading
|
|
2707
2713
|
}, { ref_for: !0 }, n.props, {
|
|
2708
2714
|
onChange: (r) => f(n.name, r, n),
|
|
2709
|
-
onBlur: () =>
|
|
2710
|
-
onSearch: (r) =>
|
|
2715
|
+
onBlur: () => C(n.name, c[n.name], n),
|
|
2716
|
+
onSearch: (r) => M(n.name, r, n)
|
|
2711
2717
|
}), {
|
|
2712
2718
|
default: x(() => [
|
|
2713
|
-
(v(!0),
|
|
2719
|
+
(v(!0), R(re, null, me(n.options, (r) => (v(), w(je, {
|
|
2714
2720
|
key: r.value,
|
|
2715
2721
|
value: r.value,
|
|
2716
2722
|
disabled: r.disabled,
|
|
@@ -2723,7 +2729,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2723
2729
|
}, 1032, ["value", "disabled", "label"]))), 128))
|
|
2724
2730
|
]),
|
|
2725
2731
|
_: 2
|
|
2726
|
-
}, 1040, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "show-search", "filter-option", "mode", "max-tag-count", "not-found-content", "loading", "onChange", "onBlur", "onSearch"])) : n.type === "treeSelect" ? (v(),
|
|
2732
|
+
}, 1040, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "show-search", "filter-option", "mode", "max-tag-count", "not-found-content", "loading", "onChange", "onBlur", "onSearch"])) : n.type === "treeSelect" ? (v(), w(Le, U({
|
|
2727
2733
|
key: 5,
|
|
2728
2734
|
value: c[n.name],
|
|
2729
2735
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2747,9 +2753,9 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2747
2753
|
style: { width: "100%" }
|
|
2748
2754
|
}, { ref_for: !0 }, n.props, {
|
|
2749
2755
|
onChange: (r) => f(n.name, r, n),
|
|
2750
|
-
onBlur: () =>
|
|
2751
|
-
onSearch: (r) =>
|
|
2752
|
-
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "show-search", "multiple", "tree-checkable", "tree-check-strictly", "tree-default-expand-all", "tree-default-expanded-keys", "tree-node-filter-prop", "tree-node-label-prop", "show-tree-icon", "dropdown-class-name", "tree-data", "loading", "not-found-content", "max-tag-count", "onChange", "onBlur", "onSearch"])) : n.type === "radio" ? (v(),
|
|
2756
|
+
onBlur: () => C(n.name, c[n.name], n),
|
|
2757
|
+
onSearch: (r) => M(n.name, r, n)
|
|
2758
|
+
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "show-search", "multiple", "tree-checkable", "tree-check-strictly", "tree-default-expand-all", "tree-default-expanded-keys", "tree-node-filter-prop", "tree-node-label-prop", "show-tree-icon", "dropdown-class-name", "tree-data", "loading", "not-found-content", "max-tag-count", "onChange", "onBlur", "onSearch"])) : n.type === "radio" ? (v(), w(ee, U({
|
|
2753
2759
|
key: 6,
|
|
2754
2760
|
value: c[n.name],
|
|
2755
2761
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2760,7 +2766,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2760
2766
|
onChange: (r) => f(n.name, r.target.value, n)
|
|
2761
2767
|
}), {
|
|
2762
2768
|
default: x(() => [
|
|
2763
|
-
n.optionType === "button" ? (v(!0),
|
|
2769
|
+
n.optionType === "button" ? (v(!0), R(re, { key: 0 }, me(n.options, (r) => (v(), w(ct, {
|
|
2764
2770
|
key: r.value,
|
|
2765
2771
|
value: r.value,
|
|
2766
2772
|
disabled: r.disabled
|
|
@@ -2769,7 +2775,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2769
2775
|
L(q(r.label || r.text), 1)
|
|
2770
2776
|
]),
|
|
2771
2777
|
_: 2
|
|
2772
|
-
}, 1032, ["value", "disabled"]))), 128)) : (v(!0),
|
|
2778
|
+
}, 1032, ["value", "disabled"]))), 128)) : (v(!0), R(re, { key: 1 }, me(n.options, (r) => (v(), w(dt, {
|
|
2773
2779
|
key: r.value,
|
|
2774
2780
|
value: r.value,
|
|
2775
2781
|
disabled: r.disabled
|
|
@@ -2781,7 +2787,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2781
2787
|
}, 1032, ["value", "disabled"]))), 128))
|
|
2782
2788
|
]),
|
|
2783
2789
|
_: 2
|
|
2784
|
-
}, 1040, ["value", "onUpdate:value", "disabled", "size", "button-style", "onChange"])) : n.type === "checkbox" ? (v(),
|
|
2790
|
+
}, 1040, ["value", "onUpdate:value", "disabled", "size", "button-style", "onChange"])) : n.type === "checkbox" ? (v(), w(ft, U({
|
|
2785
2791
|
key: 7,
|
|
2786
2792
|
value: c[n.name],
|
|
2787
2793
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2790,7 +2796,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2790
2796
|
onChange: (r) => f(n.name, r, n)
|
|
2791
2797
|
}), {
|
|
2792
2798
|
default: x(() => [
|
|
2793
|
-
(v(!0),
|
|
2799
|
+
(v(!0), R(re, null, me(n.options, (r) => (v(), w(Ne, {
|
|
2794
2800
|
key: r.value,
|
|
2795
2801
|
value: r.value,
|
|
2796
2802
|
disabled: r.disabled
|
|
@@ -2802,7 +2808,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2802
2808
|
}, 1032, ["value", "disabled"]))), 128))
|
|
2803
2809
|
]),
|
|
2804
2810
|
_: 2
|
|
2805
|
-
}, 1040, ["value", "onUpdate:value", "disabled", "onChange"])) : n.type === "checkbox-single" ? (v(),
|
|
2811
|
+
}, 1040, ["value", "onUpdate:value", "disabled", "onChange"])) : n.type === "checkbox-single" ? (v(), w(Ne, U({
|
|
2806
2812
|
key: 8,
|
|
2807
2813
|
checked: c[n.name],
|
|
2808
2814
|
"onUpdate:checked": (r) => c[n.name] = r,
|
|
@@ -2814,7 +2820,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2814
2820
|
L(q(n.text || n.label), 1)
|
|
2815
2821
|
]),
|
|
2816
2822
|
_: 2
|
|
2817
|
-
}, 1040, ["checked", "onUpdate:checked", "disabled", "onChange"])) : n.type === "switch" ? (v(),
|
|
2823
|
+
}, 1040, ["checked", "onUpdate:checked", "disabled", "onChange"])) : n.type === "switch" ? (v(), w(te, U({
|
|
2818
2824
|
key: 9,
|
|
2819
2825
|
checked: c[n.name],
|
|
2820
2826
|
"onUpdate:checked": (r) => c[n.name] = r,
|
|
@@ -2827,7 +2833,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2827
2833
|
"un-checked-value": n.unCheckedValue
|
|
2828
2834
|
}, { ref_for: !0 }, n.props, {
|
|
2829
2835
|
onChange: (r) => f(n.name, r, n)
|
|
2830
|
-
}), null, 16, ["checked", "onUpdate:checked", "disabled", "size", "loading", "checked-children", "un-checked-children", "checked-value", "un-checked-value", "onChange"])) : n.type === "date" ? (v(),
|
|
2836
|
+
}), null, 16, ["checked", "onUpdate:checked", "disabled", "size", "loading", "checked-children", "un-checked-children", "checked-value", "un-checked-value", "onChange"])) : n.type === "date" ? (v(), w(pt, U({
|
|
2831
2837
|
key: 10,
|
|
2832
2838
|
value: c[n.name],
|
|
2833
2839
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2843,8 +2849,8 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2843
2849
|
style: { width: "100%" }
|
|
2844
2850
|
}, { ref_for: !0 }, n.props, {
|
|
2845
2851
|
onChange: (r) => f(n.name, r, n),
|
|
2846
|
-
onBlur: () =>
|
|
2847
|
-
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "format", "value-format", "picker", "show-time", "disabled-date", "disabled-time", "onChange", "onBlur"])) : n.type === "time" ? (v(),
|
|
2852
|
+
onBlur: () => C(n.name, c[n.name], n)
|
|
2853
|
+
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "format", "value-format", "picker", "show-time", "disabled-date", "disabled-time", "onChange", "onBlur"])) : n.type === "time" ? (v(), w(we, U({
|
|
2848
2854
|
key: 11,
|
|
2849
2855
|
value: c[n.name],
|
|
2850
2856
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2860,8 +2866,8 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2860
2866
|
style: { width: "100%" }
|
|
2861
2867
|
}, { ref_for: !0 }, n.props, {
|
|
2862
2868
|
onChange: (r) => f(n.name, r, n),
|
|
2863
|
-
onBlur: () =>
|
|
2864
|
-
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "format", "value-format", "hour-step", "minute-step", "second-step", "disabled-time", "onChange", "onBlur"])) : n.type === "dateRange" ? (v(),
|
|
2869
|
+
onBlur: () => C(n.name, c[n.name], n)
|
|
2870
|
+
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "format", "value-format", "hour-step", "minute-step", "second-step", "disabled-time", "onChange", "onBlur"])) : n.type === "dateRange" ? (v(), w(pe, U({
|
|
2865
2871
|
key: 12,
|
|
2866
2872
|
value: c[n.name],
|
|
2867
2873
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2877,8 +2883,8 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2877
2883
|
style: { width: "100%" }
|
|
2878
2884
|
}, { ref_for: !0 }, n.props, {
|
|
2879
2885
|
onChange: (r) => f(n.name, r, n),
|
|
2880
|
-
onBlur: () =>
|
|
2881
|
-
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "format", "value-format", "picker", "show-time", "disabled-date", "disabled-time", "onChange", "onBlur"])) : n.type === "slider" ? (v(),
|
|
2886
|
+
onBlur: () => C(n.name, c[n.name], n)
|
|
2887
|
+
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "format", "value-format", "picker", "show-time", "disabled-date", "disabled-time", "onChange", "onBlur"])) : n.type === "slider" ? (v(), w(He, U({
|
|
2882
2888
|
key: 13,
|
|
2883
2889
|
value: c[n.name],
|
|
2884
2890
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2893,7 +2899,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2893
2899
|
tooltip: n.tooltip
|
|
2894
2900
|
}, { ref_for: !0 }, n.props, {
|
|
2895
2901
|
onChange: (r) => f(n.name, r, n)
|
|
2896
|
-
}), null, 16, ["value", "onUpdate:value", "disabled", "min", "max", "step", "range", "marks", "dots", "included", "tooltip", "onChange"])) : n.type === "rate" ? (v(),
|
|
2902
|
+
}), null, 16, ["value", "onUpdate:value", "disabled", "min", "max", "step", "range", "marks", "dots", "included", "tooltip", "onChange"])) : n.type === "rate" ? (v(), w(Ye, U({
|
|
2897
2903
|
key: 14,
|
|
2898
2904
|
value: c[n.name],
|
|
2899
2905
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2905,13 +2911,13 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2905
2911
|
tooltips: n.tooltips
|
|
2906
2912
|
}, { ref_for: !0 }, n.props, {
|
|
2907
2913
|
onChange: (r) => f(n.name, r, n)
|
|
2908
|
-
}), null, 16, ["value", "onUpdate:value", "disabled", "count", "allow-half", "allow-clear", "character", "tooltips", "onChange"])) : n.type === "custom" && n.component ? (v(),
|
|
2914
|
+
}), null, 16, ["value", "onUpdate:value", "disabled", "count", "allow-half", "allow-clear", "character", "tooltips", "onChange"])) : n.type === "custom" && n.component ? (v(), w(X(n.component), U({
|
|
2909
2915
|
key: 15,
|
|
2910
2916
|
value: c[n.name],
|
|
2911
2917
|
"onUpdate:value": (r) => c[n.name] = r
|
|
2912
2918
|
}, { ref_for: !0 }, n.props, {
|
|
2913
2919
|
onChange: (r) => f(n.name, r, n)
|
|
2914
|
-
}), null, 16, ["value", "onUpdate:value", "onChange"])) : (v(),
|
|
2920
|
+
}), null, 16, ["value", "onUpdate:value", "onChange"])) : (v(), w(A, U({
|
|
2915
2921
|
key: 16,
|
|
2916
2922
|
value: c[n.name],
|
|
2917
2923
|
"onUpdate:value": (r) => c[n.name] = r,
|
|
@@ -2920,7 +2926,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2920
2926
|
"allow-clear": n.allowClear !== !1
|
|
2921
2927
|
}, { ref_for: !0 }, n.props, {
|
|
2922
2928
|
onChange: (r) => f(n.name, r.target.value, n),
|
|
2923
|
-
onBlur: (r) =>
|
|
2929
|
+
onBlur: (r) => C(n.name, r.target.value, n)
|
|
2924
2930
|
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "allow-clear", "onChange", "onBlur"]))
|
|
2925
2931
|
], !0)
|
|
2926
2932
|
]),
|
|
@@ -2940,10 +2946,10 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2940
2946
|
], !0)), 128)),
|
|
2941
2947
|
W(p.$slots, "custom-items", {
|
|
2942
2948
|
formData: c,
|
|
2943
|
-
updateField:
|
|
2949
|
+
updateField: k,
|
|
2944
2950
|
formRef: u.value
|
|
2945
2951
|
}, void 0, !0),
|
|
2946
|
-
p.showActions && !p.hideDefaultActions ? (v(),
|
|
2952
|
+
p.showActions && !p.hideDefaultActions ? (v(), w(Pe, {
|
|
2947
2953
|
key: 0,
|
|
2948
2954
|
"wrapper-col": p.actionWrapperCol || { offset: p.labelCol?.span || 4, span: p.wrapperCol?.span || 20 },
|
|
2949
2955
|
class: "form-actions"
|
|
@@ -2957,7 +2963,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2957
2963
|
formData: c,
|
|
2958
2964
|
loading: p.submitLoading
|
|
2959
2965
|
}, () => [
|
|
2960
|
-
S(
|
|
2966
|
+
S(G, null, {
|
|
2961
2967
|
default: x(() => [
|
|
2962
2968
|
S(Fe, {
|
|
2963
2969
|
type: "primary",
|
|
@@ -2969,7 +2975,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2969
2975
|
]),
|
|
2970
2976
|
_: 1
|
|
2971
2977
|
}, 8, ["loading"]),
|
|
2972
|
-
p.showReset ? (v(),
|
|
2978
|
+
p.showReset ? (v(), w(Fe, {
|
|
2973
2979
|
key: 0,
|
|
2974
2980
|
onClick: be
|
|
2975
2981
|
}, {
|
|
@@ -2991,7 +2997,7 @@ const vl = /* @__PURE__ */ Me({
|
|
|
2991
2997
|
], 6);
|
|
2992
2998
|
};
|
|
2993
2999
|
}
|
|
2994
|
-
}), Cl = /* @__PURE__ */ ma(yl, [["__scopeId", "data-v-
|
|
3000
|
+
}), Cl = /* @__PURE__ */ ma(yl, [["__scopeId", "data-v-066cf786"]]), kl = [
|
|
2995
3001
|
fl,
|
|
2996
3002
|
vl,
|
|
2997
3003
|
bl,
|