st-comp 0.0.86 → 0.0.88
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/components.d.ts +1 -0
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +2 -2
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +10 -10
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +89 -89
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +7 -7
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +138 -138
- package/es/Table.cjs +1 -20
- package/es/Table.js +390 -3589
- package/es/TreeMap.cjs +1 -2
- package/es/TreeMap.js +1 -163
- package/es/VarietySearch.cjs +2 -2
- package/es/VarietySearch.js +1551 -1391
- package/es/VirtualTable.cjs +4 -4
- package/es/VirtualTable.js +100 -100
- package/es/{base-4865d432.cjs → base-2b869b95.cjs} +1 -1
- package/es/{base-6faccb01.js → base-5e2578a9.js} +65 -65
- package/es/{castArray-bdee0d50.js → castArray-9b96e1ad.js} +1 -1
- package/es/castArray-adec592d.cjs +1 -0
- package/es/{config-provider-465c8253.cjs → config-provider-25d2db4b.cjs} +1 -1
- package/es/{config-provider-be0e9c36.js → config-provider-ddbd0b1c.js} +11 -11
- package/es/{el-button-aad5268b.cjs → el-button-8fca9a5d.cjs} +1 -1
- package/es/{el-button-1b9c4fd6.js → el-button-daeb181f.js} +56 -56
- package/es/{el-empty-348c46f7.js → el-empty-b1d5d1e4.js} +4 -4
- package/es/{el-empty-608948d9.cjs → el-empty-d83469ab.cjs} +1 -1
- package/es/el-icon-0bfbe0c8.js +3795 -0
- package/es/el-icon-19bc1691.cjs +20 -0
- package/es/{el-overlay-4713107e.cjs → el-overlay-88994e77.cjs} +2 -2
- package/es/{el-overlay-400ac6ce.js → el-overlay-fcd84f34.js} +46 -46
- package/es/{el-scrollbar-83abe3de.js → el-scrollbar-0f49204a.js} +46 -46
- package/es/{el-scrollbar-bc381e35.cjs → el-scrollbar-43353984.cjs} +1 -1
- package/es/{el-select-895360ba.js → el-select-1a2f2c95.js} +285 -285
- package/es/el-select-c3d21536.cjs +9 -0
- package/es/{el-tag-30cecca3.js → el-tag-1e32cb79.js} +122 -122
- package/es/el-tag-7737bede.cjs +1 -0
- package/es/{focus-trap-a169f160.cjs → focus-trap-19c04a47.cjs} +1 -1
- package/es/{focus-trap-5ac78614.js → focus-trap-82e6ab3c.js} +18 -18
- package/es/{raf-92c5ed6d.js → raf-7414f3eb.js} +1 -1
- package/es/{raf-5e5c53db.cjs → raf-a8539dc6.cjs} +1 -1
- package/es/{scroll-bb8039ba.cjs → scroll-5ec08336.cjs} +1 -1
- package/es/{scroll-264c50f3.js → scroll-8d15ce5a.js} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-item-6cef6b15.cjs → use-form-item-3d2a7ac7.cjs} +2 -2
- package/es/{use-form-item-0e9cae13.js → use-form-item-ea29755c.js} +138 -137
- package/es/use-global-config-3496cd4f.cjs +1 -0
- package/es/use-global-config-9eba4e5e.js +110 -0
- package/es/{vnode-b78096e3.js → vnode-2ad5aae4.js} +4 -4
- package/es/{vnode-abafec9e.cjs → vnode-b447c505.cjs} +1 -1
- package/es/{zh-cn-e4d38144.cjs → zh-cn-35bd18a8.cjs} +1 -1
- package/es/{zh-cn-8aaa7dd2.js → zh-cn-6a7c1846.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +153 -153
- package/lib/{index-137cb843.js → index-cf938a55.js} +18765 -18608
- package/lib/{python-02b0f7eb.js → python-40015c17.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietySearch/components/CommonIndicator/index.vue +190 -59
- package/packages/VarietySearch/components/FactorScreen/index.vue +84 -27
- package/packages/VarietySearch/config.js +41 -12
- package/packages/VarietySearch/index.vue +67 -12
- package/src/pages/VarietySearch/index.vue +70 -11
- package/es/castArray-3341cbb4.cjs +0 -1
- package/es/el-icon-158ddc19.cjs +0 -1
- package/es/el-icon-d385d377.js +0 -593
- package/es/el-select-7116533b.cjs +0 -9
- package/es/el-tag-2c7e5d4a.cjs +0 -1
- package/es/use-global-config-17f3d7c7.cjs +0 -1
- package/es/use-global-config-8c9c775f.js +0 -110
package/es/VarietySearch.js
CHANGED
|
@@ -1,163 +1,166 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as
|
|
3
|
-
import { ref as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { E as
|
|
9
|
-
import {
|
|
1
|
+
import { a0 as Ct, a1 as Jt, l as Ln, a as Un, c as ce, d as Te, i as Dn, h as _e, S as Ke, o as pe, u as ye, _ as be, I as xe, M as Zt, e as Xt, a2 as Bn, g as qt, w as Me, E as ft, F as ae, f as zn, H as Le, b as en, T as Wn, a3 as Gn, a4 as Yn } from "./base-5e2578a9.js";
|
|
2
|
+
import { c as Je, k as pt, g as Kn, b as tn, d as Hn, e as Qn, f as Jn, i as Zn, E as Xn, a as er, h as tr, j as nr } from "./el-icon-0bfbe0c8.js";
|
|
3
|
+
import { ref as H, computed as N, defineComponent as Z, watch as ve, provide as mt, reactive as Ze, toRefs as vt, openBlock as I, createElementBlock as q, normalizeClass as L, unref as u, renderSlot as me, inject as Ce, onMounted as Ae, onBeforeUnmount as nn, onUpdated as rn, createVNode as F, Fragment as Q, nextTick as Xe, useSlots as rr, withCtx as S, createBlock as U, resolveDynamicComponent as gt, normalizeStyle as He, createTextVNode as j, toDisplayString as te, createCommentVNode as z, createElementVNode as C, TransitionGroup as ar, Transition as an, withDirectives as $e, vShow as on, isRef as ln, withModifiers as ge, vModelRadio as sn, withKeys as Ue, shallowReactive as or, isVNode as un, render as Nt, mergeModels as yt, useModel as bt, renderList as se, pushScopeId as ht, popScopeId as _t, createSlots as Mt } from "vue";
|
|
4
|
+
import "./el-tooltip-4ed993c7.js";
|
|
5
|
+
import { k as dn, g as cn, s as lr, e as ir, f as sr, h as wt, n as Qe, j as fn, l as ur, S as dr, m as cr, E as fr } from "./el-tag-1e32cb79.js";
|
|
6
|
+
import { a as pn, u as pr } from "./el-scrollbar-0f49204a.js";
|
|
7
|
+
import { E as mn } from "./el-overlay-fcd84f34.js";
|
|
8
|
+
import { b as xt, c as vn, E as gn, a as yn } from "./el-select-1a2f2c95.js";
|
|
9
|
+
import { E as bn } from "./el-button-daeb181f.js";
|
|
10
|
+
import { h as Ot, e as Pe, D as kt, F as at, u as It, f as hn, c as _n, r as mr, E as qe, x as vr, G as gr, H as yr, I as ot, g as br, T as At, J as hr, K as _r, L as wr } from "./use-form-item-ea29755c.js";
|
|
10
11
|
import { _ as $t } from "./_plugin-vue_export-helper-dad06003.js";
|
|
11
|
-
import { m as
|
|
12
|
-
import {
|
|
13
|
-
import { U as
|
|
14
|
-
import { m as Pt } from "./config-provider-
|
|
15
|
-
import { c as lt } from "./castArray-
|
|
16
|
-
import "./
|
|
17
|
-
import "./
|
|
12
|
+
import { m as xr } from "./typescript-7ae59c4c.js";
|
|
13
|
+
import { b as Or, g as nt, a as kr } from "./use-global-config-9eba4e5e.js";
|
|
14
|
+
import { U as he, C as Vt, I as ze, i as Se, a as Ir } from "./focus-trap-82e6ab3c.js";
|
|
15
|
+
import { m as Pt } from "./config-provider-ddbd0b1c.js";
|
|
16
|
+
import { c as lt } from "./castArray-9b96e1ad.js";
|
|
17
|
+
import "./_commonjsHelpers-10dfc225.js";
|
|
18
|
+
import "./raf-7414f3eb.js";
|
|
19
|
+
import "./vnode-2ad5aae4.js";
|
|
20
|
+
import "./scroll-8d15ce5a.js";
|
|
18
21
|
import "./index-657047bb.js";
|
|
19
|
-
function
|
|
22
|
+
function $r(n, e) {
|
|
20
23
|
for (var t = -1, r = n == null ? 0 : n.length; ++t < r && e(n[t], t, n) !== !1; )
|
|
21
24
|
;
|
|
22
25
|
return n;
|
|
23
26
|
}
|
|
24
|
-
function
|
|
25
|
-
return n &&
|
|
27
|
+
function Vr(n, e) {
|
|
28
|
+
return n && Je(e, dn(e), n);
|
|
26
29
|
}
|
|
27
|
-
function
|
|
28
|
-
return n &&
|
|
30
|
+
function Er(n, e) {
|
|
31
|
+
return n && Je(e, pt(e), n);
|
|
29
32
|
}
|
|
30
|
-
function
|
|
31
|
-
return
|
|
33
|
+
function Sr(n, e) {
|
|
34
|
+
return Je(n, cn(n), e);
|
|
32
35
|
}
|
|
33
|
-
var
|
|
36
|
+
var Fr = Object.getOwnPropertySymbols, Tr = Fr ? function(n) {
|
|
34
37
|
for (var e = []; n; )
|
|
35
|
-
|
|
38
|
+
ir(e, cn(n)), n = Kn(n);
|
|
36
39
|
return e;
|
|
37
|
-
} :
|
|
38
|
-
const
|
|
39
|
-
function
|
|
40
|
-
return
|
|
40
|
+
} : lr;
|
|
41
|
+
const wn = Tr;
|
|
42
|
+
function Cr(n, e) {
|
|
43
|
+
return Je(n, wn(n), e);
|
|
41
44
|
}
|
|
42
|
-
function
|
|
43
|
-
return
|
|
45
|
+
function qr(n) {
|
|
46
|
+
return sr(n, pt, wn);
|
|
44
47
|
}
|
|
45
|
-
var
|
|
46
|
-
function
|
|
48
|
+
var Nr = Object.prototype, Mr = Nr.hasOwnProperty;
|
|
49
|
+
function Ar(n) {
|
|
47
50
|
var e = n.length, t = new n.constructor(e);
|
|
48
|
-
return e && typeof n[0] == "string" &&
|
|
51
|
+
return e && typeof n[0] == "string" && Mr.call(n, "index") && (t.index = n.index, t.input = n.input), t;
|
|
49
52
|
}
|
|
50
|
-
function
|
|
53
|
+
function Pr(n, e) {
|
|
51
54
|
var t = e ? tn(n.buffer) : n.buffer;
|
|
52
55
|
return new n.constructor(t, n.byteOffset, n.byteLength);
|
|
53
56
|
}
|
|
54
|
-
var
|
|
55
|
-
function
|
|
56
|
-
var e = new n.constructor(n.source,
|
|
57
|
+
var jr = /\w*$/;
|
|
58
|
+
function Rr(n) {
|
|
59
|
+
var e = new n.constructor(n.source, jr.exec(n));
|
|
57
60
|
return e.lastIndex = n.lastIndex, e;
|
|
58
61
|
}
|
|
59
62
|
var jt = Ct ? Ct.prototype : void 0, Rt = jt ? jt.valueOf : void 0;
|
|
60
|
-
function
|
|
63
|
+
function Lr(n) {
|
|
61
64
|
return Rt ? Object(Rt.call(n)) : {};
|
|
62
65
|
}
|
|
63
|
-
var
|
|
64
|
-
function
|
|
66
|
+
var Ur = "[object Boolean]", Dr = "[object Date]", Br = "[object Map]", zr = "[object Number]", Wr = "[object RegExp]", Gr = "[object Set]", Yr = "[object String]", Kr = "[object Symbol]", Hr = "[object ArrayBuffer]", Qr = "[object DataView]", Jr = "[object Float32Array]", Zr = "[object Float64Array]", Xr = "[object Int8Array]", ea = "[object Int16Array]", ta = "[object Int32Array]", na = "[object Uint8Array]", ra = "[object Uint8ClampedArray]", aa = "[object Uint16Array]", oa = "[object Uint32Array]";
|
|
67
|
+
function la(n, e, t) {
|
|
65
68
|
var r = n.constructor;
|
|
66
69
|
switch (e) {
|
|
67
|
-
case
|
|
70
|
+
case Hr:
|
|
68
71
|
return tn(n);
|
|
69
|
-
case
|
|
70
|
-
case
|
|
72
|
+
case Ur:
|
|
73
|
+
case Dr:
|
|
71
74
|
return new r(+n);
|
|
72
|
-
case Gr:
|
|
73
|
-
return qr(n, t);
|
|
74
|
-
case Yr:
|
|
75
|
-
case Kr:
|
|
76
|
-
case Hr:
|
|
77
75
|
case Qr:
|
|
76
|
+
return Pr(n, t);
|
|
78
77
|
case Jr:
|
|
79
78
|
case Zr:
|
|
80
79
|
case Xr:
|
|
81
80
|
case ea:
|
|
82
81
|
case ta:
|
|
82
|
+
case na:
|
|
83
|
+
case ra:
|
|
84
|
+
case aa:
|
|
85
|
+
case oa:
|
|
83
86
|
return Hn(n, t);
|
|
84
|
-
case Rr:
|
|
85
|
-
return new r();
|
|
86
|
-
case Ur:
|
|
87
|
-
case Lr:
|
|
88
|
-
return new r(n);
|
|
89
87
|
case Br:
|
|
90
|
-
return Mr(n);
|
|
91
|
-
case Dr:
|
|
92
88
|
return new r();
|
|
93
89
|
case zr:
|
|
94
|
-
|
|
90
|
+
case Yr:
|
|
91
|
+
return new r(n);
|
|
92
|
+
case Wr:
|
|
93
|
+
return Rr(n);
|
|
94
|
+
case Gr:
|
|
95
|
+
return new r();
|
|
96
|
+
case Kr:
|
|
97
|
+
return Lr(n);
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
|
-
var
|
|
98
|
-
function aa(n) {
|
|
99
|
-
return Jt(n) && wt(n) == ra;
|
|
100
|
-
}
|
|
101
|
-
var Ut = He && He.isMap, oa = Ut ? gn(Ut) : aa;
|
|
102
|
-
const la = oa;
|
|
103
|
-
var ia = "[object Set]";
|
|
100
|
+
var ia = "[object Map]";
|
|
104
101
|
function sa(n) {
|
|
105
102
|
return Jt(n) && wt(n) == ia;
|
|
106
103
|
}
|
|
107
|
-
var
|
|
104
|
+
var Lt = Qe && Qe.isMap, ua = Lt ? fn(Lt) : sa;
|
|
108
105
|
const da = ua;
|
|
109
|
-
var ca =
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
var ca = "[object Set]";
|
|
107
|
+
function fa(n) {
|
|
108
|
+
return Jt(n) && wt(n) == ca;
|
|
109
|
+
}
|
|
110
|
+
var Ut = Qe && Qe.isSet, pa = Ut ? fn(Ut) : fa;
|
|
111
|
+
const ma = pa;
|
|
112
|
+
var va = 1, ga = 2, ya = 4, xn = "[object Arguments]", ba = "[object Array]", ha = "[object Boolean]", _a = "[object Date]", wa = "[object Error]", On = "[object Function]", xa = "[object GeneratorFunction]", Oa = "[object Map]", ka = "[object Number]", kn = "[object Object]", Ia = "[object RegExp]", $a = "[object Set]", Va = "[object String]", Ea = "[object Symbol]", Sa = "[object WeakMap]", Fa = "[object ArrayBuffer]", Ta = "[object DataView]", Ca = "[object Float32Array]", qa = "[object Float64Array]", Na = "[object Int8Array]", Ma = "[object Int16Array]", Aa = "[object Int32Array]", Pa = "[object Uint8Array]", ja = "[object Uint8ClampedArray]", Ra = "[object Uint16Array]", La = "[object Uint32Array]", B = {};
|
|
113
|
+
B[xn] = B[ba] = B[Fa] = B[Ta] = B[ha] = B[_a] = B[Ca] = B[qa] = B[Na] = B[Ma] = B[Aa] = B[Oa] = B[ka] = B[kn] = B[Ia] = B[$a] = B[Va] = B[Ea] = B[Pa] = B[ja] = B[Ra] = B[La] = !0;
|
|
114
|
+
B[wa] = B[On] = B[Sa] = !1;
|
|
115
|
+
function We(n, e, t, r, a, l) {
|
|
116
|
+
var o, i = e & va, p = e & ga, V = e & ya;
|
|
114
117
|
if (t && (o = a ? t(n, r, a, l) : t(n)), o !== void 0)
|
|
115
118
|
return o;
|
|
116
|
-
if (!
|
|
119
|
+
if (!Ln(n))
|
|
117
120
|
return n;
|
|
118
|
-
var
|
|
119
|
-
if (
|
|
120
|
-
if (o =
|
|
121
|
+
var c = Un(n);
|
|
122
|
+
if (c) {
|
|
123
|
+
if (o = Ar(n), !i)
|
|
121
124
|
return Qn(n, o);
|
|
122
125
|
} else {
|
|
123
|
-
var
|
|
124
|
-
if (
|
|
126
|
+
var s = wt(n), x = s == On || s == xa;
|
|
127
|
+
if (ur(n))
|
|
125
128
|
return Jn(n, i);
|
|
126
|
-
if (
|
|
127
|
-
if (o =
|
|
128
|
-
return
|
|
129
|
+
if (s == kn || s == xn || x && !a) {
|
|
130
|
+
if (o = p || x ? {} : Zn(n), !i)
|
|
131
|
+
return p ? Cr(n, Er(o, n)) : Sr(n, Vr(o, n));
|
|
129
132
|
} else {
|
|
130
|
-
if (!B[
|
|
133
|
+
if (!B[s])
|
|
131
134
|
return a ? n : {};
|
|
132
|
-
o =
|
|
135
|
+
o = la(n, s, i);
|
|
133
136
|
}
|
|
134
137
|
}
|
|
135
|
-
l || (l = new
|
|
138
|
+
l || (l = new dr());
|
|
136
139
|
var _ = l.get(n);
|
|
137
140
|
if (_)
|
|
138
141
|
return _;
|
|
139
|
-
l.set(n, o),
|
|
140
|
-
o.add(
|
|
141
|
-
}) :
|
|
142
|
-
o.set(
|
|
142
|
+
l.set(n, o), ma(n) ? n.forEach(function(h) {
|
|
143
|
+
o.add(We(h, e, t, h, n, l));
|
|
144
|
+
}) : da(n) && n.forEach(function(h, d) {
|
|
145
|
+
o.set(d, We(h, e, t, d, n, l));
|
|
143
146
|
});
|
|
144
|
-
var
|
|
145
|
-
return
|
|
146
|
-
|
|
147
|
+
var f = V ? p ? qr : cr : p ? pt : dn, v = c ? void 0 : f(n);
|
|
148
|
+
return $r(v || n, function(h, d) {
|
|
149
|
+
v && (d = h, h = n[d]), Or(o, d, We(h, e, t, d, n, l));
|
|
147
150
|
}), o;
|
|
148
151
|
}
|
|
149
|
-
var
|
|
152
|
+
var Ua = 4;
|
|
150
153
|
function Dt(n) {
|
|
151
|
-
return
|
|
154
|
+
return We(n, Ua);
|
|
152
155
|
}
|
|
153
|
-
const
|
|
156
|
+
const Da = ce({
|
|
154
157
|
size: {
|
|
155
158
|
type: String,
|
|
156
159
|
values: Ot
|
|
157
160
|
},
|
|
158
161
|
disabled: Boolean
|
|
159
|
-
}),
|
|
160
|
-
...
|
|
162
|
+
}), Ba = ce({
|
|
163
|
+
...Da,
|
|
161
164
|
model: Object,
|
|
162
165
|
rules: {
|
|
163
166
|
type: Te(Object)
|
|
@@ -196,11 +199,11 @@ const ja = ue({
|
|
|
196
199
|
scrollIntoViewOptions: {
|
|
197
200
|
type: [Object, Boolean]
|
|
198
201
|
}
|
|
199
|
-
}),
|
|
200
|
-
validate: (n, e, t) => (Dn(n) ||
|
|
201
|
-
},
|
|
202
|
-
function
|
|
203
|
-
const n =
|
|
202
|
+
}), za = {
|
|
203
|
+
validate: (n, e, t) => (Dn(n) || _e(n)) && Ke(e) && _e(t)
|
|
204
|
+
}, Wa = "ElForm";
|
|
205
|
+
function Ga() {
|
|
206
|
+
const n = H([]), e = N(() => {
|
|
204
207
|
if (!n.value.length)
|
|
205
208
|
return "0";
|
|
206
209
|
const l = Math.max(...n.value);
|
|
@@ -208,7 +211,7 @@ function Da() {
|
|
|
208
211
|
});
|
|
209
212
|
function t(l) {
|
|
210
213
|
const o = n.value.indexOf(l);
|
|
211
|
-
return o === -1 && e.value === "0" &&
|
|
214
|
+
return o === -1 && e.value === "0" && pe(Wa, `unexpected width ${l}`), o;
|
|
212
215
|
}
|
|
213
216
|
function r(l, o) {
|
|
214
217
|
if (l && o) {
|
|
@@ -227,115 +230,115 @@ function Da() {
|
|
|
227
230
|
deregisterLabelWidth: a
|
|
228
231
|
};
|
|
229
232
|
}
|
|
230
|
-
const
|
|
233
|
+
const De = (n, e) => {
|
|
231
234
|
const t = lt(e);
|
|
232
235
|
return t.length > 0 ? n.filter((r) => r.prop && t.includes(r.prop)) : n;
|
|
233
|
-
},
|
|
234
|
-
name:
|
|
235
|
-
}),
|
|
236
|
-
...
|
|
237
|
-
props:
|
|
238
|
-
emits:
|
|
236
|
+
}, Ge = "ElForm", Ya = Z({
|
|
237
|
+
name: Ge
|
|
238
|
+
}), Ka = /* @__PURE__ */ Z({
|
|
239
|
+
...Ya,
|
|
240
|
+
props: Ba,
|
|
241
|
+
emits: za,
|
|
239
242
|
setup(n, { expose: e, emit: t }) {
|
|
240
|
-
const r = n, a = [], l = Pe(), o =
|
|
241
|
-
const { labelPosition:
|
|
243
|
+
const r = n, a = [], l = Pe(), o = ye("form"), i = N(() => {
|
|
244
|
+
const { labelPosition: g, inline: y } = r;
|
|
242
245
|
return [
|
|
243
246
|
o.b(),
|
|
244
247
|
o.m(l.value || "default"),
|
|
245
248
|
{
|
|
246
|
-
[o.m(`label-${
|
|
247
|
-
[o.m("inline")]:
|
|
249
|
+
[o.m(`label-${g}`)]: g,
|
|
250
|
+
[o.m("inline")]: y
|
|
248
251
|
}
|
|
249
252
|
];
|
|
250
|
-
}),
|
|
251
|
-
a.push(
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
},
|
|
253
|
+
}), p = (g) => {
|
|
254
|
+
a.push(g);
|
|
255
|
+
}, V = (g) => {
|
|
256
|
+
g.prop && a.splice(a.indexOf(g), 1);
|
|
257
|
+
}, c = (g = []) => {
|
|
255
258
|
if (!r.model) {
|
|
256
|
-
|
|
259
|
+
pe(Ge, "model is required for resetFields to work.");
|
|
257
260
|
return;
|
|
258
261
|
}
|
|
259
|
-
|
|
260
|
-
},
|
|
261
|
-
|
|
262
|
-
},
|
|
263
|
-
const
|
|
264
|
-
return
|
|
265
|
-
}), _ = (
|
|
262
|
+
De(a, g).forEach((y) => y.resetField());
|
|
263
|
+
}, s = (g = []) => {
|
|
264
|
+
De(a, g).forEach((y) => y.clearValidate());
|
|
265
|
+
}, x = N(() => {
|
|
266
|
+
const g = !!r.model;
|
|
267
|
+
return g || pe(Ge, "model is required for validate to work."), g;
|
|
268
|
+
}), _ = (g) => {
|
|
266
269
|
if (a.length === 0)
|
|
267
270
|
return [];
|
|
268
|
-
const
|
|
269
|
-
return
|
|
270
|
-
},
|
|
271
|
-
if (!
|
|
271
|
+
const y = De(a, g);
|
|
272
|
+
return y.length ? y : (pe(Ge, "please pass correct props!"), []);
|
|
273
|
+
}, f = async (g) => h(void 0, g), v = async (g = []) => {
|
|
274
|
+
if (!x.value)
|
|
272
275
|
return !1;
|
|
273
|
-
const
|
|
274
|
-
if (
|
|
276
|
+
const y = _(g);
|
|
277
|
+
if (y.length === 0)
|
|
275
278
|
return !0;
|
|
276
|
-
let
|
|
277
|
-
for (const
|
|
279
|
+
let w = {};
|
|
280
|
+
for (const k of y)
|
|
278
281
|
try {
|
|
279
|
-
await
|
|
280
|
-
} catch (
|
|
281
|
-
|
|
282
|
-
...
|
|
283
|
-
|
|
282
|
+
await k.validate("");
|
|
283
|
+
} catch ($) {
|
|
284
|
+
w = {
|
|
285
|
+
...w,
|
|
286
|
+
...$
|
|
284
287
|
};
|
|
285
288
|
}
|
|
286
|
-
return Object.keys(
|
|
287
|
-
},
|
|
288
|
-
const
|
|
289
|
+
return Object.keys(w).length === 0 ? !0 : Promise.reject(w);
|
|
290
|
+
}, h = async (g = [], y) => {
|
|
291
|
+
const w = !xe(y);
|
|
289
292
|
try {
|
|
290
|
-
const
|
|
291
|
-
return
|
|
292
|
-
} catch (
|
|
293
|
-
if (
|
|
294
|
-
throw
|
|
295
|
-
const
|
|
296
|
-
return r.scrollToError &&
|
|
293
|
+
const k = await v(g);
|
|
294
|
+
return k === !0 && (y == null || y(k)), k;
|
|
295
|
+
} catch (k) {
|
|
296
|
+
if (k instanceof Error)
|
|
297
|
+
throw k;
|
|
298
|
+
const $ = k;
|
|
299
|
+
return r.scrollToError && d(Object.keys($)[0]), y == null || y(!1, $), w && Promise.reject($);
|
|
297
300
|
}
|
|
298
|
-
},
|
|
299
|
-
var
|
|
300
|
-
const
|
|
301
|
-
|
|
301
|
+
}, d = (g) => {
|
|
302
|
+
var y;
|
|
303
|
+
const w = De(a, g)[0];
|
|
304
|
+
w && ((y = w.$el) == null || y.scrollIntoView(r.scrollIntoViewOptions));
|
|
302
305
|
};
|
|
303
|
-
return
|
|
304
|
-
r.validateOnRuleChange &&
|
|
305
|
-
}, { deep: !0 }), mt(kt,
|
|
306
|
+
return ve(() => r.rules, () => {
|
|
307
|
+
r.validateOnRuleChange && f().catch((g) => pe(g));
|
|
308
|
+
}, { deep: !0 }), mt(kt, Ze({
|
|
306
309
|
...vt(r),
|
|
307
310
|
emit: t,
|
|
308
|
-
resetFields:
|
|
309
|
-
clearValidate:
|
|
310
|
-
validateField:
|
|
311
|
-
addField:
|
|
312
|
-
removeField:
|
|
313
|
-
...
|
|
311
|
+
resetFields: c,
|
|
312
|
+
clearValidate: s,
|
|
313
|
+
validateField: h,
|
|
314
|
+
addField: p,
|
|
315
|
+
removeField: V,
|
|
316
|
+
...Ga()
|
|
314
317
|
})), e({
|
|
315
|
-
validate:
|
|
316
|
-
validateField:
|
|
317
|
-
resetFields:
|
|
318
|
-
clearValidate:
|
|
319
|
-
scrollToField:
|
|
320
|
-
}), (
|
|
321
|
-
class:
|
|
318
|
+
validate: f,
|
|
319
|
+
validateField: h,
|
|
320
|
+
resetFields: c,
|
|
321
|
+
clearValidate: s,
|
|
322
|
+
scrollToField: d
|
|
323
|
+
}), (g, y) => (I(), q("form", {
|
|
324
|
+
class: L(u(i))
|
|
322
325
|
}, [
|
|
323
|
-
|
|
326
|
+
me(g.$slots, "default")
|
|
324
327
|
], 2));
|
|
325
328
|
}
|
|
326
329
|
});
|
|
327
|
-
var
|
|
328
|
-
function
|
|
329
|
-
return
|
|
330
|
+
var Ha = /* @__PURE__ */ be(Ka, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);
|
|
331
|
+
function we() {
|
|
332
|
+
return we = Object.assign ? Object.assign.bind() : function(n) {
|
|
330
333
|
for (var e = 1; e < arguments.length; e++) {
|
|
331
334
|
var t = arguments[e];
|
|
332
335
|
for (var r in t)
|
|
333
336
|
Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
334
337
|
}
|
|
335
338
|
return n;
|
|
336
|
-
},
|
|
339
|
+
}, we.apply(this, arguments);
|
|
337
340
|
}
|
|
338
|
-
function
|
|
341
|
+
function Qa(n, e) {
|
|
339
342
|
n.prototype = Object.create(e.prototype), n.prototype.constructor = n, Ne(n, e);
|
|
340
343
|
}
|
|
341
344
|
function it(n) {
|
|
@@ -348,7 +351,7 @@ function Ne(n, e) {
|
|
|
348
351
|
return r.__proto__ = a, r;
|
|
349
352
|
}, Ne(n, e);
|
|
350
353
|
}
|
|
351
|
-
function
|
|
354
|
+
function Ja() {
|
|
352
355
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
353
356
|
return !1;
|
|
354
357
|
if (typeof Proxy == "function")
|
|
@@ -360,21 +363,21 @@ function Ya() {
|
|
|
360
363
|
return !1;
|
|
361
364
|
}
|
|
362
365
|
}
|
|
363
|
-
function
|
|
364
|
-
return
|
|
366
|
+
function Ye(n, e, t) {
|
|
367
|
+
return Ja() ? Ye = Reflect.construct.bind() : Ye = function(a, l, o) {
|
|
365
368
|
var i = [null];
|
|
366
369
|
i.push.apply(i, l);
|
|
367
|
-
var
|
|
368
|
-
return o && Ne(
|
|
369
|
-
},
|
|
370
|
+
var p = Function.bind.apply(a, i), V = new p();
|
|
371
|
+
return o && Ne(V, o.prototype), V;
|
|
372
|
+
}, Ye.apply(null, arguments);
|
|
370
373
|
}
|
|
371
|
-
function
|
|
374
|
+
function Za(n) {
|
|
372
375
|
return Function.toString.call(n).indexOf("[native code]") !== -1;
|
|
373
376
|
}
|
|
374
377
|
function st(n) {
|
|
375
378
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
376
379
|
return st = function(r) {
|
|
377
|
-
if (r === null || !
|
|
380
|
+
if (r === null || !Za(r))
|
|
378
381
|
return r;
|
|
379
382
|
if (typeof r != "function")
|
|
380
383
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -384,7 +387,7 @@ function st(n) {
|
|
|
384
387
|
e.set(r, a);
|
|
385
388
|
}
|
|
386
389
|
function a() {
|
|
387
|
-
return
|
|
390
|
+
return Ye(r, arguments, it(this).constructor);
|
|
388
391
|
}
|
|
389
392
|
return a.prototype = Object.create(r.prototype, {
|
|
390
393
|
constructor: {
|
|
@@ -396,7 +399,7 @@ function st(n) {
|
|
|
396
399
|
}), Ne(a, r);
|
|
397
400
|
}, st(n);
|
|
398
401
|
}
|
|
399
|
-
var
|
|
402
|
+
var Xa = /%[sdj%]/g, In = function() {
|
|
400
403
|
};
|
|
401
404
|
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (In = function(e, t) {
|
|
402
405
|
typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && t.every(function(r) {
|
|
@@ -412,14 +415,14 @@ function ut(n) {
|
|
|
412
415
|
e[r] = e[r] || [], e[r].push(t);
|
|
413
416
|
}), e;
|
|
414
417
|
}
|
|
415
|
-
function
|
|
418
|
+
function ue(n) {
|
|
416
419
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
|
|
417
420
|
t[r - 1] = arguments[r];
|
|
418
421
|
var a = 0, l = t.length;
|
|
419
422
|
if (typeof n == "function")
|
|
420
423
|
return n.apply(null, t);
|
|
421
424
|
if (typeof n == "string") {
|
|
422
|
-
var o = n.replace(
|
|
425
|
+
var o = n.replace(Xa, function(i) {
|
|
423
426
|
if (i === "%%")
|
|
424
427
|
return "%";
|
|
425
428
|
if (a >= l)
|
|
@@ -444,13 +447,13 @@ function oe(n) {
|
|
|
444
447
|
}
|
|
445
448
|
return n;
|
|
446
449
|
}
|
|
447
|
-
function
|
|
450
|
+
function eo(n) {
|
|
448
451
|
return n === "string" || n === "url" || n === "hex" || n === "email" || n === "date" || n === "pattern";
|
|
449
452
|
}
|
|
450
|
-
function
|
|
451
|
-
return !!(n == null || e === "array" && Array.isArray(n) && !n.length ||
|
|
453
|
+
function J(n, e) {
|
|
454
|
+
return !!(n == null || e === "array" && Array.isArray(n) && !n.length || eo(e) && typeof n == "string" && !n);
|
|
452
455
|
}
|
|
453
|
-
function
|
|
456
|
+
function to(n, e, t) {
|
|
454
457
|
var r = [], a = 0, l = n.length;
|
|
455
458
|
function o(i) {
|
|
456
459
|
r.push.apply(r, i || []), a++, a === l && t(r);
|
|
@@ -459,7 +462,7 @@ function Ja(n, e, t) {
|
|
|
459
462
|
e(i, o);
|
|
460
463
|
});
|
|
461
464
|
}
|
|
462
|
-
function
|
|
465
|
+
function Bt(n, e, t) {
|
|
463
466
|
var r = 0, a = n.length;
|
|
464
467
|
function l(o) {
|
|
465
468
|
if (o && o.length) {
|
|
@@ -471,50 +474,50 @@ function Lt(n, e, t) {
|
|
|
471
474
|
}
|
|
472
475
|
l([]);
|
|
473
476
|
}
|
|
474
|
-
function
|
|
477
|
+
function no(n) {
|
|
475
478
|
var e = [];
|
|
476
479
|
return Object.keys(n).forEach(function(t) {
|
|
477
480
|
e.push.apply(e, n[t] || []);
|
|
478
481
|
}), e;
|
|
479
482
|
}
|
|
480
483
|
var zt = /* @__PURE__ */ function(n) {
|
|
481
|
-
|
|
484
|
+
Qa(e, n);
|
|
482
485
|
function e(t, r) {
|
|
483
486
|
var a;
|
|
484
487
|
return a = n.call(this, "Async Validation Error") || this, a.errors = t, a.fields = r, a;
|
|
485
488
|
}
|
|
486
489
|
return e;
|
|
487
490
|
}(/* @__PURE__ */ st(Error));
|
|
488
|
-
function
|
|
491
|
+
function ro(n, e, t, r, a) {
|
|
489
492
|
if (e.first) {
|
|
490
|
-
var l = new Promise(function(
|
|
491
|
-
var
|
|
492
|
-
return r(
|
|
493
|
-
},
|
|
494
|
-
|
|
493
|
+
var l = new Promise(function(x, _) {
|
|
494
|
+
var f = function(d) {
|
|
495
|
+
return r(d), d.length ? _(new zt(d, ut(d))) : x(a);
|
|
496
|
+
}, v = no(n);
|
|
497
|
+
Bt(v, t, f);
|
|
495
498
|
});
|
|
496
|
-
return l.catch(function(
|
|
497
|
-
return
|
|
499
|
+
return l.catch(function(x) {
|
|
500
|
+
return x;
|
|
498
501
|
}), l;
|
|
499
502
|
}
|
|
500
|
-
var o = e.firstFields === !0 ? Object.keys(n) : e.firstFields || [], i = Object.keys(n),
|
|
501
|
-
var
|
|
502
|
-
if (
|
|
503
|
-
return r(
|
|
503
|
+
var o = e.firstFields === !0 ? Object.keys(n) : e.firstFields || [], i = Object.keys(n), p = i.length, V = 0, c = [], s = new Promise(function(x, _) {
|
|
504
|
+
var f = function(h) {
|
|
505
|
+
if (c.push.apply(c, h), V++, V === p)
|
|
506
|
+
return r(c), c.length ? _(new zt(c, ut(c))) : x(a);
|
|
504
507
|
};
|
|
505
|
-
i.length || (r(
|
|
506
|
-
var
|
|
507
|
-
o.indexOf(
|
|
508
|
+
i.length || (r(c), x(a)), i.forEach(function(v) {
|
|
509
|
+
var h = n[v];
|
|
510
|
+
o.indexOf(v) !== -1 ? Bt(h, t, f) : to(h, t, f);
|
|
508
511
|
});
|
|
509
512
|
});
|
|
510
|
-
return
|
|
511
|
-
return
|
|
512
|
-
}),
|
|
513
|
+
return s.catch(function(x) {
|
|
514
|
+
return x;
|
|
515
|
+
}), s;
|
|
513
516
|
}
|
|
514
|
-
function
|
|
517
|
+
function ao(n) {
|
|
515
518
|
return !!(n && n.message !== void 0);
|
|
516
519
|
}
|
|
517
|
-
function
|
|
520
|
+
function oo(n, e) {
|
|
518
521
|
for (var t = n, r = 0; r < e.length; r++) {
|
|
519
522
|
if (t == null)
|
|
520
523
|
return t;
|
|
@@ -525,7 +528,7 @@ function to(n, e) {
|
|
|
525
528
|
function Wt(n, e) {
|
|
526
529
|
return function(t) {
|
|
527
530
|
var r;
|
|
528
|
-
return n.fullFields ? r =
|
|
531
|
+
return n.fullFields ? r = oo(e, n.fullFields) : r = e[t.field || n.fullField], ao(t) ? (t.field = t.field || n.fullField, t.fieldValue = r, t) : {
|
|
529
532
|
message: typeof t == "function" ? t() : t,
|
|
530
533
|
fieldValue: r,
|
|
531
534
|
field: t.field || n.fullField
|
|
@@ -537,20 +540,20 @@ function Gt(n, e) {
|
|
|
537
540
|
for (var t in e)
|
|
538
541
|
if (e.hasOwnProperty(t)) {
|
|
539
542
|
var r = e[t];
|
|
540
|
-
typeof r == "object" && typeof n[t] == "object" ? n[t] =
|
|
543
|
+
typeof r == "object" && typeof n[t] == "object" ? n[t] = we({}, n[t], r) : n[t] = r;
|
|
541
544
|
}
|
|
542
545
|
}
|
|
543
546
|
return n;
|
|
544
547
|
}
|
|
545
548
|
var $n = function(e, t, r, a, l, o) {
|
|
546
|
-
e.required && (!r.hasOwnProperty(e.field) ||
|
|
547
|
-
},
|
|
548
|
-
(/^\s+$/.test(t) || t === "") && a.push(
|
|
549
|
-
},
|
|
550
|
-
if (
|
|
551
|
-
return
|
|
552
|
-
var n = "[a-fA-F\\d:]", e = function(
|
|
553
|
-
return
|
|
549
|
+
e.required && (!r.hasOwnProperty(e.field) || J(t, o || e.type)) && a.push(ue(l.messages.required, e.fullField));
|
|
550
|
+
}, lo = function(e, t, r, a, l) {
|
|
551
|
+
(/^\s+$/.test(t) || t === "") && a.push(ue(l.messages.whitespace, e.fullField));
|
|
552
|
+
}, Be, io = function() {
|
|
553
|
+
if (Be)
|
|
554
|
+
return Be;
|
|
555
|
+
var n = "[a-fA-F\\d:]", e = function(w) {
|
|
556
|
+
return w && w.includeBoundaries ? "(?:(?<=\\s|^)(?=" + n + ")|(?<=" + n + ")(?=\\s|$))" : "";
|
|
554
557
|
}, t = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", r = "[a-fA-F\\d]{1,4}", a = (`
|
|
555
558
|
(?:
|
|
556
559
|
(?:` + r + ":){7}(?:" + r + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
@@ -562,16 +565,16 @@ var $n = function(e, t, r, a, l, o) {
|
|
|
562
565
|
(?:` + r + ":){1}(?:(?::" + r + "){0,4}:" + t + "|(?::" + r + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
563
566
|
(?::(?:(?::` + r + "){0,5}:" + t + "|(?::" + r + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
564
567
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
565
|
-
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), l = new RegExp("(?:^" + t + "$)|(?:^" + a + "$)"), o = new RegExp("^" + t + "$"), i = new RegExp("^" + a + "$"),
|
|
566
|
-
return
|
|
568
|
+
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), l = new RegExp("(?:^" + t + "$)|(?:^" + a + "$)"), o = new RegExp("^" + t + "$"), i = new RegExp("^" + a + "$"), p = function(w) {
|
|
569
|
+
return w && w.exact ? l : new RegExp("(?:" + e(w) + t + e(w) + ")|(?:" + e(w) + a + e(w) + ")", "g");
|
|
567
570
|
};
|
|
568
|
-
|
|
569
|
-
return
|
|
570
|
-
},
|
|
571
|
-
return
|
|
571
|
+
p.v4 = function(y) {
|
|
572
|
+
return y && y.exact ? o : new RegExp("" + e(y) + t + e(y), "g");
|
|
573
|
+
}, p.v6 = function(y) {
|
|
574
|
+
return y && y.exact ? i : new RegExp("" + e(y) + a + e(y), "g");
|
|
572
575
|
};
|
|
573
|
-
var
|
|
574
|
-
return
|
|
576
|
+
var V = "(?:(?:[a-z]+:)?//)", c = "(?:\\S+(?::\\S*)?@)?", s = p.v4().source, x = p.v6().source, _ = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", f = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", v = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", h = "(?::\\d{2,5})?", d = '(?:[/?#][^\\s"]*)?', g = "(?:" + V + "|www\\.)" + c + "(?:localhost|" + s + "|" + x + "|" + _ + f + v + ")" + h + d;
|
|
577
|
+
return Be = new RegExp("(?:^" + g + "$)", "i"), Be;
|
|
575
578
|
}, Yt = {
|
|
576
579
|
// http://emailregex.com/
|
|
577
580
|
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
|
|
@@ -580,12 +583,12 @@ var $n = function(e, t, r, a, l, o) {
|
|
|
580
583
|
// 'i',
|
|
581
584
|
// ),
|
|
582
585
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
583
|
-
},
|
|
586
|
+
}, Ee = {
|
|
584
587
|
integer: function(e) {
|
|
585
|
-
return
|
|
588
|
+
return Ee.number(e) && parseInt(e, 10) === e;
|
|
586
589
|
},
|
|
587
590
|
float: function(e) {
|
|
588
|
-
return
|
|
591
|
+
return Ee.number(e) && !Ee.integer(e);
|
|
589
592
|
},
|
|
590
593
|
array: function(e) {
|
|
591
594
|
return Array.isArray(e);
|
|
@@ -606,7 +609,7 @@ var $n = function(e, t, r, a, l, o) {
|
|
|
606
609
|
return isNaN(e) ? !1 : typeof e == "number";
|
|
607
610
|
},
|
|
608
611
|
object: function(e) {
|
|
609
|
-
return typeof e == "object" && !
|
|
612
|
+
return typeof e == "object" && !Ee.array(e);
|
|
610
613
|
},
|
|
611
614
|
method: function(e) {
|
|
612
615
|
return typeof e == "function";
|
|
@@ -615,177 +618,177 @@ var $n = function(e, t, r, a, l, o) {
|
|
|
615
618
|
return typeof e == "string" && e.length <= 320 && !!e.match(Yt.email);
|
|
616
619
|
},
|
|
617
620
|
url: function(e) {
|
|
618
|
-
return typeof e == "string" && e.length <= 2048 && !!e.match(
|
|
621
|
+
return typeof e == "string" && e.length <= 2048 && !!e.match(io());
|
|
619
622
|
},
|
|
620
623
|
hex: function(e) {
|
|
621
624
|
return typeof e == "string" && !!e.match(Yt.hex);
|
|
622
625
|
}
|
|
623
|
-
},
|
|
626
|
+
}, so = function(e, t, r, a, l) {
|
|
624
627
|
if (e.required && t === void 0) {
|
|
625
628
|
$n(e, t, r, a, l);
|
|
626
629
|
return;
|
|
627
630
|
}
|
|
628
631
|
var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], i = e.type;
|
|
629
|
-
o.indexOf(i) > -1 ?
|
|
630
|
-
},
|
|
631
|
-
var o = typeof e.len == "number", i = typeof e.min == "number",
|
|
632
|
-
if (
|
|
632
|
+
o.indexOf(i) > -1 ? Ee[i](t) || a.push(ue(l.messages.types[i], e.fullField, e.type)) : i && typeof t !== e.type && a.push(ue(l.messages.types[i], e.fullField, e.type));
|
|
633
|
+
}, uo = function(e, t, r, a, l) {
|
|
634
|
+
var o = typeof e.len == "number", i = typeof e.min == "number", p = typeof e.max == "number", V = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = t, s = null, x = typeof t == "number", _ = typeof t == "string", f = Array.isArray(t);
|
|
635
|
+
if (x ? s = "number" : _ ? s = "string" : f && (s = "array"), !s)
|
|
633
636
|
return !1;
|
|
634
|
-
|
|
635
|
-
}, ke = "enum",
|
|
636
|
-
e[ke] = Array.isArray(e[ke]) ? e[ke] : [], e[ke].indexOf(t) === -1 && a.push(
|
|
637
|
-
},
|
|
637
|
+
f && (c = t.length), _ && (c = t.replace(V, "_").length), o ? c !== e.len && a.push(ue(l.messages[s].len, e.fullField, e.len)) : i && !p && c < e.min ? a.push(ue(l.messages[s].min, e.fullField, e.min)) : p && !i && c > e.max ? a.push(ue(l.messages[s].max, e.fullField, e.max)) : i && p && (c < e.min || c > e.max) && a.push(ue(l.messages[s].range, e.fullField, e.min, e.max));
|
|
638
|
+
}, ke = "enum", co = function(e, t, r, a, l) {
|
|
639
|
+
e[ke] = Array.isArray(e[ke]) ? e[ke] : [], e[ke].indexOf(t) === -1 && a.push(ue(l.messages[ke], e.fullField, e[ke].join(", ")));
|
|
640
|
+
}, fo = function(e, t, r, a, l) {
|
|
638
641
|
if (e.pattern) {
|
|
639
642
|
if (e.pattern instanceof RegExp)
|
|
640
|
-
e.pattern.lastIndex = 0, e.pattern.test(t) || a.push(
|
|
643
|
+
e.pattern.lastIndex = 0, e.pattern.test(t) || a.push(ue(l.messages.pattern.mismatch, e.fullField, t, e.pattern));
|
|
641
644
|
else if (typeof e.pattern == "string") {
|
|
642
645
|
var o = new RegExp(e.pattern);
|
|
643
|
-
o.test(t) || a.push(
|
|
646
|
+
o.test(t) || a.push(ue(l.messages.pattern.mismatch, e.fullField, t, e.pattern));
|
|
644
647
|
}
|
|
645
648
|
}
|
|
646
|
-
},
|
|
649
|
+
}, M = {
|
|
647
650
|
required: $n,
|
|
648
|
-
whitespace:
|
|
649
|
-
type:
|
|
650
|
-
range:
|
|
651
|
-
enum:
|
|
652
|
-
pattern:
|
|
653
|
-
},
|
|
651
|
+
whitespace: lo,
|
|
652
|
+
type: so,
|
|
653
|
+
range: uo,
|
|
654
|
+
enum: co,
|
|
655
|
+
pattern: fo
|
|
656
|
+
}, po = function(e, t, r, a, l) {
|
|
654
657
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
655
658
|
if (i) {
|
|
656
|
-
if (
|
|
659
|
+
if (J(t, "string") && !e.required)
|
|
657
660
|
return r();
|
|
658
|
-
|
|
661
|
+
M.required(e, t, a, o, l, "string"), J(t, "string") || (M.type(e, t, a, o, l), M.range(e, t, a, o, l), M.pattern(e, t, a, o, l), e.whitespace === !0 && M.whitespace(e, t, a, o, l));
|
|
659
662
|
}
|
|
660
663
|
r(o);
|
|
661
|
-
},
|
|
664
|
+
}, mo = function(e, t, r, a, l) {
|
|
662
665
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
663
666
|
if (i) {
|
|
664
|
-
if (
|
|
667
|
+
if (J(t) && !e.required)
|
|
665
668
|
return r();
|
|
666
|
-
|
|
669
|
+
M.required(e, t, a, o, l), t !== void 0 && M.type(e, t, a, o, l);
|
|
667
670
|
}
|
|
668
671
|
r(o);
|
|
669
|
-
},
|
|
672
|
+
}, vo = function(e, t, r, a, l) {
|
|
670
673
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
671
674
|
if (i) {
|
|
672
|
-
if (t === "" && (t = void 0),
|
|
675
|
+
if (t === "" && (t = void 0), J(t) && !e.required)
|
|
673
676
|
return r();
|
|
674
|
-
|
|
677
|
+
M.required(e, t, a, o, l), t !== void 0 && (M.type(e, t, a, o, l), M.range(e, t, a, o, l));
|
|
675
678
|
}
|
|
676
679
|
r(o);
|
|
677
|
-
},
|
|
680
|
+
}, go = function(e, t, r, a, l) {
|
|
678
681
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
679
682
|
if (i) {
|
|
680
|
-
if (
|
|
683
|
+
if (J(t) && !e.required)
|
|
681
684
|
return r();
|
|
682
|
-
|
|
685
|
+
M.required(e, t, a, o, l), t !== void 0 && M.type(e, t, a, o, l);
|
|
683
686
|
}
|
|
684
687
|
r(o);
|
|
685
|
-
},
|
|
688
|
+
}, yo = function(e, t, r, a, l) {
|
|
686
689
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
687
690
|
if (i) {
|
|
688
|
-
if (
|
|
691
|
+
if (J(t) && !e.required)
|
|
689
692
|
return r();
|
|
690
|
-
|
|
693
|
+
M.required(e, t, a, o, l), J(t) || M.type(e, t, a, o, l);
|
|
691
694
|
}
|
|
692
695
|
r(o);
|
|
693
|
-
},
|
|
696
|
+
}, bo = function(e, t, r, a, l) {
|
|
694
697
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
695
698
|
if (i) {
|
|
696
|
-
if (
|
|
699
|
+
if (J(t) && !e.required)
|
|
697
700
|
return r();
|
|
698
|
-
|
|
701
|
+
M.required(e, t, a, o, l), t !== void 0 && (M.type(e, t, a, o, l), M.range(e, t, a, o, l));
|
|
699
702
|
}
|
|
700
703
|
r(o);
|
|
701
|
-
},
|
|
704
|
+
}, ho = function(e, t, r, a, l) {
|
|
702
705
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
703
706
|
if (i) {
|
|
704
|
-
if (
|
|
707
|
+
if (J(t) && !e.required)
|
|
705
708
|
return r();
|
|
706
|
-
|
|
709
|
+
M.required(e, t, a, o, l), t !== void 0 && (M.type(e, t, a, o, l), M.range(e, t, a, o, l));
|
|
707
710
|
}
|
|
708
711
|
r(o);
|
|
709
|
-
},
|
|
712
|
+
}, _o = function(e, t, r, a, l) {
|
|
710
713
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
711
714
|
if (i) {
|
|
712
715
|
if (t == null && !e.required)
|
|
713
716
|
return r();
|
|
714
|
-
|
|
717
|
+
M.required(e, t, a, o, l, "array"), t != null && (M.type(e, t, a, o, l), M.range(e, t, a, o, l));
|
|
715
718
|
}
|
|
716
719
|
r(o);
|
|
717
|
-
},
|
|
720
|
+
}, wo = function(e, t, r, a, l) {
|
|
718
721
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
719
722
|
if (i) {
|
|
720
|
-
if (
|
|
723
|
+
if (J(t) && !e.required)
|
|
721
724
|
return r();
|
|
722
|
-
|
|
725
|
+
M.required(e, t, a, o, l), t !== void 0 && M.type(e, t, a, o, l);
|
|
723
726
|
}
|
|
724
727
|
r(o);
|
|
725
|
-
},
|
|
728
|
+
}, xo = "enum", Oo = function(e, t, r, a, l) {
|
|
726
729
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
727
730
|
if (i) {
|
|
728
|
-
if (
|
|
731
|
+
if (J(t) && !e.required)
|
|
729
732
|
return r();
|
|
730
|
-
|
|
733
|
+
M.required(e, t, a, o, l), t !== void 0 && M[xo](e, t, a, o, l);
|
|
731
734
|
}
|
|
732
735
|
r(o);
|
|
733
|
-
},
|
|
736
|
+
}, ko = function(e, t, r, a, l) {
|
|
734
737
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
735
738
|
if (i) {
|
|
736
|
-
if (
|
|
739
|
+
if (J(t, "string") && !e.required)
|
|
737
740
|
return r();
|
|
738
|
-
|
|
741
|
+
M.required(e, t, a, o, l), J(t, "string") || M.pattern(e, t, a, o, l);
|
|
739
742
|
}
|
|
740
743
|
r(o);
|
|
741
|
-
},
|
|
744
|
+
}, Io = function(e, t, r, a, l) {
|
|
742
745
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
743
746
|
if (i) {
|
|
744
|
-
if (
|
|
747
|
+
if (J(t, "date") && !e.required)
|
|
745
748
|
return r();
|
|
746
|
-
if (
|
|
747
|
-
var
|
|
748
|
-
t instanceof Date ?
|
|
749
|
+
if (M.required(e, t, a, o, l), !J(t, "date")) {
|
|
750
|
+
var p;
|
|
751
|
+
t instanceof Date ? p = t : p = new Date(t), M.type(e, p, a, o, l), p && M.range(e, p.getTime(), a, o, l);
|
|
749
752
|
}
|
|
750
753
|
}
|
|
751
754
|
r(o);
|
|
752
|
-
},
|
|
755
|
+
}, $o = function(e, t, r, a, l) {
|
|
753
756
|
var o = [], i = Array.isArray(t) ? "array" : typeof t;
|
|
754
|
-
|
|
757
|
+
M.required(e, t, a, o, l, i), r(o);
|
|
755
758
|
}, rt = function(e, t, r, a, l) {
|
|
756
|
-
var o = e.type, i = [],
|
|
757
|
-
if (
|
|
758
|
-
if (
|
|
759
|
+
var o = e.type, i = [], p = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
760
|
+
if (p) {
|
|
761
|
+
if (J(t, o) && !e.required)
|
|
759
762
|
return r();
|
|
760
|
-
|
|
763
|
+
M.required(e, t, a, i, l, o), J(t, o) || M.type(e, t, a, i, l);
|
|
761
764
|
}
|
|
762
765
|
r(i);
|
|
763
|
-
},
|
|
766
|
+
}, Vo = function(e, t, r, a, l) {
|
|
764
767
|
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
765
768
|
if (i) {
|
|
766
|
-
if (
|
|
769
|
+
if (J(t) && !e.required)
|
|
767
770
|
return r();
|
|
768
|
-
|
|
771
|
+
M.required(e, t, a, o, l);
|
|
769
772
|
}
|
|
770
773
|
r(o);
|
|
771
774
|
}, Fe = {
|
|
772
|
-
string:
|
|
773
|
-
method:
|
|
774
|
-
number:
|
|
775
|
-
boolean:
|
|
776
|
-
regexp:
|
|
777
|
-
integer:
|
|
778
|
-
float:
|
|
779
|
-
array:
|
|
780
|
-
object:
|
|
781
|
-
enum:
|
|
782
|
-
pattern:
|
|
783
|
-
date:
|
|
775
|
+
string: po,
|
|
776
|
+
method: mo,
|
|
777
|
+
number: vo,
|
|
778
|
+
boolean: go,
|
|
779
|
+
regexp: yo,
|
|
780
|
+
integer: bo,
|
|
781
|
+
float: ho,
|
|
782
|
+
array: _o,
|
|
783
|
+
object: wo,
|
|
784
|
+
enum: Oo,
|
|
785
|
+
pattern: ko,
|
|
786
|
+
date: Io,
|
|
784
787
|
url: rt,
|
|
785
788
|
hex: rt,
|
|
786
789
|
email: rt,
|
|
787
|
-
required:
|
|
788
|
-
any:
|
|
790
|
+
required: $o,
|
|
791
|
+
any: Vo
|
|
789
792
|
};
|
|
790
793
|
function dt() {
|
|
791
794
|
return {
|
|
@@ -861,104 +864,104 @@ var ct = dt(), je = /* @__PURE__ */ function() {
|
|
|
861
864
|
var o = this;
|
|
862
865
|
a === void 0 && (a = {}), l === void 0 && (l = function() {
|
|
863
866
|
});
|
|
864
|
-
var i = r,
|
|
865
|
-
if (typeof
|
|
866
|
-
return
|
|
867
|
-
function
|
|
868
|
-
var
|
|
869
|
-
function
|
|
870
|
-
if (Array.isArray(
|
|
871
|
-
var
|
|
872
|
-
|
|
867
|
+
var i = r, p = a, V = l;
|
|
868
|
+
if (typeof p == "function" && (V = p, p = {}), !this.rules || Object.keys(this.rules).length === 0)
|
|
869
|
+
return V && V(null, i), Promise.resolve(i);
|
|
870
|
+
function c(v) {
|
|
871
|
+
var h = [], d = {};
|
|
872
|
+
function g(w) {
|
|
873
|
+
if (Array.isArray(w)) {
|
|
874
|
+
var k;
|
|
875
|
+
h = (k = h).concat.apply(k, w);
|
|
873
876
|
} else
|
|
874
|
-
|
|
877
|
+
h.push(w);
|
|
875
878
|
}
|
|
876
|
-
for (var
|
|
877
|
-
|
|
878
|
-
|
|
879
|
+
for (var y = 0; y < v.length; y++)
|
|
880
|
+
g(v[y]);
|
|
881
|
+
h.length ? (d = ut(h), V(h, d)) : V(null, i);
|
|
879
882
|
}
|
|
880
|
-
if (
|
|
881
|
-
var
|
|
882
|
-
|
|
883
|
+
if (p.messages) {
|
|
884
|
+
var s = this.messages();
|
|
885
|
+
s === ct && (s = dt()), Gt(s, p.messages), p.messages = s;
|
|
883
886
|
} else
|
|
884
|
-
|
|
885
|
-
var
|
|
886
|
-
_.forEach(function(
|
|
887
|
-
var
|
|
888
|
-
|
|
889
|
-
var
|
|
890
|
-
typeof
|
|
891
|
-
validator:
|
|
892
|
-
} :
|
|
893
|
-
rule:
|
|
894
|
-
value:
|
|
887
|
+
p.messages = this.messages();
|
|
888
|
+
var x = {}, _ = p.keys || Object.keys(this.rules);
|
|
889
|
+
_.forEach(function(v) {
|
|
890
|
+
var h = o.rules[v], d = i[v];
|
|
891
|
+
h.forEach(function(g) {
|
|
892
|
+
var y = g;
|
|
893
|
+
typeof y.transform == "function" && (i === r && (i = we({}, i)), d = i[v] = y.transform(d)), typeof y == "function" ? y = {
|
|
894
|
+
validator: y
|
|
895
|
+
} : y = we({}, y), y.validator = o.getValidationMethod(y), y.validator && (y.field = v, y.fullField = y.fullField || v, y.type = o.getType(y), x[v] = x[v] || [], x[v].push({
|
|
896
|
+
rule: y,
|
|
897
|
+
value: d,
|
|
895
898
|
source: i,
|
|
896
|
-
field:
|
|
899
|
+
field: v
|
|
897
900
|
}));
|
|
898
901
|
});
|
|
899
902
|
});
|
|
900
|
-
var
|
|
901
|
-
return
|
|
902
|
-
var
|
|
903
|
-
|
|
904
|
-
function
|
|
905
|
-
return
|
|
906
|
-
fullField:
|
|
907
|
-
fullFields:
|
|
903
|
+
var f = {};
|
|
904
|
+
return ro(x, p, function(v, h) {
|
|
905
|
+
var d = v.rule, g = (d.type === "object" || d.type === "array") && (typeof d.fields == "object" || typeof d.defaultField == "object");
|
|
906
|
+
g = g && (d.required || !d.required && v.value), d.field = v.field;
|
|
907
|
+
function y($, b) {
|
|
908
|
+
return we({}, b, {
|
|
909
|
+
fullField: d.fullField + "." + $,
|
|
910
|
+
fullFields: d.fullFields ? [].concat(d.fullFields, [$]) : [$]
|
|
908
911
|
});
|
|
909
912
|
}
|
|
910
|
-
function
|
|
911
|
-
|
|
912
|
-
var
|
|
913
|
-
!
|
|
914
|
-
var
|
|
915
|
-
if (
|
|
916
|
-
return
|
|
917
|
-
if (!
|
|
918
|
-
|
|
913
|
+
function w($) {
|
|
914
|
+
$ === void 0 && ($ = []);
|
|
915
|
+
var b = Array.isArray($) ? $ : [$];
|
|
916
|
+
!p.suppressWarning && b.length && n.warning("async-validator:", b), b.length && d.message !== void 0 && (b = [].concat(d.message));
|
|
917
|
+
var O = b.map(Wt(d, i));
|
|
918
|
+
if (p.first && O.length)
|
|
919
|
+
return f[d.field] = 1, h(O);
|
|
920
|
+
if (!g)
|
|
921
|
+
h(O);
|
|
919
922
|
else {
|
|
920
|
-
if (
|
|
921
|
-
return
|
|
922
|
-
var
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
}),
|
|
926
|
-
var
|
|
927
|
-
Object.keys(
|
|
928
|
-
var
|
|
929
|
-
|
|
923
|
+
if (d.required && !v.value)
|
|
924
|
+
return d.message !== void 0 ? O = [].concat(d.message).map(Wt(d, i)) : p.error && (O = [p.error(d, ue(p.messages.required, d.field))]), h(O);
|
|
925
|
+
var G = {};
|
|
926
|
+
d.defaultField && Object.keys(v.value).map(function(X) {
|
|
927
|
+
G[X] = d.defaultField;
|
|
928
|
+
}), G = we({}, G, v.rule.fields);
|
|
929
|
+
var oe = {};
|
|
930
|
+
Object.keys(G).forEach(function(X) {
|
|
931
|
+
var m = G[X], E = Array.isArray(m) ? m : [m];
|
|
932
|
+
oe[X] = E.map(y.bind(null, X));
|
|
930
933
|
});
|
|
931
|
-
var
|
|
932
|
-
|
|
933
|
-
var
|
|
934
|
-
|
|
934
|
+
var le = new n(oe);
|
|
935
|
+
le.messages(p.messages), v.rule.options && (v.rule.options.messages = p.messages, v.rule.options.error = p.error), le.validate(v.value, v.rule.options || p, function(X) {
|
|
936
|
+
var m = [];
|
|
937
|
+
O && O.length && m.push.apply(m, O), X && X.length && m.push.apply(m, X), h(m.length ? m : null);
|
|
935
938
|
});
|
|
936
939
|
}
|
|
937
940
|
}
|
|
938
|
-
var
|
|
939
|
-
if (
|
|
940
|
-
|
|
941
|
-
else if (
|
|
941
|
+
var k;
|
|
942
|
+
if (d.asyncValidator)
|
|
943
|
+
k = d.asyncValidator(d, v.value, w, v.source, p);
|
|
944
|
+
else if (d.validator) {
|
|
942
945
|
try {
|
|
943
|
-
|
|
944
|
-
} catch (
|
|
945
|
-
console.error == null || console.error(
|
|
946
|
-
throw
|
|
947
|
-
}, 0),
|
|
946
|
+
k = d.validator(d, v.value, w, v.source, p);
|
|
947
|
+
} catch ($) {
|
|
948
|
+
console.error == null || console.error($), p.suppressValidatorError || setTimeout(function() {
|
|
949
|
+
throw $;
|
|
950
|
+
}, 0), w($.message);
|
|
948
951
|
}
|
|
949
|
-
|
|
952
|
+
k === !0 ? w() : k === !1 ? w(typeof d.message == "function" ? d.message(d.fullField || d.field) : d.message || (d.fullField || d.field) + " fails") : k instanceof Array ? w(k) : k instanceof Error && w(k.message);
|
|
950
953
|
}
|
|
951
|
-
|
|
952
|
-
return
|
|
953
|
-
}, function(
|
|
954
|
-
return
|
|
954
|
+
k && k.then && k.then(function() {
|
|
955
|
+
return w();
|
|
956
|
+
}, function($) {
|
|
957
|
+
return w($);
|
|
955
958
|
});
|
|
956
|
-
}, function(
|
|
957
|
-
|
|
959
|
+
}, function(v) {
|
|
960
|
+
c(v);
|
|
958
961
|
}, i);
|
|
959
962
|
}, e.getType = function(r) {
|
|
960
963
|
if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !Fe.hasOwnProperty(r.type))
|
|
961
|
-
throw new Error(
|
|
964
|
+
throw new Error(ue("Unknown rule type %s", r.type));
|
|
962
965
|
return r.type || "string";
|
|
963
966
|
}, e.getValidationMethod = function(r) {
|
|
964
967
|
if (typeof r.validator == "function")
|
|
@@ -975,12 +978,12 @@ je.register = function(e, t) {
|
|
|
975
978
|
je.warning = In;
|
|
976
979
|
je.messages = ct;
|
|
977
980
|
je.validators = Fe;
|
|
978
|
-
const
|
|
981
|
+
const Eo = [
|
|
979
982
|
"",
|
|
980
983
|
"error",
|
|
981
984
|
"validating",
|
|
982
985
|
"success"
|
|
983
|
-
],
|
|
986
|
+
], So = ce({
|
|
984
987
|
label: String,
|
|
985
988
|
labelWidth: {
|
|
986
989
|
type: [String, Number],
|
|
@@ -999,7 +1002,7 @@ const ko = [
|
|
|
999
1002
|
error: String,
|
|
1000
1003
|
validateStatus: {
|
|
1001
1004
|
type: String,
|
|
1002
|
-
values:
|
|
1005
|
+
values: Eo
|
|
1003
1006
|
},
|
|
1004
1007
|
for: String,
|
|
1005
1008
|
inlineMessage: {
|
|
@@ -1015,7 +1018,7 @@ const ko = [
|
|
|
1015
1018
|
values: Ot
|
|
1016
1019
|
}
|
|
1017
1020
|
}), Kt = "ElLabelWrap";
|
|
1018
|
-
var
|
|
1021
|
+
var Fo = Z({
|
|
1019
1022
|
name: Kt,
|
|
1020
1023
|
props: {
|
|
1021
1024
|
isAutoWidth: Boolean,
|
|
@@ -1026,235 +1029,235 @@ var $o = Q({
|
|
|
1026
1029
|
}) {
|
|
1027
1030
|
const t = Ce(kt, void 0), r = Ce(at);
|
|
1028
1031
|
r || Zt(Kt, "usage: <el-form-item><label-wrap /></el-form-item>");
|
|
1029
|
-
const a =
|
|
1030
|
-
var
|
|
1031
|
-
if ((
|
|
1032
|
-
const
|
|
1033
|
-
return Math.ceil(Number.parseFloat(
|
|
1032
|
+
const a = ye("form"), l = H(), o = H(0), i = () => {
|
|
1033
|
+
var c;
|
|
1034
|
+
if ((c = l.value) != null && c.firstElementChild) {
|
|
1035
|
+
const s = window.getComputedStyle(l.value.firstElementChild).width;
|
|
1036
|
+
return Math.ceil(Number.parseFloat(s));
|
|
1034
1037
|
} else
|
|
1035
1038
|
return 0;
|
|
1036
|
-
},
|
|
1037
|
-
|
|
1038
|
-
e.default && n.isAutoWidth && (
|
|
1039
|
+
}, p = (c = "update") => {
|
|
1040
|
+
Xe(() => {
|
|
1041
|
+
e.default && n.isAutoWidth && (c === "update" ? o.value = i() : c === "remove" && (t == null || t.deregisterLabelWidth(o.value)));
|
|
1039
1042
|
});
|
|
1040
|
-
},
|
|
1043
|
+
}, V = () => p("update");
|
|
1041
1044
|
return Ae(() => {
|
|
1042
|
-
|
|
1045
|
+
V();
|
|
1043
1046
|
}), nn(() => {
|
|
1044
|
-
|
|
1045
|
-
}), rn(() =>
|
|
1046
|
-
n.updateAll && (t == null || t.registerLabelWidth(
|
|
1047
|
-
}),
|
|
1048
|
-
var
|
|
1049
|
-
return (
|
|
1050
|
-
}),
|
|
1051
|
-
var
|
|
1047
|
+
p("remove");
|
|
1048
|
+
}), rn(() => V()), ve(o, (c, s) => {
|
|
1049
|
+
n.updateAll && (t == null || t.registerLabelWidth(c, s));
|
|
1050
|
+
}), pn(N(() => {
|
|
1051
|
+
var c, s;
|
|
1052
|
+
return (s = (c = l.value) == null ? void 0 : c.firstElementChild) != null ? s : null;
|
|
1053
|
+
}), V), () => {
|
|
1054
|
+
var c, s;
|
|
1052
1055
|
if (!e)
|
|
1053
1056
|
return null;
|
|
1054
1057
|
const {
|
|
1055
|
-
isAutoWidth:
|
|
1058
|
+
isAutoWidth: x
|
|
1056
1059
|
} = n;
|
|
1057
|
-
if (
|
|
1058
|
-
const _ = t == null ? void 0 : t.autoLabelWidth,
|
|
1059
|
-
if (
|
|
1060
|
-
const
|
|
1061
|
-
|
|
1060
|
+
if (x) {
|
|
1061
|
+
const _ = t == null ? void 0 : t.autoLabelWidth, f = r == null ? void 0 : r.hasLabel, v = {};
|
|
1062
|
+
if (f && _ && _ !== "auto") {
|
|
1063
|
+
const h = Math.max(0, Number.parseInt(_, 10) - o.value), d = t.labelPosition === "left" ? "marginRight" : "marginLeft";
|
|
1064
|
+
h && (v[d] = `${h}px`);
|
|
1062
1065
|
}
|
|
1063
|
-
return
|
|
1066
|
+
return F("div", {
|
|
1064
1067
|
ref: l,
|
|
1065
1068
|
class: [a.be("item", "label-wrap")],
|
|
1066
|
-
style:
|
|
1067
|
-
}, [(
|
|
1069
|
+
style: v
|
|
1070
|
+
}, [(c = e.default) == null ? void 0 : c.call(e)]);
|
|
1068
1071
|
} else
|
|
1069
|
-
return
|
|
1072
|
+
return F(Q, {
|
|
1070
1073
|
ref: l
|
|
1071
|
-
}, [(
|
|
1074
|
+
}, [(s = e.default) == null ? void 0 : s.call(e)]);
|
|
1072
1075
|
};
|
|
1073
1076
|
}
|
|
1074
1077
|
});
|
|
1075
|
-
const
|
|
1078
|
+
const To = ["role", "aria-labelledby"], Co = Z({
|
|
1076
1079
|
name: "ElFormItem"
|
|
1077
|
-
}),
|
|
1078
|
-
...
|
|
1079
|
-
props:
|
|
1080
|
+
}), qo = /* @__PURE__ */ Z({
|
|
1081
|
+
...Co,
|
|
1082
|
+
props: So,
|
|
1080
1083
|
setup(n, { expose: e }) {
|
|
1081
|
-
const t = n, r =
|
|
1082
|
-
let
|
|
1083
|
-
const
|
|
1084
|
+
const t = n, r = rr(), a = Ce(kt, void 0), l = Ce(at, void 0), o = Pe(void 0, { formItem: !1 }), i = ye("form-item"), p = Xt().value, V = H([]), c = H(""), s = Bn(c, 100), x = H(""), _ = H();
|
|
1085
|
+
let f, v = !1;
|
|
1086
|
+
const h = N(() => {
|
|
1084
1087
|
if ((a == null ? void 0 : a.labelPosition) === "top")
|
|
1085
1088
|
return {};
|
|
1086
|
-
const
|
|
1087
|
-
return
|
|
1088
|
-
}),
|
|
1089
|
+
const T = qt(t.labelWidth || (a == null ? void 0 : a.labelWidth) || "");
|
|
1090
|
+
return T ? { width: T } : {};
|
|
1091
|
+
}), d = N(() => {
|
|
1089
1092
|
if ((a == null ? void 0 : a.labelPosition) === "top" || a != null && a.inline)
|
|
1090
1093
|
return {};
|
|
1091
|
-
if (!t.label && !t.labelWidth &&
|
|
1094
|
+
if (!t.label && !t.labelWidth && G)
|
|
1092
1095
|
return {};
|
|
1093
|
-
const
|
|
1094
|
-
return !t.label && !r.label ? { marginLeft:
|
|
1095
|
-
}),
|
|
1096
|
+
const T = qt(t.labelWidth || (a == null ? void 0 : a.labelWidth) || "");
|
|
1097
|
+
return !t.label && !r.label ? { marginLeft: T } : {};
|
|
1098
|
+
}), g = N(() => [
|
|
1096
1099
|
i.b(),
|
|
1097
1100
|
i.m(o.value),
|
|
1098
|
-
i.is("error",
|
|
1099
|
-
i.is("validating",
|
|
1100
|
-
i.is("success",
|
|
1101
|
-
i.is("required",
|
|
1101
|
+
i.is("error", c.value === "error"),
|
|
1102
|
+
i.is("validating", c.value === "validating"),
|
|
1103
|
+
i.is("success", c.value === "success"),
|
|
1104
|
+
i.is("required", E.value || t.required),
|
|
1102
1105
|
i.is("no-asterisk", a == null ? void 0 : a.hideRequiredAsterisk),
|
|
1103
1106
|
(a == null ? void 0 : a.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
|
|
1104
1107
|
{ [i.m("feedback")]: a == null ? void 0 : a.statusIcon }
|
|
1105
|
-
]),
|
|
1108
|
+
]), y = N(() => Ke(t.inlineMessage) ? t.inlineMessage : (a == null ? void 0 : a.inlineMessage) || !1), w = N(() => [
|
|
1106
1109
|
i.e("error"),
|
|
1107
|
-
{ [i.em("error", "inline")]:
|
|
1108
|
-
]),
|
|
1109
|
-
const
|
|
1110
|
-
if (!(!
|
|
1111
|
-
return nt(
|
|
1112
|
-
}),
|
|
1113
|
-
const { required:
|
|
1114
|
-
t.rules &&
|
|
1115
|
-
const
|
|
1116
|
-
if (
|
|
1117
|
-
const
|
|
1118
|
-
|
|
1110
|
+
{ [i.em("error", "inline")]: y.value }
|
|
1111
|
+
]), k = N(() => t.prop ? _e(t.prop) ? t.prop : t.prop.join(".") : ""), $ = N(() => !!(t.label || r.label)), b = N(() => t.for || V.value.length === 1 ? V.value[0] : void 0), O = N(() => !b.value && $.value), G = !!l, oe = N(() => {
|
|
1112
|
+
const T = a == null ? void 0 : a.model;
|
|
1113
|
+
if (!(!T || !t.prop))
|
|
1114
|
+
return nt(T, t.prop).value;
|
|
1115
|
+
}), le = N(() => {
|
|
1116
|
+
const { required: T } = t, R = [];
|
|
1117
|
+
t.rules && R.push(...lt(t.rules));
|
|
1118
|
+
const ne = a == null ? void 0 : a.rules;
|
|
1119
|
+
if (ne && t.prop) {
|
|
1120
|
+
const ee = nt(ne, t.prop).value;
|
|
1121
|
+
ee && R.push(...lt(ee));
|
|
1119
1122
|
}
|
|
1120
|
-
if (
|
|
1121
|
-
const
|
|
1122
|
-
if (
|
|
1123
|
-
for (const [
|
|
1124
|
-
|
|
1123
|
+
if (T !== void 0) {
|
|
1124
|
+
const ee = R.map((fe, Oe) => [fe, Oe]).filter(([fe]) => Object.keys(fe).includes("required"));
|
|
1125
|
+
if (ee.length > 0)
|
|
1126
|
+
for (const [fe, Oe] of ee)
|
|
1127
|
+
fe.required !== T && (R[Oe] = { ...fe, required: T });
|
|
1125
1128
|
else
|
|
1126
|
-
|
|
1129
|
+
R.push({ required: T });
|
|
1127
1130
|
}
|
|
1128
|
-
return
|
|
1129
|
-
}),
|
|
1130
|
-
var
|
|
1131
|
-
return
|
|
1132
|
-
}),
|
|
1133
|
-
|
|
1134
|
-
},
|
|
1135
|
-
var
|
|
1136
|
-
const { errors:
|
|
1137
|
-
(!
|
|
1138
|
-
},
|
|
1139
|
-
|
|
1140
|
-
},
|
|
1141
|
-
const
|
|
1131
|
+
return R;
|
|
1132
|
+
}), X = N(() => le.value.length > 0), m = (T) => le.value.filter((ne) => !ne.trigger || !T ? !0 : Array.isArray(ne.trigger) ? ne.trigger.includes(T) : ne.trigger === T).map(({ trigger: ne, ...ee }) => ee), E = N(() => le.value.some((T) => T.required)), A = N(() => {
|
|
1133
|
+
var T;
|
|
1134
|
+
return s.value === "error" && t.showMessage && ((T = a == null ? void 0 : a.showMessage) != null ? T : !0);
|
|
1135
|
+
}), W = N(() => `${t.label || ""}${(a == null ? void 0 : a.labelSuffix) || ""}`), D = (T) => {
|
|
1136
|
+
c.value = T;
|
|
1137
|
+
}, P = (T) => {
|
|
1138
|
+
var R, ne;
|
|
1139
|
+
const { errors: ee, fields: fe } = T;
|
|
1140
|
+
(!ee || !fe) && console.error(T), D("error"), x.value = ee ? (ne = (R = ee == null ? void 0 : ee[0]) == null ? void 0 : R.message) != null ? ne : `${t.prop} is required` : "", a == null || a.emit("validate", t.prop, !1, x.value);
|
|
1141
|
+
}, re = () => {
|
|
1142
|
+
D("success"), a == null || a.emit("validate", t.prop, !0, "");
|
|
1143
|
+
}, Y = async (T) => {
|
|
1144
|
+
const R = k.value;
|
|
1142
1145
|
return new je({
|
|
1143
|
-
[
|
|
1144
|
-
}).validate({ [
|
|
1145
|
-
},
|
|
1146
|
-
if (
|
|
1146
|
+
[R]: T
|
|
1147
|
+
}).validate({ [R]: oe.value }, { firstFields: !0 }).then(() => (re(), !0)).catch((ee) => (P(ee), Promise.reject(ee)));
|
|
1148
|
+
}, K = async (T, R) => {
|
|
1149
|
+
if (v || !t.prop)
|
|
1147
1150
|
return !1;
|
|
1148
|
-
const
|
|
1149
|
-
if (!
|
|
1150
|
-
return
|
|
1151
|
-
const
|
|
1152
|
-
return
|
|
1153
|
-
const { fields: Oe } =
|
|
1154
|
-
return
|
|
1151
|
+
const ne = xe(R);
|
|
1152
|
+
if (!X.value)
|
|
1153
|
+
return R == null || R(!1), !1;
|
|
1154
|
+
const ee = m(T);
|
|
1155
|
+
return ee.length === 0 ? (R == null || R(!0), !0) : (D("validating"), Y(ee).then(() => (R == null || R(!0), !0)).catch((fe) => {
|
|
1156
|
+
const { fields: Oe } = fe;
|
|
1157
|
+
return R == null || R(!1, Oe), ne ? !1 : Promise.reject(Oe);
|
|
1155
1158
|
}));
|
|
1156
1159
|
}, et = () => {
|
|
1157
|
-
|
|
1160
|
+
D(""), x.value = "", v = !1;
|
|
1158
1161
|
}, Tt = async () => {
|
|
1159
|
-
const
|
|
1160
|
-
if (!
|
|
1162
|
+
const T = a == null ? void 0 : a.model;
|
|
1163
|
+
if (!T || !t.prop)
|
|
1161
1164
|
return;
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
}, jn = (
|
|
1165
|
-
|
|
1166
|
-
}, Rn = (
|
|
1167
|
-
|
|
1165
|
+
const R = nt(T, t.prop);
|
|
1166
|
+
v = !0, R.value = Dt(f), await Xe(), et(), v = !1;
|
|
1167
|
+
}, jn = (T) => {
|
|
1168
|
+
V.value.includes(T) || V.value.push(T);
|
|
1169
|
+
}, Rn = (T) => {
|
|
1170
|
+
V.value = V.value.filter((R) => R !== T);
|
|
1168
1171
|
};
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
}, { immediate: !0 }),
|
|
1172
|
-
const tt =
|
|
1172
|
+
ve(() => t.error, (T) => {
|
|
1173
|
+
x.value = T || "", D(T ? "error" : "");
|
|
1174
|
+
}, { immediate: !0 }), ve(() => t.validateStatus, (T) => D(T || ""));
|
|
1175
|
+
const tt = Ze({
|
|
1173
1176
|
...vt(t),
|
|
1174
1177
|
$el: _,
|
|
1175
1178
|
size: o,
|
|
1176
|
-
validateState:
|
|
1177
|
-
labelId:
|
|
1178
|
-
inputIds:
|
|
1179
|
-
isGroup:
|
|
1180
|
-
hasLabel:
|
|
1179
|
+
validateState: c,
|
|
1180
|
+
labelId: p,
|
|
1181
|
+
inputIds: V,
|
|
1182
|
+
isGroup: O,
|
|
1183
|
+
hasLabel: $,
|
|
1181
1184
|
addInputId: jn,
|
|
1182
1185
|
removeInputId: Rn,
|
|
1183
1186
|
resetField: Tt,
|
|
1184
1187
|
clearValidate: et,
|
|
1185
|
-
validate:
|
|
1188
|
+
validate: K
|
|
1186
1189
|
});
|
|
1187
1190
|
return mt(at, tt), Ae(() => {
|
|
1188
|
-
t.prop && (a == null || a.addField(tt),
|
|
1191
|
+
t.prop && (a == null || a.addField(tt), f = Dt(oe.value));
|
|
1189
1192
|
}), nn(() => {
|
|
1190
1193
|
a == null || a.removeField(tt);
|
|
1191
1194
|
}), e({
|
|
1192
1195
|
size: o,
|
|
1193
|
-
validateMessage:
|
|
1194
|
-
validateState:
|
|
1195
|
-
validate:
|
|
1196
|
+
validateMessage: x,
|
|
1197
|
+
validateState: c,
|
|
1198
|
+
validate: K,
|
|
1196
1199
|
clearValidate: et,
|
|
1197
1200
|
resetField: Tt
|
|
1198
|
-
}), (
|
|
1199
|
-
var
|
|
1200
|
-
return
|
|
1201
|
+
}), (T, R) => {
|
|
1202
|
+
var ne;
|
|
1203
|
+
return I(), q("div", {
|
|
1201
1204
|
ref_key: "formItemRef",
|
|
1202
1205
|
ref: _,
|
|
1203
|
-
class:
|
|
1204
|
-
role: u(
|
|
1205
|
-
"aria-labelledby": u(
|
|
1206
|
+
class: L(u(g)),
|
|
1207
|
+
role: u(O) ? "group" : void 0,
|
|
1208
|
+
"aria-labelledby": u(O) ? u(p) : void 0
|
|
1206
1209
|
}, [
|
|
1207
|
-
|
|
1208
|
-
"is-auto-width": u(
|
|
1209
|
-
"update-all": ((
|
|
1210
|
+
F(u(Fo), {
|
|
1211
|
+
"is-auto-width": u(h).width === "auto",
|
|
1212
|
+
"update-all": ((ne = u(a)) == null ? void 0 : ne.labelWidth) === "auto"
|
|
1210
1213
|
}, {
|
|
1211
|
-
default:
|
|
1212
|
-
u(
|
|
1214
|
+
default: S(() => [
|
|
1215
|
+
u($) ? (I(), U(gt(u(b) ? "label" : "div"), {
|
|
1213
1216
|
key: 0,
|
|
1214
|
-
id: u(
|
|
1215
|
-
for: u(
|
|
1216
|
-
class:
|
|
1217
|
-
style:
|
|
1217
|
+
id: u(p),
|
|
1218
|
+
for: u(b),
|
|
1219
|
+
class: L(u(i).e("label")),
|
|
1220
|
+
style: He(u(h))
|
|
1218
1221
|
}, {
|
|
1219
|
-
default:
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
+
default: S(() => [
|
|
1223
|
+
me(T.$slots, "label", { label: u(W) }, () => [
|
|
1224
|
+
j(te(u(W)), 1)
|
|
1222
1225
|
])
|
|
1223
1226
|
]),
|
|
1224
1227
|
_: 3
|
|
1225
|
-
}, 8, ["id", "for", "class", "style"])) :
|
|
1228
|
+
}, 8, ["id", "for", "class", "style"])) : z("v-if", !0)
|
|
1226
1229
|
]),
|
|
1227
1230
|
_: 3
|
|
1228
1231
|
}, 8, ["is-auto-width", "update-all"]),
|
|
1229
|
-
|
|
1230
|
-
class:
|
|
1231
|
-
style:
|
|
1232
|
+
C("div", {
|
|
1233
|
+
class: L(u(i).e("content")),
|
|
1234
|
+
style: He(u(d))
|
|
1232
1235
|
}, [
|
|
1233
|
-
|
|
1234
|
-
|
|
1236
|
+
me(T.$slots, "default"),
|
|
1237
|
+
F(ar, {
|
|
1235
1238
|
name: `${u(i).namespace.value}-zoom-in-top`
|
|
1236
1239
|
}, {
|
|
1237
|
-
default:
|
|
1238
|
-
u(
|
|
1240
|
+
default: S(() => [
|
|
1241
|
+
u(A) ? me(T.$slots, "error", {
|
|
1239
1242
|
key: 0,
|
|
1240
|
-
error:
|
|
1243
|
+
error: x.value
|
|
1241
1244
|
}, () => [
|
|
1242
|
-
|
|
1243
|
-
class:
|
|
1244
|
-
},
|
|
1245
|
-
]) :
|
|
1245
|
+
C("div", {
|
|
1246
|
+
class: L(u(w))
|
|
1247
|
+
}, te(x.value), 3)
|
|
1248
|
+
]) : z("v-if", !0)
|
|
1246
1249
|
]),
|
|
1247
1250
|
_: 3
|
|
1248
1251
|
}, 8, ["name"])
|
|
1249
1252
|
], 6)
|
|
1250
|
-
], 10,
|
|
1253
|
+
], 10, To);
|
|
1251
1254
|
};
|
|
1252
1255
|
}
|
|
1253
1256
|
});
|
|
1254
|
-
var Vn = /* @__PURE__ */
|
|
1255
|
-
const
|
|
1257
|
+
var Vn = /* @__PURE__ */ be(qo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);
|
|
1258
|
+
const No = Me(Ha, {
|
|
1256
1259
|
FormItem: Vn
|
|
1257
|
-
}),
|
|
1260
|
+
}), Mo = ft(Vn), Ao = ce({
|
|
1258
1261
|
value: {
|
|
1259
1262
|
type: [String, Number],
|
|
1260
1263
|
default: ""
|
|
@@ -1270,33 +1273,33 @@ const Fo = Me(Wa, {
|
|
|
1270
1273
|
values: ["primary", "success", "warning", "info", "danger"],
|
|
1271
1274
|
default: "danger"
|
|
1272
1275
|
}
|
|
1273
|
-
}),
|
|
1276
|
+
}), Po = ["textContent"], jo = Z({
|
|
1274
1277
|
name: "ElBadge"
|
|
1275
|
-
}),
|
|
1276
|
-
...
|
|
1277
|
-
props:
|
|
1278
|
+
}), Ro = /* @__PURE__ */ Z({
|
|
1279
|
+
...jo,
|
|
1280
|
+
props: Ao,
|
|
1278
1281
|
setup(n, { expose: e }) {
|
|
1279
|
-
const t = n, r =
|
|
1282
|
+
const t = n, r = ye("badge"), a = N(() => t.isDot ? "" : ae(t.value) && ae(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`);
|
|
1280
1283
|
return e({
|
|
1281
1284
|
content: a
|
|
1282
|
-
}), (l, o) => (
|
|
1283
|
-
class:
|
|
1285
|
+
}), (l, o) => (I(), q("div", {
|
|
1286
|
+
class: L(u(r).b())
|
|
1284
1287
|
}, [
|
|
1285
|
-
|
|
1286
|
-
|
|
1288
|
+
me(l.$slots, "default"),
|
|
1289
|
+
F(an, {
|
|
1287
1290
|
name: `${u(r).namespace.value}-zoom-in-center`,
|
|
1288
1291
|
persisted: ""
|
|
1289
1292
|
}, {
|
|
1290
|
-
default:
|
|
1291
|
-
|
|
1292
|
-
class:
|
|
1293
|
+
default: S(() => [
|
|
1294
|
+
$e(C("sup", {
|
|
1295
|
+
class: L([
|
|
1293
1296
|
u(r).e("content"),
|
|
1294
1297
|
u(r).em("content", l.type),
|
|
1295
1298
|
u(r).is("fixed", !!l.$slots.default),
|
|
1296
1299
|
u(r).is("dot", l.isDot)
|
|
1297
1300
|
]),
|
|
1298
|
-
textContent:
|
|
1299
|
-
}, null, 10,
|
|
1301
|
+
textContent: te(u(a))
|
|
1302
|
+
}, null, 10, Po), [
|
|
1300
1303
|
[on, !l.hidden && (u(a) || l.isDot)]
|
|
1301
1304
|
])
|
|
1302
1305
|
]),
|
|
@@ -1305,16 +1308,16 @@ const Fo = Me(Wa, {
|
|
|
1305
1308
|
], 2));
|
|
1306
1309
|
}
|
|
1307
1310
|
});
|
|
1308
|
-
var
|
|
1309
|
-
const
|
|
1311
|
+
var Lo = /* @__PURE__ */ be(Ro, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);
|
|
1312
|
+
const Uo = Me(Lo), Do = 100, Bo = 600, Ht = {
|
|
1310
1313
|
beforeMount(n, e) {
|
|
1311
|
-
const t = e.value, { interval: r =
|
|
1314
|
+
const t = e.value, { interval: r = Do, delay: a = Bo } = xe(t) ? {} : t;
|
|
1312
1315
|
let l, o;
|
|
1313
|
-
const i = () =>
|
|
1316
|
+
const i = () => xe(t) ? t() : t.handler(), p = () => {
|
|
1314
1317
|
o && (clearTimeout(o), o = void 0), l && (clearInterval(l), l = void 0);
|
|
1315
1318
|
};
|
|
1316
|
-
n.addEventListener("mousedown", (
|
|
1317
|
-
|
|
1319
|
+
n.addEventListener("mousedown", (V) => {
|
|
1320
|
+
V.button === 0 && (p(), i(), document.addEventListener("mouseup", () => p(), {
|
|
1318
1321
|
once: !0
|
|
1319
1322
|
}), o = setTimeout(() => {
|
|
1320
1323
|
l = setInterval(() => {
|
|
@@ -1323,14 +1326,14 @@ const Po = Me(Ao), jo = 100, Ro = 600, Ht = {
|
|
|
1323
1326
|
}, a));
|
|
1324
1327
|
});
|
|
1325
1328
|
}
|
|
1326
|
-
}, En =
|
|
1329
|
+
}, En = ce({
|
|
1327
1330
|
size: It,
|
|
1328
1331
|
disabled: Boolean,
|
|
1329
1332
|
label: {
|
|
1330
1333
|
type: [String, Number, Boolean],
|
|
1331
1334
|
default: ""
|
|
1332
1335
|
}
|
|
1333
|
-
}),
|
|
1336
|
+
}), zo = ce({
|
|
1334
1337
|
...En,
|
|
1335
1338
|
modelValue: {
|
|
1336
1339
|
type: [String, Number, Boolean],
|
|
@@ -1342,153 +1345,153 @@ const Po = Me(Ao), jo = 100, Ro = 600, Ht = {
|
|
|
1342
1345
|
},
|
|
1343
1346
|
border: Boolean
|
|
1344
1347
|
}), Sn = {
|
|
1345
|
-
[
|
|
1346
|
-
[Vt]: (n) =>
|
|
1348
|
+
[he]: (n) => _e(n) || ae(n) || Ke(n),
|
|
1349
|
+
[Vt]: (n) => _e(n) || ae(n) || Ke(n)
|
|
1347
1350
|
}, Fn = Symbol("radioGroupKey"), Tn = (n, e) => {
|
|
1348
|
-
const t =
|
|
1351
|
+
const t = H(), r = Ce(Fn, void 0), a = N(() => !!r), l = N({
|
|
1349
1352
|
get() {
|
|
1350
1353
|
return a.value ? r.modelValue : n.modelValue;
|
|
1351
1354
|
},
|
|
1352
|
-
set(
|
|
1353
|
-
a.value ? r.changeEvent(
|
|
1355
|
+
set(c) {
|
|
1356
|
+
a.value ? r.changeEvent(c) : e && e(he, c), t.value.checked = n.modelValue === n.label;
|
|
1354
1357
|
}
|
|
1355
|
-
}), o = Pe(
|
|
1358
|
+
}), o = Pe(N(() => r == null ? void 0 : r.size)), i = hn(N(() => r == null ? void 0 : r.disabled)), p = H(!1), V = N(() => i.value || a.value && l.value !== n.label ? -1 : 0);
|
|
1356
1359
|
return {
|
|
1357
1360
|
radioRef: t,
|
|
1358
1361
|
isGroup: a,
|
|
1359
1362
|
radioGroup: r,
|
|
1360
|
-
focus:
|
|
1363
|
+
focus: p,
|
|
1361
1364
|
size: o,
|
|
1362
1365
|
disabled: i,
|
|
1363
|
-
tabIndex:
|
|
1366
|
+
tabIndex: V,
|
|
1364
1367
|
modelValue: l
|
|
1365
1368
|
};
|
|
1366
|
-
},
|
|
1369
|
+
}, Wo = ["value", "name", "disabled"], Go = Z({
|
|
1367
1370
|
name: "ElRadio"
|
|
1368
|
-
}),
|
|
1369
|
-
...
|
|
1370
|
-
props:
|
|
1371
|
+
}), Yo = /* @__PURE__ */ Z({
|
|
1372
|
+
...Go,
|
|
1373
|
+
props: zo,
|
|
1371
1374
|
emits: Sn,
|
|
1372
1375
|
setup(n, { emit: e }) {
|
|
1373
|
-
const t = n, r =
|
|
1374
|
-
function
|
|
1375
|
-
|
|
1376
|
+
const t = n, r = ye("radio"), { radioRef: a, radioGroup: l, focus: o, size: i, disabled: p, modelValue: V } = Tn(t, e);
|
|
1377
|
+
function c() {
|
|
1378
|
+
Xe(() => e("change", V.value));
|
|
1376
1379
|
}
|
|
1377
|
-
return (
|
|
1380
|
+
return (s, x) => {
|
|
1378
1381
|
var _;
|
|
1379
|
-
return
|
|
1380
|
-
class:
|
|
1382
|
+
return I(), q("label", {
|
|
1383
|
+
class: L([
|
|
1381
1384
|
u(r).b(),
|
|
1382
|
-
u(r).is("disabled", u(
|
|
1385
|
+
u(r).is("disabled", u(p)),
|
|
1383
1386
|
u(r).is("focus", u(o)),
|
|
1384
|
-
u(r).is("bordered",
|
|
1385
|
-
u(r).is("checked", u(
|
|
1387
|
+
u(r).is("bordered", s.border),
|
|
1388
|
+
u(r).is("checked", u(V) === s.label),
|
|
1386
1389
|
u(r).m(u(i))
|
|
1387
1390
|
])
|
|
1388
1391
|
}, [
|
|
1389
|
-
|
|
1390
|
-
class:
|
|
1392
|
+
C("span", {
|
|
1393
|
+
class: L([
|
|
1391
1394
|
u(r).e("input"),
|
|
1392
|
-
u(r).is("disabled", u(
|
|
1393
|
-
u(r).is("checked", u(
|
|
1395
|
+
u(r).is("disabled", u(p)),
|
|
1396
|
+
u(r).is("checked", u(V) === s.label)
|
|
1394
1397
|
])
|
|
1395
1398
|
}, [
|
|
1396
|
-
|
|
1399
|
+
$e(C("input", {
|
|
1397
1400
|
ref_key: "radioRef",
|
|
1398
1401
|
ref: a,
|
|
1399
|
-
"onUpdate:modelValue":
|
|
1400
|
-
class:
|
|
1401
|
-
value:
|
|
1402
|
-
name:
|
|
1403
|
-
disabled: u(
|
|
1402
|
+
"onUpdate:modelValue": x[0] || (x[0] = (f) => ln(V) ? V.value = f : null),
|
|
1403
|
+
class: L(u(r).e("original")),
|
|
1404
|
+
value: s.label,
|
|
1405
|
+
name: s.name || ((_ = u(l)) == null ? void 0 : _.name),
|
|
1406
|
+
disabled: u(p),
|
|
1404
1407
|
type: "radio",
|
|
1405
|
-
onFocus:
|
|
1406
|
-
onBlur:
|
|
1407
|
-
onChange:
|
|
1408
|
-
onClick:
|
|
1408
|
+
onFocus: x[1] || (x[1] = (f) => o.value = !0),
|
|
1409
|
+
onBlur: x[2] || (x[2] = (f) => o.value = !1),
|
|
1410
|
+
onChange: c,
|
|
1411
|
+
onClick: x[3] || (x[3] = ge(() => {
|
|
1409
1412
|
}, ["stop"]))
|
|
1410
|
-
}, null, 42,
|
|
1411
|
-
[sn, u(
|
|
1413
|
+
}, null, 42, Wo), [
|
|
1414
|
+
[sn, u(V)]
|
|
1412
1415
|
]),
|
|
1413
|
-
|
|
1414
|
-
class:
|
|
1416
|
+
C("span", {
|
|
1417
|
+
class: L(u(r).e("inner"))
|
|
1415
1418
|
}, null, 2)
|
|
1416
1419
|
], 2),
|
|
1417
|
-
|
|
1418
|
-
class:
|
|
1419
|
-
onKeydown:
|
|
1420
|
+
C("span", {
|
|
1421
|
+
class: L(u(r).e("label")),
|
|
1422
|
+
onKeydown: x[4] || (x[4] = ge(() => {
|
|
1420
1423
|
}, ["stop"]))
|
|
1421
1424
|
}, [
|
|
1422
|
-
|
|
1423
|
-
|
|
1425
|
+
me(s.$slots, "default", {}, () => [
|
|
1426
|
+
j(te(s.label), 1)
|
|
1424
1427
|
])
|
|
1425
1428
|
], 34)
|
|
1426
1429
|
], 2);
|
|
1427
1430
|
};
|
|
1428
1431
|
}
|
|
1429
1432
|
});
|
|
1430
|
-
var
|
|
1431
|
-
const
|
|
1433
|
+
var Ko = /* @__PURE__ */ be(Yo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]);
|
|
1434
|
+
const Ho = ce({
|
|
1432
1435
|
...En,
|
|
1433
1436
|
name: {
|
|
1434
1437
|
type: String,
|
|
1435
1438
|
default: ""
|
|
1436
1439
|
}
|
|
1437
|
-
}),
|
|
1440
|
+
}), Qo = ["value", "name", "disabled"], Jo = Z({
|
|
1438
1441
|
name: "ElRadioButton"
|
|
1439
|
-
}),
|
|
1440
|
-
...
|
|
1441
|
-
props:
|
|
1442
|
+
}), Zo = /* @__PURE__ */ Z({
|
|
1443
|
+
...Jo,
|
|
1444
|
+
props: Ho,
|
|
1442
1445
|
setup(n) {
|
|
1443
|
-
const e = n, t =
|
|
1444
|
-
backgroundColor: (
|
|
1445
|
-
borderColor: (
|
|
1446
|
-
boxShadow:
|
|
1447
|
-
color: (
|
|
1446
|
+
const e = n, t = ye("radio"), { radioRef: r, focus: a, size: l, disabled: o, modelValue: i, radioGroup: p } = Tn(e), V = N(() => ({
|
|
1447
|
+
backgroundColor: (p == null ? void 0 : p.fill) || "",
|
|
1448
|
+
borderColor: (p == null ? void 0 : p.fill) || "",
|
|
1449
|
+
boxShadow: p != null && p.fill ? `-1px 0 0 0 ${p.fill}` : "",
|
|
1450
|
+
color: (p == null ? void 0 : p.textColor) || ""
|
|
1448
1451
|
}));
|
|
1449
|
-
return (
|
|
1450
|
-
var
|
|
1451
|
-
return
|
|
1452
|
-
class:
|
|
1452
|
+
return (c, s) => {
|
|
1453
|
+
var x;
|
|
1454
|
+
return I(), q("label", {
|
|
1455
|
+
class: L([
|
|
1453
1456
|
u(t).b("button"),
|
|
1454
|
-
u(t).is("active", u(i) ===
|
|
1457
|
+
u(t).is("active", u(i) === c.label),
|
|
1455
1458
|
u(t).is("disabled", u(o)),
|
|
1456
1459
|
u(t).is("focus", u(a)),
|
|
1457
1460
|
u(t).bm("button", u(l))
|
|
1458
1461
|
])
|
|
1459
1462
|
}, [
|
|
1460
|
-
|
|
1463
|
+
$e(C("input", {
|
|
1461
1464
|
ref_key: "radioRef",
|
|
1462
1465
|
ref: r,
|
|
1463
|
-
"onUpdate:modelValue":
|
|
1464
|
-
class:
|
|
1465
|
-
value:
|
|
1466
|
+
"onUpdate:modelValue": s[0] || (s[0] = (_) => ln(i) ? i.value = _ : null),
|
|
1467
|
+
class: L(u(t).be("button", "original-radio")),
|
|
1468
|
+
value: c.label,
|
|
1466
1469
|
type: "radio",
|
|
1467
|
-
name:
|
|
1470
|
+
name: c.name || ((x = u(p)) == null ? void 0 : x.name),
|
|
1468
1471
|
disabled: u(o),
|
|
1469
|
-
onFocus:
|
|
1470
|
-
onBlur:
|
|
1471
|
-
onClick:
|
|
1472
|
+
onFocus: s[1] || (s[1] = (_) => a.value = !0),
|
|
1473
|
+
onBlur: s[2] || (s[2] = (_) => a.value = !1),
|
|
1474
|
+
onClick: s[3] || (s[3] = ge(() => {
|
|
1472
1475
|
}, ["stop"]))
|
|
1473
|
-
}, null, 42,
|
|
1476
|
+
}, null, 42, Qo), [
|
|
1474
1477
|
[sn, u(i)]
|
|
1475
1478
|
]),
|
|
1476
|
-
|
|
1477
|
-
class:
|
|
1478
|
-
style:
|
|
1479
|
-
onKeydown:
|
|
1479
|
+
C("span", {
|
|
1480
|
+
class: L(u(t).be("button", "inner")),
|
|
1481
|
+
style: He(u(i) === c.label ? u(V) : {}),
|
|
1482
|
+
onKeydown: s[4] || (s[4] = ge(() => {
|
|
1480
1483
|
}, ["stop"]))
|
|
1481
1484
|
}, [
|
|
1482
|
-
|
|
1483
|
-
|
|
1485
|
+
me(c.$slots, "default", {}, () => [
|
|
1486
|
+
j(te(c.label), 1)
|
|
1484
1487
|
])
|
|
1485
1488
|
], 38)
|
|
1486
1489
|
], 2);
|
|
1487
1490
|
};
|
|
1488
1491
|
}
|
|
1489
1492
|
});
|
|
1490
|
-
var Cn = /* @__PURE__ */
|
|
1491
|
-
const
|
|
1493
|
+
var Cn = /* @__PURE__ */ be(Zo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]);
|
|
1494
|
+
const Xo = ce({
|
|
1492
1495
|
id: {
|
|
1493
1496
|
type: String,
|
|
1494
1497
|
default: void 0
|
|
@@ -1519,49 +1522,49 @@ const Ho = ue({
|
|
|
1519
1522
|
type: Boolean,
|
|
1520
1523
|
default: !0
|
|
1521
1524
|
}
|
|
1522
|
-
}),
|
|
1525
|
+
}), el = Sn, tl = ["id", "aria-label", "aria-labelledby"], nl = Z({
|
|
1523
1526
|
name: "ElRadioGroup"
|
|
1524
|
-
}),
|
|
1525
|
-
...
|
|
1526
|
-
props:
|
|
1527
|
-
emits:
|
|
1527
|
+
}), rl = /* @__PURE__ */ Z({
|
|
1528
|
+
...nl,
|
|
1529
|
+
props: Xo,
|
|
1530
|
+
emits: el,
|
|
1528
1531
|
setup(n, { emit: e }) {
|
|
1529
|
-
const t = n, r =
|
|
1532
|
+
const t = n, r = ye("radio"), a = Xt(), l = H(), { formItem: o } = _n(), { inputId: i, isLabeledByFormItem: p } = mr(t, {
|
|
1530
1533
|
formItemContext: o
|
|
1531
|
-
}),
|
|
1532
|
-
e(
|
|
1534
|
+
}), V = (s) => {
|
|
1535
|
+
e(he, s), Xe(() => e("change", s));
|
|
1533
1536
|
};
|
|
1534
1537
|
Ae(() => {
|
|
1535
|
-
const
|
|
1536
|
-
!Array.from(
|
|
1538
|
+
const s = l.value.querySelectorAll("[type=radio]"), x = s[0];
|
|
1539
|
+
!Array.from(s).some((_) => _.checked) && x && (x.tabIndex = 0);
|
|
1537
1540
|
});
|
|
1538
|
-
const
|
|
1539
|
-
return mt(Fn,
|
|
1541
|
+
const c = N(() => t.name || a.value);
|
|
1542
|
+
return mt(Fn, Ze({
|
|
1540
1543
|
...vt(t),
|
|
1541
|
-
changeEvent:
|
|
1542
|
-
name:
|
|
1543
|
-
})),
|
|
1544
|
-
t.validateEvent && (o == null || o.validate("change").catch((
|
|
1545
|
-
}), (
|
|
1544
|
+
changeEvent: V,
|
|
1545
|
+
name: c
|
|
1546
|
+
})), ve(() => t.modelValue, () => {
|
|
1547
|
+
t.validateEvent && (o == null || o.validate("change").catch((s) => pe(s)));
|
|
1548
|
+
}), (s, x) => (I(), q("div", {
|
|
1546
1549
|
id: u(i),
|
|
1547
1550
|
ref_key: "radioGroupRef",
|
|
1548
1551
|
ref: l,
|
|
1549
|
-
class:
|
|
1552
|
+
class: L(u(r).b("group")),
|
|
1550
1553
|
role: "radiogroup",
|
|
1551
|
-
"aria-label": u(
|
|
1552
|
-
"aria-labelledby": u(
|
|
1554
|
+
"aria-label": u(p) ? void 0 : s.label || "radio-group",
|
|
1555
|
+
"aria-labelledby": u(p) ? u(o).labelId : void 0
|
|
1553
1556
|
}, [
|
|
1554
|
-
|
|
1555
|
-
], 10,
|
|
1557
|
+
me(s.$slots, "default")
|
|
1558
|
+
], 10, tl));
|
|
1556
1559
|
}
|
|
1557
1560
|
});
|
|
1558
|
-
var qn = /* @__PURE__ */
|
|
1559
|
-
const Et = Me(
|
|
1561
|
+
var qn = /* @__PURE__ */ be(rl, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]);
|
|
1562
|
+
const Et = Me(Ko, {
|
|
1560
1563
|
RadioButton: Cn,
|
|
1561
1564
|
RadioGroup: qn
|
|
1562
1565
|
}), St = ft(qn);
|
|
1563
1566
|
ft(Cn);
|
|
1564
|
-
const
|
|
1567
|
+
const al = ce({
|
|
1565
1568
|
id: {
|
|
1566
1569
|
type: String,
|
|
1567
1570
|
default: void 0
|
|
@@ -1594,7 +1597,7 @@ const el = ue({
|
|
|
1594
1597
|
},
|
|
1595
1598
|
valueOnClear: {
|
|
1596
1599
|
type: [String, Number, null],
|
|
1597
|
-
validator: (n) => n === null ||
|
|
1600
|
+
validator: (n) => n === null || ae(n) || ["min", "max"].includes(n),
|
|
1598
1601
|
default: null
|
|
1599
1602
|
},
|
|
1600
1603
|
name: String,
|
|
@@ -1608,193 +1611,193 @@ const el = ue({
|
|
|
1608
1611
|
type: Boolean,
|
|
1609
1612
|
default: !0
|
|
1610
1613
|
}
|
|
1611
|
-
}),
|
|
1614
|
+
}), ol = {
|
|
1612
1615
|
[Vt]: (n, e) => e !== n,
|
|
1613
1616
|
blur: (n) => n instanceof FocusEvent,
|
|
1614
1617
|
focus: (n) => n instanceof FocusEvent,
|
|
1615
|
-
[
|
|
1616
|
-
[
|
|
1617
|
-
},
|
|
1618
|
+
[ze]: (n) => ae(n) || Se(n),
|
|
1619
|
+
[he]: (n) => ae(n) || Se(n)
|
|
1620
|
+
}, ll = ["aria-label", "onKeydown"], il = ["aria-label", "onKeydown"], sl = Z({
|
|
1618
1621
|
name: "ElInputNumber"
|
|
1619
|
-
}),
|
|
1620
|
-
...
|
|
1621
|
-
props:
|
|
1622
|
-
emits:
|
|
1622
|
+
}), ul = /* @__PURE__ */ Z({
|
|
1623
|
+
...sl,
|
|
1624
|
+
props: al,
|
|
1625
|
+
emits: ol,
|
|
1623
1626
|
setup(n, { expose: e, emit: t }) {
|
|
1624
|
-
const r = n, { t: a } = zn(), l =
|
|
1627
|
+
const r = n, { t: a } = zn(), l = ye("input-number"), o = H(), i = Ze({
|
|
1625
1628
|
currentValue: r.modelValue,
|
|
1626
1629
|
userInput: null
|
|
1627
|
-
}), { formItem:
|
|
1628
|
-
const
|
|
1629
|
-
return
|
|
1630
|
-
}),
|
|
1630
|
+
}), { formItem: p } = _n(), V = N(() => ae(r.modelValue) && r.modelValue <= r.min), c = N(() => ae(r.modelValue) && r.modelValue >= r.max), s = N(() => {
|
|
1631
|
+
const m = d(r.step);
|
|
1632
|
+
return Le(r.precision) ? Math.max(d(r.modelValue), m) : (m > r.precision && pe("InputNumber", "precision should not be less than the decimal places of step"), r.precision);
|
|
1633
|
+
}), x = N(() => r.controls && r.controlsPosition === "right"), _ = Pe(), f = hn(), v = N(() => {
|
|
1631
1634
|
if (i.userInput !== null)
|
|
1632
1635
|
return i.userInput;
|
|
1633
|
-
let
|
|
1634
|
-
if (Se(
|
|
1636
|
+
let m = i.currentValue;
|
|
1637
|
+
if (Se(m))
|
|
1635
1638
|
return "";
|
|
1636
|
-
if (
|
|
1637
|
-
if (Number.isNaN(
|
|
1639
|
+
if (ae(m)) {
|
|
1640
|
+
if (Number.isNaN(m))
|
|
1638
1641
|
return "";
|
|
1639
|
-
|
|
1642
|
+
Le(r.precision) || (m = m.toFixed(r.precision));
|
|
1640
1643
|
}
|
|
1641
|
-
return
|
|
1642
|
-
}),
|
|
1643
|
-
if (
|
|
1644
|
-
return Math.round(
|
|
1645
|
-
let
|
|
1646
|
-
const
|
|
1647
|
-
if (
|
|
1648
|
-
return
|
|
1649
|
-
const
|
|
1650
|
-
return
|
|
1651
|
-
},
|
|
1652
|
-
if (Se(
|
|
1644
|
+
return m;
|
|
1645
|
+
}), h = (m, E) => {
|
|
1646
|
+
if (Le(E) && (E = s.value), E === 0)
|
|
1647
|
+
return Math.round(m);
|
|
1648
|
+
let A = String(m);
|
|
1649
|
+
const W = A.indexOf(".");
|
|
1650
|
+
if (W === -1 || !A.replace(".", "").split("")[W + E])
|
|
1651
|
+
return m;
|
|
1652
|
+
const re = A.length;
|
|
1653
|
+
return A.charAt(re - 1) === "5" && (A = `${A.slice(0, Math.max(0, re - 1))}6`), Number.parseFloat(Number(A).toFixed(E));
|
|
1654
|
+
}, d = (m) => {
|
|
1655
|
+
if (Se(m))
|
|
1653
1656
|
return 0;
|
|
1654
|
-
const
|
|
1655
|
-
let
|
|
1656
|
-
return
|
|
1657
|
-
},
|
|
1658
|
-
if (r.readonly ||
|
|
1657
|
+
const E = m.toString(), A = E.indexOf(".");
|
|
1658
|
+
let W = 0;
|
|
1659
|
+
return A !== -1 && (W = E.length - A - 1), W;
|
|
1660
|
+
}, g = (m, E = 1) => ae(m) ? h(m + r.step * E) : i.currentValue, y = () => {
|
|
1661
|
+
if (r.readonly || f.value || c.value)
|
|
1659
1662
|
return;
|
|
1660
|
-
const
|
|
1661
|
-
|
|
1662
|
-
},
|
|
1663
|
-
if (r.readonly ||
|
|
1663
|
+
const m = Number(v.value) || 0, E = g(m);
|
|
1664
|
+
$(E), t(ze, i.currentValue);
|
|
1665
|
+
}, w = () => {
|
|
1666
|
+
if (r.readonly || f.value || V.value)
|
|
1664
1667
|
return;
|
|
1665
|
-
const
|
|
1666
|
-
|
|
1667
|
-
},
|
|
1668
|
-
const { max:
|
|
1669
|
-
|
|
1670
|
-
let
|
|
1671
|
-
if (Se(
|
|
1668
|
+
const m = Number(v.value) || 0, E = g(m, -1);
|
|
1669
|
+
$(E), t(ze, i.currentValue);
|
|
1670
|
+
}, k = (m, E) => {
|
|
1671
|
+
const { max: A, min: W, step: D, precision: P, stepStrictly: re, valueOnClear: Y } = r;
|
|
1672
|
+
A < W && Zt("InputNumber", "min should not be greater than max.");
|
|
1673
|
+
let K = Number(m);
|
|
1674
|
+
if (Se(m) || Number.isNaN(K))
|
|
1672
1675
|
return null;
|
|
1673
|
-
if (
|
|
1674
|
-
if (
|
|
1676
|
+
if (m === "") {
|
|
1677
|
+
if (Y === null)
|
|
1675
1678
|
return null;
|
|
1676
|
-
|
|
1679
|
+
K = _e(Y) ? { min: W, max: A }[Y] : Y;
|
|
1677
1680
|
}
|
|
1678
|
-
return
|
|
1679
|
-
},
|
|
1680
|
-
var
|
|
1681
|
-
const
|
|
1682
|
-
if (!
|
|
1683
|
-
t(
|
|
1681
|
+
return re && (K = h(Math.round(K / D) * D, P)), Le(P) || (K = h(K, P)), (K > A || K < W) && (K = K > A ? A : W, E && t(he, K)), K;
|
|
1682
|
+
}, $ = (m, E = !0) => {
|
|
1683
|
+
var A;
|
|
1684
|
+
const W = i.currentValue, D = k(m);
|
|
1685
|
+
if (!E) {
|
|
1686
|
+
t(he, D);
|
|
1684
1687
|
return;
|
|
1685
1688
|
}
|
|
1686
|
-
|
|
1687
|
-
},
|
|
1688
|
-
i.userInput =
|
|
1689
|
-
const
|
|
1690
|
-
t(
|
|
1691
|
-
},
|
|
1692
|
-
const
|
|
1693
|
-
(
|
|
1694
|
-
},
|
|
1695
|
-
var
|
|
1696
|
-
(
|
|
1697
|
-
},
|
|
1698
|
-
var
|
|
1699
|
-
(
|
|
1700
|
-
},
|
|
1701
|
-
t("focus",
|
|
1702
|
-
},
|
|
1703
|
-
var
|
|
1704
|
-
t("blur",
|
|
1689
|
+
W !== D && (i.userInput = null, t(he, D), t(Vt, D, W), r.validateEvent && ((A = p == null ? void 0 : p.validate) == null || A.call(p, "change").catch((P) => pe(P))), i.currentValue = D);
|
|
1690
|
+
}, b = (m) => {
|
|
1691
|
+
i.userInput = m;
|
|
1692
|
+
const E = m === "" ? null : Number(m);
|
|
1693
|
+
t(ze, E), $(E, !1);
|
|
1694
|
+
}, O = (m) => {
|
|
1695
|
+
const E = m !== "" ? Number(m) : "";
|
|
1696
|
+
(ae(E) && !Number.isNaN(E) || m === "") && $(E), i.userInput = null;
|
|
1697
|
+
}, G = () => {
|
|
1698
|
+
var m, E;
|
|
1699
|
+
(E = (m = o.value) == null ? void 0 : m.focus) == null || E.call(m);
|
|
1700
|
+
}, oe = () => {
|
|
1701
|
+
var m, E;
|
|
1702
|
+
(E = (m = o.value) == null ? void 0 : m.blur) == null || E.call(m);
|
|
1703
|
+
}, le = (m) => {
|
|
1704
|
+
t("focus", m);
|
|
1705
|
+
}, X = (m) => {
|
|
1706
|
+
var E;
|
|
1707
|
+
t("blur", m), r.validateEvent && ((E = p == null ? void 0 : p.validate) == null || E.call(p, "blur").catch((A) => pe(A)));
|
|
1705
1708
|
};
|
|
1706
|
-
return
|
|
1707
|
-
const
|
|
1708
|
-
!
|
|
1709
|
+
return ve(() => r.modelValue, (m) => {
|
|
1710
|
+
const E = k(i.userInput), A = k(m, !0);
|
|
1711
|
+
!ae(E) && (!E || E !== A) && (i.currentValue = A, i.userInput = null);
|
|
1709
1712
|
}, { immediate: !0 }), Ae(() => {
|
|
1710
|
-
var
|
|
1711
|
-
const { min:
|
|
1712
|
-
if (
|
|
1713
|
-
let
|
|
1714
|
-
Number.isNaN(
|
|
1713
|
+
var m;
|
|
1714
|
+
const { min: E, max: A, modelValue: W } = r, D = (m = o.value) == null ? void 0 : m.input;
|
|
1715
|
+
if (D.setAttribute("role", "spinbutton"), Number.isFinite(A) ? D.setAttribute("aria-valuemax", String(A)) : D.removeAttribute("aria-valuemax"), Number.isFinite(E) ? D.setAttribute("aria-valuemin", String(E)) : D.removeAttribute("aria-valuemin"), D.setAttribute("aria-valuenow", i.currentValue || i.currentValue === 0 ? String(i.currentValue) : ""), D.setAttribute("aria-disabled", String(f.value)), !ae(W) && W != null) {
|
|
1716
|
+
let P = Number(W);
|
|
1717
|
+
Number.isNaN(P) && (P = null), t(he, P);
|
|
1715
1718
|
}
|
|
1716
1719
|
}), rn(() => {
|
|
1717
|
-
var
|
|
1718
|
-
const
|
|
1719
|
-
|
|
1720
|
+
var m, E;
|
|
1721
|
+
const A = (m = o.value) == null ? void 0 : m.input;
|
|
1722
|
+
A == null || A.setAttribute("aria-valuenow", `${(E = i.currentValue) != null ? E : ""}`);
|
|
1720
1723
|
}), e({
|
|
1721
|
-
focus:
|
|
1722
|
-
blur:
|
|
1723
|
-
}), (
|
|
1724
|
-
class:
|
|
1724
|
+
focus: G,
|
|
1725
|
+
blur: oe
|
|
1726
|
+
}), (m, E) => (I(), q("div", {
|
|
1727
|
+
class: L([
|
|
1725
1728
|
u(l).b(),
|
|
1726
1729
|
u(l).m(u(_)),
|
|
1727
|
-
u(l).is("disabled", u(
|
|
1728
|
-
u(l).is("without-controls", !
|
|
1729
|
-
u(l).is("controls-right", u(
|
|
1730
|
+
u(l).is("disabled", u(f)),
|
|
1731
|
+
u(l).is("without-controls", !m.controls),
|
|
1732
|
+
u(l).is("controls-right", u(x))
|
|
1730
1733
|
]),
|
|
1731
|
-
onDragstart:
|
|
1734
|
+
onDragstart: E[1] || (E[1] = ge(() => {
|
|
1732
1735
|
}, ["prevent"]))
|
|
1733
1736
|
}, [
|
|
1734
|
-
|
|
1737
|
+
m.controls ? $e((I(), q("span", {
|
|
1735
1738
|
key: 0,
|
|
1736
1739
|
role: "button",
|
|
1737
1740
|
"aria-label": u(a)("el.inputNumber.decrease"),
|
|
1738
|
-
class:
|
|
1739
|
-
onKeydown: Ue(
|
|
1741
|
+
class: L([u(l).e("decrease"), u(l).is("disabled", u(V))]),
|
|
1742
|
+
onKeydown: Ue(w, ["enter"])
|
|
1740
1743
|
}, [
|
|
1741
|
-
|
|
1742
|
-
default:
|
|
1743
|
-
u(
|
|
1744
|
+
F(u(qe), null, {
|
|
1745
|
+
default: S(() => [
|
|
1746
|
+
u(x) ? (I(), U(u(vr), { key: 0 })) : (I(), U(u(gr), { key: 1 }))
|
|
1744
1747
|
]),
|
|
1745
1748
|
_: 1
|
|
1746
1749
|
})
|
|
1747
|
-
], 42,
|
|
1748
|
-
[u(Ht),
|
|
1749
|
-
]) :
|
|
1750
|
-
|
|
1750
|
+
], 42, ll)), [
|
|
1751
|
+
[u(Ht), w]
|
|
1752
|
+
]) : z("v-if", !0),
|
|
1753
|
+
m.controls ? $e((I(), q("span", {
|
|
1751
1754
|
key: 1,
|
|
1752
1755
|
role: "button",
|
|
1753
1756
|
"aria-label": u(a)("el.inputNumber.increase"),
|
|
1754
|
-
class:
|
|
1755
|
-
onKeydown: Ue(
|
|
1757
|
+
class: L([u(l).e("increase"), u(l).is("disabled", u(c))]),
|
|
1758
|
+
onKeydown: Ue(y, ["enter"])
|
|
1756
1759
|
}, [
|
|
1757
|
-
|
|
1758
|
-
default:
|
|
1759
|
-
u(
|
|
1760
|
+
F(u(qe), null, {
|
|
1761
|
+
default: S(() => [
|
|
1762
|
+
u(x) ? (I(), U(u(yr), { key: 0 })) : (I(), U(u(ot), { key: 1 }))
|
|
1760
1763
|
]),
|
|
1761
1764
|
_: 1
|
|
1762
1765
|
})
|
|
1763
|
-
], 42,
|
|
1764
|
-
[u(Ht),
|
|
1765
|
-
]) :
|
|
1766
|
-
|
|
1767
|
-
id:
|
|
1766
|
+
], 42, il)), [
|
|
1767
|
+
[u(Ht), y]
|
|
1768
|
+
]) : z("v-if", !0),
|
|
1769
|
+
F(u(xt), {
|
|
1770
|
+
id: m.id,
|
|
1768
1771
|
ref_key: "input",
|
|
1769
1772
|
ref: o,
|
|
1770
1773
|
type: "number",
|
|
1771
|
-
step:
|
|
1772
|
-
"model-value": u(
|
|
1773
|
-
placeholder:
|
|
1774
|
-
readonly:
|
|
1775
|
-
disabled: u(
|
|
1774
|
+
step: m.step,
|
|
1775
|
+
"model-value": u(v),
|
|
1776
|
+
placeholder: m.placeholder,
|
|
1777
|
+
readonly: m.readonly,
|
|
1778
|
+
disabled: u(f),
|
|
1776
1779
|
size: u(_),
|
|
1777
|
-
max:
|
|
1778
|
-
min:
|
|
1779
|
-
name:
|
|
1780
|
-
label:
|
|
1780
|
+
max: m.max,
|
|
1781
|
+
min: m.min,
|
|
1782
|
+
name: m.name,
|
|
1783
|
+
label: m.label,
|
|
1781
1784
|
"validate-event": !1,
|
|
1782
|
-
onWheel:
|
|
1785
|
+
onWheel: E[0] || (E[0] = ge(() => {
|
|
1783
1786
|
}, ["prevent"])),
|
|
1784
1787
|
onKeydown: [
|
|
1785
|
-
Ue(
|
|
1786
|
-
Ue(
|
|
1788
|
+
Ue(ge(y, ["prevent"]), ["up"]),
|
|
1789
|
+
Ue(ge(w, ["prevent"]), ["down"])
|
|
1787
1790
|
],
|
|
1788
|
-
onBlur:
|
|
1789
|
-
onFocus:
|
|
1790
|
-
onInput:
|
|
1791
|
-
onChange:
|
|
1791
|
+
onBlur: X,
|
|
1792
|
+
onFocus: le,
|
|
1793
|
+
onInput: b,
|
|
1794
|
+
onChange: O
|
|
1792
1795
|
}, null, 8, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "label", "onKeydown"])
|
|
1793
1796
|
], 34));
|
|
1794
1797
|
}
|
|
1795
1798
|
});
|
|
1796
|
-
var
|
|
1797
|
-
const Nn = Me(
|
|
1799
|
+
var dl = /* @__PURE__ */ be(ul, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input-number/src/input-number.vue"]]);
|
|
1800
|
+
const Nn = Me(dl), cl = ce({
|
|
1798
1801
|
type: {
|
|
1799
1802
|
type: String,
|
|
1800
1803
|
values: ["primary", "success", "info", "warning", "danger", ""],
|
|
@@ -1812,30 +1815,30 @@ const Nn = Me(ll), il = ue({
|
|
|
1812
1815
|
type: String,
|
|
1813
1816
|
default: "span"
|
|
1814
1817
|
}
|
|
1815
|
-
}),
|
|
1818
|
+
}), fl = Z({
|
|
1816
1819
|
name: "ElText"
|
|
1817
|
-
}),
|
|
1818
|
-
...
|
|
1819
|
-
props:
|
|
1820
|
+
}), pl = /* @__PURE__ */ Z({
|
|
1821
|
+
...fl,
|
|
1822
|
+
props: cl,
|
|
1820
1823
|
setup(n) {
|
|
1821
|
-
const e = n, t = Pe(), r =
|
|
1824
|
+
const e = n, t = Pe(), r = ye("text"), a = N(() => [
|
|
1822
1825
|
r.b(),
|
|
1823
1826
|
r.m(e.type),
|
|
1824
1827
|
r.m(t.value),
|
|
1825
1828
|
r.is("truncated", e.truncated)
|
|
1826
1829
|
]);
|
|
1827
|
-
return (l, o) => (
|
|
1828
|
-
class:
|
|
1830
|
+
return (l, o) => (I(), U(gt(l.tag), {
|
|
1831
|
+
class: L(u(a))
|
|
1829
1832
|
}, {
|
|
1830
|
-
default:
|
|
1831
|
-
|
|
1833
|
+
default: S(() => [
|
|
1834
|
+
me(l.$slots, "default")
|
|
1832
1835
|
]),
|
|
1833
1836
|
_: 3
|
|
1834
1837
|
}, 8, ["class"]));
|
|
1835
1838
|
}
|
|
1836
1839
|
});
|
|
1837
|
-
var
|
|
1838
|
-
const
|
|
1840
|
+
var ml = /* @__PURE__ */ be(pl, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/text/src/text.vue"]]);
|
|
1841
|
+
const vl = Me(ml), Mn = ["success", "info", "warning", "error"], ie = xr({
|
|
1839
1842
|
customClass: "",
|
|
1840
1843
|
center: !1,
|
|
1841
1844
|
dangerouslyUseHTMLString: !1,
|
|
@@ -1851,30 +1854,30 @@ const cl = Me(dl), Mn = ["success", "info", "warning", "error"], ae = br({
|
|
|
1851
1854
|
grouping: !1,
|
|
1852
1855
|
repeatNum: 1,
|
|
1853
1856
|
appendTo: en ? document.body : void 0
|
|
1854
|
-
}),
|
|
1857
|
+
}), gl = ce({
|
|
1855
1858
|
customClass: {
|
|
1856
1859
|
type: String,
|
|
1857
|
-
default:
|
|
1860
|
+
default: ie.customClass
|
|
1858
1861
|
},
|
|
1859
1862
|
center: {
|
|
1860
1863
|
type: Boolean,
|
|
1861
|
-
default:
|
|
1864
|
+
default: ie.center
|
|
1862
1865
|
},
|
|
1863
1866
|
dangerouslyUseHTMLString: {
|
|
1864
1867
|
type: Boolean,
|
|
1865
|
-
default:
|
|
1868
|
+
default: ie.dangerouslyUseHTMLString
|
|
1866
1869
|
},
|
|
1867
1870
|
duration: {
|
|
1868
1871
|
type: Number,
|
|
1869
|
-
default:
|
|
1872
|
+
default: ie.duration
|
|
1870
1873
|
},
|
|
1871
1874
|
icon: {
|
|
1872
|
-
type:
|
|
1873
|
-
default:
|
|
1875
|
+
type: br,
|
|
1876
|
+
default: ie.icon
|
|
1874
1877
|
},
|
|
1875
1878
|
id: {
|
|
1876
1879
|
type: String,
|
|
1877
|
-
default:
|
|
1880
|
+
default: ie.id
|
|
1878
1881
|
},
|
|
1879
1882
|
message: {
|
|
1880
1883
|
type: Te([
|
|
@@ -1882,7 +1885,7 @@ const cl = Me(dl), Mn = ["success", "info", "warning", "error"], ae = br({
|
|
|
1882
1885
|
Object,
|
|
1883
1886
|
Function
|
|
1884
1887
|
]),
|
|
1885
|
-
default:
|
|
1888
|
+
default: ie.message
|
|
1886
1889
|
},
|
|
1887
1890
|
onClose: {
|
|
1888
1891
|
type: Te(Function),
|
|
@@ -1890,227 +1893,227 @@ const cl = Me(dl), Mn = ["success", "info", "warning", "error"], ae = br({
|
|
|
1890
1893
|
},
|
|
1891
1894
|
showClose: {
|
|
1892
1895
|
type: Boolean,
|
|
1893
|
-
default:
|
|
1896
|
+
default: ie.showClose
|
|
1894
1897
|
},
|
|
1895
1898
|
type: {
|
|
1896
1899
|
type: String,
|
|
1897
1900
|
values: Mn,
|
|
1898
|
-
default:
|
|
1901
|
+
default: ie.type
|
|
1899
1902
|
},
|
|
1900
1903
|
offset: {
|
|
1901
1904
|
type: Number,
|
|
1902
|
-
default:
|
|
1905
|
+
default: ie.offset
|
|
1903
1906
|
},
|
|
1904
1907
|
zIndex: {
|
|
1905
1908
|
type: Number,
|
|
1906
|
-
default:
|
|
1909
|
+
default: ie.zIndex
|
|
1907
1910
|
},
|
|
1908
1911
|
grouping: {
|
|
1909
1912
|
type: Boolean,
|
|
1910
|
-
default:
|
|
1913
|
+
default: ie.grouping
|
|
1911
1914
|
},
|
|
1912
1915
|
repeatNum: {
|
|
1913
1916
|
type: Number,
|
|
1914
|
-
default:
|
|
1917
|
+
default: ie.repeatNum
|
|
1915
1918
|
}
|
|
1916
|
-
}),
|
|
1919
|
+
}), yl = {
|
|
1917
1920
|
destroy: () => !0
|
|
1918
|
-
},
|
|
1919
|
-
const e =
|
|
1921
|
+
}, de = or([]), bl = (n) => {
|
|
1922
|
+
const e = de.findIndex((a) => a.id === n), t = de[e];
|
|
1920
1923
|
let r;
|
|
1921
|
-
return e > 0 && (r =
|
|
1922
|
-
},
|
|
1923
|
-
const { prev: e } =
|
|
1924
|
+
return e > 0 && (r = de[e - 1]), { current: t, prev: r };
|
|
1925
|
+
}, hl = (n) => {
|
|
1926
|
+
const { prev: e } = bl(n);
|
|
1924
1927
|
return e ? e.vm.exposed.bottom.value : 0;
|
|
1925
|
-
},
|
|
1928
|
+
}, _l = (n, e) => de.findIndex((r) => r.id === n) > 0 ? 20 : e, wl = ["id"], xl = ["innerHTML"], Ol = Z({
|
|
1926
1929
|
name: "ElMessage"
|
|
1927
|
-
}),
|
|
1928
|
-
...
|
|
1929
|
-
props:
|
|
1930
|
-
emits:
|
|
1930
|
+
}), kl = /* @__PURE__ */ Z({
|
|
1931
|
+
...Ol,
|
|
1932
|
+
props: gl,
|
|
1933
|
+
emits: yl,
|
|
1931
1934
|
setup(n, { expose: e }) {
|
|
1932
|
-
const t = n, { Close: r } =
|
|
1933
|
-
let
|
|
1934
|
-
const
|
|
1935
|
-
const
|
|
1936
|
-
return { [a.bm("icon",
|
|
1937
|
-
}),
|
|
1938
|
-
top: `${
|
|
1935
|
+
const t = n, { Close: r } = hr, { ns: a, zIndex: l } = kr("message"), { currentZIndex: o, nextZIndex: i } = l, p = H(), V = H(!1), c = H(0);
|
|
1936
|
+
let s;
|
|
1937
|
+
const x = N(() => t.type ? t.type === "error" ? "danger" : t.type : "info"), _ = N(() => {
|
|
1938
|
+
const b = t.type;
|
|
1939
|
+
return { [a.bm("icon", b)]: b && At[b] };
|
|
1940
|
+
}), f = N(() => t.icon || At[t.type] || ""), v = N(() => hl(t.id)), h = N(() => _l(t.id, t.offset) + v.value), d = N(() => c.value + h.value), g = N(() => ({
|
|
1941
|
+
top: `${h.value}px`,
|
|
1939
1942
|
zIndex: o.value
|
|
1940
1943
|
}));
|
|
1941
|
-
function
|
|
1942
|
-
t.duration !== 0 && ({ stop:
|
|
1943
|
-
|
|
1944
|
+
function y() {
|
|
1945
|
+
t.duration !== 0 && ({ stop: s } = Wn(() => {
|
|
1946
|
+
k();
|
|
1944
1947
|
}, t.duration));
|
|
1945
1948
|
}
|
|
1946
|
-
function
|
|
1947
|
-
|
|
1949
|
+
function w() {
|
|
1950
|
+
s == null || s();
|
|
1948
1951
|
}
|
|
1949
|
-
function
|
|
1950
|
-
|
|
1952
|
+
function k() {
|
|
1953
|
+
V.value = !1;
|
|
1951
1954
|
}
|
|
1952
|
-
function
|
|
1953
|
-
|
|
1955
|
+
function $({ code: b }) {
|
|
1956
|
+
b === Ir.esc && k();
|
|
1954
1957
|
}
|
|
1955
1958
|
return Ae(() => {
|
|
1956
|
-
|
|
1957
|
-
}),
|
|
1958
|
-
|
|
1959
|
-
}),
|
|
1960
|
-
|
|
1959
|
+
y(), i(), V.value = !0;
|
|
1960
|
+
}), ve(() => t.repeatNum, () => {
|
|
1961
|
+
w(), y();
|
|
1962
|
+
}), pr(document, "keydown", $), pn(p, () => {
|
|
1963
|
+
c.value = p.value.getBoundingClientRect().height;
|
|
1961
1964
|
}), e({
|
|
1962
|
-
visible:
|
|
1963
|
-
bottom:
|
|
1964
|
-
close:
|
|
1965
|
-
}), (
|
|
1965
|
+
visible: V,
|
|
1966
|
+
bottom: d,
|
|
1967
|
+
close: k
|
|
1968
|
+
}), (b, O) => (I(), U(an, {
|
|
1966
1969
|
name: u(a).b("fade"),
|
|
1967
|
-
onBeforeLeave:
|
|
1968
|
-
onAfterLeave:
|
|
1970
|
+
onBeforeLeave: b.onClose,
|
|
1971
|
+
onAfterLeave: O[0] || (O[0] = (G) => b.$emit("destroy")),
|
|
1969
1972
|
persisted: ""
|
|
1970
1973
|
}, {
|
|
1971
|
-
default:
|
|
1972
|
-
|
|
1973
|
-
id:
|
|
1974
|
+
default: S(() => [
|
|
1975
|
+
$e(C("div", {
|
|
1976
|
+
id: b.id,
|
|
1974
1977
|
ref_key: "messageRef",
|
|
1975
|
-
ref:
|
|
1976
|
-
class:
|
|
1978
|
+
ref: p,
|
|
1979
|
+
class: L([
|
|
1977
1980
|
u(a).b(),
|
|
1978
|
-
{ [u(a).m(
|
|
1979
|
-
u(a).is("center",
|
|
1980
|
-
u(a).is("closable",
|
|
1981
|
-
|
|
1981
|
+
{ [u(a).m(b.type)]: b.type && !b.icon },
|
|
1982
|
+
u(a).is("center", b.center),
|
|
1983
|
+
u(a).is("closable", b.showClose),
|
|
1984
|
+
b.customClass
|
|
1982
1985
|
]),
|
|
1983
|
-
style:
|
|
1986
|
+
style: He(u(g)),
|
|
1984
1987
|
role: "alert",
|
|
1985
|
-
onMouseenter:
|
|
1986
|
-
onMouseleave:
|
|
1988
|
+
onMouseenter: w,
|
|
1989
|
+
onMouseleave: y
|
|
1987
1990
|
}, [
|
|
1988
|
-
|
|
1991
|
+
b.repeatNum > 1 ? (I(), U(u(Uo), {
|
|
1989
1992
|
key: 0,
|
|
1990
|
-
value:
|
|
1991
|
-
type: u(
|
|
1992
|
-
class:
|
|
1993
|
-
}, null, 8, ["value", "type", "class"])) :
|
|
1994
|
-
u(
|
|
1993
|
+
value: b.repeatNum,
|
|
1994
|
+
type: u(x),
|
|
1995
|
+
class: L(u(a).e("badge"))
|
|
1996
|
+
}, null, 8, ["value", "type", "class"])) : z("v-if", !0),
|
|
1997
|
+
u(f) ? (I(), U(u(qe), {
|
|
1995
1998
|
key: 1,
|
|
1996
|
-
class:
|
|
1999
|
+
class: L([u(a).e("icon"), u(_)])
|
|
1997
2000
|
}, {
|
|
1998
|
-
default:
|
|
1999
|
-
(
|
|
2001
|
+
default: S(() => [
|
|
2002
|
+
(I(), U(gt(u(f))))
|
|
2000
2003
|
]),
|
|
2001
2004
|
_: 1
|
|
2002
|
-
}, 8, ["class"])) :
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
class:
|
|
2008
|
-
innerHTML:
|
|
2009
|
-
}, null, 10,
|
|
2010
|
-
], 2112)) : (
|
|
2005
|
+
}, 8, ["class"])) : z("v-if", !0),
|
|
2006
|
+
me(b.$slots, "default", {}, () => [
|
|
2007
|
+
b.dangerouslyUseHTMLString ? (I(), q(Q, { key: 1 }, [
|
|
2008
|
+
z(" Caution here, message could've been compromised, never use user's input as message "),
|
|
2009
|
+
C("p", {
|
|
2010
|
+
class: L(u(a).e("content")),
|
|
2011
|
+
innerHTML: b.message
|
|
2012
|
+
}, null, 10, xl)
|
|
2013
|
+
], 2112)) : (I(), q("p", {
|
|
2011
2014
|
key: 0,
|
|
2012
|
-
class:
|
|
2013
|
-
},
|
|
2015
|
+
class: L(u(a).e("content"))
|
|
2016
|
+
}, te(b.message), 3))
|
|
2014
2017
|
]),
|
|
2015
|
-
|
|
2018
|
+
b.showClose ? (I(), U(u(qe), {
|
|
2016
2019
|
key: 2,
|
|
2017
|
-
class:
|
|
2018
|
-
onClick:
|
|
2020
|
+
class: L(u(a).e("closeBtn")),
|
|
2021
|
+
onClick: ge(k, ["stop"])
|
|
2019
2022
|
}, {
|
|
2020
|
-
default:
|
|
2021
|
-
|
|
2023
|
+
default: S(() => [
|
|
2024
|
+
F(u(r))
|
|
2022
2025
|
]),
|
|
2023
2026
|
_: 1
|
|
2024
|
-
}, 8, ["class", "onClick"])) :
|
|
2025
|
-
], 46,
|
|
2026
|
-
[on,
|
|
2027
|
+
}, 8, ["class", "onClick"])) : z("v-if", !0)
|
|
2028
|
+
], 46, wl), [
|
|
2029
|
+
[on, V.value]
|
|
2027
2030
|
])
|
|
2028
2031
|
]),
|
|
2029
2032
|
_: 3
|
|
2030
2033
|
}, 8, ["name", "onBeforeLeave"]));
|
|
2031
2034
|
}
|
|
2032
2035
|
});
|
|
2033
|
-
var
|
|
2034
|
-
let
|
|
2036
|
+
var Il = /* @__PURE__ */ be(kl, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);
|
|
2037
|
+
let $l = 1;
|
|
2035
2038
|
const An = (n) => {
|
|
2036
|
-
const e = !n ||
|
|
2037
|
-
...
|
|
2039
|
+
const e = !n || _e(n) || un(n) || xe(n) ? { message: n } : n, t = {
|
|
2040
|
+
...ie,
|
|
2038
2041
|
...e
|
|
2039
2042
|
};
|
|
2040
2043
|
if (!t.appendTo)
|
|
2041
2044
|
t.appendTo = document.body;
|
|
2042
|
-
else if (
|
|
2045
|
+
else if (_e(t.appendTo)) {
|
|
2043
2046
|
let r = document.querySelector(t.appendTo);
|
|
2044
|
-
Gn(r) || (
|
|
2047
|
+
Gn(r) || (pe("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."), r = document.body), t.appendTo = r;
|
|
2045
2048
|
}
|
|
2046
2049
|
return t;
|
|
2047
|
-
},
|
|
2048
|
-
const e =
|
|
2050
|
+
}, Vl = (n) => {
|
|
2051
|
+
const e = de.indexOf(n);
|
|
2049
2052
|
if (e === -1)
|
|
2050
2053
|
return;
|
|
2051
|
-
|
|
2054
|
+
de.splice(e, 1);
|
|
2052
2055
|
const { handler: t } = n;
|
|
2053
2056
|
t.close();
|
|
2054
|
-
},
|
|
2055
|
-
const r = `message_${
|
|
2057
|
+
}, El = ({ appendTo: n, ...e }, t) => {
|
|
2058
|
+
const r = `message_${$l++}`, a = e.onClose, l = document.createElement("div"), o = {
|
|
2056
2059
|
...e,
|
|
2057
2060
|
id: r,
|
|
2058
2061
|
onClose: () => {
|
|
2059
|
-
a == null || a(),
|
|
2062
|
+
a == null || a(), Vl(c);
|
|
2060
2063
|
},
|
|
2061
2064
|
onDestroy: () => {
|
|
2062
2065
|
Nt(null, l);
|
|
2063
2066
|
}
|
|
2064
|
-
}, i =
|
|
2065
|
-
default:
|
|
2067
|
+
}, i = F(Il, o, xe(o.message) || un(o.message) ? {
|
|
2068
|
+
default: xe(o.message) ? o.message : () => o.message
|
|
2066
2069
|
} : null);
|
|
2067
|
-
i.appContext = t ||
|
|
2068
|
-
const
|
|
2070
|
+
i.appContext = t || Ve._context, Nt(i, l), n.appendChild(l.firstElementChild);
|
|
2071
|
+
const p = i.component, c = {
|
|
2069
2072
|
id: r,
|
|
2070
2073
|
vnode: i,
|
|
2071
|
-
vm:
|
|
2074
|
+
vm: p,
|
|
2072
2075
|
handler: {
|
|
2073
2076
|
close: () => {
|
|
2074
|
-
|
|
2077
|
+
p.exposed.visible.value = !1;
|
|
2075
2078
|
}
|
|
2076
2079
|
},
|
|
2077
2080
|
props: i.component.props
|
|
2078
2081
|
};
|
|
2079
|
-
return
|
|
2080
|
-
},
|
|
2082
|
+
return c;
|
|
2083
|
+
}, Ve = (n = {}, e) => {
|
|
2081
2084
|
if (!en)
|
|
2082
2085
|
return { close: () => {
|
|
2083
2086
|
} };
|
|
2084
|
-
if (
|
|
2087
|
+
if (ae(Pt.max) && de.length >= Pt.max)
|
|
2085
2088
|
return { close: () => {
|
|
2086
2089
|
} };
|
|
2087
2090
|
const t = An(n);
|
|
2088
|
-
if (t.grouping &&
|
|
2089
|
-
const a =
|
|
2091
|
+
if (t.grouping && de.length) {
|
|
2092
|
+
const a = de.find(({ vnode: l }) => {
|
|
2090
2093
|
var o;
|
|
2091
2094
|
return ((o = l.props) == null ? void 0 : o.message) === t.message;
|
|
2092
2095
|
});
|
|
2093
2096
|
if (a)
|
|
2094
2097
|
return a.props.repeatNum += 1, a.props.type = t.type, a.handler;
|
|
2095
2098
|
}
|
|
2096
|
-
const r =
|
|
2097
|
-
return
|
|
2099
|
+
const r = El(t, e);
|
|
2100
|
+
return de.push(r), r.handler;
|
|
2098
2101
|
};
|
|
2099
2102
|
Mn.forEach((n) => {
|
|
2100
|
-
|
|
2103
|
+
Ve[n] = (e = {}, t) => {
|
|
2101
2104
|
const r = An(e);
|
|
2102
|
-
return
|
|
2105
|
+
return Ve({ ...r, type: n }, t);
|
|
2103
2106
|
};
|
|
2104
2107
|
});
|
|
2105
|
-
function
|
|
2106
|
-
for (const e of
|
|
2108
|
+
function Sl(n) {
|
|
2109
|
+
for (const e of de)
|
|
2107
2110
|
(!n || n === e.props.type) && e.handler.close();
|
|
2108
2111
|
}
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
const
|
|
2112
|
+
Ve.closeAll = Sl;
|
|
2113
|
+
Ve._context = null;
|
|
2114
|
+
const Ie = Yn(Ve, "$message");
|
|
2112
2115
|
const Qt = {
|
|
2113
|
-
// 品种市场
|
|
2116
|
+
// 品种市场 [选项: 前端默认]
|
|
2114
2117
|
varietyMarket: {
|
|
2115
2118
|
show: !0,
|
|
2116
2119
|
options: [
|
|
@@ -2123,7 +2126,7 @@ const Qt = {
|
|
|
2123
2126
|
{ label: "期权", value: 8, memo: [11] }
|
|
2124
2127
|
]
|
|
2125
2128
|
},
|
|
2126
|
-
// 常用选项
|
|
2129
|
+
// 常用选项 [选项: 前端默认]
|
|
2127
2130
|
commonOption: {
|
|
2128
2131
|
show: !0,
|
|
2129
2132
|
options: [
|
|
@@ -2143,26 +2146,42 @@ const Qt = {
|
|
|
2143
2146
|
{ label: "概念板块指数", value: 15 }
|
|
2144
2147
|
]
|
|
2145
2148
|
},
|
|
2146
|
-
//
|
|
2149
|
+
// 上市板块 [选项: 接口获取**!]
|
|
2150
|
+
marketIds: {
|
|
2151
|
+
show: !0,
|
|
2152
|
+
options: [
|
|
2153
|
+
// { label: "沪深主板", value: 1, varietyMarketIds: [3] },
|
|
2154
|
+
// { label: "创业板", value: 2, varietyMarketIds: [3] },
|
|
2155
|
+
// { label: "科创板", value: 4, varietyMarketIds: [3] },
|
|
2156
|
+
// { label: "新三板", value: 8, varietyMarketIds: [3] },
|
|
2157
|
+
// { label: "沪股通", value: 1024, varietyMarketIds: [3] },
|
|
2158
|
+
// { label: "深股通", value: 2048, varietyMarketIds: [3] },
|
|
2159
|
+
// { label: "沪港通", value: 4096, varietyMarketIds: [5] },
|
|
2160
|
+
// { label: "深港通", value: 8192, varietyMarketIds: [5] },
|
|
2161
|
+
]
|
|
2162
|
+
},
|
|
2163
|
+
// 自定标签 [选项: 接口获取**!]
|
|
2147
2164
|
customTag: {
|
|
2148
2165
|
show: !0,
|
|
2149
2166
|
options: []
|
|
2150
2167
|
},
|
|
2151
|
-
// 因子筛选
|
|
2168
|
+
// 因子筛选 [选项: 接口获取**!]
|
|
2152
2169
|
factorScreen: {
|
|
2153
2170
|
show: !0,
|
|
2154
|
-
|
|
2171
|
+
// SQL功能是否展示
|
|
2172
|
+
sqlShow: !1,
|
|
2155
2173
|
// 周期功能是否展示
|
|
2156
|
-
|
|
2174
|
+
cycleShow: !0,
|
|
2157
2175
|
// 周期默认值
|
|
2176
|
+
cycleDefault: null,
|
|
2158
2177
|
cycleOptions: [],
|
|
2159
|
-
//
|
|
2178
|
+
// 周期下拉框数据源
|
|
2160
2179
|
factorOptions: [],
|
|
2161
|
-
//
|
|
2162
|
-
|
|
2163
|
-
//
|
|
2180
|
+
// 因子下拉框数据源
|
|
2181
|
+
factorDescriptions: []
|
|
2182
|
+
// 因子使用说明数据源
|
|
2164
2183
|
},
|
|
2165
|
-
// 常用指标
|
|
2184
|
+
// 常用指标 [选项: 前端默认]
|
|
2166
2185
|
commonIndicator: {
|
|
2167
2186
|
show: !0,
|
|
2168
2187
|
options: [
|
|
@@ -2426,6 +2445,16 @@ const Qt = {
|
|
|
2426
2445
|
// 单位下拉框选项
|
|
2427
2446
|
unitOptions: ["%"]
|
|
2428
2447
|
},
|
|
2448
|
+
// 股价分位
|
|
2449
|
+
{
|
|
2450
|
+
key: "priceLevels",
|
|
2451
|
+
label: "股价分位",
|
|
2452
|
+
parent: {
|
|
2453
|
+
varietyMarketIds: [3, 5, 7],
|
|
2454
|
+
commonOptionIds: [4, 6, 12, 14, 15]
|
|
2455
|
+
},
|
|
2456
|
+
type: "custom"
|
|
2457
|
+
},
|
|
2429
2458
|
// ----------期权-----------
|
|
2430
2459
|
// 过期天数
|
|
2431
2460
|
{
|
|
@@ -2557,7 +2586,7 @@ const Qt = {
|
|
|
2557
2586
|
},
|
|
2558
2587
|
type: "custom"
|
|
2559
2588
|
},
|
|
2560
|
-
//
|
|
2589
|
+
// 期权档位
|
|
2561
2590
|
{
|
|
2562
2591
|
key: "optionGear",
|
|
2563
2592
|
label: "期权档位",
|
|
@@ -2575,22 +2604,24 @@ const Qt = {
|
|
|
2575
2604
|
]
|
|
2576
2605
|
}
|
|
2577
2606
|
};
|
|
2578
|
-
const Pn = (n) => (ht("data-v-
|
|
2607
|
+
const Pn = (n) => (ht("data-v-d76a610e"), n = n(), _t(), n), Fl = { class: "factor-screen" }, Tl = { class: "custom-header" }, Cl = ["id"], ql = { class: "form-row" }, Nl = { style: { display: "flex", "align-items": "center", width: "100%", height: "24px" } }, Ml = /* @__PURE__ */ Pn(() => /* @__PURE__ */ C("span", null, "~", -1)), Al = /* @__PURE__ */ Pn(() => /* @__PURE__ */ C("span", null, "&&代表and,||代表or", -1)), Pl = { class: "dialog-footer" }, jl = {
|
|
2579
2608
|
__name: "index",
|
|
2580
2609
|
props: /* @__PURE__ */ yt({
|
|
2581
2610
|
config: {
|
|
2582
2611
|
type: Object,
|
|
2583
2612
|
default: {
|
|
2584
|
-
|
|
2613
|
+
// SQL功能是否展示
|
|
2614
|
+
sqlShow: !1,
|
|
2585
2615
|
// 周期功能是否展示
|
|
2586
|
-
|
|
2616
|
+
cycleShow: !0,
|
|
2587
2617
|
// 周期默认值
|
|
2618
|
+
cycleDefault: null,
|
|
2588
2619
|
cycleOptions: [],
|
|
2589
2620
|
// 周期下拉框选项
|
|
2590
2621
|
factorOptions: [],
|
|
2591
2622
|
// 因子下拉框选项
|
|
2592
|
-
|
|
2593
|
-
//
|
|
2623
|
+
factorDescriptions: []
|
|
2624
|
+
// 因子使用说明数据源
|
|
2594
2625
|
}
|
|
2595
2626
|
}
|
|
2596
2627
|
}, {
|
|
@@ -2605,7 +2636,7 @@ const Pn = (n) => (ht("data-v-0ae7a782"), n = n(), _t(), n), $l = { class: "fact
|
|
|
2605
2636
|
}),
|
|
2606
2637
|
emits: ["update:data"],
|
|
2607
2638
|
setup(n) {
|
|
2608
|
-
const e = bt(n, "data"), t = n, r =
|
|
2639
|
+
const e = bt(n, "data"), t = n, r = H(!1), a = H(!1), l = H(null), o = H({
|
|
2609
2640
|
// 筛选因子列表
|
|
2610
2641
|
list: [
|
|
2611
2642
|
{
|
|
@@ -2621,176 +2652,200 @@ const Pn = (n) => (ht("data-v-0ae7a782"), n = n(), _t(), n), $l = { class: "fact
|
|
|
2621
2652
|
sqlEnable: 0,
|
|
2622
2653
|
// SQL语句
|
|
2623
2654
|
sqlValue: null
|
|
2624
|
-
}),
|
|
2625
|
-
const { list:
|
|
2626
|
-
|
|
2627
|
-
list: JSON.parse(JSON.stringify(
|
|
2628
|
-
sqlEnable:
|
|
2629
|
-
sqlValue:
|
|
2630
|
-
},
|
|
2631
|
-
},
|
|
2632
|
-
|
|
2633
|
-
}, m = () => {
|
|
2634
|
-
e.value = {
|
|
2635
|
-
list: [],
|
|
2636
|
-
sqlEnable: 0,
|
|
2637
|
-
sqlValue: null
|
|
2638
|
-
};
|
|
2639
|
-
}, b = () => {
|
|
2640
|
-
l.value.list.push({
|
|
2655
|
+
}), i = () => {
|
|
2656
|
+
const { list: h, sqlEnable: d, sqlValue: g } = e.value;
|
|
2657
|
+
o.value = {
|
|
2658
|
+
list: JSON.parse(JSON.stringify(h)),
|
|
2659
|
+
sqlEnable: d,
|
|
2660
|
+
sqlValue: g
|
|
2661
|
+
}, o.value.list.length || p(), r.value = !0;
|
|
2662
|
+
}, p = () => {
|
|
2663
|
+
o.value.list.push({
|
|
2641
2664
|
cycle: t.config.cycleDefault ?? null,
|
|
2642
2665
|
factor: null,
|
|
2643
2666
|
score: [null, null]
|
|
2644
2667
|
});
|
|
2645
|
-
},
|
|
2646
|
-
l.value.
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
let s = `factor_id = ${p.factor} and `;
|
|
2651
|
-
return t.config.cycleShow && (s += `freq_id = ${p.cycle} and `), (p.score[0] || p.score[0] === 0) && (p.score[1] || p.score[1] === 0) ? s += `score >= ${p.score[0]} and score <= ${p.score[1]}` : p.score[0] || p.score[0] === 0 ? s += `score >= ${p.score[0]}` : (p.score[1] || p.score[1] === 0) && (s += `score <= ${p.score[1]}`), s = `(${s})`, x !== 0 && (s = ` && ${s}`), g += s, g;
|
|
2668
|
+
}, V = () => {
|
|
2669
|
+
l.value.validate((h) => {
|
|
2670
|
+
h && (o.value.sqlValue = o.value.list.reduce((d, g, y) => {
|
|
2671
|
+
let w = `factor_id = ${g.factor} and `;
|
|
2672
|
+
return t.config.cycleShow && (w += `freq_id = ${g.cycle} and `), (g.score[0] || g.score[0] === 0) && (g.score[1] || g.score[1] === 0) ? w += `score >= ${g.score[0]} and score <= ${g.score[1]}` : g.score[0] || g.score[0] === 0 ? w += `score >= ${g.score[0]}` : (g.score[1] || g.score[1] === 0) && (w += `score <= ${g.score[1]}`), w = `(${w})`, y !== 0 && (w = ` && ${w}`), d += w, d;
|
|
2652
2673
|
}, ""));
|
|
2653
2674
|
});
|
|
2654
|
-
},
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2675
|
+
}, c = () => {
|
|
2676
|
+
e.value = {
|
|
2677
|
+
list: [],
|
|
2678
|
+
sqlEnable: 0,
|
|
2679
|
+
sqlValue: null
|
|
2680
|
+
};
|
|
2681
|
+
}, s = (h) => {
|
|
2682
|
+
e.value.list.splice(h, 1);
|
|
2683
|
+
}, x = (h) => {
|
|
2684
|
+
o.value.list.splice(h, 1);
|
|
2685
|
+
}, _ = () => {
|
|
2686
|
+
l.value.validate((h) => {
|
|
2687
|
+
const { list: d, sqlEnable: g, sqlValue: y } = o.value;
|
|
2688
|
+
if (h) {
|
|
2689
|
+
if (g && !y)
|
|
2690
|
+
return Ie.error("SQL语句不能为空");
|
|
2660
2691
|
e.value = {
|
|
2661
|
-
list: JSON.parse(JSON.stringify(
|
|
2662
|
-
sqlEnable:
|
|
2663
|
-
sqlValue:
|
|
2692
|
+
list: JSON.parse(JSON.stringify(d)),
|
|
2693
|
+
sqlEnable: g,
|
|
2694
|
+
sqlValue: y
|
|
2664
2695
|
}, r.value = !1;
|
|
2665
2696
|
}
|
|
2666
2697
|
});
|
|
2667
|
-
},
|
|
2668
|
-
const { cycle:
|
|
2669
|
-
let
|
|
2670
|
-
return
|
|
2671
|
-
}, v = (
|
|
2672
|
-
!
|
|
2698
|
+
}, f = (h) => {
|
|
2699
|
+
const { cycle: d, factor: g, score: y } = h;
|
|
2700
|
+
let w = "";
|
|
2701
|
+
return w += ` ${t.config.cycleOptions.find(({ value: k }) => k === d).label}`, w += ` ${t.config.factorOptions.find(({ value: k }) => k === g).label}`, w += ` ${y[0] || y[0] === 0 ? `${y[0]}分` : "∞"}`, w += " ~", w += ` ${y[1] || y[1] === 0 ? `${y[1]}分` : "∞"}`, w;
|
|
2702
|
+
}, v = (h, d, g) => {
|
|
2703
|
+
!d[0] && d[0] !== 0 && !d[1] && d[1] !== 0 ? g(new Error("至少填写一个分数")) : g();
|
|
2673
2704
|
};
|
|
2674
|
-
return (
|
|
2675
|
-
const
|
|
2676
|
-
return
|
|
2677
|
-
e.value.sqlEnable && e.value.sqlValue ? (
|
|
2705
|
+
return (h, d) => {
|
|
2706
|
+
const g = vl, y = vn, w = bn, k = qe, $ = fr, b = gn, O = yn, G = Mo, oe = Nn, le = Et, X = St, m = xt, E = No, A = mn, W = Xn, D = er;
|
|
2707
|
+
return I(), q("div", Fl, [
|
|
2708
|
+
e.value.sqlEnable && e.value.sqlValue ? (I(), U(y, {
|
|
2678
2709
|
key: 0,
|
|
2679
2710
|
closable: "",
|
|
2680
2711
|
type: "info",
|
|
2681
2712
|
title: e.value.sqlValue,
|
|
2682
|
-
onClose:
|
|
2713
|
+
onClose: c
|
|
2683
2714
|
}, {
|
|
2684
|
-
default:
|
|
2685
|
-
|
|
2715
|
+
default: S(() => [
|
|
2716
|
+
F(g, {
|
|
2686
2717
|
type: "info",
|
|
2687
2718
|
truncated: "",
|
|
2688
2719
|
style: { "max-width": "500px" }
|
|
2689
2720
|
}, {
|
|
2690
|
-
default:
|
|
2691
|
-
|
|
2721
|
+
default: S(() => [
|
|
2722
|
+
j(te(e.value.sqlValue), 1)
|
|
2692
2723
|
]),
|
|
2693
2724
|
_: 1
|
|
2694
2725
|
})
|
|
2695
2726
|
]),
|
|
2696
2727
|
_: 1
|
|
2697
|
-
}, 8, ["title"])) :
|
|
2698
|
-
!e.value.sqlEnable && e.value.list.length ? (
|
|
2728
|
+
}, 8, ["title"])) : z("", !0),
|
|
2729
|
+
!e.value.sqlEnable && e.value.list.length ? (I(!0), q(Q, { key: 1 }, se(e.value.list, (P, re) => (I(), U(y, {
|
|
2699
2730
|
closable: "",
|
|
2700
2731
|
type: "info",
|
|
2701
|
-
onClose: (
|
|
2732
|
+
onClose: (Y) => s(re)
|
|
2702
2733
|
}, {
|
|
2703
|
-
default:
|
|
2704
|
-
|
|
2734
|
+
default: S(() => [
|
|
2735
|
+
j(te(f(P)), 1)
|
|
2705
2736
|
]),
|
|
2706
2737
|
_: 2
|
|
2707
|
-
}, 1032, ["onClose"]))), 256)) :
|
|
2708
|
-
|
|
2738
|
+
}, 1032, ["onClose"]))), 256)) : z("", !0),
|
|
2739
|
+
F(w, {
|
|
2709
2740
|
class: "screen-btn",
|
|
2710
2741
|
type: "primary",
|
|
2711
2742
|
plain: "",
|
|
2712
2743
|
size: "small",
|
|
2713
2744
|
icon: u(ot),
|
|
2714
|
-
onClick:
|
|
2745
|
+
onClick: i
|
|
2715
2746
|
}, {
|
|
2716
|
-
default:
|
|
2717
|
-
|
|
2747
|
+
default: S(() => [
|
|
2748
|
+
j("添加因子")
|
|
2718
2749
|
]),
|
|
2719
2750
|
_: 1
|
|
2720
2751
|
}, 8, ["icon"]),
|
|
2721
|
-
|
|
2752
|
+
F(A, {
|
|
2722
2753
|
modelValue: r.value,
|
|
2723
|
-
"onUpdate:modelValue":
|
|
2724
|
-
title: "因子筛选",
|
|
2754
|
+
"onUpdate:modelValue": d[3] || (d[3] = (P) => r.value = P),
|
|
2725
2755
|
width: "500",
|
|
2726
2756
|
"align-center": "",
|
|
2727
2757
|
"destroy-on-close": ""
|
|
2728
2758
|
}, {
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2759
|
+
header: S(({ titleId: P, titleClass: re }) => [
|
|
2760
|
+
C("div", Tl, [
|
|
2761
|
+
C("span", {
|
|
2762
|
+
id: P,
|
|
2763
|
+
class: L(re)
|
|
2764
|
+
}, " 因子筛选 ", 10, Cl),
|
|
2765
|
+
F($, {
|
|
2766
|
+
effect: "dark",
|
|
2767
|
+
content: "点击查看: 因子使用说明",
|
|
2768
|
+
placement: "right"
|
|
2769
|
+
}, {
|
|
2770
|
+
default: S(() => [
|
|
2771
|
+
F(k, {
|
|
2772
|
+
onClick: d[0] || (d[0] = (Y) => a.value = !0)
|
|
2773
|
+
}, {
|
|
2774
|
+
default: S(() => [
|
|
2775
|
+
F(u(_r))
|
|
2776
|
+
]),
|
|
2777
|
+
_: 1
|
|
2778
|
+
})
|
|
2779
|
+
]),
|
|
2780
|
+
_: 1
|
|
2781
|
+
})
|
|
2782
|
+
])
|
|
2783
|
+
]),
|
|
2784
|
+
footer: S(() => [
|
|
2785
|
+
C("div", Pl, [
|
|
2786
|
+
F(w, {
|
|
2732
2787
|
type: "primary",
|
|
2733
|
-
onClick:
|
|
2788
|
+
onClick: _
|
|
2734
2789
|
}, {
|
|
2735
|
-
default:
|
|
2736
|
-
|
|
2790
|
+
default: S(() => [
|
|
2791
|
+
j("确定")
|
|
2737
2792
|
]),
|
|
2738
2793
|
_: 1
|
|
2739
2794
|
})
|
|
2740
2795
|
])
|
|
2741
2796
|
]),
|
|
2742
|
-
default:
|
|
2743
|
-
|
|
2797
|
+
default: S(() => [
|
|
2798
|
+
F(E, {
|
|
2744
2799
|
ref_key: "dialogFormRef",
|
|
2745
|
-
ref:
|
|
2746
|
-
model:
|
|
2800
|
+
ref: l,
|
|
2801
|
+
model: o.value
|
|
2747
2802
|
}, {
|
|
2748
|
-
default:
|
|
2749
|
-
(
|
|
2750
|
-
n.config.cycleShow ? (
|
|
2803
|
+
default: S(() => [
|
|
2804
|
+
(I(!0), q(Q, null, se(o.value.list, (P, re) => (I(), q("div", ql, [
|
|
2805
|
+
n.config.cycleShow ? (I(), U(G, {
|
|
2751
2806
|
key: 0,
|
|
2752
|
-
prop: "list." +
|
|
2807
|
+
prop: "list." + re + ".cycle",
|
|
2753
2808
|
rules: { required: !0, message: "周期不能为空", trigger: "blur" },
|
|
2754
2809
|
style: { width: "100px", "margin-right": "10px" }
|
|
2755
2810
|
}, {
|
|
2756
|
-
default:
|
|
2757
|
-
|
|
2758
|
-
modelValue:
|
|
2759
|
-
"onUpdate:modelValue": (
|
|
2811
|
+
default: S(() => [
|
|
2812
|
+
F(O, {
|
|
2813
|
+
modelValue: P.cycle,
|
|
2814
|
+
"onUpdate:modelValue": (Y) => P.cycle = Y,
|
|
2760
2815
|
placeholder: "选择周期",
|
|
2761
2816
|
size: "small"
|
|
2762
2817
|
}, {
|
|
2763
|
-
default:
|
|
2764
|
-
(
|
|
2765
|
-
label:
|
|
2766
|
-
value:
|
|
2767
|
-
key:
|
|
2818
|
+
default: S(() => [
|
|
2819
|
+
(I(!0), q(Q, null, se(n.config.cycleOptions, ({ label: Y, value: K }) => (I(), U(b, {
|
|
2820
|
+
label: Y,
|
|
2821
|
+
value: K,
|
|
2822
|
+
key: K
|
|
2768
2823
|
}, null, 8, ["label", "value"]))), 128))
|
|
2769
2824
|
]),
|
|
2770
2825
|
_: 2
|
|
2771
2826
|
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
|
2772
2827
|
]),
|
|
2773
2828
|
_: 2
|
|
2774
|
-
}, 1032, ["prop"])) :
|
|
2775
|
-
|
|
2776
|
-
prop: "list." +
|
|
2829
|
+
}, 1032, ["prop"])) : z("", !0),
|
|
2830
|
+
F(G, {
|
|
2831
|
+
prop: "list." + re + ".factor",
|
|
2777
2832
|
rules: { required: !0, message: "因子不能为空", trigger: "blur" },
|
|
2778
2833
|
style: { width: "100px", "margin-right": "10px" }
|
|
2779
2834
|
}, {
|
|
2780
|
-
default:
|
|
2781
|
-
|
|
2782
|
-
modelValue:
|
|
2783
|
-
"onUpdate:modelValue": (
|
|
2835
|
+
default: S(() => [
|
|
2836
|
+
F(O, {
|
|
2837
|
+
modelValue: P.factor,
|
|
2838
|
+
"onUpdate:modelValue": (Y) => P.factor = Y,
|
|
2784
2839
|
placeholder: "选择因子",
|
|
2785
2840
|
filterable: "",
|
|
2786
2841
|
size: "small",
|
|
2787
2842
|
"no-match-text": "无匹配数据"
|
|
2788
2843
|
}, {
|
|
2789
|
-
default:
|
|
2790
|
-
(
|
|
2791
|
-
label:
|
|
2792
|
-
value:
|
|
2793
|
-
key:
|
|
2844
|
+
default: S(() => [
|
|
2845
|
+
(I(!0), q(Q, null, se(n.config.factorOptions, ({ label: Y, value: K }) => (I(), U(b, {
|
|
2846
|
+
label: Y,
|
|
2847
|
+
value: K,
|
|
2848
|
+
key: K
|
|
2794
2849
|
}, null, 8, ["label", "value"]))), 128))
|
|
2795
2850
|
]),
|
|
2796
2851
|
_: 2
|
|
@@ -2798,23 +2853,23 @@ const Pn = (n) => (ht("data-v-0ae7a782"), n = n(), _t(), n), $l = { class: "fact
|
|
|
2798
2853
|
]),
|
|
2799
2854
|
_: 2
|
|
2800
2855
|
}, 1032, ["prop"]),
|
|
2801
|
-
|
|
2802
|
-
prop: "list." +
|
|
2856
|
+
F(G, {
|
|
2857
|
+
prop: "list." + re + ".score",
|
|
2803
2858
|
rules: { validator: v, trigger: "blur" },
|
|
2804
2859
|
style: { width: "200px", "margin-right": "10px" }
|
|
2805
2860
|
}, {
|
|
2806
|
-
default:
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
modelValue:
|
|
2810
|
-
"onUpdate:modelValue": (
|
|
2861
|
+
default: S(() => [
|
|
2862
|
+
C("div", Nl, [
|
|
2863
|
+
F(oe, {
|
|
2864
|
+
modelValue: P.score[0],
|
|
2865
|
+
"onUpdate:modelValue": (Y) => P.score[0] = Y,
|
|
2811
2866
|
size: "small",
|
|
2812
2867
|
"controls-position": "right"
|
|
2813
2868
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
modelValue:
|
|
2817
|
-
"onUpdate:modelValue": (
|
|
2869
|
+
Ml,
|
|
2870
|
+
F(oe, {
|
|
2871
|
+
modelValue: P.score[1],
|
|
2872
|
+
"onUpdate:modelValue": (Y) => P.score[1] = Y,
|
|
2818
2873
|
size: "small",
|
|
2819
2874
|
"controls-position": "right"
|
|
2820
2875
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
@@ -2822,97 +2877,131 @@ const Pn = (n) => (ht("data-v-0ae7a782"), n = n(), _t(), n), $l = { class: "fact
|
|
|
2822
2877
|
]),
|
|
2823
2878
|
_: 2
|
|
2824
2879
|
}, 1032, ["prop", "rules"]),
|
|
2825
|
-
|
|
2826
|
-
onClick: (
|
|
2880
|
+
F(k, {
|
|
2881
|
+
onClick: (Y) => x(re)
|
|
2827
2882
|
}, {
|
|
2828
|
-
default:
|
|
2829
|
-
|
|
2883
|
+
default: S(() => [
|
|
2884
|
+
F(u(wr))
|
|
2830
2885
|
]),
|
|
2831
2886
|
_: 2
|
|
2832
2887
|
}, 1032, ["onClick"])
|
|
2833
2888
|
]))), 256)),
|
|
2834
|
-
|
|
2889
|
+
F(w, {
|
|
2835
2890
|
type: "primary",
|
|
2836
2891
|
plain: "",
|
|
2837
2892
|
size: "small",
|
|
2838
2893
|
icon: u(ot),
|
|
2839
|
-
onClick:
|
|
2894
|
+
onClick: p,
|
|
2840
2895
|
style: { "margin-bottom": "10px" }
|
|
2841
2896
|
}, {
|
|
2842
|
-
default:
|
|
2843
|
-
|
|
2897
|
+
default: S(() => [
|
|
2898
|
+
j("添加因子")
|
|
2844
2899
|
]),
|
|
2845
2900
|
_: 1
|
|
2846
2901
|
}, 8, ["icon"]),
|
|
2847
|
-
n.config.sqlShow ? (
|
|
2848
|
-
|
|
2849
|
-
default:
|
|
2850
|
-
|
|
2851
|
-
modelValue:
|
|
2852
|
-
"onUpdate:modelValue":
|
|
2902
|
+
n.config.sqlShow ? (I(), q(Q, { key: 0 }, [
|
|
2903
|
+
F(G, { label: "SQL功能: " }, {
|
|
2904
|
+
default: S(() => [
|
|
2905
|
+
F(X, {
|
|
2906
|
+
modelValue: o.value.sqlEnable,
|
|
2907
|
+
"onUpdate:modelValue": d[1] || (d[1] = (P) => o.value.sqlEnable = P)
|
|
2853
2908
|
}, {
|
|
2854
|
-
default:
|
|
2855
|
-
|
|
2856
|
-
default:
|
|
2857
|
-
|
|
2909
|
+
default: S(() => [
|
|
2910
|
+
F(le, { label: 0 }, {
|
|
2911
|
+
default: S(() => [
|
|
2912
|
+
j("关闭")
|
|
2858
2913
|
]),
|
|
2859
2914
|
_: 1
|
|
2860
2915
|
}),
|
|
2861
|
-
|
|
2862
|
-
default:
|
|
2863
|
-
|
|
2916
|
+
F(le, { label: 1 }, {
|
|
2917
|
+
default: S(() => [
|
|
2918
|
+
j("启用")
|
|
2864
2919
|
]),
|
|
2865
2920
|
_: 1
|
|
2866
2921
|
})
|
|
2867
2922
|
]),
|
|
2868
2923
|
_: 1
|
|
2869
2924
|
}, 8, ["modelValue"]),
|
|
2870
|
-
|
|
2925
|
+
o.value.sqlEnable ? (I(), U(w, {
|
|
2871
2926
|
key: 0,
|
|
2872
2927
|
type: "primary",
|
|
2873
2928
|
size: "small",
|
|
2874
|
-
onClick:
|
|
2929
|
+
onClick: V,
|
|
2875
2930
|
style: { "margin-left": "auto" }
|
|
2876
2931
|
}, {
|
|
2877
|
-
default:
|
|
2878
|
-
|
|
2932
|
+
default: S(() => [
|
|
2933
|
+
j("生成SQL")
|
|
2879
2934
|
]),
|
|
2880
2935
|
_: 1
|
|
2881
|
-
})) :
|
|
2936
|
+
})) : z("", !0)
|
|
2882
2937
|
]),
|
|
2883
2938
|
_: 1
|
|
2884
2939
|
}),
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
modelValue:
|
|
2888
|
-
"onUpdate:modelValue":
|
|
2940
|
+
o.value.sqlEnable ? (I(), q(Q, { key: 0 }, [
|
|
2941
|
+
F(m, {
|
|
2942
|
+
modelValue: o.value.sqlValue,
|
|
2943
|
+
"onUpdate:modelValue": d[2] || (d[2] = (P) => o.value.sqlValue = P),
|
|
2889
2944
|
autosize: { minRows: 4 },
|
|
2890
2945
|
type: "textarea",
|
|
2891
2946
|
style: { "margin-bottom": "10px" }
|
|
2892
2947
|
}, null, 8, ["modelValue"]),
|
|
2893
|
-
|
|
2894
|
-
], 64)) :
|
|
2895
|
-
], 64)) :
|
|
2948
|
+
Al
|
|
2949
|
+
], 64)) : z("", !0)
|
|
2950
|
+
], 64)) : z("", !0)
|
|
2896
2951
|
]),
|
|
2897
2952
|
_: 1
|
|
2898
2953
|
}, 8, ["model"])
|
|
2899
2954
|
]),
|
|
2900
2955
|
_: 1
|
|
2956
|
+
}, 8, ["modelValue"]),
|
|
2957
|
+
F(A, {
|
|
2958
|
+
modelValue: a.value,
|
|
2959
|
+
"onUpdate:modelValue": d[4] || (d[4] = (P) => a.value = P),
|
|
2960
|
+
title: "因子使用说明",
|
|
2961
|
+
width: "1000",
|
|
2962
|
+
"align-center": "",
|
|
2963
|
+
"destroy-on-close": ""
|
|
2964
|
+
}, {
|
|
2965
|
+
default: S(() => [
|
|
2966
|
+
F(D, {
|
|
2967
|
+
data: n.config.factorDescriptions,
|
|
2968
|
+
border: "",
|
|
2969
|
+
height: "500"
|
|
2970
|
+
}, {
|
|
2971
|
+
default: S(() => [
|
|
2972
|
+
F(W, {
|
|
2973
|
+
prop: "factorName",
|
|
2974
|
+
label: "因子名称",
|
|
2975
|
+
width: "200"
|
|
2976
|
+
}),
|
|
2977
|
+
F(W, {
|
|
2978
|
+
prop: "factorDesc",
|
|
2979
|
+
label: "因子说明"
|
|
2980
|
+
}),
|
|
2981
|
+
F(W, {
|
|
2982
|
+
prop: "factorScoreDefine",
|
|
2983
|
+
label: "分值定义"
|
|
2984
|
+
})
|
|
2985
|
+
]),
|
|
2986
|
+
_: 1
|
|
2987
|
+
}, 8, ["data"])
|
|
2988
|
+
]),
|
|
2989
|
+
_: 1
|
|
2901
2990
|
}, 8, ["modelValue"])
|
|
2902
2991
|
]);
|
|
2903
2992
|
};
|
|
2904
2993
|
}
|
|
2905
|
-
},
|
|
2906
|
-
const Ft = (n) => (ht("data-v-
|
|
2994
|
+
}, Rl = /* @__PURE__ */ $t(jl, [["__scopeId", "data-v-d76a610e"]]);
|
|
2995
|
+
const Ft = (n) => (ht("data-v-bfc7b27f"), n = n(), _t(), n), Ll = {
|
|
2907
2996
|
key: 0,
|
|
2908
2997
|
class: "common-indicator"
|
|
2909
|
-
},
|
|
2910
|
-
/* @__PURE__ */
|
|
2911
|
-
/* @__PURE__ */
|
|
2912
|
-
], -1)),
|
|
2998
|
+
}, Ul = { class: "indicator" }, Dl = /* @__PURE__ */ Ft(() => /* @__PURE__ */ C("div", { class: "title" }, [
|
|
2999
|
+
/* @__PURE__ */ C("span", null, "常用指标: "),
|
|
3000
|
+
/* @__PURE__ */ C("span", null, "不限")
|
|
3001
|
+
], -1)), Bl = { class: "options" }, zl = ["onClick"], Wl = { class: "tags" }, Gl = ["onClick"], Yl = {
|
|
2913
3002
|
key: 0,
|
|
2914
3003
|
class: "convenient-option-box"
|
|
2915
|
-
},
|
|
3004
|
+
}, Kl = { class: "out-box" }, Hl = /* @__PURE__ */ Ft(() => /* @__PURE__ */ C("span", null, "自定义: ", -1)), Ql = { key: 0 }, Jl = { key: 0 }, Zl = { key: 0 }, Xl = { key: 1 }, ei = { class: "tFeaturelncomes-option-box" }, ti = { class: "tFeaturelncomes-out-box" }, ni = /* @__PURE__ */ Ft(() => /* @__PURE__ */ C("span", null, "自定义: ", -1)), ri = { key: 2 }, ai = { key: 3 }, oi = { class: "dialog-footer" }, li = {
|
|
2916
3005
|
__name: "index",
|
|
2917
3006
|
props: /* @__PURE__ */ yt({
|
|
2918
3007
|
config: { type: Object, default: () => {
|
|
@@ -2927,45 +3016,45 @@ const Ft = (n) => (ht("data-v-0a691a79"), n = n(), _t(), n), Nl = {
|
|
|
2927
3016
|
}),
|
|
2928
3017
|
emits: ["update:data"],
|
|
2929
3018
|
setup(n) {
|
|
2930
|
-
const e = n, t = bt(n, "data"), r =
|
|
3019
|
+
const e = n, t = bt(n, "data"), r = N(() => {
|
|
2931
3020
|
let _ = [];
|
|
2932
|
-
return e.varietyMarket === null && !e.commonOption.length ? _ = e.config.options : (_ = e.config.options, e.varietyMarket && (_ = _.filter(({ parent:
|
|
2933
|
-
const { commonOptionIds:
|
|
2934
|
-
return [.../* @__PURE__ */ new Set([...
|
|
3021
|
+
return e.varietyMarket === null && !e.commonOption.length ? _ = e.config.options : (_ = e.config.options, e.varietyMarket && (_ = _.filter(({ parent: f }) => f.varietyMarketIds.includes(e.varietyMarket))), e.commonOption.length && (_ = _.filter(({ parent: f }) => {
|
|
3022
|
+
const { commonOptionIds: v } = f;
|
|
3023
|
+
return [.../* @__PURE__ */ new Set([...v, ...e.commonOption])].length !== [...v, ...e.commonOption].length;
|
|
2935
3024
|
}))), _;
|
|
2936
3025
|
});
|
|
2937
|
-
|
|
3026
|
+
ve(
|
|
2938
3027
|
() => r.value,
|
|
2939
3028
|
() => {
|
|
2940
|
-
t.value.length && (t.value = t.value.filter(({ key: _ }) => r.value.find((
|
|
3029
|
+
t.value.length && (t.value = t.value.filter(({ key: _ }) => r.value.find((f) => f.key === _)));
|
|
2941
3030
|
}
|
|
2942
3031
|
);
|
|
2943
|
-
const a =
|
|
3032
|
+
const a = H(!1), l = H({}), o = H({}), i = (_) => {
|
|
2944
3033
|
l.value = _;
|
|
2945
|
-
const
|
|
3034
|
+
const f = {
|
|
2946
3035
|
label: _.label,
|
|
2947
3036
|
key: _.key,
|
|
2948
3037
|
type: _.type
|
|
2949
3038
|
};
|
|
2950
3039
|
_.type === void 0 ? o.value = {
|
|
2951
|
-
...
|
|
3040
|
+
...f,
|
|
2952
3041
|
range: [null, null],
|
|
2953
3042
|
unit: _.defaultUnit.length ? [..._.defaultUnit] : [null, null]
|
|
2954
|
-
} : _.key === "st" ? o.value = { ...
|
|
2955
|
-
...
|
|
3043
|
+
} : _.key === "st" ? o.value = { ...f, st: null } : _.key === "tFeaturelncomes" ? o.value = {
|
|
3044
|
+
...f,
|
|
2956
3045
|
rule: 1,
|
|
2957
3046
|
// 1超 2跌
|
|
2958
3047
|
withFewYears: null,
|
|
2959
3048
|
yearsCount: null,
|
|
2960
3049
|
netProfit: null
|
|
2961
|
-
} : _.key === "optionsCpType" && (o.value = {
|
|
2962
|
-
...
|
|
3050
|
+
} : _.key === "priceLevels" ? o.value = { ...f, priceLevels: null } : _.key === "optionsCpType" && (o.value = {
|
|
3051
|
+
...f,
|
|
2963
3052
|
optionsCpType: null
|
|
2964
3053
|
// 1看涨 2看跌
|
|
2965
3054
|
}), a.value = !0;
|
|
2966
|
-
},
|
|
3055
|
+
}, p = (_) => {
|
|
2967
3056
|
o.value.range = [..._.range], o.value.unit = [..._.unit];
|
|
2968
|
-
},
|
|
3057
|
+
}, V = (_) => {
|
|
2969
3058
|
switch (_) {
|
|
2970
3059
|
case "≤0":
|
|
2971
3060
|
Object.assign(o.value, {
|
|
@@ -3009,117 +3098,132 @@ const Ft = (n) => (ht("data-v-0a691a79"), n = n(), _t(), n), Nl = {
|
|
|
3009
3098
|
});
|
|
3010
3099
|
break;
|
|
3011
3100
|
}
|
|
3012
|
-
},
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3101
|
+
}, c = () => {
|
|
3102
|
+
switch (o.value.key) {
|
|
3103
|
+
case "st": {
|
|
3104
|
+
const { label: f, st: v } = o.value;
|
|
3105
|
+
if (v === null)
|
|
3106
|
+
return Ie.warning("格式错误: 请至少选择一个值");
|
|
3107
|
+
o.value.tagText = `${f}: ${v ? "是" : "否"}`;
|
|
3108
|
+
break;
|
|
3109
|
+
}
|
|
3110
|
+
case "tFeaturelncomes": {
|
|
3111
|
+
const { label: f, rule: v, withFewYears: h, yearsCount: d, netProfit: g } = o.value;
|
|
3112
|
+
if (["", null].includes(h) || ["", null].includes(d) || ["", null].includes(g))
|
|
3113
|
+
return Ie.warning("格式错误: 请填写完整");
|
|
3114
|
+
o.value.tagText = `${f}: ${h}年内${d}年以上盈利${v === 1 ? "超" : "跌"}过${g}亿`;
|
|
3115
|
+
break;
|
|
3116
|
+
}
|
|
3117
|
+
case "priceLevels": {
|
|
3118
|
+
const { label: f, priceLevels: v } = o.value;
|
|
3119
|
+
if (!v || v.length === 0)
|
|
3120
|
+
return Ie.warning("格式错误: 请至少选择一个值");
|
|
3121
|
+
o.value.tagText = `${f}: 已选${v}分位`;
|
|
3122
|
+
break;
|
|
3123
|
+
}
|
|
3124
|
+
case "optionsCpType": {
|
|
3125
|
+
const { label: f, optionsCpType: v } = o.value;
|
|
3126
|
+
if (v === null)
|
|
3127
|
+
return Ie.warning("格式错误: 请至少选择一个值");
|
|
3128
|
+
o.value.tagText = `${f}: ${v === 1 ? "看涨" : "看跌"}`;
|
|
3129
|
+
break;
|
|
3130
|
+
}
|
|
3131
|
+
default: {
|
|
3132
|
+
const { label: f, range: v, unit: h } = o.value;
|
|
3133
|
+
if (["", null].includes(v[0]) && ["", null].includes(v[1]))
|
|
3134
|
+
return Ie.warning("格式错误: 请至少填写一个值");
|
|
3135
|
+
!["", null].includes(v[0]) && !["", null].includes(v[1]) ? o.value.tagText = `${f}: ${v[0]}${h[0] ?? ""} ~ ${v[1]}${h[1] ?? ""}` : ["", null].includes(v[0]) ? o.value.tagText = `${f}: ≤${v[1]}${h[1] ?? ""}` : o.value.tagText = `${f}: ≥${v[0]}${h[0] ?? ""}`;
|
|
3136
|
+
}
|
|
3033
3137
|
}
|
|
3034
|
-
const _ = t.value.findIndex(({ key:
|
|
3138
|
+
const _ = t.value.findIndex(({ key: f }) => f === o.value.key);
|
|
3035
3139
|
_ === -1 ? t.value.push(o.value) : t.value.splice(_, 1, o.value), a.value = !1;
|
|
3036
|
-
},
|
|
3140
|
+
}, s = (_) => {
|
|
3037
3141
|
t.value.splice(_, 1);
|
|
3038
|
-
},
|
|
3039
|
-
l.value = r.value.find(({ key:
|
|
3142
|
+
}, x = (_) => {
|
|
3143
|
+
l.value = r.value.find(({ key: f }) => f === _.key), o.value = _, a.value = !0;
|
|
3040
3144
|
};
|
|
3041
|
-
return (_,
|
|
3042
|
-
const
|
|
3043
|
-
return n.config.show && r.value.length ? (
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
(
|
|
3048
|
-
key:
|
|
3049
|
-
onClick: (
|
|
3050
|
-
},
|
|
3145
|
+
return (_, f) => {
|
|
3146
|
+
const v = vn, h = bn, d = gn, g = yn, y = xt, w = Et, k = St, $ = Nn, b = mn;
|
|
3147
|
+
return n.config.show && r.value.length ? (I(), q("div", Ll, [
|
|
3148
|
+
C("div", Ul, [
|
|
3149
|
+
Dl,
|
|
3150
|
+
C("div", Bl, [
|
|
3151
|
+
(I(!0), q(Q, null, se(r.value, (O) => (I(), q("span", {
|
|
3152
|
+
key: O.key,
|
|
3153
|
+
onClick: (G) => i(O)
|
|
3154
|
+
}, te(O.label), 9, zl))), 128))
|
|
3051
3155
|
])
|
|
3052
3156
|
]),
|
|
3053
|
-
|
|
3054
|
-
(
|
|
3157
|
+
C("div", Wl, [
|
|
3158
|
+
(I(!0), q(Q, null, se(t.value, (O, G) => (I(), U(v, {
|
|
3055
3159
|
closable: "",
|
|
3056
3160
|
type: "info",
|
|
3057
|
-
onClose: (
|
|
3161
|
+
onClose: (oe) => s(G)
|
|
3058
3162
|
}, {
|
|
3059
|
-
default:
|
|
3060
|
-
|
|
3061
|
-
|
|
3163
|
+
default: S(() => [
|
|
3164
|
+
C("span", null, te(O.tagText), 1),
|
|
3165
|
+
C("span", {
|
|
3062
3166
|
class: "edit",
|
|
3063
|
-
onClick: (
|
|
3064
|
-
}, "编辑", 8,
|
|
3167
|
+
onClick: (oe) => x(O)
|
|
3168
|
+
}, "编辑", 8, Gl)
|
|
3065
3169
|
]),
|
|
3066
3170
|
_: 2
|
|
3067
3171
|
}, 1032, ["onClose"]))), 256))
|
|
3068
3172
|
]),
|
|
3069
|
-
|
|
3173
|
+
F(b, {
|
|
3070
3174
|
modelValue: a.value,
|
|
3071
|
-
"onUpdate:modelValue":
|
|
3175
|
+
"onUpdate:modelValue": f[15] || (f[15] = (O) => a.value = O),
|
|
3072
3176
|
title: l.value.label,
|
|
3073
3177
|
width: "600",
|
|
3074
3178
|
"align-center": "",
|
|
3075
3179
|
"destroy-on-close": ""
|
|
3076
3180
|
}, {
|
|
3077
|
-
footer:
|
|
3078
|
-
|
|
3079
|
-
|
|
3181
|
+
footer: S(() => [
|
|
3182
|
+
C("div", oi, [
|
|
3183
|
+
F(h, {
|
|
3080
3184
|
type: "primary",
|
|
3081
|
-
onClick:
|
|
3185
|
+
onClick: c
|
|
3082
3186
|
}, {
|
|
3083
|
-
default:
|
|
3084
|
-
|
|
3187
|
+
default: S(() => [
|
|
3188
|
+
j("确定")
|
|
3085
3189
|
]),
|
|
3086
3190
|
_: 1
|
|
3087
3191
|
})
|
|
3088
3192
|
])
|
|
3089
3193
|
]),
|
|
3090
|
-
default:
|
|
3091
|
-
l.value.type === void 0 ? (
|
|
3092
|
-
l.value.convenientOptions.length ? (
|
|
3093
|
-
(
|
|
3094
|
-
key:
|
|
3095
|
-
onClick: (
|
|
3194
|
+
default: S(() => [
|
|
3195
|
+
l.value.type === void 0 ? (I(), q(Q, { key: 0 }, [
|
|
3196
|
+
l.value.convenientOptions.length ? (I(), q("div", Yl, [
|
|
3197
|
+
(I(!0), q(Q, null, se(l.value.convenientOptions, (O) => (I(), U(h, {
|
|
3198
|
+
key: O.text,
|
|
3199
|
+
onClick: (G) => p(O)
|
|
3096
3200
|
}, {
|
|
3097
|
-
default:
|
|
3098
|
-
|
|
3201
|
+
default: S(() => [
|
|
3202
|
+
j(te(O.text), 1)
|
|
3099
3203
|
]),
|
|
3100
3204
|
_: 2
|
|
3101
3205
|
}, 1032, ["onClick"]))), 128))
|
|
3102
|
-
])) :
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3206
|
+
])) : z("", !0),
|
|
3207
|
+
C("div", Kl, [
|
|
3208
|
+
Hl,
|
|
3209
|
+
F(y, {
|
|
3106
3210
|
modelValue: o.value.range[0],
|
|
3107
|
-
"onUpdate:modelValue":
|
|
3211
|
+
"onUpdate:modelValue": f[1] || (f[1] = (O) => o.value.range[0] = O),
|
|
3108
3212
|
style: { flex: "1" }
|
|
3109
3213
|
}, Mt({ _: 2 }, [
|
|
3110
3214
|
l.value.unitOptions.length ? {
|
|
3111
3215
|
name: "append",
|
|
3112
|
-
fn:
|
|
3113
|
-
l.value.unitOptions.length === 1 ? (
|
|
3216
|
+
fn: S(() => [
|
|
3217
|
+
l.value.unitOptions.length === 1 ? (I(), q("span", Ql, te(o.value.unit[0]), 1)) : (I(), U(g, {
|
|
3114
3218
|
key: 1,
|
|
3115
3219
|
modelValue: o.value.unit[0],
|
|
3116
|
-
"onUpdate:modelValue":
|
|
3220
|
+
"onUpdate:modelValue": f[0] || (f[0] = (O) => o.value.unit[0] = O),
|
|
3117
3221
|
style: { width: "72px" }
|
|
3118
3222
|
}, {
|
|
3119
|
-
default:
|
|
3120
|
-
(
|
|
3121
|
-
label:
|
|
3122
|
-
value:
|
|
3223
|
+
default: S(() => [
|
|
3224
|
+
(I(!0), q(Q, null, se(l.value.unitOptions, (O) => (I(), U(d, {
|
|
3225
|
+
label: O,
|
|
3226
|
+
value: O
|
|
3123
3227
|
}, null, 8, ["label", "value"]))), 256))
|
|
3124
3228
|
]),
|
|
3125
3229
|
_: 1
|
|
@@ -3128,25 +3232,25 @@ const Ft = (n) => (ht("data-v-0a691a79"), n = n(), _t(), n), Nl = {
|
|
|
3128
3232
|
key: "0"
|
|
3129
3233
|
} : void 0
|
|
3130
3234
|
]), 1032, ["modelValue"]),
|
|
3131
|
-
|
|
3132
|
-
|
|
3235
|
+
j(" ~ "),
|
|
3236
|
+
F(y, {
|
|
3133
3237
|
modelValue: o.value.range[1],
|
|
3134
|
-
"onUpdate:modelValue":
|
|
3238
|
+
"onUpdate:modelValue": f[3] || (f[3] = (O) => o.value.range[1] = O),
|
|
3135
3239
|
style: { flex: "1" }
|
|
3136
3240
|
}, Mt({ _: 2 }, [
|
|
3137
3241
|
l.value.unitOptions.length ? {
|
|
3138
3242
|
name: "append",
|
|
3139
|
-
fn:
|
|
3140
|
-
l.value.unitOptions.length === 1 ? (
|
|
3243
|
+
fn: S(() => [
|
|
3244
|
+
l.value.unitOptions.length === 1 ? (I(), q("span", Jl, te(o.value.unit[1]), 1)) : (I(), U(g, {
|
|
3141
3245
|
key: 1,
|
|
3142
3246
|
modelValue: o.value.unit[1],
|
|
3143
|
-
"onUpdate:modelValue":
|
|
3247
|
+
"onUpdate:modelValue": f[2] || (f[2] = (O) => o.value.unit[1] = O),
|
|
3144
3248
|
style: { width: "72px" }
|
|
3145
3249
|
}, {
|
|
3146
|
-
default:
|
|
3147
|
-
(
|
|
3148
|
-
label:
|
|
3149
|
-
value:
|
|
3250
|
+
default: S(() => [
|
|
3251
|
+
(I(!0), q(Q, null, se(l.value.unitOptions, (O) => (I(), U(d, {
|
|
3252
|
+
label: O,
|
|
3253
|
+
value: O
|
|
3150
3254
|
}, null, 8, ["label", "value"]))), 256))
|
|
3151
3255
|
]),
|
|
3152
3256
|
_: 1
|
|
@@ -3156,150 +3260,170 @@ const Ft = (n) => (ht("data-v-0a691a79"), n = n(), _t(), n), Nl = {
|
|
|
3156
3260
|
} : void 0
|
|
3157
3261
|
]), 1032, ["modelValue"])
|
|
3158
3262
|
])
|
|
3159
|
-
], 64)) : (
|
|
3160
|
-
l.value.key === "st" ? (
|
|
3161
|
-
|
|
3263
|
+
], 64)) : (I(), q(Q, { key: 1 }, [
|
|
3264
|
+
l.value.key === "st" ? (I(), q("div", Zl, [
|
|
3265
|
+
F(k, {
|
|
3162
3266
|
modelValue: o.value.st,
|
|
3163
|
-
"onUpdate:modelValue":
|
|
3267
|
+
"onUpdate:modelValue": f[4] || (f[4] = (O) => o.value.st = O)
|
|
3164
3268
|
}, {
|
|
3165
|
-
default:
|
|
3166
|
-
|
|
3167
|
-
default:
|
|
3168
|
-
|
|
3269
|
+
default: S(() => [
|
|
3270
|
+
F(w, { label: 1 }, {
|
|
3271
|
+
default: S(() => [
|
|
3272
|
+
j("是")
|
|
3169
3273
|
]),
|
|
3170
3274
|
_: 1
|
|
3171
3275
|
}),
|
|
3172
|
-
|
|
3173
|
-
default:
|
|
3174
|
-
|
|
3276
|
+
F(w, { label: 0 }, {
|
|
3277
|
+
default: S(() => [
|
|
3278
|
+
j("否")
|
|
3175
3279
|
]),
|
|
3176
3280
|
_: 1
|
|
3177
3281
|
})
|
|
3178
3282
|
]),
|
|
3179
3283
|
_: 1
|
|
3180
3284
|
}, 8, ["modelValue"])
|
|
3181
|
-
])) :
|
|
3182
|
-
l.value.key === "tFeaturelncomes" ? (
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
onClick:
|
|
3285
|
+
])) : z("", !0),
|
|
3286
|
+
l.value.key === "tFeaturelncomes" ? (I(), q("div", Xl, [
|
|
3287
|
+
C("div", ei, [
|
|
3288
|
+
F(h, {
|
|
3289
|
+
onClick: f[5] || (f[5] = (O) => V("≤0"))
|
|
3186
3290
|
}, {
|
|
3187
|
-
default:
|
|
3188
|
-
|
|
3291
|
+
default: S(() => [
|
|
3292
|
+
j("≤0")
|
|
3189
3293
|
]),
|
|
3190
3294
|
_: 1
|
|
3191
3295
|
}),
|
|
3192
|
-
|
|
3193
|
-
onClick:
|
|
3296
|
+
F(h, {
|
|
3297
|
+
onClick: f[6] || (f[6] = (O) => V("≥0"))
|
|
3194
3298
|
}, {
|
|
3195
|
-
default:
|
|
3196
|
-
|
|
3299
|
+
default: S(() => [
|
|
3300
|
+
j("≥0")
|
|
3197
3301
|
]),
|
|
3198
3302
|
_: 1
|
|
3199
3303
|
}),
|
|
3200
|
-
|
|
3201
|
-
onClick:
|
|
3304
|
+
F(h, {
|
|
3305
|
+
onClick: f[7] || (f[7] = (O) => V("五年内有四年以上盈利超过5千万"))
|
|
3202
3306
|
}, {
|
|
3203
|
-
default:
|
|
3204
|
-
|
|
3307
|
+
default: S(() => [
|
|
3308
|
+
j("五年内有四年以上盈利超过5千万")
|
|
3205
3309
|
]),
|
|
3206
3310
|
_: 1
|
|
3207
3311
|
}),
|
|
3208
|
-
|
|
3209
|
-
onClick:
|
|
3312
|
+
F(h, {
|
|
3313
|
+
onClick: f[8] || (f[8] = (O) => V("≥10亿"))
|
|
3210
3314
|
}, {
|
|
3211
|
-
default:
|
|
3212
|
-
|
|
3315
|
+
default: S(() => [
|
|
3316
|
+
j("≥10亿")
|
|
3213
3317
|
]),
|
|
3214
3318
|
_: 1
|
|
3215
3319
|
}),
|
|
3216
|
-
|
|
3217
|
-
onClick:
|
|
3320
|
+
F(h, {
|
|
3321
|
+
onClick: f[9] || (f[9] = (O) => V("≥20亿"))
|
|
3218
3322
|
}, {
|
|
3219
|
-
default:
|
|
3220
|
-
|
|
3323
|
+
default: S(() => [
|
|
3324
|
+
j("≥20亿")
|
|
3221
3325
|
]),
|
|
3222
3326
|
_: 1
|
|
3223
3327
|
})
|
|
3224
3328
|
]),
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3329
|
+
C("div", ti, [
|
|
3330
|
+
ni,
|
|
3331
|
+
C("div", null, [
|
|
3332
|
+
F($, {
|
|
3229
3333
|
modelValue: o.value.withFewYears,
|
|
3230
|
-
"onUpdate:modelValue":
|
|
3334
|
+
"onUpdate:modelValue": f[10] || (f[10] = (O) => o.value.withFewYears = O),
|
|
3231
3335
|
"controls-position": "right"
|
|
3232
3336
|
}, null, 8, ["modelValue"]),
|
|
3233
|
-
|
|
3234
|
-
|
|
3337
|
+
j(" 年内 "),
|
|
3338
|
+
F($, {
|
|
3235
3339
|
modelValue: o.value.yearsCount,
|
|
3236
|
-
"onUpdate:modelValue":
|
|
3340
|
+
"onUpdate:modelValue": f[11] || (f[11] = (O) => o.value.yearsCount = O),
|
|
3237
3341
|
"controls-position": "right"
|
|
3238
3342
|
}, null, 8, ["modelValue"]),
|
|
3239
|
-
|
|
3240
|
-
|
|
3343
|
+
j(" 年以上盈利" + te(o.value.rule === 1 ? "超" : "跌") + "过 ", 1),
|
|
3344
|
+
F($, {
|
|
3241
3345
|
modelValue: o.value.netProfit,
|
|
3242
|
-
"onUpdate:modelValue":
|
|
3346
|
+
"onUpdate:modelValue": f[12] || (f[12] = (O) => o.value.netProfit = O),
|
|
3243
3347
|
"controls-position": "right"
|
|
3244
3348
|
}, null, 8, ["modelValue"]),
|
|
3245
|
-
|
|
3349
|
+
j(" 亿 ")
|
|
3246
3350
|
])
|
|
3247
3351
|
])
|
|
3248
|
-
])) :
|
|
3249
|
-
l.value.key === "
|
|
3250
|
-
|
|
3352
|
+
])) : z("", !0),
|
|
3353
|
+
l.value.key === "priceLevels" ? (I(), q("div", ri, [
|
|
3354
|
+
F(g, {
|
|
3355
|
+
modelValue: o.value.priceLevels,
|
|
3356
|
+
"onUpdate:modelValue": f[13] || (f[13] = (O) => o.value.priceLevels = O),
|
|
3357
|
+
multiple: "",
|
|
3358
|
+
placeholder: "请选择",
|
|
3359
|
+
style: { width: "100%" }
|
|
3360
|
+
}, {
|
|
3361
|
+
default: S(() => [
|
|
3362
|
+
(I(), q(Q, null, se([1, 2, 3, 4, 5], (O) => F(d, {
|
|
3363
|
+
key: O,
|
|
3364
|
+
label: `${O}分位`,
|
|
3365
|
+
value: O
|
|
3366
|
+
}, null, 8, ["label", "value"])), 64))
|
|
3367
|
+
]),
|
|
3368
|
+
_: 1
|
|
3369
|
+
}, 8, ["modelValue"])
|
|
3370
|
+
])) : z("", !0),
|
|
3371
|
+
l.value.key === "optionsCpType" ? (I(), q("div", ai, [
|
|
3372
|
+
F(k, {
|
|
3251
3373
|
modelValue: o.value.optionsCpType,
|
|
3252
|
-
"onUpdate:modelValue":
|
|
3374
|
+
"onUpdate:modelValue": f[14] || (f[14] = (O) => o.value.optionsCpType = O)
|
|
3253
3375
|
}, {
|
|
3254
|
-
default:
|
|
3255
|
-
|
|
3256
|
-
default:
|
|
3257
|
-
|
|
3376
|
+
default: S(() => [
|
|
3377
|
+
F(w, { label: 1 }, {
|
|
3378
|
+
default: S(() => [
|
|
3379
|
+
j("看涨")
|
|
3258
3380
|
]),
|
|
3259
3381
|
_: 1
|
|
3260
3382
|
}),
|
|
3261
|
-
|
|
3262
|
-
default:
|
|
3263
|
-
|
|
3383
|
+
F(w, { label: 2 }, {
|
|
3384
|
+
default: S(() => [
|
|
3385
|
+
j("看跌")
|
|
3264
3386
|
]),
|
|
3265
3387
|
_: 1
|
|
3266
3388
|
})
|
|
3267
3389
|
]),
|
|
3268
3390
|
_: 1
|
|
3269
3391
|
}, 8, ["modelValue"])
|
|
3270
|
-
])) :
|
|
3392
|
+
])) : z("", !0)
|
|
3271
3393
|
], 64))
|
|
3272
3394
|
]),
|
|
3273
3395
|
_: 1
|
|
3274
3396
|
}, 8, ["modelValue", "title"])
|
|
3275
|
-
])) :
|
|
3397
|
+
])) : z("", !0);
|
|
3276
3398
|
};
|
|
3277
3399
|
}
|
|
3278
|
-
},
|
|
3279
|
-
const
|
|
3400
|
+
}, ii = /* @__PURE__ */ $t(li, [["__scopeId", "data-v-bfc7b27f"]]);
|
|
3401
|
+
const Re = (n) => (ht("data-v-914f7926"), n = n(), _t(), n), si = { class: "variety-search" }, ui = {
|
|
3280
3402
|
key: 0,
|
|
3281
3403
|
class: "variety-search-row"
|
|
3282
|
-
},
|
|
3404
|
+
}, di = { class: "title" }, ci = /* @__PURE__ */ Re(() => /* @__PURE__ */ C("span", null, "品种市场: ", -1)), fi = {
|
|
3283
3405
|
key: 1,
|
|
3284
3406
|
class: "variety-search-row"
|
|
3285
|
-
},
|
|
3407
|
+
}, pi = { class: "title" }, mi = /* @__PURE__ */ Re(() => /* @__PURE__ */ C("span", null, "常用选项: ", -1)), vi = {
|
|
3286
3408
|
key: 2,
|
|
3287
3409
|
class: "variety-search-row"
|
|
3288
|
-
},
|
|
3410
|
+
}, gi = { class: "title" }, yi = /* @__PURE__ */ Re(() => /* @__PURE__ */ C("span", null, "上市板块: ", -1)), bi = {
|
|
3289
3411
|
key: 3,
|
|
3290
3412
|
class: "variety-search-row"
|
|
3291
|
-
},
|
|
3413
|
+
}, hi = { class: "title" }, _i = /* @__PURE__ */ Re(() => /* @__PURE__ */ C("span", null, "自定标签: ", -1)), wi = {
|
|
3414
|
+
key: 4,
|
|
3415
|
+
class: "variety-search-row"
|
|
3416
|
+
}, xi = { class: "title" }, Oi = /* @__PURE__ */ Re(() => /* @__PURE__ */ C("span", null, "因子筛选: ", -1)), ki = {
|
|
3292
3417
|
__name: "index",
|
|
3293
|
-
props: /* @__PURE__ */ yt({
|
|
3294
|
-
// 配置项
|
|
3295
|
-
config: { type: Object, default: {} }
|
|
3296
|
-
}, {
|
|
3418
|
+
props: /* @__PURE__ */ yt({ config: { type: Object, default: {} } }, {
|
|
3297
3419
|
searchData: {
|
|
3298
3420
|
default: {
|
|
3299
3421
|
// 品种市场
|
|
3300
3422
|
varietyMarket: null,
|
|
3301
3423
|
// 常用选项
|
|
3302
3424
|
commonOption: [],
|
|
3425
|
+
// 上市板块
|
|
3426
|
+
marketIds: [],
|
|
3303
3427
|
// 自定标签
|
|
3304
3428
|
customTag: [],
|
|
3305
3429
|
// 因子筛选
|
|
@@ -3316,228 +3440,264 @@ const Xe = (n) => (ht("data-v-6f290912"), n = n(), _t(), n), ti = { class: "vari
|
|
|
3316
3440
|
}),
|
|
3317
3441
|
emits: ["update:searchData"],
|
|
3318
3442
|
setup(n, { expose: e }) {
|
|
3319
|
-
const t = n, r = bt(n, "searchData"), a =
|
|
3320
|
-
const
|
|
3321
|
-
return Object.keys(Qt).forEach((
|
|
3322
|
-
const
|
|
3323
|
-
|
|
3324
|
-
}),
|
|
3325
|
-
}), l =
|
|
3326
|
-
const { varietyMarket:
|
|
3327
|
-
if (
|
|
3328
|
-
const
|
|
3329
|
-
return a.value.commonOption.options.filter(({ value:
|
|
3443
|
+
const t = n, r = bt(n, "searchData"), a = N(() => {
|
|
3444
|
+
const c = {};
|
|
3445
|
+
return Object.keys(Qt).forEach((s) => {
|
|
3446
|
+
const x = Qt[s], _ = t.config[s] ?? {}, f = { ...x, ..._ };
|
|
3447
|
+
c[s] = f;
|
|
3448
|
+
}), c;
|
|
3449
|
+
}), l = N(() => a.value.varietyMarket.options), o = N(() => {
|
|
3450
|
+
const { varietyMarket: c } = r.value;
|
|
3451
|
+
if (c) {
|
|
3452
|
+
const s = l.value.find(({ value: x }) => x === c).memo;
|
|
3453
|
+
return a.value.commonOption.options.filter(({ value: x }) => s.includes(x));
|
|
3330
3454
|
} else
|
|
3331
3455
|
return a.value.commonOption.options;
|
|
3332
|
-
}), i =
|
|
3333
|
-
|
|
3456
|
+
}), i = N(() => {
|
|
3457
|
+
const { varietyMarket: c } = r.value;
|
|
3458
|
+
return c ? a.value.marketIds.options.filter((s) => s.varietyMarketIds.includes(c)) : a.value.marketIds.options;
|
|
3459
|
+
}), p = N(() => a.value.customTag.options), V = (c) => {
|
|
3460
|
+
["commonOption", "marketIds", "customTag", "factorScreen", "commonIndicator"].includes(c) ? r.value[c] = [] : r.value[c] = null;
|
|
3334
3461
|
};
|
|
3335
|
-
return
|
|
3462
|
+
return ve(
|
|
3336
3463
|
() => o.value,
|
|
3337
|
-
(
|
|
3338
|
-
r.value.commonOption.length && (r.value.commonOption = r.value.commonOption.filter((
|
|
3464
|
+
(c) => {
|
|
3465
|
+
r.value.commonOption.length && (r.value.commonOption = r.value.commonOption.filter((s) => c.find(({ value: x }) => x === s)));
|
|
3466
|
+
}
|
|
3467
|
+
), ve(
|
|
3468
|
+
() => i.value,
|
|
3469
|
+
(c) => {
|
|
3470
|
+
r.value.marketIds.length && (r.value.marketIds = r.value.marketIds.filter((s) => c.find(({ value: x }) => x === s)));
|
|
3339
3471
|
}
|
|
3340
3472
|
), e({
|
|
3341
3473
|
// 生成接口传参结构的数据
|
|
3342
|
-
formatData: (
|
|
3343
|
-
var
|
|
3474
|
+
formatData: (c) => {
|
|
3475
|
+
var x, _, f, v, h;
|
|
3344
3476
|
console.log("%c[st-varietySearch]: 正在生成接口传参结构的数据...", "color: tomato");
|
|
3345
|
-
const
|
|
3346
|
-
if (
|
|
3347
|
-
const { factorScreen:
|
|
3348
|
-
(
|
|
3477
|
+
const s = {};
|
|
3478
|
+
if (c.varietyMarket && (s.exchangeId = String(c.varietyMarket)), (x = c.commonOption) != null && x.length && (s.optionId = c.commonOption.join(",")), (_ = c.marketIds) != null && _.length && (s.marketIds = c.marketIds), (f = c.customTag) != null && f.length && (s.tagIds = c.customTag), (v = a.value.factorScreen) != null && v.show) {
|
|
3479
|
+
const { factorScreen: d } = c;
|
|
3480
|
+
(h = d == null ? void 0 : d.list) != null && h.length && (s.tbFeatureFactorScores = d.list.map((g) => ({
|
|
3349
3481
|
freqId: g.cycle,
|
|
3350
3482
|
factorId: g.factor,
|
|
3351
3483
|
startScore: g.score[0],
|
|
3352
3484
|
endScore: g.score[1]
|
|
3353
|
-
}))),
|
|
3485
|
+
}))), s.enableSql = d.sqlEnable === 1 ? 2 : 1, d.sqlEnable && (s.sql = d.sqlValue);
|
|
3354
3486
|
}
|
|
3355
3487
|
{
|
|
3356
|
-
const
|
|
3357
|
-
const { key:
|
|
3358
|
-
if (
|
|
3359
|
-
let [
|
|
3360
|
-
["", null].includes(
|
|
3361
|
-
column:
|
|
3362
|
-
start:
|
|
3363
|
-
end:
|
|
3488
|
+
const d = ["expireDays", "virtualRealDegree", "yearProfitRate", "impliedVolatility", "levelMultiplier", "turnover", "volume", "openInterest", "optionsCpType", "optionGear"], g = c.commonIndicator.reduce((b, O) => {
|
|
3489
|
+
const { key: G, type: oe, range: le, unit: X } = O;
|
|
3490
|
+
if (G === "dividendYield") {
|
|
3491
|
+
let [m, E] = le;
|
|
3492
|
+
["", null].includes(m) || (m = m / 100), ["", null].includes(E) || (E = E / 100), b.push({
|
|
3493
|
+
column: O.key,
|
|
3494
|
+
start: m,
|
|
3495
|
+
end: E
|
|
3364
3496
|
});
|
|
3365
|
-
} else if (
|
|
3366
|
-
let [
|
|
3367
|
-
if (!["", null].includes(
|
|
3368
|
-
switch (
|
|
3497
|
+
} else if (oe === void 0 && !d.includes(G)) {
|
|
3498
|
+
let [m, E] = le;
|
|
3499
|
+
if (!["", null].includes(m))
|
|
3500
|
+
switch (X[0]) {
|
|
3369
3501
|
case "亿":
|
|
3370
|
-
|
|
3502
|
+
m = m * 1e8;
|
|
3371
3503
|
break;
|
|
3372
3504
|
case "千万":
|
|
3373
|
-
|
|
3505
|
+
m = m * 1e7;
|
|
3374
3506
|
break;
|
|
3375
3507
|
default:
|
|
3376
|
-
|
|
3508
|
+
m = m;
|
|
3377
3509
|
break;
|
|
3378
3510
|
}
|
|
3379
|
-
if (!["", null].includes(
|
|
3380
|
-
switch (
|
|
3511
|
+
if (!["", null].includes(E))
|
|
3512
|
+
switch (X[1]) {
|
|
3381
3513
|
case "亿":
|
|
3382
|
-
|
|
3514
|
+
E = E * 1e8;
|
|
3383
3515
|
break;
|
|
3384
3516
|
case "千万":
|
|
3385
|
-
|
|
3517
|
+
E = E * 1e7;
|
|
3386
3518
|
break;
|
|
3387
3519
|
default:
|
|
3388
|
-
|
|
3520
|
+
E = E;
|
|
3389
3521
|
break;
|
|
3390
3522
|
}
|
|
3391
|
-
|
|
3392
|
-
column:
|
|
3393
|
-
start:
|
|
3394
|
-
end:
|
|
3523
|
+
b.push({
|
|
3524
|
+
column: O.key,
|
|
3525
|
+
start: m,
|
|
3526
|
+
end: E
|
|
3395
3527
|
});
|
|
3396
3528
|
}
|
|
3397
|
-
return
|
|
3529
|
+
return b;
|
|
3398
3530
|
}, []);
|
|
3399
|
-
g.length && (
|
|
3400
|
-
const
|
|
3401
|
-
|
|
3402
|
-
const
|
|
3403
|
-
|
|
3404
|
-
const
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3531
|
+
g.length && (s.query = g);
|
|
3532
|
+
const y = c.commonIndicator.find(({ key: b }) => b === "st");
|
|
3533
|
+
y && (s.st = y.st);
|
|
3534
|
+
const w = c.commonIndicator.find(({ key: b }) => b === "tFeaturelncomes");
|
|
3535
|
+
w && (s.netProfitQueryDto = { ...w, netProfit: w.netProfit * 1e8 });
|
|
3536
|
+
const k = c.commonIndicator.find(({ key: b }) => b === "priceLevels");
|
|
3537
|
+
k && (s.priceLevels = k.priceLevels);
|
|
3538
|
+
const $ = {};
|
|
3539
|
+
c.commonIndicator.forEach((b) => {
|
|
3540
|
+
const { key: O } = b;
|
|
3541
|
+
switch (O) {
|
|
3408
3542
|
case "expireDays":
|
|
3409
|
-
["", null].includes(
|
|
3543
|
+
["", null].includes(b.range[0]) || ($.minExpireDays = b.range[0]), ["", null].includes(b.range[1]) || ($.maxExpireDays = b.range[1]);
|
|
3410
3544
|
break;
|
|
3411
3545
|
case "virtualRealDegree":
|
|
3412
|
-
["", null].includes(
|
|
3546
|
+
["", null].includes(b.range[0]) || ($.minVirtualRealDegree = b.range[0] / 100), ["", null].includes(b.range[1]) || ($.maxVirtualRealDegree = b.range[1] / 100);
|
|
3413
3547
|
break;
|
|
3414
3548
|
case "yearProfitRate":
|
|
3415
|
-
["", null].includes(
|
|
3549
|
+
["", null].includes(b.range[0]) || ($.minYearProfitRate = b.range[0] / 100), ["", null].includes(b.range[1]) || ($.maxYearProfitRate = b.range[1] / 100);
|
|
3416
3550
|
break;
|
|
3417
3551
|
case "impliedVolatility":
|
|
3418
|
-
["", null].includes(
|
|
3552
|
+
["", null].includes(b.range[0]) || ($.minImpliedVolatility = b.range[0] / 100), ["", null].includes(b.range[1]) || ($.maxImpliedVolatility = b.range[1] / 100);
|
|
3419
3553
|
break;
|
|
3420
3554
|
case "levelMultiplier":
|
|
3421
|
-
["", null].includes(
|
|
3555
|
+
["", null].includes(b.range[0]) || ($.minLevelMultiplier = b.range[0]), ["", null].includes(b.range[1]) || ($.maxLevelMultiplier = b.range[1]);
|
|
3422
3556
|
break;
|
|
3423
3557
|
case "turnover":
|
|
3424
|
-
["", null].includes(
|
|
3558
|
+
["", null].includes(b.range[0]) || ($.minTurnover = b.range[0] * 1e4), ["", null].includes(b.range[1]) || ($.maxTurnover = b.range[1] * 1e4);
|
|
3425
3559
|
break;
|
|
3426
3560
|
case "volume":
|
|
3427
|
-
["", null].includes(
|
|
3561
|
+
["", null].includes(b.range[0]) || ($.minVolume = b.range[0]), ["", null].includes(b.range[1]) || ($.maxVolume = b.range[1]);
|
|
3428
3562
|
break;
|
|
3429
3563
|
case "openInterest":
|
|
3430
|
-
["", null].includes(
|
|
3564
|
+
["", null].includes(b.range[0]) || ($.minOpenInterest = b.range[0]), ["", null].includes(b.range[1]) || ($.maxOpenInterest = b.range[1]);
|
|
3431
3565
|
break;
|
|
3432
3566
|
case "optionsCpType":
|
|
3433
|
-
|
|
3567
|
+
$.optionsCpType = b.optionsCpType;
|
|
3434
3568
|
break;
|
|
3435
3569
|
case "optionGear":
|
|
3436
|
-
["", null].includes(
|
|
3570
|
+
["", null].includes(b.range[0]) || ($.minOptionGear = b.range[0]), ["", null].includes(b.range[1]) || ($.maxOptionGear = b.range[1]);
|
|
3437
3571
|
break;
|
|
3438
3572
|
}
|
|
3439
|
-
}), Object.keys(
|
|
3573
|
+
}), Object.keys($).length && (s.searchOptionDto = $);
|
|
3440
3574
|
}
|
|
3441
|
-
return console.log("%c[st-varietySearch]: 接口传参数据生成完毕", "color: green",
|
|
3575
|
+
return console.log("%c[st-varietySearch]: 接口传参数据生成完毕", "color: green", s), s;
|
|
3442
3576
|
}
|
|
3443
|
-
}), (
|
|
3444
|
-
var
|
|
3445
|
-
const
|
|
3446
|
-
return
|
|
3447
|
-
(
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
onClick:
|
|
3577
|
+
}), (c, s) => {
|
|
3578
|
+
var h, d, g, y, w;
|
|
3579
|
+
const x = Et, _ = St, f = tr, v = nr;
|
|
3580
|
+
return I(), q("div", si, [
|
|
3581
|
+
(h = a.value.varietyMarket) != null && h.show ? (I(), q("div", ui, [
|
|
3582
|
+
C("div", di, [
|
|
3583
|
+
ci,
|
|
3584
|
+
C("span", {
|
|
3585
|
+
onClick: s[0] || (s[0] = (k) => V("varietyMarket"))
|
|
3452
3586
|
}, "不限")
|
|
3453
3587
|
]),
|
|
3454
|
-
|
|
3588
|
+
F(_, {
|
|
3455
3589
|
modelValue: r.value.varietyMarket,
|
|
3456
|
-
"onUpdate:modelValue":
|
|
3590
|
+
"onUpdate:modelValue": s[1] || (s[1] = (k) => r.value.varietyMarket = k),
|
|
3457
3591
|
size: "small"
|
|
3458
3592
|
}, {
|
|
3459
|
-
default:
|
|
3460
|
-
(
|
|
3461
|
-
label:
|
|
3462
|
-
key:
|
|
3593
|
+
default: S(() => [
|
|
3594
|
+
(I(!0), q(Q, null, se(l.value, ({ label: k, value: $ }) => (I(), U(x, {
|
|
3595
|
+
label: $,
|
|
3596
|
+
key: $
|
|
3463
3597
|
}, {
|
|
3464
|
-
default:
|
|
3465
|
-
|
|
3598
|
+
default: S(() => [
|
|
3599
|
+
j(te(k), 1)
|
|
3466
3600
|
]),
|
|
3467
3601
|
_: 2
|
|
3468
3602
|
}, 1032, ["label"]))), 128))
|
|
3469
3603
|
]),
|
|
3470
3604
|
_: 1
|
|
3471
3605
|
}, 8, ["modelValue"])
|
|
3472
|
-
])) :
|
|
3473
|
-
(
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
onClick:
|
|
3606
|
+
])) : z("", !0),
|
|
3607
|
+
(d = a.value.commonOption) != null && d.show && o.value.length ? (I(), q("div", fi, [
|
|
3608
|
+
C("div", pi, [
|
|
3609
|
+
mi,
|
|
3610
|
+
C("span", {
|
|
3611
|
+
onClick: s[2] || (s[2] = (k) => V("commonOption"))
|
|
3478
3612
|
}, "不限")
|
|
3479
3613
|
]),
|
|
3480
|
-
|
|
3614
|
+
F(v, {
|
|
3481
3615
|
modelValue: r.value.commonOption,
|
|
3482
|
-
"onUpdate:modelValue":
|
|
3616
|
+
"onUpdate:modelValue": s[3] || (s[3] = (k) => r.value.commonOption = k),
|
|
3617
|
+
size: "small"
|
|
3618
|
+
}, {
|
|
3619
|
+
default: S(() => [
|
|
3620
|
+
(I(!0), q(Q, null, se(o.value, ({ label: k, value: $ }) => (I(), U(f, {
|
|
3621
|
+
label: $,
|
|
3622
|
+
key: $
|
|
3623
|
+
}, {
|
|
3624
|
+
default: S(() => [
|
|
3625
|
+
j(te(k), 1)
|
|
3626
|
+
]),
|
|
3627
|
+
_: 2
|
|
3628
|
+
}, 1032, ["label"]))), 128))
|
|
3629
|
+
]),
|
|
3630
|
+
_: 1
|
|
3631
|
+
}, 8, ["modelValue"])
|
|
3632
|
+
])) : z("", !0),
|
|
3633
|
+
(g = a.value.marketIds) != null && g.show && i.value.length ? (I(), q("div", vi, [
|
|
3634
|
+
C("div", gi, [
|
|
3635
|
+
yi,
|
|
3636
|
+
C("span", {
|
|
3637
|
+
onClick: s[4] || (s[4] = (k) => V("marketIds"))
|
|
3638
|
+
}, "不限")
|
|
3639
|
+
]),
|
|
3640
|
+
F(v, {
|
|
3641
|
+
modelValue: r.value.marketIds,
|
|
3642
|
+
"onUpdate:modelValue": s[5] || (s[5] = (k) => r.value.marketIds = k),
|
|
3483
3643
|
size: "small"
|
|
3484
3644
|
}, {
|
|
3485
|
-
default:
|
|
3486
|
-
(
|
|
3487
|
-
label:
|
|
3488
|
-
key:
|
|
3645
|
+
default: S(() => [
|
|
3646
|
+
(I(!0), q(Q, null, se(i.value, ({ label: k, value: $ }) => (I(), U(f, {
|
|
3647
|
+
label: $,
|
|
3648
|
+
key: $
|
|
3489
3649
|
}, {
|
|
3490
|
-
default:
|
|
3491
|
-
|
|
3650
|
+
default: S(() => [
|
|
3651
|
+
j(te(k), 1)
|
|
3492
3652
|
]),
|
|
3493
3653
|
_: 2
|
|
3494
3654
|
}, 1032, ["label"]))), 128))
|
|
3495
3655
|
]),
|
|
3496
3656
|
_: 1
|
|
3497
3657
|
}, 8, ["modelValue"])
|
|
3498
|
-
])) :
|
|
3499
|
-
(
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
onClick:
|
|
3658
|
+
])) : z("", !0),
|
|
3659
|
+
(y = a.value.customTag) != null && y.show && p.value.length ? (I(), q("div", bi, [
|
|
3660
|
+
C("div", hi, [
|
|
3661
|
+
_i,
|
|
3662
|
+
C("span", {
|
|
3663
|
+
onClick: s[6] || (s[6] = (k) => V("customTag"))
|
|
3504
3664
|
}, "不限")
|
|
3505
3665
|
]),
|
|
3506
|
-
|
|
3666
|
+
F(v, {
|
|
3507
3667
|
modelValue: r.value.customTag,
|
|
3508
|
-
"onUpdate:modelValue":
|
|
3668
|
+
"onUpdate:modelValue": s[7] || (s[7] = (k) => r.value.customTag = k),
|
|
3509
3669
|
size: "small"
|
|
3510
3670
|
}, {
|
|
3511
|
-
default:
|
|
3512
|
-
(
|
|
3513
|
-
label:
|
|
3514
|
-
key:
|
|
3671
|
+
default: S(() => [
|
|
3672
|
+
(I(!0), q(Q, null, se(p.value, ({ label: k, value: $ }) => (I(), U(f, {
|
|
3673
|
+
label: $,
|
|
3674
|
+
key: $
|
|
3515
3675
|
}, {
|
|
3516
|
-
default:
|
|
3517
|
-
|
|
3676
|
+
default: S(() => [
|
|
3677
|
+
j(te(k), 1)
|
|
3518
3678
|
]),
|
|
3519
3679
|
_: 2
|
|
3520
3680
|
}, 1032, ["label"]))), 128))
|
|
3521
3681
|
]),
|
|
3522
3682
|
_: 1
|
|
3523
3683
|
}, 8, ["modelValue"])
|
|
3524
|
-
])) :
|
|
3525
|
-
(
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
onClick:
|
|
3684
|
+
])) : z("", !0),
|
|
3685
|
+
(w = a.value.factorScreen) != null && w.show ? (I(), q("div", wi, [
|
|
3686
|
+
C("div", xi, [
|
|
3687
|
+
Oi,
|
|
3688
|
+
C("span", {
|
|
3689
|
+
onClick: s[8] || (s[8] = (k) => V("factorScreen"))
|
|
3530
3690
|
}, "不限")
|
|
3531
3691
|
]),
|
|
3532
|
-
|
|
3692
|
+
F(Rl, {
|
|
3533
3693
|
data: r.value.factorScreen,
|
|
3534
|
-
"onUpdate:data":
|
|
3694
|
+
"onUpdate:data": s[9] || (s[9] = (k) => r.value.factorScreen = k),
|
|
3535
3695
|
config: a.value.factorScreen
|
|
3536
3696
|
}, null, 8, ["data", "config"])
|
|
3537
|
-
])) :
|
|
3538
|
-
|
|
3697
|
+
])) : z("", !0),
|
|
3698
|
+
F(ii, {
|
|
3539
3699
|
data: r.value.commonIndicator,
|
|
3540
|
-
"onUpdate:data":
|
|
3700
|
+
"onUpdate:data": s[10] || (s[10] = (k) => r.value.commonIndicator = k),
|
|
3541
3701
|
varietyMarket: r.value.varietyMarket,
|
|
3542
3702
|
commonOption: r.value.commonOption,
|
|
3543
3703
|
config: a.value.commonIndicator
|
|
@@ -3545,11 +3705,11 @@ const Xe = (n) => (ht("data-v-6f290912"), n = n(), _t(), n), ti = { class: "vari
|
|
|
3545
3705
|
]);
|
|
3546
3706
|
};
|
|
3547
3707
|
}
|
|
3548
|
-
},
|
|
3708
|
+
}, Ii = /* @__PURE__ */ $t(ki, [["__scopeId", "data-v-914f7926"]]), Yi = {
|
|
3549
3709
|
install(n) {
|
|
3550
|
-
n.component("st-varietySearch",
|
|
3710
|
+
n.component("st-varietySearch", Ii);
|
|
3551
3711
|
}
|
|
3552
3712
|
};
|
|
3553
3713
|
export {
|
|
3554
|
-
|
|
3714
|
+
Yi as default
|
|
3555
3715
|
};
|