st-comp 0.0.68 → 0.0.70
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/lib/ChartLayout.cjs.js +1 -0
- package/lib/ChartLayout.es.js +72 -0
- package/lib/Dialog.cjs.js +1 -0
- package/lib/Dialog.es.js +90 -0
- package/lib/HeatMap.cjs.js +1 -0
- package/lib/HeatMap.es.js +118 -0
- package/lib/Kline.cjs.js +1 -0
- package/lib/Kline.es.js +2631 -0
- package/lib/KlineNew.cjs.js +1 -0
- package/lib/KlineNew.es.js +614 -0
- package/lib/LinearLegend.cjs.js +1 -0
- package/lib/LinearLegend.es.js +63 -0
- package/lib/Map.cjs.js +1 -0
- package/lib/{bundle.js → Map.es.js} +43 -41503
- package/lib/Pagination.cjs.js +1 -0
- package/lib/Pagination.es.js +625 -0
- package/lib/Pie.cjs.js +2 -0
- package/lib/Pie.es.js +160 -0
- package/lib/Table.cjs.js +20 -0
- package/lib/Table.es.js +4007 -0
- package/lib/TreeMap.cjs.js +2 -0
- package/lib/TreeMap.es.js +163 -0
- package/lib/VarietySearch.cjs.js +12 -0
- package/lib/VarietySearch.es.js +3336 -0
- package/lib/VirtualTable.cjs.js +13 -0
- package/lib/VirtualTable.es.js +2680 -0
- package/lib/_commonjsHelpers-10dfc225.js +8 -0
- package/lib/_commonjsHelpers-87b0abe8.cjs +1 -0
- package/lib/_plugin-vue_export-helper-dad06003.js +9 -0
- package/lib/_plugin-vue_export-helper-f246444f.cjs +1 -0
- package/lib/base-4865d432.cjs +9 -0
- package/lib/base-a240bf62.js +762 -0
- package/lib/bundle.cjs.js +1 -0
- package/lib/bundle.es.js +46 -0
- package/lib/bundle.umd-4967d574.js +16091 -0
- package/lib/bundle.umd-c5698c50.cjs +71 -0
- package/lib/castArray-3341cbb4.cjs +1 -0
- package/lib/castArray-a723a736.js +10 -0
- package/lib/config-provider-3db4dac6.js +148 -0
- package/lib/config-provider-cf4edc1e.cjs +1 -0
- package/lib/el-button-c24606d0.cjs +1 -0
- package/lib/el-button-fa6a5742.js +231 -0
- package/lib/el-empty-282e5e93.js +204 -0
- package/lib/el-empty-608948d9.cjs +1 -0
- package/lib/el-icon-7718f55e.cjs +1 -0
- package/lib/el-icon-d9ef9ccc.js +592 -0
- package/lib/el-overlay-7fceb816.cjs +5 -0
- package/lib/el-overlay-9b7bdd18.js +678 -0
- package/lib/el-scrollbar-7dc53299.js +248 -0
- package/lib/el-scrollbar-bc381e35.cjs +1 -0
- package/lib/el-select-85ed2643.js +1894 -0
- package/lib/el-select-a50741c1.cjs +9 -0
- package/lib/el-tag-308f715a.js +2416 -0
- package/lib/el-tag-87fd3960.cjs +1 -0
- package/lib/el-tooltip-0ea8fbf8.cjs +1 -0
- package/lib/el-tooltip-4ed993c7.js +1 -0
- package/lib/focus-trap-2a734f35.cjs +3 -0
- package/lib/focus-trap-6922b96b.js +376 -0
- package/lib/index-1508a06b.js +556 -0
- package/lib/index-48a9f60d.cjs +1 -0
- package/lib/index-657047bb.js +513 -0
- package/lib/index-eea0bcb3.cjs +1 -0
- package/lib/index.esm-8d9a2abe.js +2432 -0
- package/lib/index.esm-94a95a2a.cjs +3 -0
- package/lib/raf-5e5c53db.cjs +1 -0
- package/lib/raf-fc8a56cf.js +6 -0
- package/lib/scroll-bb8039ba.cjs +1 -0
- package/lib/scroll-cfdae01b.js +35 -0
- package/lib/style.css +1 -1
- package/lib/typescript-7ae59c4c.js +4 -0
- package/lib/typescript-b63f8e83.cjs +1 -0
- package/lib/vnode-a9714179.js +14 -0
- package/lib/vnode-abafec9e.cjs +1 -0
- package/lib/zh-cn-92978806.js +134 -0
- package/lib/zh-cn-d4df7172.cjs +1 -0
- package/package.json +3 -3
- package/packages/Kline/componentsNew/KlineUtils/index.vue +8 -12
- package/lib/bundle.umd.cjs +0 -139
|
@@ -0,0 +1,3336 @@
|
|
|
1
|
+
import { S as $t, n as Gt, l as Rn, p as Un, b as ce, d as Ve, A as Dn, i as ge, x as We, j as de, u as ye, _ as be, H as _e, t as Kt, I as Yt, J as Bn, v as Ft, w as Ye, f as ft, k as te, g as Ln, E as je, C as Ht, c as zn, D as Wn, K as Gn } from "./base-a240bf62.js";
|
|
2
|
+
import { c as He, k as pt, g as Kn, f as Jt, d as Yn, a as Hn, b as Jn, i as Zn, E as Qn, h as Xn } from "./el-icon-d9ef9ccc.js";
|
|
3
|
+
import { ref as G, computed as T, defineComponent as Z, watch as me, provide as mt, reactive as Je, toRefs as vt, openBlock as k, createElementBlock as A, normalizeClass as U, unref as u, renderSlot as pe, inject as Te, onMounted as Ae, onBeforeUnmount as Zt, onUpdated as Qt, createVNode as V, Fragment as Q, nextTick as Ze, useSlots as er, withCtx as F, createBlock as L, resolveDynamicComponent as Xt, normalizeStyle as Ge, createTextVNode as R, toDisplayString as X, createCommentVNode as K, createElementVNode as N, TransitionGroup as tr, Transition as en, withDirectives as Ie, vShow as tn, isRef as nn, withModifiers as fe, vModelRadio as rn, withKeys as Pe, shallowReactive as nr, isVNode as an, render as Et, mergeModels as gt, useModel as yt, renderList as ie, pushScopeId as bt, popScopeId as ht, createSlots as Vt } from "vue";
|
|
4
|
+
import { E as on } from "./el-overlay-9b7bdd18.js";
|
|
5
|
+
import { b as ln, c as sn, E as un, a as dn } from "./el-select-85ed2643.js";
|
|
6
|
+
import { k as cn, l as fn, s as rr, m as ar, n as or, o as _t, p as Ke, q as pn, c as lr, S as ir, r as sr } from "./el-tag-308f715a.js";
|
|
7
|
+
import { u as mn, a as ur } from "./el-scrollbar-7dc53299.js";
|
|
8
|
+
import { E as vn } from "./el-button-fa6a5742.js";
|
|
9
|
+
import { E as Ce, a as dr, h as cr, g as fr, p as at, i as pr } from "./index-1508a06b.js";
|
|
10
|
+
import { _ as Ot } from "./_plugin-vue_export-helper-dad06003.js";
|
|
11
|
+
import { c as gn, e as Qe, g as wt, h as ot, f as xt, U as ve, C as kt, j as yn, k as bn, l as mr, I as De, a as Fe, i as vr, T as Tt, m as gr, E as yr } from "./focus-trap-6922b96b.js";
|
|
12
|
+
import { c as lt } from "./castArray-a723a736.js";
|
|
13
|
+
import { a as br, g as nt, u as hr, m as Ct } from "./config-provider-3db4dac6.js";
|
|
14
|
+
import { m as _r } from "./typescript-7ae59c4c.js";
|
|
15
|
+
import "./vnode-a9714179.js";
|
|
16
|
+
import "./scroll-cfdae01b.js";
|
|
17
|
+
import "./index-657047bb.js";
|
|
18
|
+
function Or(n, e) {
|
|
19
|
+
for (var t = -1, r = n == null ? 0 : n.length; ++t < r && e(n[t], t, n) !== !1; )
|
|
20
|
+
;
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
function wr(n, e) {
|
|
24
|
+
return n && He(e, cn(e), n);
|
|
25
|
+
}
|
|
26
|
+
function xr(n, e) {
|
|
27
|
+
return n && He(e, pt(e), n);
|
|
28
|
+
}
|
|
29
|
+
function kr(n, e) {
|
|
30
|
+
return He(n, fn(n), e);
|
|
31
|
+
}
|
|
32
|
+
var Ir = Object.getOwnPropertySymbols, Sr = Ir ? function(n) {
|
|
33
|
+
for (var e = []; n; )
|
|
34
|
+
ar(e, fn(n)), n = Kn(n);
|
|
35
|
+
return e;
|
|
36
|
+
} : rr;
|
|
37
|
+
const hn = Sr;
|
|
38
|
+
function $r(n, e) {
|
|
39
|
+
return He(n, hn(n), e);
|
|
40
|
+
}
|
|
41
|
+
function Fr(n) {
|
|
42
|
+
return or(n, pt, hn);
|
|
43
|
+
}
|
|
44
|
+
var Er = Object.prototype, Vr = Er.hasOwnProperty;
|
|
45
|
+
function Tr(n) {
|
|
46
|
+
var e = n.length, t = new n.constructor(e);
|
|
47
|
+
return e && typeof n[0] == "string" && Vr.call(n, "index") && (t.index = n.index, t.input = n.input), t;
|
|
48
|
+
}
|
|
49
|
+
function Cr(n, e) {
|
|
50
|
+
var t = e ? Jt(n.buffer) : n.buffer;
|
|
51
|
+
return new n.constructor(t, n.byteOffset, n.byteLength);
|
|
52
|
+
}
|
|
53
|
+
var Nr = /\w*$/;
|
|
54
|
+
function Ar(n) {
|
|
55
|
+
var e = new n.constructor(n.source, Nr.exec(n));
|
|
56
|
+
return e.lastIndex = n.lastIndex, e;
|
|
57
|
+
}
|
|
58
|
+
var Nt = $t ? $t.prototype : void 0, At = Nt ? Nt.valueOf : void 0;
|
|
59
|
+
function Mr(n) {
|
|
60
|
+
return At ? Object(At.call(n)) : {};
|
|
61
|
+
}
|
|
62
|
+
var jr = "[object Boolean]", Pr = "[object Date]", qr = "[object Map]", Rr = "[object Number]", Ur = "[object RegExp]", Dr = "[object Set]", Br = "[object String]", Lr = "[object Symbol]", zr = "[object ArrayBuffer]", Wr = "[object DataView]", Gr = "[object Float32Array]", Kr = "[object Float64Array]", Yr = "[object Int8Array]", Hr = "[object Int16Array]", Jr = "[object Int32Array]", Zr = "[object Uint8Array]", Qr = "[object Uint8ClampedArray]", Xr = "[object Uint16Array]", ea = "[object Uint32Array]";
|
|
63
|
+
function ta(n, e, t) {
|
|
64
|
+
var r = n.constructor;
|
|
65
|
+
switch (e) {
|
|
66
|
+
case zr:
|
|
67
|
+
return Jt(n);
|
|
68
|
+
case jr:
|
|
69
|
+
case Pr:
|
|
70
|
+
return new r(+n);
|
|
71
|
+
case Wr:
|
|
72
|
+
return Cr(n, t);
|
|
73
|
+
case Gr:
|
|
74
|
+
case Kr:
|
|
75
|
+
case Yr:
|
|
76
|
+
case Hr:
|
|
77
|
+
case Jr:
|
|
78
|
+
case Zr:
|
|
79
|
+
case Qr:
|
|
80
|
+
case Xr:
|
|
81
|
+
case ea:
|
|
82
|
+
return Yn(n, t);
|
|
83
|
+
case qr:
|
|
84
|
+
return new r();
|
|
85
|
+
case Rr:
|
|
86
|
+
case Br:
|
|
87
|
+
return new r(n);
|
|
88
|
+
case Ur:
|
|
89
|
+
return Ar(n);
|
|
90
|
+
case Dr:
|
|
91
|
+
return new r();
|
|
92
|
+
case Lr:
|
|
93
|
+
return Mr(n);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
var na = "[object Map]";
|
|
97
|
+
function ra(n) {
|
|
98
|
+
return Gt(n) && _t(n) == na;
|
|
99
|
+
}
|
|
100
|
+
var Mt = Ke && Ke.isMap, aa = Mt ? pn(Mt) : ra;
|
|
101
|
+
const oa = aa;
|
|
102
|
+
var la = "[object Set]";
|
|
103
|
+
function ia(n) {
|
|
104
|
+
return Gt(n) && _t(n) == la;
|
|
105
|
+
}
|
|
106
|
+
var jt = Ke && Ke.isSet, sa = jt ? pn(jt) : ia;
|
|
107
|
+
const ua = sa;
|
|
108
|
+
var da = 1, ca = 2, fa = 4, _n = "[object Arguments]", pa = "[object Array]", ma = "[object Boolean]", va = "[object Date]", ga = "[object Error]", On = "[object Function]", ya = "[object GeneratorFunction]", ba = "[object Map]", ha = "[object Number]", wn = "[object Object]", _a = "[object RegExp]", Oa = "[object Set]", wa = "[object String]", xa = "[object Symbol]", ka = "[object WeakMap]", Ia = "[object ArrayBuffer]", Sa = "[object DataView]", $a = "[object Float32Array]", Fa = "[object Float64Array]", Ea = "[object Int8Array]", Va = "[object Int16Array]", Ta = "[object Int32Array]", Ca = "[object Uint8Array]", Na = "[object Uint8ClampedArray]", Aa = "[object Uint16Array]", Ma = "[object Uint32Array]", q = {};
|
|
109
|
+
q[_n] = q[pa] = q[Ia] = q[Sa] = q[ma] = q[va] = q[$a] = q[Fa] = q[Ea] = q[Va] = q[Ta] = q[ba] = q[ha] = q[wn] = q[_a] = q[Oa] = q[wa] = q[xa] = q[Ca] = q[Na] = q[Aa] = q[Ma] = !0;
|
|
110
|
+
q[ga] = q[On] = q[ka] = !1;
|
|
111
|
+
function Be(n, e, t, r, a, l) {
|
|
112
|
+
var o, i = e & da, f = e & ca, x = e & fa;
|
|
113
|
+
if (t && (o = a ? t(n, r, a, l) : t(n)), o !== void 0)
|
|
114
|
+
return o;
|
|
115
|
+
if (!Rn(n))
|
|
116
|
+
return n;
|
|
117
|
+
var p = Un(n);
|
|
118
|
+
if (p) {
|
|
119
|
+
if (o = Tr(n), !i)
|
|
120
|
+
return Hn(n, o);
|
|
121
|
+
} else {
|
|
122
|
+
var d = _t(n), _ = d == On || d == ya;
|
|
123
|
+
if (lr(n))
|
|
124
|
+
return Jn(n, i);
|
|
125
|
+
if (d == wn || d == _n || _ && !a) {
|
|
126
|
+
if (o = f || _ ? {} : Zn(n), !i)
|
|
127
|
+
return f ? $r(n, xr(o, n)) : kr(n, wr(o, n));
|
|
128
|
+
} else {
|
|
129
|
+
if (!q[d])
|
|
130
|
+
return a ? n : {};
|
|
131
|
+
o = ta(n, d, i);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
l || (l = new ir());
|
|
135
|
+
var g = l.get(n);
|
|
136
|
+
if (g)
|
|
137
|
+
return g;
|
|
138
|
+
l.set(n, o), ua(n) ? n.forEach(function(m) {
|
|
139
|
+
o.add(Be(m, e, t, m, n, l));
|
|
140
|
+
}) : oa(n) && n.forEach(function(m, s) {
|
|
141
|
+
o.set(s, Be(m, e, t, s, n, l));
|
|
142
|
+
});
|
|
143
|
+
var c = x ? f ? Fr : sr : f ? pt : cn, v = p ? void 0 : c(n);
|
|
144
|
+
return Or(v || n, function(m, s) {
|
|
145
|
+
v && (s = m, m = n[s]), br(o, s, Be(m, e, t, s, n, l));
|
|
146
|
+
}), o;
|
|
147
|
+
}
|
|
148
|
+
var ja = 4;
|
|
149
|
+
function Pt(n) {
|
|
150
|
+
return Be(n, ja);
|
|
151
|
+
}
|
|
152
|
+
const Pa = ce({
|
|
153
|
+
size: {
|
|
154
|
+
type: String,
|
|
155
|
+
values: gn
|
|
156
|
+
},
|
|
157
|
+
disabled: Boolean
|
|
158
|
+
}), qa = ce({
|
|
159
|
+
...Pa,
|
|
160
|
+
model: Object,
|
|
161
|
+
rules: {
|
|
162
|
+
type: Ve(Object)
|
|
163
|
+
},
|
|
164
|
+
labelPosition: {
|
|
165
|
+
type: String,
|
|
166
|
+
values: ["left", "right", "top"],
|
|
167
|
+
default: "right"
|
|
168
|
+
},
|
|
169
|
+
requireAsteriskPosition: {
|
|
170
|
+
type: String,
|
|
171
|
+
values: ["left", "right"],
|
|
172
|
+
default: "left"
|
|
173
|
+
},
|
|
174
|
+
labelWidth: {
|
|
175
|
+
type: [String, Number],
|
|
176
|
+
default: ""
|
|
177
|
+
},
|
|
178
|
+
labelSuffix: {
|
|
179
|
+
type: String,
|
|
180
|
+
default: ""
|
|
181
|
+
},
|
|
182
|
+
inline: Boolean,
|
|
183
|
+
inlineMessage: Boolean,
|
|
184
|
+
statusIcon: Boolean,
|
|
185
|
+
showMessage: {
|
|
186
|
+
type: Boolean,
|
|
187
|
+
default: !0
|
|
188
|
+
},
|
|
189
|
+
validateOnRuleChange: {
|
|
190
|
+
type: Boolean,
|
|
191
|
+
default: !0
|
|
192
|
+
},
|
|
193
|
+
hideRequiredAsterisk: Boolean,
|
|
194
|
+
scrollToError: Boolean,
|
|
195
|
+
scrollIntoViewOptions: {
|
|
196
|
+
type: [Object, Boolean]
|
|
197
|
+
}
|
|
198
|
+
}), Ra = {
|
|
199
|
+
validate: (n, e, t) => (Dn(n) || ge(n)) && We(e) && ge(t)
|
|
200
|
+
}, Ua = "ElForm";
|
|
201
|
+
function Da() {
|
|
202
|
+
const n = G([]), e = T(() => {
|
|
203
|
+
if (!n.value.length)
|
|
204
|
+
return "0";
|
|
205
|
+
const l = Math.max(...n.value);
|
|
206
|
+
return l ? `${l}px` : "";
|
|
207
|
+
});
|
|
208
|
+
function t(l) {
|
|
209
|
+
const o = n.value.indexOf(l);
|
|
210
|
+
return o === -1 && e.value === "0" && de(Ua, `unexpected width ${l}`), o;
|
|
211
|
+
}
|
|
212
|
+
function r(l, o) {
|
|
213
|
+
if (l && o) {
|
|
214
|
+
const i = t(o);
|
|
215
|
+
n.value.splice(i, 1, l);
|
|
216
|
+
} else
|
|
217
|
+
l && n.value.push(l);
|
|
218
|
+
}
|
|
219
|
+
function a(l) {
|
|
220
|
+
const o = t(l);
|
|
221
|
+
o > -1 && n.value.splice(o, 1);
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
autoLabelWidth: e,
|
|
225
|
+
registerLabelWidth: r,
|
|
226
|
+
deregisterLabelWidth: a
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
const qe = (n, e) => {
|
|
230
|
+
const t = lt(e);
|
|
231
|
+
return t.length > 0 ? n.filter((r) => r.prop && t.includes(r.prop)) : n;
|
|
232
|
+
}, Le = "ElForm", Ba = Z({
|
|
233
|
+
name: Le
|
|
234
|
+
}), La = /* @__PURE__ */ Z({
|
|
235
|
+
...Ba,
|
|
236
|
+
props: qa,
|
|
237
|
+
emits: Ra,
|
|
238
|
+
setup(n, { expose: e, emit: t }) {
|
|
239
|
+
const r = n, a = [], l = Qe(), o = ye("form"), i = T(() => {
|
|
240
|
+
const { labelPosition: w, inline: h } = r;
|
|
241
|
+
return [
|
|
242
|
+
o.b(),
|
|
243
|
+
o.m(l.value || "default"),
|
|
244
|
+
{
|
|
245
|
+
[o.m(`label-${w}`)]: w,
|
|
246
|
+
[o.m("inline")]: h
|
|
247
|
+
}
|
|
248
|
+
];
|
|
249
|
+
}), f = (w) => {
|
|
250
|
+
a.push(w);
|
|
251
|
+
}, x = (w) => {
|
|
252
|
+
w.prop && a.splice(a.indexOf(w), 1);
|
|
253
|
+
}, p = (w = []) => {
|
|
254
|
+
if (!r.model) {
|
|
255
|
+
de(Le, "model is required for resetFields to work.");
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
qe(a, w).forEach((h) => h.resetField());
|
|
259
|
+
}, d = (w = []) => {
|
|
260
|
+
qe(a, w).forEach((h) => h.clearValidate());
|
|
261
|
+
}, _ = T(() => {
|
|
262
|
+
const w = !!r.model;
|
|
263
|
+
return w || de(Le, "model is required for validate to work."), w;
|
|
264
|
+
}), g = (w) => {
|
|
265
|
+
if (a.length === 0)
|
|
266
|
+
return [];
|
|
267
|
+
const h = qe(a, w);
|
|
268
|
+
return h.length ? h : (de(Le, "please pass correct props!"), []);
|
|
269
|
+
}, c = async (w) => m(void 0, w), v = async (w = []) => {
|
|
270
|
+
if (!_.value)
|
|
271
|
+
return !1;
|
|
272
|
+
const h = g(w);
|
|
273
|
+
if (h.length === 0)
|
|
274
|
+
return !0;
|
|
275
|
+
let O = {};
|
|
276
|
+
for (const S of h)
|
|
277
|
+
try {
|
|
278
|
+
await S.validate("");
|
|
279
|
+
} catch (C) {
|
|
280
|
+
O = {
|
|
281
|
+
...O,
|
|
282
|
+
...C
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
return Object.keys(O).length === 0 ? !0 : Promise.reject(O);
|
|
286
|
+
}, m = async (w = [], h) => {
|
|
287
|
+
const O = !_e(h);
|
|
288
|
+
try {
|
|
289
|
+
const S = await v(w);
|
|
290
|
+
return S === !0 && (h == null || h(S)), S;
|
|
291
|
+
} catch (S) {
|
|
292
|
+
if (S instanceof Error)
|
|
293
|
+
throw S;
|
|
294
|
+
const C = S;
|
|
295
|
+
return r.scrollToError && s(Object.keys(C)[0]), h == null || h(!1, C), O && Promise.reject(C);
|
|
296
|
+
}
|
|
297
|
+
}, s = (w) => {
|
|
298
|
+
var h;
|
|
299
|
+
const O = qe(a, w)[0];
|
|
300
|
+
O && ((h = O.$el) == null || h.scrollIntoView(r.scrollIntoViewOptions));
|
|
301
|
+
};
|
|
302
|
+
return me(() => r.rules, () => {
|
|
303
|
+
r.validateOnRuleChange && c().catch((w) => de(w));
|
|
304
|
+
}, { deep: !0 }), mt(wt, Je({
|
|
305
|
+
...vt(r),
|
|
306
|
+
emit: t,
|
|
307
|
+
resetFields: p,
|
|
308
|
+
clearValidate: d,
|
|
309
|
+
validateField: m,
|
|
310
|
+
addField: f,
|
|
311
|
+
removeField: x,
|
|
312
|
+
...Da()
|
|
313
|
+
})), e({
|
|
314
|
+
validate: c,
|
|
315
|
+
validateField: m,
|
|
316
|
+
resetFields: p,
|
|
317
|
+
clearValidate: d,
|
|
318
|
+
scrollToField: s
|
|
319
|
+
}), (w, h) => (k(), A("form", {
|
|
320
|
+
class: U(u(i))
|
|
321
|
+
}, [
|
|
322
|
+
pe(w.$slots, "default")
|
|
323
|
+
], 2));
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
var za = /* @__PURE__ */ be(La, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);
|
|
327
|
+
function he() {
|
|
328
|
+
return he = Object.assign ? Object.assign.bind() : function(n) {
|
|
329
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
330
|
+
var t = arguments[e];
|
|
331
|
+
for (var r in t)
|
|
332
|
+
Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
333
|
+
}
|
|
334
|
+
return n;
|
|
335
|
+
}, he.apply(this, arguments);
|
|
336
|
+
}
|
|
337
|
+
function Wa(n, e) {
|
|
338
|
+
n.prototype = Object.create(e.prototype), n.prototype.constructor = n, Ne(n, e);
|
|
339
|
+
}
|
|
340
|
+
function it(n) {
|
|
341
|
+
return it = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
342
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
343
|
+
}, it(n);
|
|
344
|
+
}
|
|
345
|
+
function Ne(n, e) {
|
|
346
|
+
return Ne = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, a) {
|
|
347
|
+
return r.__proto__ = a, r;
|
|
348
|
+
}, Ne(n, e);
|
|
349
|
+
}
|
|
350
|
+
function Ga() {
|
|
351
|
+
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
352
|
+
return !1;
|
|
353
|
+
if (typeof Proxy == "function")
|
|
354
|
+
return !0;
|
|
355
|
+
try {
|
|
356
|
+
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
357
|
+
})), !0;
|
|
358
|
+
} catch {
|
|
359
|
+
return !1;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
function ze(n, e, t) {
|
|
363
|
+
return Ga() ? ze = Reflect.construct.bind() : ze = function(a, l, o) {
|
|
364
|
+
var i = [null];
|
|
365
|
+
i.push.apply(i, l);
|
|
366
|
+
var f = Function.bind.apply(a, i), x = new f();
|
|
367
|
+
return o && Ne(x, o.prototype), x;
|
|
368
|
+
}, ze.apply(null, arguments);
|
|
369
|
+
}
|
|
370
|
+
function Ka(n) {
|
|
371
|
+
return Function.toString.call(n).indexOf("[native code]") !== -1;
|
|
372
|
+
}
|
|
373
|
+
function st(n) {
|
|
374
|
+
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
375
|
+
return st = function(r) {
|
|
376
|
+
if (r === null || !Ka(r))
|
|
377
|
+
return r;
|
|
378
|
+
if (typeof r != "function")
|
|
379
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
380
|
+
if (typeof e < "u") {
|
|
381
|
+
if (e.has(r))
|
|
382
|
+
return e.get(r);
|
|
383
|
+
e.set(r, a);
|
|
384
|
+
}
|
|
385
|
+
function a() {
|
|
386
|
+
return ze(r, arguments, it(this).constructor);
|
|
387
|
+
}
|
|
388
|
+
return a.prototype = Object.create(r.prototype, {
|
|
389
|
+
constructor: {
|
|
390
|
+
value: a,
|
|
391
|
+
enumerable: !1,
|
|
392
|
+
writable: !0,
|
|
393
|
+
configurable: !0
|
|
394
|
+
}
|
|
395
|
+
}), Ne(a, r);
|
|
396
|
+
}, st(n);
|
|
397
|
+
}
|
|
398
|
+
var Ya = /%[sdj%]/g, xn = function() {
|
|
399
|
+
};
|
|
400
|
+
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (xn = function(e, t) {
|
|
401
|
+
typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && t.every(function(r) {
|
|
402
|
+
return typeof r == "string";
|
|
403
|
+
}) && console.warn(e, t);
|
|
404
|
+
});
|
|
405
|
+
function ut(n) {
|
|
406
|
+
if (!n || !n.length)
|
|
407
|
+
return null;
|
|
408
|
+
var e = {};
|
|
409
|
+
return n.forEach(function(t) {
|
|
410
|
+
var r = t.field;
|
|
411
|
+
e[r] = e[r] || [], e[r].push(t);
|
|
412
|
+
}), e;
|
|
413
|
+
}
|
|
414
|
+
function oe(n) {
|
|
415
|
+
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
|
|
416
|
+
t[r - 1] = arguments[r];
|
|
417
|
+
var a = 0, l = t.length;
|
|
418
|
+
if (typeof n == "function")
|
|
419
|
+
return n.apply(null, t);
|
|
420
|
+
if (typeof n == "string") {
|
|
421
|
+
var o = n.replace(Ya, function(i) {
|
|
422
|
+
if (i === "%%")
|
|
423
|
+
return "%";
|
|
424
|
+
if (a >= l)
|
|
425
|
+
return i;
|
|
426
|
+
switch (i) {
|
|
427
|
+
case "%s":
|
|
428
|
+
return String(t[a++]);
|
|
429
|
+
case "%d":
|
|
430
|
+
return Number(t[a++]);
|
|
431
|
+
case "%j":
|
|
432
|
+
try {
|
|
433
|
+
return JSON.stringify(t[a++]);
|
|
434
|
+
} catch {
|
|
435
|
+
return "[Circular]";
|
|
436
|
+
}
|
|
437
|
+
break;
|
|
438
|
+
default:
|
|
439
|
+
return i;
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
return o;
|
|
443
|
+
}
|
|
444
|
+
return n;
|
|
445
|
+
}
|
|
446
|
+
function Ha(n) {
|
|
447
|
+
return n === "string" || n === "url" || n === "hex" || n === "email" || n === "date" || n === "pattern";
|
|
448
|
+
}
|
|
449
|
+
function Y(n, e) {
|
|
450
|
+
return !!(n == null || e === "array" && Array.isArray(n) && !n.length || Ha(e) && typeof n == "string" && !n);
|
|
451
|
+
}
|
|
452
|
+
function Ja(n, e, t) {
|
|
453
|
+
var r = [], a = 0, l = n.length;
|
|
454
|
+
function o(i) {
|
|
455
|
+
r.push.apply(r, i || []), a++, a === l && t(r);
|
|
456
|
+
}
|
|
457
|
+
n.forEach(function(i) {
|
|
458
|
+
e(i, o);
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
function qt(n, e, t) {
|
|
462
|
+
var r = 0, a = n.length;
|
|
463
|
+
function l(o) {
|
|
464
|
+
if (o && o.length) {
|
|
465
|
+
t(o);
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
var i = r;
|
|
469
|
+
r = r + 1, i < a ? e(n[i], l) : t([]);
|
|
470
|
+
}
|
|
471
|
+
l([]);
|
|
472
|
+
}
|
|
473
|
+
function Za(n) {
|
|
474
|
+
var e = [];
|
|
475
|
+
return Object.keys(n).forEach(function(t) {
|
|
476
|
+
e.push.apply(e, n[t] || []);
|
|
477
|
+
}), e;
|
|
478
|
+
}
|
|
479
|
+
var Rt = /* @__PURE__ */ function(n) {
|
|
480
|
+
Wa(e, n);
|
|
481
|
+
function e(t, r) {
|
|
482
|
+
var a;
|
|
483
|
+
return a = n.call(this, "Async Validation Error") || this, a.errors = t, a.fields = r, a;
|
|
484
|
+
}
|
|
485
|
+
return e;
|
|
486
|
+
}(/* @__PURE__ */ st(Error));
|
|
487
|
+
function Qa(n, e, t, r, a) {
|
|
488
|
+
if (e.first) {
|
|
489
|
+
var l = new Promise(function(_, g) {
|
|
490
|
+
var c = function(s) {
|
|
491
|
+
return r(s), s.length ? g(new Rt(s, ut(s))) : _(a);
|
|
492
|
+
}, v = Za(n);
|
|
493
|
+
qt(v, t, c);
|
|
494
|
+
});
|
|
495
|
+
return l.catch(function(_) {
|
|
496
|
+
return _;
|
|
497
|
+
}), l;
|
|
498
|
+
}
|
|
499
|
+
var o = e.firstFields === !0 ? Object.keys(n) : e.firstFields || [], i = Object.keys(n), f = i.length, x = 0, p = [], d = new Promise(function(_, g) {
|
|
500
|
+
var c = function(m) {
|
|
501
|
+
if (p.push.apply(p, m), x++, x === f)
|
|
502
|
+
return r(p), p.length ? g(new Rt(p, ut(p))) : _(a);
|
|
503
|
+
};
|
|
504
|
+
i.length || (r(p), _(a)), i.forEach(function(v) {
|
|
505
|
+
var m = n[v];
|
|
506
|
+
o.indexOf(v) !== -1 ? qt(m, t, c) : Ja(m, t, c);
|
|
507
|
+
});
|
|
508
|
+
});
|
|
509
|
+
return d.catch(function(_) {
|
|
510
|
+
return _;
|
|
511
|
+
}), d;
|
|
512
|
+
}
|
|
513
|
+
function Xa(n) {
|
|
514
|
+
return !!(n && n.message !== void 0);
|
|
515
|
+
}
|
|
516
|
+
function eo(n, e) {
|
|
517
|
+
for (var t = n, r = 0; r < e.length; r++) {
|
|
518
|
+
if (t == null)
|
|
519
|
+
return t;
|
|
520
|
+
t = t[e[r]];
|
|
521
|
+
}
|
|
522
|
+
return t;
|
|
523
|
+
}
|
|
524
|
+
function Ut(n, e) {
|
|
525
|
+
return function(t) {
|
|
526
|
+
var r;
|
|
527
|
+
return n.fullFields ? r = eo(e, n.fullFields) : r = e[t.field || n.fullField], Xa(t) ? (t.field = t.field || n.fullField, t.fieldValue = r, t) : {
|
|
528
|
+
message: typeof t == "function" ? t() : t,
|
|
529
|
+
fieldValue: r,
|
|
530
|
+
field: t.field || n.fullField
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
function Dt(n, e) {
|
|
535
|
+
if (e) {
|
|
536
|
+
for (var t in e)
|
|
537
|
+
if (e.hasOwnProperty(t)) {
|
|
538
|
+
var r = e[t];
|
|
539
|
+
typeof r == "object" && typeof n[t] == "object" ? n[t] = he({}, n[t], r) : n[t] = r;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
return n;
|
|
543
|
+
}
|
|
544
|
+
var kn = function(e, t, r, a, l, o) {
|
|
545
|
+
e.required && (!r.hasOwnProperty(e.field) || Y(t, o || e.type)) && a.push(oe(l.messages.required, e.fullField));
|
|
546
|
+
}, to = function(e, t, r, a, l) {
|
|
547
|
+
(/^\s+$/.test(t) || t === "") && a.push(oe(l.messages.whitespace, e.fullField));
|
|
548
|
+
}, Re, no = function() {
|
|
549
|
+
if (Re)
|
|
550
|
+
return Re;
|
|
551
|
+
var n = "[a-fA-F\\d:]", e = function(O) {
|
|
552
|
+
return O && O.includeBoundaries ? "(?:(?<=\\s|^)(?=" + n + ")|(?<=" + n + ")(?=\\s|$))" : "";
|
|
553
|
+
}, 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 = (`
|
|
554
|
+
(?:
|
|
555
|
+
(?:` + r + ":){7}(?:" + r + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
556
|
+
(?:` + r + ":){6}(?:" + t + "|:" + r + `|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
557
|
+
(?:` + r + ":){5}(?::" + t + "|(?::" + r + `){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
558
|
+
(?:` + r + ":){4}(?:(?::" + r + "){0,1}:" + t + "|(?::" + r + `){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
559
|
+
(?:` + r + ":){3}(?:(?::" + r + "){0,2}:" + t + "|(?::" + r + `){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
560
|
+
(?:` + r + ":){2}(?:(?::" + r + "){0,3}:" + t + "|(?::" + r + `){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
561
|
+
(?:` + 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
|
|
562
|
+
(?::(?:(?::` + 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
|
|
563
|
+
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
564
|
+
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), l = new RegExp("(?:^" + t + "$)|(?:^" + a + "$)"), o = new RegExp("^" + t + "$"), i = new RegExp("^" + a + "$"), f = function(O) {
|
|
565
|
+
return O && O.exact ? l : new RegExp("(?:" + e(O) + t + e(O) + ")|(?:" + e(O) + a + e(O) + ")", "g");
|
|
566
|
+
};
|
|
567
|
+
f.v4 = function(h) {
|
|
568
|
+
return h && h.exact ? o : new RegExp("" + e(h) + t + e(h), "g");
|
|
569
|
+
}, f.v6 = function(h) {
|
|
570
|
+
return h && h.exact ? i : new RegExp("" + e(h) + a + e(h), "g");
|
|
571
|
+
};
|
|
572
|
+
var x = "(?:(?:[a-z]+:)?//)", p = "(?:\\S+(?::\\S*)?@)?", d = f.v4().source, _ = f.v6().source, g = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", c = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", v = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", m = "(?::\\d{2,5})?", s = '(?:[/?#][^\\s"]*)?', w = "(?:" + x + "|www\\.)" + p + "(?:localhost|" + d + "|" + _ + "|" + g + c + v + ")" + m + s;
|
|
573
|
+
return Re = new RegExp("(?:^" + w + "$)", "i"), Re;
|
|
574
|
+
}, Bt = {
|
|
575
|
+
// http://emailregex.com/
|
|
576
|
+
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,}))$/,
|
|
577
|
+
// url: new RegExp(
|
|
578
|
+
// '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
|
|
579
|
+
// 'i',
|
|
580
|
+
// ),
|
|
581
|
+
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
582
|
+
}, $e = {
|
|
583
|
+
integer: function(e) {
|
|
584
|
+
return $e.number(e) && parseInt(e, 10) === e;
|
|
585
|
+
},
|
|
586
|
+
float: function(e) {
|
|
587
|
+
return $e.number(e) && !$e.integer(e);
|
|
588
|
+
},
|
|
589
|
+
array: function(e) {
|
|
590
|
+
return Array.isArray(e);
|
|
591
|
+
},
|
|
592
|
+
regexp: function(e) {
|
|
593
|
+
if (e instanceof RegExp)
|
|
594
|
+
return !0;
|
|
595
|
+
try {
|
|
596
|
+
return !!new RegExp(e);
|
|
597
|
+
} catch {
|
|
598
|
+
return !1;
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
date: function(e) {
|
|
602
|
+
return typeof e.getTime == "function" && typeof e.getMonth == "function" && typeof e.getYear == "function" && !isNaN(e.getTime());
|
|
603
|
+
},
|
|
604
|
+
number: function(e) {
|
|
605
|
+
return isNaN(e) ? !1 : typeof e == "number";
|
|
606
|
+
},
|
|
607
|
+
object: function(e) {
|
|
608
|
+
return typeof e == "object" && !$e.array(e);
|
|
609
|
+
},
|
|
610
|
+
method: function(e) {
|
|
611
|
+
return typeof e == "function";
|
|
612
|
+
},
|
|
613
|
+
email: function(e) {
|
|
614
|
+
return typeof e == "string" && e.length <= 320 && !!e.match(Bt.email);
|
|
615
|
+
},
|
|
616
|
+
url: function(e) {
|
|
617
|
+
return typeof e == "string" && e.length <= 2048 && !!e.match(no());
|
|
618
|
+
},
|
|
619
|
+
hex: function(e) {
|
|
620
|
+
return typeof e == "string" && !!e.match(Bt.hex);
|
|
621
|
+
}
|
|
622
|
+
}, ro = function(e, t, r, a, l) {
|
|
623
|
+
if (e.required && t === void 0) {
|
|
624
|
+
kn(e, t, r, a, l);
|
|
625
|
+
return;
|
|
626
|
+
}
|
|
627
|
+
var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], i = e.type;
|
|
628
|
+
o.indexOf(i) > -1 ? $e[i](t) || a.push(oe(l.messages.types[i], e.fullField, e.type)) : i && typeof t !== e.type && a.push(oe(l.messages.types[i], e.fullField, e.type));
|
|
629
|
+
}, ao = function(e, t, r, a, l) {
|
|
630
|
+
var o = typeof e.len == "number", i = typeof e.min == "number", f = typeof e.max == "number", x = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, p = t, d = null, _ = typeof t == "number", g = typeof t == "string", c = Array.isArray(t);
|
|
631
|
+
if (_ ? d = "number" : g ? d = "string" : c && (d = "array"), !d)
|
|
632
|
+
return !1;
|
|
633
|
+
c && (p = t.length), g && (p = t.replace(x, "_").length), o ? p !== e.len && a.push(oe(l.messages[d].len, e.fullField, e.len)) : i && !f && p < e.min ? a.push(oe(l.messages[d].min, e.fullField, e.min)) : f && !i && p > e.max ? a.push(oe(l.messages[d].max, e.fullField, e.max)) : i && f && (p < e.min || p > e.max) && a.push(oe(l.messages[d].range, e.fullField, e.min, e.max));
|
|
634
|
+
}, ke = "enum", oo = function(e, t, r, a, l) {
|
|
635
|
+
e[ke] = Array.isArray(e[ke]) ? e[ke] : [], e[ke].indexOf(t) === -1 && a.push(oe(l.messages[ke], e.fullField, e[ke].join(", ")));
|
|
636
|
+
}, lo = function(e, t, r, a, l) {
|
|
637
|
+
if (e.pattern) {
|
|
638
|
+
if (e.pattern instanceof RegExp)
|
|
639
|
+
e.pattern.lastIndex = 0, e.pattern.test(t) || a.push(oe(l.messages.pattern.mismatch, e.fullField, t, e.pattern));
|
|
640
|
+
else if (typeof e.pattern == "string") {
|
|
641
|
+
var o = new RegExp(e.pattern);
|
|
642
|
+
o.test(t) || a.push(oe(l.messages.pattern.mismatch, e.fullField, t, e.pattern));
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
}, M = {
|
|
646
|
+
required: kn,
|
|
647
|
+
whitespace: to,
|
|
648
|
+
type: ro,
|
|
649
|
+
range: ao,
|
|
650
|
+
enum: oo,
|
|
651
|
+
pattern: lo
|
|
652
|
+
}, io = function(e, t, r, a, l) {
|
|
653
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
654
|
+
if (i) {
|
|
655
|
+
if (Y(t, "string") && !e.required)
|
|
656
|
+
return r();
|
|
657
|
+
M.required(e, t, a, o, l, "string"), Y(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));
|
|
658
|
+
}
|
|
659
|
+
r(o);
|
|
660
|
+
}, so = function(e, t, r, a, l) {
|
|
661
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
662
|
+
if (i) {
|
|
663
|
+
if (Y(t) && !e.required)
|
|
664
|
+
return r();
|
|
665
|
+
M.required(e, t, a, o, l), t !== void 0 && M.type(e, t, a, o, l);
|
|
666
|
+
}
|
|
667
|
+
r(o);
|
|
668
|
+
}, uo = function(e, t, r, a, l) {
|
|
669
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
670
|
+
if (i) {
|
|
671
|
+
if (t === "" && (t = void 0), Y(t) && !e.required)
|
|
672
|
+
return r();
|
|
673
|
+
M.required(e, t, a, o, l), t !== void 0 && (M.type(e, t, a, o, l), M.range(e, t, a, o, l));
|
|
674
|
+
}
|
|
675
|
+
r(o);
|
|
676
|
+
}, co = function(e, t, r, a, l) {
|
|
677
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
678
|
+
if (i) {
|
|
679
|
+
if (Y(t) && !e.required)
|
|
680
|
+
return r();
|
|
681
|
+
M.required(e, t, a, o, l), t !== void 0 && M.type(e, t, a, o, l);
|
|
682
|
+
}
|
|
683
|
+
r(o);
|
|
684
|
+
}, fo = function(e, t, r, a, l) {
|
|
685
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
686
|
+
if (i) {
|
|
687
|
+
if (Y(t) && !e.required)
|
|
688
|
+
return r();
|
|
689
|
+
M.required(e, t, a, o, l), Y(t) || M.type(e, t, a, o, l);
|
|
690
|
+
}
|
|
691
|
+
r(o);
|
|
692
|
+
}, po = function(e, t, r, a, l) {
|
|
693
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
694
|
+
if (i) {
|
|
695
|
+
if (Y(t) && !e.required)
|
|
696
|
+
return r();
|
|
697
|
+
M.required(e, t, a, o, l), t !== void 0 && (M.type(e, t, a, o, l), M.range(e, t, a, o, l));
|
|
698
|
+
}
|
|
699
|
+
r(o);
|
|
700
|
+
}, mo = function(e, t, r, a, l) {
|
|
701
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
702
|
+
if (i) {
|
|
703
|
+
if (Y(t) && !e.required)
|
|
704
|
+
return r();
|
|
705
|
+
M.required(e, t, a, o, l), t !== void 0 && (M.type(e, t, a, o, l), M.range(e, t, a, o, l));
|
|
706
|
+
}
|
|
707
|
+
r(o);
|
|
708
|
+
}, vo = function(e, t, r, a, l) {
|
|
709
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
710
|
+
if (i) {
|
|
711
|
+
if (t == null && !e.required)
|
|
712
|
+
return r();
|
|
713
|
+
M.required(e, t, a, o, l, "array"), t != null && (M.type(e, t, a, o, l), M.range(e, t, a, o, l));
|
|
714
|
+
}
|
|
715
|
+
r(o);
|
|
716
|
+
}, go = function(e, t, r, a, l) {
|
|
717
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
718
|
+
if (i) {
|
|
719
|
+
if (Y(t) && !e.required)
|
|
720
|
+
return r();
|
|
721
|
+
M.required(e, t, a, o, l), t !== void 0 && M.type(e, t, a, o, l);
|
|
722
|
+
}
|
|
723
|
+
r(o);
|
|
724
|
+
}, yo = "enum", bo = function(e, t, r, a, l) {
|
|
725
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
726
|
+
if (i) {
|
|
727
|
+
if (Y(t) && !e.required)
|
|
728
|
+
return r();
|
|
729
|
+
M.required(e, t, a, o, l), t !== void 0 && M[yo](e, t, a, o, l);
|
|
730
|
+
}
|
|
731
|
+
r(o);
|
|
732
|
+
}, ho = function(e, t, r, a, l) {
|
|
733
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
734
|
+
if (i) {
|
|
735
|
+
if (Y(t, "string") && !e.required)
|
|
736
|
+
return r();
|
|
737
|
+
M.required(e, t, a, o, l), Y(t, "string") || M.pattern(e, t, a, o, l);
|
|
738
|
+
}
|
|
739
|
+
r(o);
|
|
740
|
+
}, _o = function(e, t, r, a, l) {
|
|
741
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
742
|
+
if (i) {
|
|
743
|
+
if (Y(t, "date") && !e.required)
|
|
744
|
+
return r();
|
|
745
|
+
if (M.required(e, t, a, o, l), !Y(t, "date")) {
|
|
746
|
+
var f;
|
|
747
|
+
t instanceof Date ? f = t : f = new Date(t), M.type(e, f, a, o, l), f && M.range(e, f.getTime(), a, o, l);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
r(o);
|
|
751
|
+
}, Oo = function(e, t, r, a, l) {
|
|
752
|
+
var o = [], i = Array.isArray(t) ? "array" : typeof t;
|
|
753
|
+
M.required(e, t, a, o, l, i), r(o);
|
|
754
|
+
}, rt = function(e, t, r, a, l) {
|
|
755
|
+
var o = e.type, i = [], f = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
756
|
+
if (f) {
|
|
757
|
+
if (Y(t, o) && !e.required)
|
|
758
|
+
return r();
|
|
759
|
+
M.required(e, t, a, i, l, o), Y(t, o) || M.type(e, t, a, i, l);
|
|
760
|
+
}
|
|
761
|
+
r(i);
|
|
762
|
+
}, wo = function(e, t, r, a, l) {
|
|
763
|
+
var o = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
764
|
+
if (i) {
|
|
765
|
+
if (Y(t) && !e.required)
|
|
766
|
+
return r();
|
|
767
|
+
M.required(e, t, a, o, l);
|
|
768
|
+
}
|
|
769
|
+
r(o);
|
|
770
|
+
}, Ee = {
|
|
771
|
+
string: io,
|
|
772
|
+
method: so,
|
|
773
|
+
number: uo,
|
|
774
|
+
boolean: co,
|
|
775
|
+
regexp: fo,
|
|
776
|
+
integer: po,
|
|
777
|
+
float: mo,
|
|
778
|
+
array: vo,
|
|
779
|
+
object: go,
|
|
780
|
+
enum: bo,
|
|
781
|
+
pattern: ho,
|
|
782
|
+
date: _o,
|
|
783
|
+
url: rt,
|
|
784
|
+
hex: rt,
|
|
785
|
+
email: rt,
|
|
786
|
+
required: Oo,
|
|
787
|
+
any: wo
|
|
788
|
+
};
|
|
789
|
+
function dt() {
|
|
790
|
+
return {
|
|
791
|
+
default: "Validation error on field %s",
|
|
792
|
+
required: "%s is required",
|
|
793
|
+
enum: "%s must be one of %s",
|
|
794
|
+
whitespace: "%s cannot be empty",
|
|
795
|
+
date: {
|
|
796
|
+
format: "%s date %s is invalid for format %s",
|
|
797
|
+
parse: "%s date could not be parsed, %s is invalid ",
|
|
798
|
+
invalid: "%s date %s is invalid"
|
|
799
|
+
},
|
|
800
|
+
types: {
|
|
801
|
+
string: "%s is not a %s",
|
|
802
|
+
method: "%s is not a %s (function)",
|
|
803
|
+
array: "%s is not an %s",
|
|
804
|
+
object: "%s is not an %s",
|
|
805
|
+
number: "%s is not a %s",
|
|
806
|
+
date: "%s is not a %s",
|
|
807
|
+
boolean: "%s is not a %s",
|
|
808
|
+
integer: "%s is not an %s",
|
|
809
|
+
float: "%s is not a %s",
|
|
810
|
+
regexp: "%s is not a valid %s",
|
|
811
|
+
email: "%s is not a valid %s",
|
|
812
|
+
url: "%s is not a valid %s",
|
|
813
|
+
hex: "%s is not a valid %s"
|
|
814
|
+
},
|
|
815
|
+
string: {
|
|
816
|
+
len: "%s must be exactly %s characters",
|
|
817
|
+
min: "%s must be at least %s characters",
|
|
818
|
+
max: "%s cannot be longer than %s characters",
|
|
819
|
+
range: "%s must be between %s and %s characters"
|
|
820
|
+
},
|
|
821
|
+
number: {
|
|
822
|
+
len: "%s must equal %s",
|
|
823
|
+
min: "%s cannot be less than %s",
|
|
824
|
+
max: "%s cannot be greater than %s",
|
|
825
|
+
range: "%s must be between %s and %s"
|
|
826
|
+
},
|
|
827
|
+
array: {
|
|
828
|
+
len: "%s must be exactly %s in length",
|
|
829
|
+
min: "%s cannot be less than %s in length",
|
|
830
|
+
max: "%s cannot be greater than %s in length",
|
|
831
|
+
range: "%s must be between %s and %s in length"
|
|
832
|
+
},
|
|
833
|
+
pattern: {
|
|
834
|
+
mismatch: "%s value %s does not match pattern %s"
|
|
835
|
+
},
|
|
836
|
+
clone: function() {
|
|
837
|
+
var e = JSON.parse(JSON.stringify(this));
|
|
838
|
+
return e.clone = this.clone, e;
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
}
|
|
842
|
+
var ct = dt(), Me = /* @__PURE__ */ function() {
|
|
843
|
+
function n(t) {
|
|
844
|
+
this.rules = null, this._messages = ct, this.define(t);
|
|
845
|
+
}
|
|
846
|
+
var e = n.prototype;
|
|
847
|
+
return e.define = function(r) {
|
|
848
|
+
var a = this;
|
|
849
|
+
if (!r)
|
|
850
|
+
throw new Error("Cannot configure a schema with no rules");
|
|
851
|
+
if (typeof r != "object" || Array.isArray(r))
|
|
852
|
+
throw new Error("Rules must be an object");
|
|
853
|
+
this.rules = {}, Object.keys(r).forEach(function(l) {
|
|
854
|
+
var o = r[l];
|
|
855
|
+
a.rules[l] = Array.isArray(o) ? o : [o];
|
|
856
|
+
});
|
|
857
|
+
}, e.messages = function(r) {
|
|
858
|
+
return r && (this._messages = Dt(dt(), r)), this._messages;
|
|
859
|
+
}, e.validate = function(r, a, l) {
|
|
860
|
+
var o = this;
|
|
861
|
+
a === void 0 && (a = {}), l === void 0 && (l = function() {
|
|
862
|
+
});
|
|
863
|
+
var i = r, f = a, x = l;
|
|
864
|
+
if (typeof f == "function" && (x = f, f = {}), !this.rules || Object.keys(this.rules).length === 0)
|
|
865
|
+
return x && x(null, i), Promise.resolve(i);
|
|
866
|
+
function p(v) {
|
|
867
|
+
var m = [], s = {};
|
|
868
|
+
function w(O) {
|
|
869
|
+
if (Array.isArray(O)) {
|
|
870
|
+
var S;
|
|
871
|
+
m = (S = m).concat.apply(S, O);
|
|
872
|
+
} else
|
|
873
|
+
m.push(O);
|
|
874
|
+
}
|
|
875
|
+
for (var h = 0; h < v.length; h++)
|
|
876
|
+
w(v[h]);
|
|
877
|
+
m.length ? (s = ut(m), x(m, s)) : x(null, i);
|
|
878
|
+
}
|
|
879
|
+
if (f.messages) {
|
|
880
|
+
var d = this.messages();
|
|
881
|
+
d === ct && (d = dt()), Dt(d, f.messages), f.messages = d;
|
|
882
|
+
} else
|
|
883
|
+
f.messages = this.messages();
|
|
884
|
+
var _ = {}, g = f.keys || Object.keys(this.rules);
|
|
885
|
+
g.forEach(function(v) {
|
|
886
|
+
var m = o.rules[v], s = i[v];
|
|
887
|
+
m.forEach(function(w) {
|
|
888
|
+
var h = w;
|
|
889
|
+
typeof h.transform == "function" && (i === r && (i = he({}, i)), s = i[v] = h.transform(s)), typeof h == "function" ? h = {
|
|
890
|
+
validator: h
|
|
891
|
+
} : h = he({}, h), h.validator = o.getValidationMethod(h), h.validator && (h.field = v, h.fullField = h.fullField || v, h.type = o.getType(h), _[v] = _[v] || [], _[v].push({
|
|
892
|
+
rule: h,
|
|
893
|
+
value: s,
|
|
894
|
+
source: i,
|
|
895
|
+
field: v
|
|
896
|
+
}));
|
|
897
|
+
});
|
|
898
|
+
});
|
|
899
|
+
var c = {};
|
|
900
|
+
return Qa(_, f, function(v, m) {
|
|
901
|
+
var s = v.rule, w = (s.type === "object" || s.type === "array") && (typeof s.fields == "object" || typeof s.defaultField == "object");
|
|
902
|
+
w = w && (s.required || !s.required && v.value), s.field = v.field;
|
|
903
|
+
function h(C, $) {
|
|
904
|
+
return he({}, $, {
|
|
905
|
+
fullField: s.fullField + "." + C,
|
|
906
|
+
fullFields: s.fullFields ? [].concat(s.fullFields, [C]) : [C]
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
function O(C) {
|
|
910
|
+
C === void 0 && (C = []);
|
|
911
|
+
var $ = Array.isArray(C) ? C : [C];
|
|
912
|
+
!f.suppressWarning && $.length && n.warning("async-validator:", $), $.length && s.message !== void 0 && ($ = [].concat(s.message));
|
|
913
|
+
var b = $.map(Ut(s, i));
|
|
914
|
+
if (f.first && b.length)
|
|
915
|
+
return c[s.field] = 1, m(b);
|
|
916
|
+
if (!w)
|
|
917
|
+
m(b);
|
|
918
|
+
else {
|
|
919
|
+
if (s.required && !v.value)
|
|
920
|
+
return s.message !== void 0 ? b = [].concat(s.message).map(Ut(s, i)) : f.error && (b = [f.error(s, oe(f.messages.required, s.field))]), m(b);
|
|
921
|
+
var z = {};
|
|
922
|
+
s.defaultField && Object.keys(v.value).map(function(ae) {
|
|
923
|
+
z[ae] = s.defaultField;
|
|
924
|
+
}), z = he({}, z, v.rule.fields);
|
|
925
|
+
var B = {};
|
|
926
|
+
Object.keys(z).forEach(function(ae) {
|
|
927
|
+
var y = z[ae], I = Array.isArray(y) ? y : [y];
|
|
928
|
+
B[ae] = I.map(h.bind(null, ae));
|
|
929
|
+
});
|
|
930
|
+
var ne = new n(B);
|
|
931
|
+
ne.messages(f.messages), v.rule.options && (v.rule.options.messages = f.messages, v.rule.options.error = f.error), ne.validate(v.value, v.rule.options || f, function(ae) {
|
|
932
|
+
var y = [];
|
|
933
|
+
b && b.length && y.push.apply(y, b), ae && ae.length && y.push.apply(y, ae), m(y.length ? y : null);
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
var S;
|
|
938
|
+
if (s.asyncValidator)
|
|
939
|
+
S = s.asyncValidator(s, v.value, O, v.source, f);
|
|
940
|
+
else if (s.validator) {
|
|
941
|
+
try {
|
|
942
|
+
S = s.validator(s, v.value, O, v.source, f);
|
|
943
|
+
} catch (C) {
|
|
944
|
+
console.error == null || console.error(C), f.suppressValidatorError || setTimeout(function() {
|
|
945
|
+
throw C;
|
|
946
|
+
}, 0), O(C.message);
|
|
947
|
+
}
|
|
948
|
+
S === !0 ? O() : S === !1 ? O(typeof s.message == "function" ? s.message(s.fullField || s.field) : s.message || (s.fullField || s.field) + " fails") : S instanceof Array ? O(S) : S instanceof Error && O(S.message);
|
|
949
|
+
}
|
|
950
|
+
S && S.then && S.then(function() {
|
|
951
|
+
return O();
|
|
952
|
+
}, function(C) {
|
|
953
|
+
return O(C);
|
|
954
|
+
});
|
|
955
|
+
}, function(v) {
|
|
956
|
+
p(v);
|
|
957
|
+
}, i);
|
|
958
|
+
}, e.getType = function(r) {
|
|
959
|
+
if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !Ee.hasOwnProperty(r.type))
|
|
960
|
+
throw new Error(oe("Unknown rule type %s", r.type));
|
|
961
|
+
return r.type || "string";
|
|
962
|
+
}, e.getValidationMethod = function(r) {
|
|
963
|
+
if (typeof r.validator == "function")
|
|
964
|
+
return r.validator;
|
|
965
|
+
var a = Object.keys(r), l = a.indexOf("message");
|
|
966
|
+
return l !== -1 && a.splice(l, 1), a.length === 1 && a[0] === "required" ? Ee.required : Ee[this.getType(r)] || void 0;
|
|
967
|
+
}, n;
|
|
968
|
+
}();
|
|
969
|
+
Me.register = function(e, t) {
|
|
970
|
+
if (typeof t != "function")
|
|
971
|
+
throw new Error("Cannot register a validator by type, validator is not a function");
|
|
972
|
+
Ee[e] = t;
|
|
973
|
+
};
|
|
974
|
+
Me.warning = xn;
|
|
975
|
+
Me.messages = ct;
|
|
976
|
+
Me.validators = Ee;
|
|
977
|
+
const xo = [
|
|
978
|
+
"",
|
|
979
|
+
"error",
|
|
980
|
+
"validating",
|
|
981
|
+
"success"
|
|
982
|
+
], ko = ce({
|
|
983
|
+
label: String,
|
|
984
|
+
labelWidth: {
|
|
985
|
+
type: [String, Number],
|
|
986
|
+
default: ""
|
|
987
|
+
},
|
|
988
|
+
prop: {
|
|
989
|
+
type: Ve([String, Array])
|
|
990
|
+
},
|
|
991
|
+
required: {
|
|
992
|
+
type: Boolean,
|
|
993
|
+
default: void 0
|
|
994
|
+
},
|
|
995
|
+
rules: {
|
|
996
|
+
type: Ve([Object, Array])
|
|
997
|
+
},
|
|
998
|
+
error: String,
|
|
999
|
+
validateStatus: {
|
|
1000
|
+
type: String,
|
|
1001
|
+
values: xo
|
|
1002
|
+
},
|
|
1003
|
+
for: String,
|
|
1004
|
+
inlineMessage: {
|
|
1005
|
+
type: [String, Boolean],
|
|
1006
|
+
default: ""
|
|
1007
|
+
},
|
|
1008
|
+
showMessage: {
|
|
1009
|
+
type: Boolean,
|
|
1010
|
+
default: !0
|
|
1011
|
+
},
|
|
1012
|
+
size: {
|
|
1013
|
+
type: String,
|
|
1014
|
+
values: gn
|
|
1015
|
+
}
|
|
1016
|
+
}), Lt = "ElLabelWrap";
|
|
1017
|
+
var Io = Z({
|
|
1018
|
+
name: Lt,
|
|
1019
|
+
props: {
|
|
1020
|
+
isAutoWidth: Boolean,
|
|
1021
|
+
updateAll: Boolean
|
|
1022
|
+
},
|
|
1023
|
+
setup(n, {
|
|
1024
|
+
slots: e
|
|
1025
|
+
}) {
|
|
1026
|
+
const t = Te(wt, void 0), r = Te(ot);
|
|
1027
|
+
r || Kt(Lt, "usage: <el-form-item><label-wrap /></el-form-item>");
|
|
1028
|
+
const a = ye("form"), l = G(), o = G(0), i = () => {
|
|
1029
|
+
var p;
|
|
1030
|
+
if ((p = l.value) != null && p.firstElementChild) {
|
|
1031
|
+
const d = window.getComputedStyle(l.value.firstElementChild).width;
|
|
1032
|
+
return Math.ceil(Number.parseFloat(d));
|
|
1033
|
+
} else
|
|
1034
|
+
return 0;
|
|
1035
|
+
}, f = (p = "update") => {
|
|
1036
|
+
Ze(() => {
|
|
1037
|
+
e.default && n.isAutoWidth && (p === "update" ? o.value = i() : p === "remove" && (t == null || t.deregisterLabelWidth(o.value)));
|
|
1038
|
+
});
|
|
1039
|
+
}, x = () => f("update");
|
|
1040
|
+
return Ae(() => {
|
|
1041
|
+
x();
|
|
1042
|
+
}), Zt(() => {
|
|
1043
|
+
f("remove");
|
|
1044
|
+
}), Qt(() => x()), me(o, (p, d) => {
|
|
1045
|
+
n.updateAll && (t == null || t.registerLabelWidth(p, d));
|
|
1046
|
+
}), mn(T(() => {
|
|
1047
|
+
var p, d;
|
|
1048
|
+
return (d = (p = l.value) == null ? void 0 : p.firstElementChild) != null ? d : null;
|
|
1049
|
+
}), x), () => {
|
|
1050
|
+
var p, d;
|
|
1051
|
+
if (!e)
|
|
1052
|
+
return null;
|
|
1053
|
+
const {
|
|
1054
|
+
isAutoWidth: _
|
|
1055
|
+
} = n;
|
|
1056
|
+
if (_) {
|
|
1057
|
+
const g = t == null ? void 0 : t.autoLabelWidth, c = r == null ? void 0 : r.hasLabel, v = {};
|
|
1058
|
+
if (c && g && g !== "auto") {
|
|
1059
|
+
const m = Math.max(0, Number.parseInt(g, 10) - o.value), s = t.labelPosition === "left" ? "marginRight" : "marginLeft";
|
|
1060
|
+
m && (v[s] = `${m}px`);
|
|
1061
|
+
}
|
|
1062
|
+
return V("div", {
|
|
1063
|
+
ref: l,
|
|
1064
|
+
class: [a.be("item", "label-wrap")],
|
|
1065
|
+
style: v
|
|
1066
|
+
}, [(p = e.default) == null ? void 0 : p.call(e)]);
|
|
1067
|
+
} else
|
|
1068
|
+
return V(Q, {
|
|
1069
|
+
ref: l
|
|
1070
|
+
}, [(d = e.default) == null ? void 0 : d.call(e)]);
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
});
|
|
1074
|
+
const So = ["role", "aria-labelledby"], $o = Z({
|
|
1075
|
+
name: "ElFormItem"
|
|
1076
|
+
}), Fo = /* @__PURE__ */ Z({
|
|
1077
|
+
...$o,
|
|
1078
|
+
props: ko,
|
|
1079
|
+
setup(n, { expose: e }) {
|
|
1080
|
+
const t = n, r = er(), a = Te(wt, void 0), l = Te(ot, void 0), o = Qe(void 0, { formItem: !1 }), i = ye("form-item"), f = Yt().value, x = G([]), p = G(""), d = Bn(p, 100), _ = G(""), g = G();
|
|
1081
|
+
let c, v = !1;
|
|
1082
|
+
const m = T(() => {
|
|
1083
|
+
if ((a == null ? void 0 : a.labelPosition) === "top")
|
|
1084
|
+
return {};
|
|
1085
|
+
const E = Ft(t.labelWidth || (a == null ? void 0 : a.labelWidth) || "");
|
|
1086
|
+
return E ? { width: E } : {};
|
|
1087
|
+
}), s = T(() => {
|
|
1088
|
+
if ((a == null ? void 0 : a.labelPosition) === "top" || a != null && a.inline)
|
|
1089
|
+
return {};
|
|
1090
|
+
if (!t.label && !t.labelWidth && z)
|
|
1091
|
+
return {};
|
|
1092
|
+
const E = Ft(t.labelWidth || (a == null ? void 0 : a.labelWidth) || "");
|
|
1093
|
+
return !t.label && !r.label ? { marginLeft: E } : {};
|
|
1094
|
+
}), w = T(() => [
|
|
1095
|
+
i.b(),
|
|
1096
|
+
i.m(o.value),
|
|
1097
|
+
i.is("error", p.value === "error"),
|
|
1098
|
+
i.is("validating", p.value === "validating"),
|
|
1099
|
+
i.is("success", p.value === "success"),
|
|
1100
|
+
i.is("required", I.value || t.required),
|
|
1101
|
+
i.is("no-asterisk", a == null ? void 0 : a.hideRequiredAsterisk),
|
|
1102
|
+
(a == null ? void 0 : a.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
|
|
1103
|
+
{ [i.m("feedback")]: a == null ? void 0 : a.statusIcon }
|
|
1104
|
+
]), h = T(() => We(t.inlineMessage) ? t.inlineMessage : (a == null ? void 0 : a.inlineMessage) || !1), O = T(() => [
|
|
1105
|
+
i.e("error"),
|
|
1106
|
+
{ [i.em("error", "inline")]: h.value }
|
|
1107
|
+
]), S = T(() => t.prop ? ge(t.prop) ? t.prop : t.prop.join(".") : ""), C = T(() => !!(t.label || r.label)), $ = T(() => t.for || x.value.length === 1 ? x.value[0] : void 0), b = T(() => !$.value && C.value), z = !!l, B = T(() => {
|
|
1108
|
+
const E = a == null ? void 0 : a.model;
|
|
1109
|
+
if (!(!E || !t.prop))
|
|
1110
|
+
return nt(E, t.prop).value;
|
|
1111
|
+
}), ne = T(() => {
|
|
1112
|
+
const { required: E } = t, P = [];
|
|
1113
|
+
t.rules && P.push(...lt(t.rules));
|
|
1114
|
+
const J = a == null ? void 0 : a.rules;
|
|
1115
|
+
if (J && t.prop) {
|
|
1116
|
+
const H = nt(J, t.prop).value;
|
|
1117
|
+
H && P.push(...lt(H));
|
|
1118
|
+
}
|
|
1119
|
+
if (E !== void 0) {
|
|
1120
|
+
const H = P.map((ue, xe) => [ue, xe]).filter(([ue]) => Object.keys(ue).includes("required"));
|
|
1121
|
+
if (H.length > 0)
|
|
1122
|
+
for (const [ue, xe] of H)
|
|
1123
|
+
ue.required !== E && (P[xe] = { ...ue, required: E });
|
|
1124
|
+
else
|
|
1125
|
+
P.push({ required: E });
|
|
1126
|
+
}
|
|
1127
|
+
return P;
|
|
1128
|
+
}), ae = T(() => ne.value.length > 0), y = (E) => ne.value.filter((J) => !J.trigger || !E ? !0 : Array.isArray(J.trigger) ? J.trigger.includes(E) : J.trigger === E).map(({ trigger: J, ...H }) => H), I = T(() => ne.value.some((E) => E.required)), j = T(() => {
|
|
1129
|
+
var E;
|
|
1130
|
+
return d.value === "error" && t.showMessage && ((E = a == null ? void 0 : a.showMessage) != null ? E : !0);
|
|
1131
|
+
}), W = T(() => `${t.label || ""}${(a == null ? void 0 : a.labelSuffix) || ""}`), D = (E) => {
|
|
1132
|
+
p.value = E;
|
|
1133
|
+
}, le = (E) => {
|
|
1134
|
+
var P, J;
|
|
1135
|
+
const { errors: H, fields: ue } = E;
|
|
1136
|
+
(!H || !ue) && console.error(E), D("error"), _.value = H ? (J = (P = H == null ? void 0 : H[0]) == null ? void 0 : P.message) != null ? J : `${t.prop} is required` : "", a == null || a.emit("validate", t.prop, !1, _.value);
|
|
1137
|
+
}, Oe = () => {
|
|
1138
|
+
D("success"), a == null || a.emit("validate", t.prop, !0, "");
|
|
1139
|
+
}, we = async (E) => {
|
|
1140
|
+
const P = S.value;
|
|
1141
|
+
return new Me({
|
|
1142
|
+
[P]: E
|
|
1143
|
+
}).validate({ [P]: B.value }, { firstFields: !0 }).then(() => (Oe(), !0)).catch((H) => (le(H), Promise.reject(H)));
|
|
1144
|
+
}, ee = async (E, P) => {
|
|
1145
|
+
if (v || !t.prop)
|
|
1146
|
+
return !1;
|
|
1147
|
+
const J = _e(P);
|
|
1148
|
+
if (!ae.value)
|
|
1149
|
+
return P == null || P(!1), !1;
|
|
1150
|
+
const H = y(E);
|
|
1151
|
+
return H.length === 0 ? (P == null || P(!0), !0) : (D("validating"), we(H).then(() => (P == null || P(!0), !0)).catch((ue) => {
|
|
1152
|
+
const { fields: xe } = ue;
|
|
1153
|
+
return P == null || P(!1, xe), J ? !1 : Promise.reject(xe);
|
|
1154
|
+
}));
|
|
1155
|
+
}, et = () => {
|
|
1156
|
+
D(""), _.value = "", v = !1;
|
|
1157
|
+
}, St = async () => {
|
|
1158
|
+
const E = a == null ? void 0 : a.model;
|
|
1159
|
+
if (!E || !t.prop)
|
|
1160
|
+
return;
|
|
1161
|
+
const P = nt(E, t.prop);
|
|
1162
|
+
v = !0, P.value = Pt(c), await Ze(), et(), v = !1;
|
|
1163
|
+
}, Pn = (E) => {
|
|
1164
|
+
x.value.includes(E) || x.value.push(E);
|
|
1165
|
+
}, qn = (E) => {
|
|
1166
|
+
x.value = x.value.filter((P) => P !== E);
|
|
1167
|
+
};
|
|
1168
|
+
me(() => t.error, (E) => {
|
|
1169
|
+
_.value = E || "", D(E ? "error" : "");
|
|
1170
|
+
}, { immediate: !0 }), me(() => t.validateStatus, (E) => D(E || ""));
|
|
1171
|
+
const tt = Je({
|
|
1172
|
+
...vt(t),
|
|
1173
|
+
$el: g,
|
|
1174
|
+
size: o,
|
|
1175
|
+
validateState: p,
|
|
1176
|
+
labelId: f,
|
|
1177
|
+
inputIds: x,
|
|
1178
|
+
isGroup: b,
|
|
1179
|
+
hasLabel: C,
|
|
1180
|
+
addInputId: Pn,
|
|
1181
|
+
removeInputId: qn,
|
|
1182
|
+
resetField: St,
|
|
1183
|
+
clearValidate: et,
|
|
1184
|
+
validate: ee
|
|
1185
|
+
});
|
|
1186
|
+
return mt(ot, tt), Ae(() => {
|
|
1187
|
+
t.prop && (a == null || a.addField(tt), c = Pt(B.value));
|
|
1188
|
+
}), Zt(() => {
|
|
1189
|
+
a == null || a.removeField(tt);
|
|
1190
|
+
}), e({
|
|
1191
|
+
size: o,
|
|
1192
|
+
validateMessage: _,
|
|
1193
|
+
validateState: p,
|
|
1194
|
+
validate: ee,
|
|
1195
|
+
clearValidate: et,
|
|
1196
|
+
resetField: St
|
|
1197
|
+
}), (E, P) => {
|
|
1198
|
+
var J;
|
|
1199
|
+
return k(), A("div", {
|
|
1200
|
+
ref_key: "formItemRef",
|
|
1201
|
+
ref: g,
|
|
1202
|
+
class: U(u(w)),
|
|
1203
|
+
role: u(b) ? "group" : void 0,
|
|
1204
|
+
"aria-labelledby": u(b) ? u(f) : void 0
|
|
1205
|
+
}, [
|
|
1206
|
+
V(u(Io), {
|
|
1207
|
+
"is-auto-width": u(m).width === "auto",
|
|
1208
|
+
"update-all": ((J = u(a)) == null ? void 0 : J.labelWidth) === "auto"
|
|
1209
|
+
}, {
|
|
1210
|
+
default: F(() => [
|
|
1211
|
+
u(C) ? (k(), L(Xt(u($) ? "label" : "div"), {
|
|
1212
|
+
key: 0,
|
|
1213
|
+
id: u(f),
|
|
1214
|
+
for: u($),
|
|
1215
|
+
class: U(u(i).e("label")),
|
|
1216
|
+
style: Ge(u(m))
|
|
1217
|
+
}, {
|
|
1218
|
+
default: F(() => [
|
|
1219
|
+
pe(E.$slots, "label", { label: u(W) }, () => [
|
|
1220
|
+
R(X(u(W)), 1)
|
|
1221
|
+
])
|
|
1222
|
+
]),
|
|
1223
|
+
_: 3
|
|
1224
|
+
}, 8, ["id", "for", "class", "style"])) : K("v-if", !0)
|
|
1225
|
+
]),
|
|
1226
|
+
_: 3
|
|
1227
|
+
}, 8, ["is-auto-width", "update-all"]),
|
|
1228
|
+
N("div", {
|
|
1229
|
+
class: U(u(i).e("content")),
|
|
1230
|
+
style: Ge(u(s))
|
|
1231
|
+
}, [
|
|
1232
|
+
pe(E.$slots, "default"),
|
|
1233
|
+
V(tr, {
|
|
1234
|
+
name: `${u(i).namespace.value}-zoom-in-top`
|
|
1235
|
+
}, {
|
|
1236
|
+
default: F(() => [
|
|
1237
|
+
u(j) ? pe(E.$slots, "error", {
|
|
1238
|
+
key: 0,
|
|
1239
|
+
error: _.value
|
|
1240
|
+
}, () => [
|
|
1241
|
+
N("div", {
|
|
1242
|
+
class: U(u(O))
|
|
1243
|
+
}, X(_.value), 3)
|
|
1244
|
+
]) : K("v-if", !0)
|
|
1245
|
+
]),
|
|
1246
|
+
_: 3
|
|
1247
|
+
}, 8, ["name"])
|
|
1248
|
+
], 6)
|
|
1249
|
+
], 10, So);
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
});
|
|
1253
|
+
var In = /* @__PURE__ */ be(Fo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);
|
|
1254
|
+
const Eo = Ye(za, {
|
|
1255
|
+
FormItem: In
|
|
1256
|
+
}), Vo = ft(In), To = ce({
|
|
1257
|
+
value: {
|
|
1258
|
+
type: [String, Number],
|
|
1259
|
+
default: ""
|
|
1260
|
+
},
|
|
1261
|
+
max: {
|
|
1262
|
+
type: Number,
|
|
1263
|
+
default: 99
|
|
1264
|
+
},
|
|
1265
|
+
isDot: Boolean,
|
|
1266
|
+
hidden: Boolean,
|
|
1267
|
+
type: {
|
|
1268
|
+
type: String,
|
|
1269
|
+
values: ["primary", "success", "warning", "info", "danger"],
|
|
1270
|
+
default: "danger"
|
|
1271
|
+
}
|
|
1272
|
+
}), Co = ["textContent"], No = Z({
|
|
1273
|
+
name: "ElBadge"
|
|
1274
|
+
}), Ao = /* @__PURE__ */ Z({
|
|
1275
|
+
...No,
|
|
1276
|
+
props: To,
|
|
1277
|
+
setup(n, { expose: e }) {
|
|
1278
|
+
const t = n, r = ye("badge"), a = T(() => t.isDot ? "" : te(t.value) && te(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`);
|
|
1279
|
+
return e({
|
|
1280
|
+
content: a
|
|
1281
|
+
}), (l, o) => (k(), A("div", {
|
|
1282
|
+
class: U(u(r).b())
|
|
1283
|
+
}, [
|
|
1284
|
+
pe(l.$slots, "default"),
|
|
1285
|
+
V(en, {
|
|
1286
|
+
name: `${u(r).namespace.value}-zoom-in-center`,
|
|
1287
|
+
persisted: ""
|
|
1288
|
+
}, {
|
|
1289
|
+
default: F(() => [
|
|
1290
|
+
Ie(N("sup", {
|
|
1291
|
+
class: U([
|
|
1292
|
+
u(r).e("content"),
|
|
1293
|
+
u(r).em("content", l.type),
|
|
1294
|
+
u(r).is("fixed", !!l.$slots.default),
|
|
1295
|
+
u(r).is("dot", l.isDot)
|
|
1296
|
+
]),
|
|
1297
|
+
textContent: X(u(a))
|
|
1298
|
+
}, null, 10, Co), [
|
|
1299
|
+
[tn, !l.hidden && (u(a) || l.isDot)]
|
|
1300
|
+
])
|
|
1301
|
+
]),
|
|
1302
|
+
_: 1
|
|
1303
|
+
}, 8, ["name"])
|
|
1304
|
+
], 2));
|
|
1305
|
+
}
|
|
1306
|
+
});
|
|
1307
|
+
var Mo = /* @__PURE__ */ be(Ao, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);
|
|
1308
|
+
const jo = Ye(Mo), Po = 100, qo = 600, zt = {
|
|
1309
|
+
beforeMount(n, e) {
|
|
1310
|
+
const t = e.value, { interval: r = Po, delay: a = qo } = _e(t) ? {} : t;
|
|
1311
|
+
let l, o;
|
|
1312
|
+
const i = () => _e(t) ? t() : t.handler(), f = () => {
|
|
1313
|
+
o && (clearTimeout(o), o = void 0), l && (clearInterval(l), l = void 0);
|
|
1314
|
+
};
|
|
1315
|
+
n.addEventListener("mousedown", (x) => {
|
|
1316
|
+
x.button === 0 && (f(), i(), document.addEventListener("mouseup", () => f(), {
|
|
1317
|
+
once: !0
|
|
1318
|
+
}), o = setTimeout(() => {
|
|
1319
|
+
l = setInterval(() => {
|
|
1320
|
+
i();
|
|
1321
|
+
}, r);
|
|
1322
|
+
}, a));
|
|
1323
|
+
});
|
|
1324
|
+
}
|
|
1325
|
+
}, Sn = ce({
|
|
1326
|
+
size: xt,
|
|
1327
|
+
disabled: Boolean,
|
|
1328
|
+
label: {
|
|
1329
|
+
type: [String, Number, Boolean],
|
|
1330
|
+
default: ""
|
|
1331
|
+
}
|
|
1332
|
+
}), Ro = ce({
|
|
1333
|
+
...Sn,
|
|
1334
|
+
modelValue: {
|
|
1335
|
+
type: [String, Number, Boolean],
|
|
1336
|
+
default: ""
|
|
1337
|
+
},
|
|
1338
|
+
name: {
|
|
1339
|
+
type: String,
|
|
1340
|
+
default: ""
|
|
1341
|
+
},
|
|
1342
|
+
border: Boolean
|
|
1343
|
+
}), $n = {
|
|
1344
|
+
[ve]: (n) => ge(n) || te(n) || We(n),
|
|
1345
|
+
[kt]: (n) => ge(n) || te(n) || We(n)
|
|
1346
|
+
}, Fn = Symbol("radioGroupKey"), En = (n, e) => {
|
|
1347
|
+
const t = G(), r = Te(Fn, void 0), a = T(() => !!r), l = T({
|
|
1348
|
+
get() {
|
|
1349
|
+
return a.value ? r.modelValue : n.modelValue;
|
|
1350
|
+
},
|
|
1351
|
+
set(p) {
|
|
1352
|
+
a.value ? r.changeEvent(p) : e && e(ve, p), t.value.checked = n.modelValue === n.label;
|
|
1353
|
+
}
|
|
1354
|
+
}), o = Qe(T(() => r == null ? void 0 : r.size)), i = yn(T(() => r == null ? void 0 : r.disabled)), f = G(!1), x = T(() => i.value || a.value && l.value !== n.label ? -1 : 0);
|
|
1355
|
+
return {
|
|
1356
|
+
radioRef: t,
|
|
1357
|
+
isGroup: a,
|
|
1358
|
+
radioGroup: r,
|
|
1359
|
+
focus: f,
|
|
1360
|
+
size: o,
|
|
1361
|
+
disabled: i,
|
|
1362
|
+
tabIndex: x,
|
|
1363
|
+
modelValue: l
|
|
1364
|
+
};
|
|
1365
|
+
}, Uo = ["value", "name", "disabled"], Do = Z({
|
|
1366
|
+
name: "ElRadio"
|
|
1367
|
+
}), Bo = /* @__PURE__ */ Z({
|
|
1368
|
+
...Do,
|
|
1369
|
+
props: Ro,
|
|
1370
|
+
emits: $n,
|
|
1371
|
+
setup(n, { emit: e }) {
|
|
1372
|
+
const t = n, r = ye("radio"), { radioRef: a, radioGroup: l, focus: o, size: i, disabled: f, modelValue: x } = En(t, e);
|
|
1373
|
+
function p() {
|
|
1374
|
+
Ze(() => e("change", x.value));
|
|
1375
|
+
}
|
|
1376
|
+
return (d, _) => {
|
|
1377
|
+
var g;
|
|
1378
|
+
return k(), A("label", {
|
|
1379
|
+
class: U([
|
|
1380
|
+
u(r).b(),
|
|
1381
|
+
u(r).is("disabled", u(f)),
|
|
1382
|
+
u(r).is("focus", u(o)),
|
|
1383
|
+
u(r).is("bordered", d.border),
|
|
1384
|
+
u(r).is("checked", u(x) === d.label),
|
|
1385
|
+
u(r).m(u(i))
|
|
1386
|
+
])
|
|
1387
|
+
}, [
|
|
1388
|
+
N("span", {
|
|
1389
|
+
class: U([
|
|
1390
|
+
u(r).e("input"),
|
|
1391
|
+
u(r).is("disabled", u(f)),
|
|
1392
|
+
u(r).is("checked", u(x) === d.label)
|
|
1393
|
+
])
|
|
1394
|
+
}, [
|
|
1395
|
+
Ie(N("input", {
|
|
1396
|
+
ref_key: "radioRef",
|
|
1397
|
+
ref: a,
|
|
1398
|
+
"onUpdate:modelValue": _[0] || (_[0] = (c) => nn(x) ? x.value = c : null),
|
|
1399
|
+
class: U(u(r).e("original")),
|
|
1400
|
+
value: d.label,
|
|
1401
|
+
name: d.name || ((g = u(l)) == null ? void 0 : g.name),
|
|
1402
|
+
disabled: u(f),
|
|
1403
|
+
type: "radio",
|
|
1404
|
+
onFocus: _[1] || (_[1] = (c) => o.value = !0),
|
|
1405
|
+
onBlur: _[2] || (_[2] = (c) => o.value = !1),
|
|
1406
|
+
onChange: p,
|
|
1407
|
+
onClick: _[3] || (_[3] = fe(() => {
|
|
1408
|
+
}, ["stop"]))
|
|
1409
|
+
}, null, 42, Uo), [
|
|
1410
|
+
[rn, u(x)]
|
|
1411
|
+
]),
|
|
1412
|
+
N("span", {
|
|
1413
|
+
class: U(u(r).e("inner"))
|
|
1414
|
+
}, null, 2)
|
|
1415
|
+
], 2),
|
|
1416
|
+
N("span", {
|
|
1417
|
+
class: U(u(r).e("label")),
|
|
1418
|
+
onKeydown: _[4] || (_[4] = fe(() => {
|
|
1419
|
+
}, ["stop"]))
|
|
1420
|
+
}, [
|
|
1421
|
+
pe(d.$slots, "default", {}, () => [
|
|
1422
|
+
R(X(d.label), 1)
|
|
1423
|
+
])
|
|
1424
|
+
], 34)
|
|
1425
|
+
], 2);
|
|
1426
|
+
};
|
|
1427
|
+
}
|
|
1428
|
+
});
|
|
1429
|
+
var Lo = /* @__PURE__ */ be(Bo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]);
|
|
1430
|
+
const zo = ce({
|
|
1431
|
+
...Sn,
|
|
1432
|
+
name: {
|
|
1433
|
+
type: String,
|
|
1434
|
+
default: ""
|
|
1435
|
+
}
|
|
1436
|
+
}), Wo = ["value", "name", "disabled"], Go = Z({
|
|
1437
|
+
name: "ElRadioButton"
|
|
1438
|
+
}), Ko = /* @__PURE__ */ Z({
|
|
1439
|
+
...Go,
|
|
1440
|
+
props: zo,
|
|
1441
|
+
setup(n) {
|
|
1442
|
+
const e = n, t = ye("radio"), { radioRef: r, focus: a, size: l, disabled: o, modelValue: i, radioGroup: f } = En(e), x = T(() => ({
|
|
1443
|
+
backgroundColor: (f == null ? void 0 : f.fill) || "",
|
|
1444
|
+
borderColor: (f == null ? void 0 : f.fill) || "",
|
|
1445
|
+
boxShadow: f != null && f.fill ? `-1px 0 0 0 ${f.fill}` : "",
|
|
1446
|
+
color: (f == null ? void 0 : f.textColor) || ""
|
|
1447
|
+
}));
|
|
1448
|
+
return (p, d) => {
|
|
1449
|
+
var _;
|
|
1450
|
+
return k(), A("label", {
|
|
1451
|
+
class: U([
|
|
1452
|
+
u(t).b("button"),
|
|
1453
|
+
u(t).is("active", u(i) === p.label),
|
|
1454
|
+
u(t).is("disabled", u(o)),
|
|
1455
|
+
u(t).is("focus", u(a)),
|
|
1456
|
+
u(t).bm("button", u(l))
|
|
1457
|
+
])
|
|
1458
|
+
}, [
|
|
1459
|
+
Ie(N("input", {
|
|
1460
|
+
ref_key: "radioRef",
|
|
1461
|
+
ref: r,
|
|
1462
|
+
"onUpdate:modelValue": d[0] || (d[0] = (g) => nn(i) ? i.value = g : null),
|
|
1463
|
+
class: U(u(t).be("button", "original-radio")),
|
|
1464
|
+
value: p.label,
|
|
1465
|
+
type: "radio",
|
|
1466
|
+
name: p.name || ((_ = u(f)) == null ? void 0 : _.name),
|
|
1467
|
+
disabled: u(o),
|
|
1468
|
+
onFocus: d[1] || (d[1] = (g) => a.value = !0),
|
|
1469
|
+
onBlur: d[2] || (d[2] = (g) => a.value = !1),
|
|
1470
|
+
onClick: d[3] || (d[3] = fe(() => {
|
|
1471
|
+
}, ["stop"]))
|
|
1472
|
+
}, null, 42, Wo), [
|
|
1473
|
+
[rn, u(i)]
|
|
1474
|
+
]),
|
|
1475
|
+
N("span", {
|
|
1476
|
+
class: U(u(t).be("button", "inner")),
|
|
1477
|
+
style: Ge(u(i) === p.label ? u(x) : {}),
|
|
1478
|
+
onKeydown: d[4] || (d[4] = fe(() => {
|
|
1479
|
+
}, ["stop"]))
|
|
1480
|
+
}, [
|
|
1481
|
+
pe(p.$slots, "default", {}, () => [
|
|
1482
|
+
R(X(p.label), 1)
|
|
1483
|
+
])
|
|
1484
|
+
], 38)
|
|
1485
|
+
], 2);
|
|
1486
|
+
};
|
|
1487
|
+
}
|
|
1488
|
+
});
|
|
1489
|
+
var Vn = /* @__PURE__ */ be(Ko, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]);
|
|
1490
|
+
const Yo = ce({
|
|
1491
|
+
id: {
|
|
1492
|
+
type: String,
|
|
1493
|
+
default: void 0
|
|
1494
|
+
},
|
|
1495
|
+
size: xt,
|
|
1496
|
+
disabled: Boolean,
|
|
1497
|
+
modelValue: {
|
|
1498
|
+
type: [String, Number, Boolean],
|
|
1499
|
+
default: ""
|
|
1500
|
+
},
|
|
1501
|
+
fill: {
|
|
1502
|
+
type: String,
|
|
1503
|
+
default: ""
|
|
1504
|
+
},
|
|
1505
|
+
label: {
|
|
1506
|
+
type: String,
|
|
1507
|
+
default: void 0
|
|
1508
|
+
},
|
|
1509
|
+
textColor: {
|
|
1510
|
+
type: String,
|
|
1511
|
+
default: ""
|
|
1512
|
+
},
|
|
1513
|
+
name: {
|
|
1514
|
+
type: String,
|
|
1515
|
+
default: void 0
|
|
1516
|
+
},
|
|
1517
|
+
validateEvent: {
|
|
1518
|
+
type: Boolean,
|
|
1519
|
+
default: !0
|
|
1520
|
+
}
|
|
1521
|
+
}), Ho = $n, Jo = ["id", "aria-label", "aria-labelledby"], Zo = Z({
|
|
1522
|
+
name: "ElRadioGroup"
|
|
1523
|
+
}), Qo = /* @__PURE__ */ Z({
|
|
1524
|
+
...Zo,
|
|
1525
|
+
props: Yo,
|
|
1526
|
+
emits: Ho,
|
|
1527
|
+
setup(n, { emit: e }) {
|
|
1528
|
+
const t = n, r = ye("radio"), a = Yt(), l = G(), { formItem: o } = bn(), { inputId: i, isLabeledByFormItem: f } = mr(t, {
|
|
1529
|
+
formItemContext: o
|
|
1530
|
+
}), x = (d) => {
|
|
1531
|
+
e(ve, d), Ze(() => e("change", d));
|
|
1532
|
+
};
|
|
1533
|
+
Ae(() => {
|
|
1534
|
+
const d = l.value.querySelectorAll("[type=radio]"), _ = d[0];
|
|
1535
|
+
!Array.from(d).some((g) => g.checked) && _ && (_.tabIndex = 0);
|
|
1536
|
+
});
|
|
1537
|
+
const p = T(() => t.name || a.value);
|
|
1538
|
+
return mt(Fn, Je({
|
|
1539
|
+
...vt(t),
|
|
1540
|
+
changeEvent: x,
|
|
1541
|
+
name: p
|
|
1542
|
+
})), me(() => t.modelValue, () => {
|
|
1543
|
+
t.validateEvent && (o == null || o.validate("change").catch((d) => de(d)));
|
|
1544
|
+
}), (d, _) => (k(), A("div", {
|
|
1545
|
+
id: u(i),
|
|
1546
|
+
ref_key: "radioGroupRef",
|
|
1547
|
+
ref: l,
|
|
1548
|
+
class: U(u(r).b("group")),
|
|
1549
|
+
role: "radiogroup",
|
|
1550
|
+
"aria-label": u(f) ? void 0 : d.label || "radio-group",
|
|
1551
|
+
"aria-labelledby": u(f) ? u(o).labelId : void 0
|
|
1552
|
+
}, [
|
|
1553
|
+
pe(d.$slots, "default")
|
|
1554
|
+
], 10, Jo));
|
|
1555
|
+
}
|
|
1556
|
+
});
|
|
1557
|
+
var Tn = /* @__PURE__ */ be(Qo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]);
|
|
1558
|
+
const Cn = Ye(Lo, {
|
|
1559
|
+
RadioButton: Vn,
|
|
1560
|
+
RadioGroup: Tn
|
|
1561
|
+
}), Nn = ft(Tn);
|
|
1562
|
+
ft(Vn);
|
|
1563
|
+
const Xo = ce({
|
|
1564
|
+
id: {
|
|
1565
|
+
type: String,
|
|
1566
|
+
default: void 0
|
|
1567
|
+
},
|
|
1568
|
+
step: {
|
|
1569
|
+
type: Number,
|
|
1570
|
+
default: 1
|
|
1571
|
+
},
|
|
1572
|
+
stepStrictly: Boolean,
|
|
1573
|
+
max: {
|
|
1574
|
+
type: Number,
|
|
1575
|
+
default: Number.POSITIVE_INFINITY
|
|
1576
|
+
},
|
|
1577
|
+
min: {
|
|
1578
|
+
type: Number,
|
|
1579
|
+
default: Number.NEGATIVE_INFINITY
|
|
1580
|
+
},
|
|
1581
|
+
modelValue: Number,
|
|
1582
|
+
readonly: Boolean,
|
|
1583
|
+
disabled: Boolean,
|
|
1584
|
+
size: xt,
|
|
1585
|
+
controls: {
|
|
1586
|
+
type: Boolean,
|
|
1587
|
+
default: !0
|
|
1588
|
+
},
|
|
1589
|
+
controlsPosition: {
|
|
1590
|
+
type: String,
|
|
1591
|
+
default: "",
|
|
1592
|
+
values: ["", "right"]
|
|
1593
|
+
},
|
|
1594
|
+
valueOnClear: {
|
|
1595
|
+
type: [String, Number, null],
|
|
1596
|
+
validator: (n) => n === null || te(n) || ["min", "max"].includes(n),
|
|
1597
|
+
default: null
|
|
1598
|
+
},
|
|
1599
|
+
name: String,
|
|
1600
|
+
label: String,
|
|
1601
|
+
placeholder: String,
|
|
1602
|
+
precision: {
|
|
1603
|
+
type: Number,
|
|
1604
|
+
validator: (n) => n >= 0 && n === Number.parseInt(`${n}`, 10)
|
|
1605
|
+
},
|
|
1606
|
+
validateEvent: {
|
|
1607
|
+
type: Boolean,
|
|
1608
|
+
default: !0
|
|
1609
|
+
}
|
|
1610
|
+
}), el = {
|
|
1611
|
+
[kt]: (n, e) => e !== n,
|
|
1612
|
+
blur: (n) => n instanceof FocusEvent,
|
|
1613
|
+
focus: (n) => n instanceof FocusEvent,
|
|
1614
|
+
[De]: (n) => te(n) || Fe(n),
|
|
1615
|
+
[ve]: (n) => te(n) || Fe(n)
|
|
1616
|
+
}, tl = ["aria-label", "onKeydown"], nl = ["aria-label", "onKeydown"], rl = Z({
|
|
1617
|
+
name: "ElInputNumber"
|
|
1618
|
+
}), al = /* @__PURE__ */ Z({
|
|
1619
|
+
...rl,
|
|
1620
|
+
props: Xo,
|
|
1621
|
+
emits: el,
|
|
1622
|
+
setup(n, { expose: e, emit: t }) {
|
|
1623
|
+
const r = n, { t: a } = Ln(), l = ye("input-number"), o = G(), i = Je({
|
|
1624
|
+
currentValue: r.modelValue,
|
|
1625
|
+
userInput: null
|
|
1626
|
+
}), { formItem: f } = bn(), x = T(() => te(r.modelValue) && r.modelValue <= r.min), p = T(() => te(r.modelValue) && r.modelValue >= r.max), d = T(() => {
|
|
1627
|
+
const y = s(r.step);
|
|
1628
|
+
return je(r.precision) ? Math.max(s(r.modelValue), y) : (y > r.precision && de("InputNumber", "precision should not be less than the decimal places of step"), r.precision);
|
|
1629
|
+
}), _ = T(() => r.controls && r.controlsPosition === "right"), g = Qe(), c = yn(), v = T(() => {
|
|
1630
|
+
if (i.userInput !== null)
|
|
1631
|
+
return i.userInput;
|
|
1632
|
+
let y = i.currentValue;
|
|
1633
|
+
if (Fe(y))
|
|
1634
|
+
return "";
|
|
1635
|
+
if (te(y)) {
|
|
1636
|
+
if (Number.isNaN(y))
|
|
1637
|
+
return "";
|
|
1638
|
+
je(r.precision) || (y = y.toFixed(r.precision));
|
|
1639
|
+
}
|
|
1640
|
+
return y;
|
|
1641
|
+
}), m = (y, I) => {
|
|
1642
|
+
if (je(I) && (I = d.value), I === 0)
|
|
1643
|
+
return Math.round(y);
|
|
1644
|
+
let j = String(y);
|
|
1645
|
+
const W = j.indexOf(".");
|
|
1646
|
+
if (W === -1 || !j.replace(".", "").split("")[W + I])
|
|
1647
|
+
return y;
|
|
1648
|
+
const Oe = j.length;
|
|
1649
|
+
return j.charAt(Oe - 1) === "5" && (j = `${j.slice(0, Math.max(0, Oe - 1))}6`), Number.parseFloat(Number(j).toFixed(I));
|
|
1650
|
+
}, s = (y) => {
|
|
1651
|
+
if (Fe(y))
|
|
1652
|
+
return 0;
|
|
1653
|
+
const I = y.toString(), j = I.indexOf(".");
|
|
1654
|
+
let W = 0;
|
|
1655
|
+
return j !== -1 && (W = I.length - j - 1), W;
|
|
1656
|
+
}, w = (y, I = 1) => te(y) ? m(y + r.step * I) : i.currentValue, h = () => {
|
|
1657
|
+
if (r.readonly || c.value || p.value)
|
|
1658
|
+
return;
|
|
1659
|
+
const y = Number(v.value) || 0, I = w(y);
|
|
1660
|
+
C(I), t(De, i.currentValue);
|
|
1661
|
+
}, O = () => {
|
|
1662
|
+
if (r.readonly || c.value || x.value)
|
|
1663
|
+
return;
|
|
1664
|
+
const y = Number(v.value) || 0, I = w(y, -1);
|
|
1665
|
+
C(I), t(De, i.currentValue);
|
|
1666
|
+
}, S = (y, I) => {
|
|
1667
|
+
const { max: j, min: W, step: D, precision: le, stepStrictly: Oe, valueOnClear: we } = r;
|
|
1668
|
+
j < W && Kt("InputNumber", "min should not be greater than max.");
|
|
1669
|
+
let ee = Number(y);
|
|
1670
|
+
if (Fe(y) || Number.isNaN(ee))
|
|
1671
|
+
return null;
|
|
1672
|
+
if (y === "") {
|
|
1673
|
+
if (we === null)
|
|
1674
|
+
return null;
|
|
1675
|
+
ee = ge(we) ? { min: W, max: j }[we] : we;
|
|
1676
|
+
}
|
|
1677
|
+
return Oe && (ee = m(Math.round(ee / D) * D, le)), je(le) || (ee = m(ee, le)), (ee > j || ee < W) && (ee = ee > j ? j : W, I && t(ve, ee)), ee;
|
|
1678
|
+
}, C = (y, I = !0) => {
|
|
1679
|
+
var j;
|
|
1680
|
+
const W = i.currentValue, D = S(y);
|
|
1681
|
+
if (!I) {
|
|
1682
|
+
t(ve, D);
|
|
1683
|
+
return;
|
|
1684
|
+
}
|
|
1685
|
+
W !== D && (i.userInput = null, t(ve, D), t(kt, D, W), r.validateEvent && ((j = f == null ? void 0 : f.validate) == null || j.call(f, "change").catch((le) => de(le))), i.currentValue = D);
|
|
1686
|
+
}, $ = (y) => {
|
|
1687
|
+
i.userInput = y;
|
|
1688
|
+
const I = y === "" ? null : Number(y);
|
|
1689
|
+
t(De, I), C(I, !1);
|
|
1690
|
+
}, b = (y) => {
|
|
1691
|
+
const I = y !== "" ? Number(y) : "";
|
|
1692
|
+
(te(I) && !Number.isNaN(I) || y === "") && C(I), i.userInput = null;
|
|
1693
|
+
}, z = () => {
|
|
1694
|
+
var y, I;
|
|
1695
|
+
(I = (y = o.value) == null ? void 0 : y.focus) == null || I.call(y);
|
|
1696
|
+
}, B = () => {
|
|
1697
|
+
var y, I;
|
|
1698
|
+
(I = (y = o.value) == null ? void 0 : y.blur) == null || I.call(y);
|
|
1699
|
+
}, ne = (y) => {
|
|
1700
|
+
t("focus", y);
|
|
1701
|
+
}, ae = (y) => {
|
|
1702
|
+
var I;
|
|
1703
|
+
t("blur", y), r.validateEvent && ((I = f == null ? void 0 : f.validate) == null || I.call(f, "blur").catch((j) => de(j)));
|
|
1704
|
+
};
|
|
1705
|
+
return me(() => r.modelValue, (y) => {
|
|
1706
|
+
const I = S(i.userInput), j = S(y, !0);
|
|
1707
|
+
!te(I) && (!I || I !== j) && (i.currentValue = j, i.userInput = null);
|
|
1708
|
+
}, { immediate: !0 }), Ae(() => {
|
|
1709
|
+
var y;
|
|
1710
|
+
const { min: I, max: j, modelValue: W } = r, D = (y = o.value) == null ? void 0 : y.input;
|
|
1711
|
+
if (D.setAttribute("role", "spinbutton"), Number.isFinite(j) ? D.setAttribute("aria-valuemax", String(j)) : D.removeAttribute("aria-valuemax"), Number.isFinite(I) ? D.setAttribute("aria-valuemin", String(I)) : D.removeAttribute("aria-valuemin"), D.setAttribute("aria-valuenow", i.currentValue || i.currentValue === 0 ? String(i.currentValue) : ""), D.setAttribute("aria-disabled", String(c.value)), !te(W) && W != null) {
|
|
1712
|
+
let le = Number(W);
|
|
1713
|
+
Number.isNaN(le) && (le = null), t(ve, le);
|
|
1714
|
+
}
|
|
1715
|
+
}), Qt(() => {
|
|
1716
|
+
var y, I;
|
|
1717
|
+
const j = (y = o.value) == null ? void 0 : y.input;
|
|
1718
|
+
j == null || j.setAttribute("aria-valuenow", `${(I = i.currentValue) != null ? I : ""}`);
|
|
1719
|
+
}), e({
|
|
1720
|
+
focus: z,
|
|
1721
|
+
blur: B
|
|
1722
|
+
}), (y, I) => (k(), A("div", {
|
|
1723
|
+
class: U([
|
|
1724
|
+
u(l).b(),
|
|
1725
|
+
u(l).m(u(g)),
|
|
1726
|
+
u(l).is("disabled", u(c)),
|
|
1727
|
+
u(l).is("without-controls", !y.controls),
|
|
1728
|
+
u(l).is("controls-right", u(_))
|
|
1729
|
+
]),
|
|
1730
|
+
onDragstart: I[1] || (I[1] = fe(() => {
|
|
1731
|
+
}, ["prevent"]))
|
|
1732
|
+
}, [
|
|
1733
|
+
y.controls ? Ie((k(), A("span", {
|
|
1734
|
+
key: 0,
|
|
1735
|
+
role: "button",
|
|
1736
|
+
"aria-label": u(a)("el.inputNumber.decrease"),
|
|
1737
|
+
class: U([u(l).e("decrease"), u(l).is("disabled", u(x))]),
|
|
1738
|
+
onKeydown: Pe(O, ["enter"])
|
|
1739
|
+
}, [
|
|
1740
|
+
V(u(Ce), null, {
|
|
1741
|
+
default: F(() => [
|
|
1742
|
+
u(_) ? (k(), L(u(dr), { key: 0 })) : (k(), L(u(cr), { key: 1 }))
|
|
1743
|
+
]),
|
|
1744
|
+
_: 1
|
|
1745
|
+
})
|
|
1746
|
+
], 42, tl)), [
|
|
1747
|
+
[u(zt), O]
|
|
1748
|
+
]) : K("v-if", !0),
|
|
1749
|
+
y.controls ? Ie((k(), A("span", {
|
|
1750
|
+
key: 1,
|
|
1751
|
+
role: "button",
|
|
1752
|
+
"aria-label": u(a)("el.inputNumber.increase"),
|
|
1753
|
+
class: U([u(l).e("increase"), u(l).is("disabled", u(p))]),
|
|
1754
|
+
onKeydown: Pe(h, ["enter"])
|
|
1755
|
+
}, [
|
|
1756
|
+
V(u(Ce), null, {
|
|
1757
|
+
default: F(() => [
|
|
1758
|
+
u(_) ? (k(), L(u(fr), { key: 0 })) : (k(), L(u(at), { key: 1 }))
|
|
1759
|
+
]),
|
|
1760
|
+
_: 1
|
|
1761
|
+
})
|
|
1762
|
+
], 42, nl)), [
|
|
1763
|
+
[u(zt), h]
|
|
1764
|
+
]) : K("v-if", !0),
|
|
1765
|
+
V(u(ln), {
|
|
1766
|
+
id: y.id,
|
|
1767
|
+
ref_key: "input",
|
|
1768
|
+
ref: o,
|
|
1769
|
+
type: "number",
|
|
1770
|
+
step: y.step,
|
|
1771
|
+
"model-value": u(v),
|
|
1772
|
+
placeholder: y.placeholder,
|
|
1773
|
+
readonly: y.readonly,
|
|
1774
|
+
disabled: u(c),
|
|
1775
|
+
size: u(g),
|
|
1776
|
+
max: y.max,
|
|
1777
|
+
min: y.min,
|
|
1778
|
+
name: y.name,
|
|
1779
|
+
label: y.label,
|
|
1780
|
+
"validate-event": !1,
|
|
1781
|
+
onWheel: I[0] || (I[0] = fe(() => {
|
|
1782
|
+
}, ["prevent"])),
|
|
1783
|
+
onKeydown: [
|
|
1784
|
+
Pe(fe(h, ["prevent"]), ["up"]),
|
|
1785
|
+
Pe(fe(O, ["prevent"]), ["down"])
|
|
1786
|
+
],
|
|
1787
|
+
onBlur: ae,
|
|
1788
|
+
onFocus: ne,
|
|
1789
|
+
onInput: $,
|
|
1790
|
+
onChange: b
|
|
1791
|
+
}, null, 8, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "label", "onKeydown"])
|
|
1792
|
+
], 34));
|
|
1793
|
+
}
|
|
1794
|
+
});
|
|
1795
|
+
var ol = /* @__PURE__ */ be(al, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input-number/src/input-number.vue"]]);
|
|
1796
|
+
const An = Ye(ol), Mn = ["success", "info", "warning", "error"], re = _r({
|
|
1797
|
+
customClass: "",
|
|
1798
|
+
center: !1,
|
|
1799
|
+
dangerouslyUseHTMLString: !1,
|
|
1800
|
+
duration: 3e3,
|
|
1801
|
+
icon: void 0,
|
|
1802
|
+
id: "",
|
|
1803
|
+
message: "",
|
|
1804
|
+
onClose: void 0,
|
|
1805
|
+
showClose: !1,
|
|
1806
|
+
type: "info",
|
|
1807
|
+
offset: 16,
|
|
1808
|
+
zIndex: 0,
|
|
1809
|
+
grouping: !1,
|
|
1810
|
+
repeatNum: 1,
|
|
1811
|
+
appendTo: Ht ? document.body : void 0
|
|
1812
|
+
}), ll = ce({
|
|
1813
|
+
customClass: {
|
|
1814
|
+
type: String,
|
|
1815
|
+
default: re.customClass
|
|
1816
|
+
},
|
|
1817
|
+
center: {
|
|
1818
|
+
type: Boolean,
|
|
1819
|
+
default: re.center
|
|
1820
|
+
},
|
|
1821
|
+
dangerouslyUseHTMLString: {
|
|
1822
|
+
type: Boolean,
|
|
1823
|
+
default: re.dangerouslyUseHTMLString
|
|
1824
|
+
},
|
|
1825
|
+
duration: {
|
|
1826
|
+
type: Number,
|
|
1827
|
+
default: re.duration
|
|
1828
|
+
},
|
|
1829
|
+
icon: {
|
|
1830
|
+
type: vr,
|
|
1831
|
+
default: re.icon
|
|
1832
|
+
},
|
|
1833
|
+
id: {
|
|
1834
|
+
type: String,
|
|
1835
|
+
default: re.id
|
|
1836
|
+
},
|
|
1837
|
+
message: {
|
|
1838
|
+
type: Ve([
|
|
1839
|
+
String,
|
|
1840
|
+
Object,
|
|
1841
|
+
Function
|
|
1842
|
+
]),
|
|
1843
|
+
default: re.message
|
|
1844
|
+
},
|
|
1845
|
+
onClose: {
|
|
1846
|
+
type: Ve(Function),
|
|
1847
|
+
required: !1
|
|
1848
|
+
},
|
|
1849
|
+
showClose: {
|
|
1850
|
+
type: Boolean,
|
|
1851
|
+
default: re.showClose
|
|
1852
|
+
},
|
|
1853
|
+
type: {
|
|
1854
|
+
type: String,
|
|
1855
|
+
values: Mn,
|
|
1856
|
+
default: re.type
|
|
1857
|
+
},
|
|
1858
|
+
offset: {
|
|
1859
|
+
type: Number,
|
|
1860
|
+
default: re.offset
|
|
1861
|
+
},
|
|
1862
|
+
zIndex: {
|
|
1863
|
+
type: Number,
|
|
1864
|
+
default: re.zIndex
|
|
1865
|
+
},
|
|
1866
|
+
grouping: {
|
|
1867
|
+
type: Boolean,
|
|
1868
|
+
default: re.grouping
|
|
1869
|
+
},
|
|
1870
|
+
repeatNum: {
|
|
1871
|
+
type: Number,
|
|
1872
|
+
default: re.repeatNum
|
|
1873
|
+
}
|
|
1874
|
+
}), il = {
|
|
1875
|
+
destroy: () => !0
|
|
1876
|
+
}, se = nr([]), sl = (n) => {
|
|
1877
|
+
const e = se.findIndex((a) => a.id === n), t = se[e];
|
|
1878
|
+
let r;
|
|
1879
|
+
return e > 0 && (r = se[e - 1]), { current: t, prev: r };
|
|
1880
|
+
}, ul = (n) => {
|
|
1881
|
+
const { prev: e } = sl(n);
|
|
1882
|
+
return e ? e.vm.exposed.bottom.value : 0;
|
|
1883
|
+
}, dl = (n, e) => se.findIndex((r) => r.id === n) > 0 ? 20 : e, cl = ["id"], fl = ["innerHTML"], pl = Z({
|
|
1884
|
+
name: "ElMessage"
|
|
1885
|
+
}), ml = /* @__PURE__ */ Z({
|
|
1886
|
+
...pl,
|
|
1887
|
+
props: ll,
|
|
1888
|
+
emits: il,
|
|
1889
|
+
setup(n, { expose: e }) {
|
|
1890
|
+
const t = n, { Close: r } = gr, { ns: a, zIndex: l } = hr("message"), { currentZIndex: o, nextZIndex: i } = l, f = G(), x = G(!1), p = G(0);
|
|
1891
|
+
let d;
|
|
1892
|
+
const _ = T(() => t.type ? t.type === "error" ? "danger" : t.type : "info"), g = T(() => {
|
|
1893
|
+
const $ = t.type;
|
|
1894
|
+
return { [a.bm("icon", $)]: $ && Tt[$] };
|
|
1895
|
+
}), c = T(() => t.icon || Tt[t.type] || ""), v = T(() => ul(t.id)), m = T(() => dl(t.id, t.offset) + v.value), s = T(() => p.value + m.value), w = T(() => ({
|
|
1896
|
+
top: `${m.value}px`,
|
|
1897
|
+
zIndex: o.value
|
|
1898
|
+
}));
|
|
1899
|
+
function h() {
|
|
1900
|
+
t.duration !== 0 && ({ stop: d } = zn(() => {
|
|
1901
|
+
S();
|
|
1902
|
+
}, t.duration));
|
|
1903
|
+
}
|
|
1904
|
+
function O() {
|
|
1905
|
+
d == null || d();
|
|
1906
|
+
}
|
|
1907
|
+
function S() {
|
|
1908
|
+
x.value = !1;
|
|
1909
|
+
}
|
|
1910
|
+
function C({ code: $ }) {
|
|
1911
|
+
$ === yr.esc && S();
|
|
1912
|
+
}
|
|
1913
|
+
return Ae(() => {
|
|
1914
|
+
h(), i(), x.value = !0;
|
|
1915
|
+
}), me(() => t.repeatNum, () => {
|
|
1916
|
+
O(), h();
|
|
1917
|
+
}), ur(document, "keydown", C), mn(f, () => {
|
|
1918
|
+
p.value = f.value.getBoundingClientRect().height;
|
|
1919
|
+
}), e({
|
|
1920
|
+
visible: x,
|
|
1921
|
+
bottom: s,
|
|
1922
|
+
close: S
|
|
1923
|
+
}), ($, b) => (k(), L(en, {
|
|
1924
|
+
name: u(a).b("fade"),
|
|
1925
|
+
onBeforeLeave: $.onClose,
|
|
1926
|
+
onAfterLeave: b[0] || (b[0] = (z) => $.$emit("destroy")),
|
|
1927
|
+
persisted: ""
|
|
1928
|
+
}, {
|
|
1929
|
+
default: F(() => [
|
|
1930
|
+
Ie(N("div", {
|
|
1931
|
+
id: $.id,
|
|
1932
|
+
ref_key: "messageRef",
|
|
1933
|
+
ref: f,
|
|
1934
|
+
class: U([
|
|
1935
|
+
u(a).b(),
|
|
1936
|
+
{ [u(a).m($.type)]: $.type && !$.icon },
|
|
1937
|
+
u(a).is("center", $.center),
|
|
1938
|
+
u(a).is("closable", $.showClose),
|
|
1939
|
+
$.customClass
|
|
1940
|
+
]),
|
|
1941
|
+
style: Ge(u(w)),
|
|
1942
|
+
role: "alert",
|
|
1943
|
+
onMouseenter: O,
|
|
1944
|
+
onMouseleave: h
|
|
1945
|
+
}, [
|
|
1946
|
+
$.repeatNum > 1 ? (k(), L(u(jo), {
|
|
1947
|
+
key: 0,
|
|
1948
|
+
value: $.repeatNum,
|
|
1949
|
+
type: u(_),
|
|
1950
|
+
class: U(u(a).e("badge"))
|
|
1951
|
+
}, null, 8, ["value", "type", "class"])) : K("v-if", !0),
|
|
1952
|
+
u(c) ? (k(), L(u(Ce), {
|
|
1953
|
+
key: 1,
|
|
1954
|
+
class: U([u(a).e("icon"), u(g)])
|
|
1955
|
+
}, {
|
|
1956
|
+
default: F(() => [
|
|
1957
|
+
(k(), L(Xt(u(c))))
|
|
1958
|
+
]),
|
|
1959
|
+
_: 1
|
|
1960
|
+
}, 8, ["class"])) : K("v-if", !0),
|
|
1961
|
+
pe($.$slots, "default", {}, () => [
|
|
1962
|
+
$.dangerouslyUseHTMLString ? (k(), A(Q, { key: 1 }, [
|
|
1963
|
+
K(" Caution here, message could've been compromised, never use user's input as message "),
|
|
1964
|
+
N("p", {
|
|
1965
|
+
class: U(u(a).e("content")),
|
|
1966
|
+
innerHTML: $.message
|
|
1967
|
+
}, null, 10, fl)
|
|
1968
|
+
], 2112)) : (k(), A("p", {
|
|
1969
|
+
key: 0,
|
|
1970
|
+
class: U(u(a).e("content"))
|
|
1971
|
+
}, X($.message), 3))
|
|
1972
|
+
]),
|
|
1973
|
+
$.showClose ? (k(), L(u(Ce), {
|
|
1974
|
+
key: 2,
|
|
1975
|
+
class: U(u(a).e("closeBtn")),
|
|
1976
|
+
onClick: fe(S, ["stop"])
|
|
1977
|
+
}, {
|
|
1978
|
+
default: F(() => [
|
|
1979
|
+
V(u(r))
|
|
1980
|
+
]),
|
|
1981
|
+
_: 1
|
|
1982
|
+
}, 8, ["class", "onClick"])) : K("v-if", !0)
|
|
1983
|
+
], 46, cl), [
|
|
1984
|
+
[tn, x.value]
|
|
1985
|
+
])
|
|
1986
|
+
]),
|
|
1987
|
+
_: 3
|
|
1988
|
+
}, 8, ["name", "onBeforeLeave"]));
|
|
1989
|
+
}
|
|
1990
|
+
});
|
|
1991
|
+
var vl = /* @__PURE__ */ be(ml, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);
|
|
1992
|
+
let gl = 1;
|
|
1993
|
+
const jn = (n) => {
|
|
1994
|
+
const e = !n || ge(n) || an(n) || _e(n) ? { message: n } : n, t = {
|
|
1995
|
+
...re,
|
|
1996
|
+
...e
|
|
1997
|
+
};
|
|
1998
|
+
if (!t.appendTo)
|
|
1999
|
+
t.appendTo = document.body;
|
|
2000
|
+
else if (ge(t.appendTo)) {
|
|
2001
|
+
let r = document.querySelector(t.appendTo);
|
|
2002
|
+
Wn(r) || (de("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."), r = document.body), t.appendTo = r;
|
|
2003
|
+
}
|
|
2004
|
+
return t;
|
|
2005
|
+
}, yl = (n) => {
|
|
2006
|
+
const e = se.indexOf(n);
|
|
2007
|
+
if (e === -1)
|
|
2008
|
+
return;
|
|
2009
|
+
se.splice(e, 1);
|
|
2010
|
+
const { handler: t } = n;
|
|
2011
|
+
t.close();
|
|
2012
|
+
}, bl = ({ appendTo: n, ...e }, t) => {
|
|
2013
|
+
const r = `message_${gl++}`, a = e.onClose, l = document.createElement("div"), o = {
|
|
2014
|
+
...e,
|
|
2015
|
+
id: r,
|
|
2016
|
+
onClose: () => {
|
|
2017
|
+
a == null || a(), yl(p);
|
|
2018
|
+
},
|
|
2019
|
+
onDestroy: () => {
|
|
2020
|
+
Et(null, l);
|
|
2021
|
+
}
|
|
2022
|
+
}, i = V(vl, o, _e(o.message) || an(o.message) ? {
|
|
2023
|
+
default: _e(o.message) ? o.message : () => o.message
|
|
2024
|
+
} : null);
|
|
2025
|
+
i.appContext = t || Se._context, Et(i, l), n.appendChild(l.firstElementChild);
|
|
2026
|
+
const f = i.component, p = {
|
|
2027
|
+
id: r,
|
|
2028
|
+
vnode: i,
|
|
2029
|
+
vm: f,
|
|
2030
|
+
handler: {
|
|
2031
|
+
close: () => {
|
|
2032
|
+
f.exposed.visible.value = !1;
|
|
2033
|
+
}
|
|
2034
|
+
},
|
|
2035
|
+
props: i.component.props
|
|
2036
|
+
};
|
|
2037
|
+
return p;
|
|
2038
|
+
}, Se = (n = {}, e) => {
|
|
2039
|
+
if (!Ht)
|
|
2040
|
+
return { close: () => {
|
|
2041
|
+
} };
|
|
2042
|
+
if (te(Ct.max) && se.length >= Ct.max)
|
|
2043
|
+
return { close: () => {
|
|
2044
|
+
} };
|
|
2045
|
+
const t = jn(n);
|
|
2046
|
+
if (t.grouping && se.length) {
|
|
2047
|
+
const a = se.find(({ vnode: l }) => {
|
|
2048
|
+
var o;
|
|
2049
|
+
return ((o = l.props) == null ? void 0 : o.message) === t.message;
|
|
2050
|
+
});
|
|
2051
|
+
if (a)
|
|
2052
|
+
return a.props.repeatNum += 1, a.props.type = t.type, a.handler;
|
|
2053
|
+
}
|
|
2054
|
+
const r = bl(t, e);
|
|
2055
|
+
return se.push(r), r.handler;
|
|
2056
|
+
};
|
|
2057
|
+
Mn.forEach((n) => {
|
|
2058
|
+
Se[n] = (e = {}, t) => {
|
|
2059
|
+
const r = jn(e);
|
|
2060
|
+
return Se({ ...r, type: n }, t);
|
|
2061
|
+
};
|
|
2062
|
+
});
|
|
2063
|
+
function hl(n) {
|
|
2064
|
+
for (const e of se)
|
|
2065
|
+
(!n || n === e.props.type) && e.handler.close();
|
|
2066
|
+
}
|
|
2067
|
+
Se.closeAll = hl;
|
|
2068
|
+
Se._context = null;
|
|
2069
|
+
const Ue = Gn(Se, "$message");
|
|
2070
|
+
const Wt = {
|
|
2071
|
+
// 品种市场
|
|
2072
|
+
varietyMarket: {
|
|
2073
|
+
show: !0,
|
|
2074
|
+
options: [
|
|
2075
|
+
{ label: "ETF", value: 2, memo: [] },
|
|
2076
|
+
{ label: "A股", value: 3, memo: [4, 6] },
|
|
2077
|
+
{ label: "期货", value: 4, memo: [1, 2, 3, 5, 7, 8, 9, 10] },
|
|
2078
|
+
{ label: "港股", value: 5, memo: [4, 6] },
|
|
2079
|
+
{ label: "外盘", value: 6, memo: [1, 2, 3, 5, 7, 8, 9, 10] },
|
|
2080
|
+
{ label: "美股", value: 7, memo: [4, 6] },
|
|
2081
|
+
{ label: "期权", value: 8, memo: [11] }
|
|
2082
|
+
]
|
|
2083
|
+
},
|
|
2084
|
+
// 常用选项
|
|
2085
|
+
commonOption: {
|
|
2086
|
+
show: !0,
|
|
2087
|
+
options: [
|
|
2088
|
+
{ label: "期货主连", value: 1 },
|
|
2089
|
+
{ label: "期货主力", value: 2 },
|
|
2090
|
+
{ label: "期货加权", value: 3 },
|
|
2091
|
+
{ label: "常用股票指数", value: 4 },
|
|
2092
|
+
{ label: "期货收益率指数", value: 5 },
|
|
2093
|
+
{ label: "股票板块指数", value: 6 },
|
|
2094
|
+
{ label: "次主力合约", value: 7 },
|
|
2095
|
+
{ label: "期货次主连", value: 8 },
|
|
2096
|
+
{ label: "期货板块收益率指数", value: 9 },
|
|
2097
|
+
{ label: "期货板块加权指数", value: 10 },
|
|
2098
|
+
{ label: "期权", value: 11 }
|
|
2099
|
+
]
|
|
2100
|
+
},
|
|
2101
|
+
// 自定义标签
|
|
2102
|
+
customTag: {
|
|
2103
|
+
show: !0,
|
|
2104
|
+
options: []
|
|
2105
|
+
},
|
|
2106
|
+
// 因子筛选
|
|
2107
|
+
factorScreen: {
|
|
2108
|
+
show: !0,
|
|
2109
|
+
cycleDefault: null,
|
|
2110
|
+
cycleOptions: [],
|
|
2111
|
+
cycleShow: !0,
|
|
2112
|
+
factorOptions: []
|
|
2113
|
+
},
|
|
2114
|
+
// 常用指标
|
|
2115
|
+
commonIndicator: {
|
|
2116
|
+
show: !0,
|
|
2117
|
+
options: [
|
|
2118
|
+
// 总市值
|
|
2119
|
+
{
|
|
2120
|
+
key: "marketCapital",
|
|
2121
|
+
label: "总市值",
|
|
2122
|
+
parent: {
|
|
2123
|
+
varietyMarketIds: [3, 5, 7],
|
|
2124
|
+
commonOptionIds: [4, 6]
|
|
2125
|
+
},
|
|
2126
|
+
// 便捷选项
|
|
2127
|
+
convenientOptions: [
|
|
2128
|
+
{ range: [null, 10], unit: ["亿", "亿"], text: "≤10亿" },
|
|
2129
|
+
{ range: [null, 25], unit: ["亿", "亿"], text: "≤25亿" },
|
|
2130
|
+
{ range: [null, 50], unit: ["亿", "亿"], text: "≤50亿" },
|
|
2131
|
+
{ range: [20, 50], unit: ["亿", "亿"], text: "20亿~50亿" },
|
|
2132
|
+
{ range: [100, null], unit: ["亿", "亿"], text: "≥100亿" },
|
|
2133
|
+
{ range: [200, null], unit: ["亿", "亿"], text: "≥200亿" },
|
|
2134
|
+
{ range: [500, null], unit: ["亿", "亿"], text: "≥500亿" },
|
|
2135
|
+
{ range: [1e3, null], unit: ["亿", "亿"], text: "≥1000亿" }
|
|
2136
|
+
],
|
|
2137
|
+
// 默认选中单位
|
|
2138
|
+
defaultUnit: ["亿", "亿"],
|
|
2139
|
+
// 单位下拉框选项
|
|
2140
|
+
unitOptions: ["元", "千万", "亿"]
|
|
2141
|
+
},
|
|
2142
|
+
// 流通市值
|
|
2143
|
+
{
|
|
2144
|
+
key: "floatMarketCapital",
|
|
2145
|
+
label: "流通市值",
|
|
2146
|
+
parent: {
|
|
2147
|
+
varietyMarketIds: [3, 5, 7],
|
|
2148
|
+
commonOptionIds: [4, 6]
|
|
2149
|
+
},
|
|
2150
|
+
// 便捷选项
|
|
2151
|
+
convenientOptions: [
|
|
2152
|
+
{ range: [null, 5], unit: ["亿", "亿"], text: "≤5亿" },
|
|
2153
|
+
{ range: [null, 20], unit: ["亿", "亿"], text: "≤20亿" },
|
|
2154
|
+
{ range: [null, 50], unit: ["亿", "亿"], text: "≤50亿" },
|
|
2155
|
+
{ range: [null, 100], unit: ["亿", "亿"], text: "≤100亿" },
|
|
2156
|
+
{ range: [100, null], unit: ["亿", "亿"], text: "≥100亿" },
|
|
2157
|
+
{ range: [200, null], unit: ["亿", "亿"], text: "≥200亿" },
|
|
2158
|
+
{ range: [500, null], unit: ["亿", "亿"], text: "≥500亿" },
|
|
2159
|
+
{ range: [1e3, null], unit: ["亿", "亿"], text: "≥1000亿" }
|
|
2160
|
+
],
|
|
2161
|
+
// 默认选中单位
|
|
2162
|
+
defaultUnit: ["亿", "亿"],
|
|
2163
|
+
// 单位下拉框选项
|
|
2164
|
+
unitOptions: ["元", "千万", "亿"]
|
|
2165
|
+
},
|
|
2166
|
+
// 总股本
|
|
2167
|
+
{
|
|
2168
|
+
key: "totalShares",
|
|
2169
|
+
label: "总股本",
|
|
2170
|
+
parent: {
|
|
2171
|
+
varietyMarketIds: [3, 5, 7],
|
|
2172
|
+
commonOptionIds: [4, 6]
|
|
2173
|
+
},
|
|
2174
|
+
// 便捷选项
|
|
2175
|
+
convenientOptions: [
|
|
2176
|
+
{ range: [null, 5], unit: ["亿", "亿"], text: "≤5亿" },
|
|
2177
|
+
{ range: [null, 10], unit: ["亿", "亿"], text: "≤10亿" },
|
|
2178
|
+
{ range: [null, 75], unit: ["亿", "亿"], text: "≤75亿" },
|
|
2179
|
+
{ range: [10, 75], unit: ["亿", "亿"], text: "10亿~75亿" },
|
|
2180
|
+
{ range: [100, null], unit: ["亿", "亿"], text: "≥100亿" }
|
|
2181
|
+
],
|
|
2182
|
+
// 默认选中单位
|
|
2183
|
+
defaultUnit: ["亿", "亿"],
|
|
2184
|
+
// 单位下拉框选项
|
|
2185
|
+
unitOptions: ["元", "千万", "亿"]
|
|
2186
|
+
},
|
|
2187
|
+
// 流通股本
|
|
2188
|
+
{
|
|
2189
|
+
key: "freeFloatShares",
|
|
2190
|
+
label: "流通股本",
|
|
2191
|
+
parent: {
|
|
2192
|
+
varietyMarketIds: [3, 5, 7],
|
|
2193
|
+
commonOptionIds: [4, 6]
|
|
2194
|
+
},
|
|
2195
|
+
// 便捷选项
|
|
2196
|
+
convenientOptions: [
|
|
2197
|
+
{ range: [null, 5], unit: ["千万", "千万"], text: "≤5千万" },
|
|
2198
|
+
{ range: [5, 3], unit: ["千万", "亿"], text: "5千万~3亿" },
|
|
2199
|
+
{ range: [null, 5], unit: ["亿", "亿"], text: "≤5亿" },
|
|
2200
|
+
{ range: [null, 10], unit: ["亿", "亿"], text: "≤10亿" },
|
|
2201
|
+
{ range: [8, 30], unit: ["亿", "亿"], text: "8亿~30亿" },
|
|
2202
|
+
{ range: [30, null], unit: ["亿", "亿"], text: "≥30亿" }
|
|
2203
|
+
],
|
|
2204
|
+
// 默认选中单位
|
|
2205
|
+
defaultUnit: ["亿", "亿"],
|
|
2206
|
+
// 单位下拉框选项
|
|
2207
|
+
unitOptions: ["元", "千万", "亿"]
|
|
2208
|
+
},
|
|
2209
|
+
// 换手率(实)
|
|
2210
|
+
{
|
|
2211
|
+
key: "turnoverRate",
|
|
2212
|
+
label: "换手率(实)",
|
|
2213
|
+
parent: {
|
|
2214
|
+
varietyMarketIds: [3, 5, 7],
|
|
2215
|
+
commonOptionIds: [4, 6]
|
|
2216
|
+
},
|
|
2217
|
+
// 便捷选项
|
|
2218
|
+
convenientOptions: [
|
|
2219
|
+
{ range: [null, 1], unit: ["%", "%"], text: "≤1%" },
|
|
2220
|
+
{ range: [1, 5], unit: ["%", "%"], text: "1%~5%" },
|
|
2221
|
+
{ range: [5, 10], unit: ["%", "%"], text: "5%~10%" },
|
|
2222
|
+
{ range: [10, null], unit: ["%", "%"], text: "≥10%" }
|
|
2223
|
+
],
|
|
2224
|
+
// 默认选中单位
|
|
2225
|
+
defaultUnit: ["%", "%"],
|
|
2226
|
+
// 单位下拉框选项
|
|
2227
|
+
unitOptions: ["%"]
|
|
2228
|
+
},
|
|
2229
|
+
// 市盈率
|
|
2230
|
+
{
|
|
2231
|
+
key: "peTtm",
|
|
2232
|
+
label: "市盈率",
|
|
2233
|
+
parent: {
|
|
2234
|
+
varietyMarketIds: [3, 5, 7],
|
|
2235
|
+
commonOptionIds: [4, 6]
|
|
2236
|
+
},
|
|
2237
|
+
// 便捷选项
|
|
2238
|
+
convenientOptions: [
|
|
2239
|
+
{ range: [0, 0], unit: [], text: "亏损" },
|
|
2240
|
+
{ range: [0, null], unit: [], text: "≥0" },
|
|
2241
|
+
{ range: [0, 20], unit: [], text: "0~20" },
|
|
2242
|
+
{ range: [20, 40], unit: [], text: "20~40" },
|
|
2243
|
+
{ range: [40, 100], unit: [], text: "40~100" },
|
|
2244
|
+
{ range: [100, null], unit: [], text: "≥100" }
|
|
2245
|
+
],
|
|
2246
|
+
// 默认选中单位
|
|
2247
|
+
defaultUnit: [],
|
|
2248
|
+
// 单位下拉框选项
|
|
2249
|
+
unitOptions: []
|
|
2250
|
+
},
|
|
2251
|
+
// 每股净收益
|
|
2252
|
+
{
|
|
2253
|
+
key: "eps",
|
|
2254
|
+
label: "每股净收益",
|
|
2255
|
+
parent: {
|
|
2256
|
+
varietyMarketIds: [3, 5, 7],
|
|
2257
|
+
commonOptionIds: [4, 6]
|
|
2258
|
+
},
|
|
2259
|
+
// 便捷选项
|
|
2260
|
+
convenientOptions: [
|
|
2261
|
+
{ range: [null, 0], unit: ["元", "元"], text: "≤0" },
|
|
2262
|
+
{ range: [0, null], unit: ["元", "元"], text: "≥0" },
|
|
2263
|
+
{ range: [0.2, null], unit: ["元", "元"], text: "≥0.2元" },
|
|
2264
|
+
{ range: [0.5, null], unit: ["元", "元"], text: "≥0.5元" },
|
|
2265
|
+
{ range: [1, null], unit: ["元", "元"], text: "≥1元" },
|
|
2266
|
+
{ range: [2, null], unit: ["元", "元"], text: "≥2元" }
|
|
2267
|
+
],
|
|
2268
|
+
// 默认选中单位
|
|
2269
|
+
defaultUnit: ["元", "元"],
|
|
2270
|
+
// 单位下拉框选项
|
|
2271
|
+
unitOptions: ["元"]
|
|
2272
|
+
},
|
|
2273
|
+
// 是否ST
|
|
2274
|
+
{
|
|
2275
|
+
key: "st",
|
|
2276
|
+
label: "是否ST",
|
|
2277
|
+
parent: {
|
|
2278
|
+
varietyMarketIds: [3, 5, 7],
|
|
2279
|
+
commonOptionIds: [4, 6]
|
|
2280
|
+
},
|
|
2281
|
+
type: "custom"
|
|
2282
|
+
},
|
|
2283
|
+
// 市净率
|
|
2284
|
+
{
|
|
2285
|
+
key: "pb",
|
|
2286
|
+
label: "市净率",
|
|
2287
|
+
parent: {
|
|
2288
|
+
varietyMarketIds: [3, 5, 7],
|
|
2289
|
+
commonOptionIds: [4, 6]
|
|
2290
|
+
},
|
|
2291
|
+
// 便捷选项
|
|
2292
|
+
convenientOptions: [
|
|
2293
|
+
{ range: [0, null], unit: [], text: "≥0" },
|
|
2294
|
+
{ range: [0, 1], unit: [], text: "0~1" },
|
|
2295
|
+
{ range: [1, 2], unit: [], text: "1~2" },
|
|
2296
|
+
{ range: [0, 3], unit: [], text: "0~3" },
|
|
2297
|
+
{ range: [3, null], unit: [], text: "≥3" }
|
|
2298
|
+
],
|
|
2299
|
+
// 默认选中单位
|
|
2300
|
+
defaultUnit: [],
|
|
2301
|
+
// 单位下拉框选项
|
|
2302
|
+
unitOptions: []
|
|
2303
|
+
},
|
|
2304
|
+
// 成交额
|
|
2305
|
+
{
|
|
2306
|
+
key: "mnShr",
|
|
2307
|
+
label: "成交额",
|
|
2308
|
+
parent: {
|
|
2309
|
+
varietyMarketIds: [3, 5, 7],
|
|
2310
|
+
commonOptionIds: [4, 6]
|
|
2311
|
+
},
|
|
2312
|
+
// 便捷选项
|
|
2313
|
+
convenientOptions: [
|
|
2314
|
+
{ range: [0, 1], unit: ["亿", "亿"], text: "0~1亿" },
|
|
2315
|
+
{ range: [0, 5], unit: ["亿", "亿"], text: "0~5亿" },
|
|
2316
|
+
{ range: [0, 10], unit: ["亿", "亿"], text: "0~10亿" },
|
|
2317
|
+
{ range: [10, null], unit: ["亿", "亿"], text: "≥10亿" },
|
|
2318
|
+
{ range: [50, null], unit: ["亿", "亿"], text: "≥50亿" },
|
|
2319
|
+
{ range: [100, null], unit: ["亿", "亿"], text: "≥100亿" }
|
|
2320
|
+
],
|
|
2321
|
+
// 默认选中单位
|
|
2322
|
+
defaultUnit: ["亿", "亿"],
|
|
2323
|
+
// 单位下拉框选项
|
|
2324
|
+
unitOptions: ["元", "千万", "亿"]
|
|
2325
|
+
},
|
|
2326
|
+
// 净资产收益率roe
|
|
2327
|
+
{
|
|
2328
|
+
key: "roe",
|
|
2329
|
+
label: "净资产收益率roe",
|
|
2330
|
+
parent: {
|
|
2331
|
+
varietyMarketIds: [3, 5, 7],
|
|
2332
|
+
commonOptionIds: [4, 6]
|
|
2333
|
+
},
|
|
2334
|
+
// 便捷选项
|
|
2335
|
+
convenientOptions: [
|
|
2336
|
+
{ range: [null, 0], unit: ["%", "%"], text: "<0" },
|
|
2337
|
+
{ range: [0, null], unit: ["%", "%"], text: ">0" },
|
|
2338
|
+
{ range: [10, null], unit: ["%", "%"], text: ">10%" },
|
|
2339
|
+
{ range: [15, null], unit: ["%", "%"], text: ">15%" },
|
|
2340
|
+
{ range: [20, null], unit: ["%", "%"], text: ">20%" },
|
|
2341
|
+
{ range: [30, null], unit: ["%", "%"], text: ">30%" }
|
|
2342
|
+
],
|
|
2343
|
+
// 默认选中单位
|
|
2344
|
+
defaultUnit: ["%", "%"],
|
|
2345
|
+
// 单位下拉框选项
|
|
2346
|
+
unitOptions: ["%"]
|
|
2347
|
+
},
|
|
2348
|
+
// 净利润
|
|
2349
|
+
{
|
|
2350
|
+
key: "tFeaturelncomes",
|
|
2351
|
+
label: "净利润",
|
|
2352
|
+
parent: {
|
|
2353
|
+
varietyMarketIds: [3, 5, 7],
|
|
2354
|
+
commonOptionIds: [4, 6]
|
|
2355
|
+
},
|
|
2356
|
+
type: "custom"
|
|
2357
|
+
},
|
|
2358
|
+
// ----------期权-----------
|
|
2359
|
+
// 过期天数
|
|
2360
|
+
{
|
|
2361
|
+
key: "expireDays",
|
|
2362
|
+
label: "过期天数",
|
|
2363
|
+
parent: {
|
|
2364
|
+
varietyMarketIds: [8],
|
|
2365
|
+
commonOptionIds: [11]
|
|
2366
|
+
},
|
|
2367
|
+
// 便捷选项
|
|
2368
|
+
convenientOptions: [],
|
|
2369
|
+
// 默认选中单位
|
|
2370
|
+
defaultUnit: ["天", "天"],
|
|
2371
|
+
// 单位下拉框选项
|
|
2372
|
+
unitOptions: ["天"]
|
|
2373
|
+
},
|
|
2374
|
+
// 虚实度
|
|
2375
|
+
{
|
|
2376
|
+
key: "virtualRealDegree",
|
|
2377
|
+
label: "虚实度",
|
|
2378
|
+
parent: {
|
|
2379
|
+
varietyMarketIds: [8],
|
|
2380
|
+
commonOptionIds: [11]
|
|
2381
|
+
},
|
|
2382
|
+
// 便捷选项
|
|
2383
|
+
convenientOptions: [],
|
|
2384
|
+
// 默认选中单位
|
|
2385
|
+
defaultUnit: ["%", "%"],
|
|
2386
|
+
// 单位下拉框选项
|
|
2387
|
+
unitOptions: ["%"]
|
|
2388
|
+
},
|
|
2389
|
+
// 年化收益率
|
|
2390
|
+
{
|
|
2391
|
+
key: "yearProfitRate",
|
|
2392
|
+
label: "年化收益率",
|
|
2393
|
+
parent: {
|
|
2394
|
+
varietyMarketIds: [8],
|
|
2395
|
+
commonOptionIds: [11]
|
|
2396
|
+
},
|
|
2397
|
+
// 便捷选项
|
|
2398
|
+
convenientOptions: [],
|
|
2399
|
+
// 默认选中单位
|
|
2400
|
+
defaultUnit: ["%", "%"],
|
|
2401
|
+
// 单位下拉框选项
|
|
2402
|
+
unitOptions: ["%"]
|
|
2403
|
+
},
|
|
2404
|
+
// 隐含波动率
|
|
2405
|
+
{
|
|
2406
|
+
key: "impliedVolatility",
|
|
2407
|
+
label: "隐含波动率",
|
|
2408
|
+
parent: {
|
|
2409
|
+
varietyMarketIds: [8],
|
|
2410
|
+
commonOptionIds: [11]
|
|
2411
|
+
},
|
|
2412
|
+
// 便捷选项
|
|
2413
|
+
convenientOptions: [],
|
|
2414
|
+
// 默认选中单位
|
|
2415
|
+
defaultUnit: ["%", "%"],
|
|
2416
|
+
// 单位下拉框选项
|
|
2417
|
+
unitOptions: ["%"]
|
|
2418
|
+
},
|
|
2419
|
+
// 杠杆率
|
|
2420
|
+
{
|
|
2421
|
+
key: "levelMultiplier",
|
|
2422
|
+
label: "杠杆率",
|
|
2423
|
+
parent: {
|
|
2424
|
+
varietyMarketIds: [8],
|
|
2425
|
+
commonOptionIds: [11]
|
|
2426
|
+
},
|
|
2427
|
+
// 便捷选项
|
|
2428
|
+
convenientOptions: [],
|
|
2429
|
+
// 默认选中单位
|
|
2430
|
+
defaultUnit: [],
|
|
2431
|
+
// 单位下拉框选项
|
|
2432
|
+
unitOptions: []
|
|
2433
|
+
},
|
|
2434
|
+
// 成交额(期权)
|
|
2435
|
+
{
|
|
2436
|
+
key: "turnover",
|
|
2437
|
+
label: "成交额(期权)",
|
|
2438
|
+
parent: {
|
|
2439
|
+
varietyMarketIds: [8],
|
|
2440
|
+
commonOptionIds: [11]
|
|
2441
|
+
},
|
|
2442
|
+
// 便捷选项
|
|
2443
|
+
convenientOptions: [],
|
|
2444
|
+
// 默认选中单位
|
|
2445
|
+
defaultUnit: ["万", "万"],
|
|
2446
|
+
// 单位下拉框选项
|
|
2447
|
+
unitOptions: ["万"]
|
|
2448
|
+
},
|
|
2449
|
+
// 成交量
|
|
2450
|
+
{
|
|
2451
|
+
key: "volume",
|
|
2452
|
+
label: "成交量",
|
|
2453
|
+
parent: {
|
|
2454
|
+
varietyMarketIds: [8],
|
|
2455
|
+
commonOptionIds: [11]
|
|
2456
|
+
},
|
|
2457
|
+
// 便捷选项
|
|
2458
|
+
convenientOptions: [],
|
|
2459
|
+
// 默认选中单位
|
|
2460
|
+
defaultUnit: [],
|
|
2461
|
+
// 单位下拉框选项
|
|
2462
|
+
unitOptions: []
|
|
2463
|
+
},
|
|
2464
|
+
// 持仓量
|
|
2465
|
+
{
|
|
2466
|
+
key: "openInterest",
|
|
2467
|
+
label: "持仓量",
|
|
2468
|
+
parent: {
|
|
2469
|
+
varietyMarketIds: [8],
|
|
2470
|
+
commonOptionIds: [11]
|
|
2471
|
+
},
|
|
2472
|
+
// 便捷选项
|
|
2473
|
+
convenientOptions: [],
|
|
2474
|
+
// 默认选中单位
|
|
2475
|
+
defaultUnit: [],
|
|
2476
|
+
// 单位下拉框选项
|
|
2477
|
+
unitOptions: []
|
|
2478
|
+
},
|
|
2479
|
+
// 认沽认购
|
|
2480
|
+
{
|
|
2481
|
+
key: "optionsCpType",
|
|
2482
|
+
label: "认沽认购",
|
|
2483
|
+
parent: {
|
|
2484
|
+
varietyMarketIds: [8],
|
|
2485
|
+
commonOptionIds: [11]
|
|
2486
|
+
},
|
|
2487
|
+
type: "custom"
|
|
2488
|
+
},
|
|
2489
|
+
// 持仓量
|
|
2490
|
+
{
|
|
2491
|
+
key: "optionGear",
|
|
2492
|
+
label: "期权档位",
|
|
2493
|
+
parent: {
|
|
2494
|
+
varietyMarketIds: [8],
|
|
2495
|
+
commonOptionIds: [11]
|
|
2496
|
+
},
|
|
2497
|
+
// 便捷选项
|
|
2498
|
+
convenientOptions: [],
|
|
2499
|
+
// 默认选中单位
|
|
2500
|
+
defaultUnit: [],
|
|
2501
|
+
// 单位下拉框选项
|
|
2502
|
+
unitOptions: []
|
|
2503
|
+
}
|
|
2504
|
+
]
|
|
2505
|
+
}
|
|
2506
|
+
};
|
|
2507
|
+
const _l = (n) => (bt("data-v-a6a3b89f"), n = n(), ht(), n), Ol = { class: "factor-screen" }, wl = { class: "form-row" }, xl = { style: { display: "flex", "align-items": "center", width: "100%", height: "24px" } }, kl = /* @__PURE__ */ _l(() => /* @__PURE__ */ N("span", null, "~", -1)), Il = { class: "dialog-footer" }, Sl = {
|
|
2508
|
+
__name: "index",
|
|
2509
|
+
props: /* @__PURE__ */ gt({ config: { type: Object, default: () => {
|
|
2510
|
+
} } }, {
|
|
2511
|
+
data: { default: [] },
|
|
2512
|
+
dataModifiers: {}
|
|
2513
|
+
}),
|
|
2514
|
+
emits: ["update:data"],
|
|
2515
|
+
setup(n) {
|
|
2516
|
+
const e = n, t = yt(n, "data"), r = G(!1), a = G(null), l = G({ factorScreen: [{ cycle: e.config.cycleDefault ?? null, factor: null, score: [null, null] }] }), o = (g, c, v) => {
|
|
2517
|
+
!c[0] && c[0] !== 0 && !c[1] && c[1] !== 0 ? v(new Error("至少填写一个分数")) : v();
|
|
2518
|
+
}, i = () => {
|
|
2519
|
+
t.value.length > 0 ? l.value.factorScreen = JSON.parse(JSON.stringify(t.value)) : l.value.factorScreen = [{ cycle: e.config.cycleDefault ?? null, factor: null, score: [null, null] }], r.value = !0;
|
|
2520
|
+
}, f = (g) => {
|
|
2521
|
+
t.value.splice(g, 1);
|
|
2522
|
+
}, x = () => {
|
|
2523
|
+
l.value.factorScreen.push({ cycle: e.config.cycleDefault ?? null, factor: null, score: [null, null] });
|
|
2524
|
+
}, p = (g) => {
|
|
2525
|
+
l.value.factorScreen.splice(g, 1);
|
|
2526
|
+
}, d = () => {
|
|
2527
|
+
a.value && a.value.validate((g) => {
|
|
2528
|
+
g ? (t.value = JSON.parse(JSON.stringify(l.value.factorScreen)), r.value = !1) : console.error("因子筛选-弹窗: 表单校验未通过");
|
|
2529
|
+
});
|
|
2530
|
+
}, _ = (g) => {
|
|
2531
|
+
const { cycle: c, factor: v, score: m } = g;
|
|
2532
|
+
let s = "";
|
|
2533
|
+
return s += ` ${e.config.cycleOptions.find(({ value: w }) => w === c).label}`, s += ` ${e.config.factorOptions.find(({ value: w }) => w === v).label}`, s += ` ${m[0] || m[0] === 0 ? `${m[0]}分` : "∞"}`, s += " ~", s += ` ${m[1] || m[1] === 0 ? `${m[1]}分` : "∞"}`, s;
|
|
2534
|
+
};
|
|
2535
|
+
return (g, c) => {
|
|
2536
|
+
const v = sn, m = vn, s = un, w = dn, h = Vo, O = An, S = Ce, C = Eo, $ = on;
|
|
2537
|
+
return k(), A("div", Ol, [
|
|
2538
|
+
t.value.length ? (k(!0), A(Q, { key: 0 }, ie(t.value, (b, z) => (k(), L(v, {
|
|
2539
|
+
closable: "",
|
|
2540
|
+
type: "info",
|
|
2541
|
+
onClose: (B) => f(z)
|
|
2542
|
+
}, {
|
|
2543
|
+
default: F(() => [
|
|
2544
|
+
R(X(_(b)), 1)
|
|
2545
|
+
]),
|
|
2546
|
+
_: 2
|
|
2547
|
+
}, 1032, ["onClose"]))), 256)) : K("", !0),
|
|
2548
|
+
V(m, {
|
|
2549
|
+
class: "screen-btn",
|
|
2550
|
+
type: "primary",
|
|
2551
|
+
plain: "",
|
|
2552
|
+
size: "small",
|
|
2553
|
+
icon: u(at),
|
|
2554
|
+
onClick: i
|
|
2555
|
+
}, {
|
|
2556
|
+
default: F(() => [
|
|
2557
|
+
R("添加因子")
|
|
2558
|
+
]),
|
|
2559
|
+
_: 1
|
|
2560
|
+
}, 8, ["icon"]),
|
|
2561
|
+
V($, {
|
|
2562
|
+
modelValue: r.value,
|
|
2563
|
+
"onUpdate:modelValue": c[0] || (c[0] = (b) => r.value = b),
|
|
2564
|
+
title: "因子筛选",
|
|
2565
|
+
width: "500",
|
|
2566
|
+
"align-center": "",
|
|
2567
|
+
"destroy-on-close": ""
|
|
2568
|
+
}, {
|
|
2569
|
+
footer: F(() => [
|
|
2570
|
+
N("div", Il, [
|
|
2571
|
+
V(m, {
|
|
2572
|
+
type: "primary",
|
|
2573
|
+
onClick: d
|
|
2574
|
+
}, {
|
|
2575
|
+
default: F(() => [
|
|
2576
|
+
R("确定")
|
|
2577
|
+
]),
|
|
2578
|
+
_: 1
|
|
2579
|
+
})
|
|
2580
|
+
])
|
|
2581
|
+
]),
|
|
2582
|
+
default: F(() => [
|
|
2583
|
+
V(C, {
|
|
2584
|
+
ref_key: "dialogFormRef",
|
|
2585
|
+
ref: a,
|
|
2586
|
+
model: l.value
|
|
2587
|
+
}, {
|
|
2588
|
+
default: F(() => [
|
|
2589
|
+
(k(!0), A(Q, null, ie(l.value.factorScreen, (b, z) => (k(), A("div", wl, [
|
|
2590
|
+
n.config.cycleShow ? (k(), L(h, {
|
|
2591
|
+
key: 0,
|
|
2592
|
+
prop: "factorScreen." + z + ".cycle",
|
|
2593
|
+
rules: { required: !0, message: "周期不能为空", trigger: "blur" },
|
|
2594
|
+
style: { width: "100px", "margin-right": "10px" }
|
|
2595
|
+
}, {
|
|
2596
|
+
default: F(() => [
|
|
2597
|
+
V(w, {
|
|
2598
|
+
modelValue: b.cycle,
|
|
2599
|
+
"onUpdate:modelValue": (B) => b.cycle = B,
|
|
2600
|
+
placeholder: "选择周期",
|
|
2601
|
+
size: "small"
|
|
2602
|
+
}, {
|
|
2603
|
+
default: F(() => [
|
|
2604
|
+
(k(!0), A(Q, null, ie(n.config.cycleOptions, ({ label: B, value: ne }) => (k(), L(s, {
|
|
2605
|
+
label: B,
|
|
2606
|
+
value: ne,
|
|
2607
|
+
key: ne
|
|
2608
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
2609
|
+
]),
|
|
2610
|
+
_: 2
|
|
2611
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
|
2612
|
+
]),
|
|
2613
|
+
_: 2
|
|
2614
|
+
}, 1032, ["prop"])) : K("", !0),
|
|
2615
|
+
V(h, {
|
|
2616
|
+
prop: "factorScreen." + z + ".factor",
|
|
2617
|
+
rules: { required: !0, message: "因子不能为空", trigger: "blur" },
|
|
2618
|
+
style: { width: "100px", "margin-right": "10px" }
|
|
2619
|
+
}, {
|
|
2620
|
+
default: F(() => [
|
|
2621
|
+
V(w, {
|
|
2622
|
+
modelValue: b.factor,
|
|
2623
|
+
"onUpdate:modelValue": (B) => b.factor = B,
|
|
2624
|
+
placeholder: "选择因子",
|
|
2625
|
+
filterable: "",
|
|
2626
|
+
size: "small",
|
|
2627
|
+
"no-match-text": "无匹配数据"
|
|
2628
|
+
}, {
|
|
2629
|
+
default: F(() => [
|
|
2630
|
+
(k(!0), A(Q, null, ie(n.config.factorOptions, ({ label: B, value: ne }) => (k(), L(s, {
|
|
2631
|
+
label: B,
|
|
2632
|
+
value: ne,
|
|
2633
|
+
key: ne
|
|
2634
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
2635
|
+
]),
|
|
2636
|
+
_: 2
|
|
2637
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
|
2638
|
+
]),
|
|
2639
|
+
_: 2
|
|
2640
|
+
}, 1032, ["prop"]),
|
|
2641
|
+
V(h, {
|
|
2642
|
+
prop: "factorScreen." + z + ".score",
|
|
2643
|
+
rules: { validator: o, trigger: "blur" },
|
|
2644
|
+
style: { width: "200px", "margin-right": "10px" }
|
|
2645
|
+
}, {
|
|
2646
|
+
default: F(() => [
|
|
2647
|
+
N("div", xl, [
|
|
2648
|
+
V(O, {
|
|
2649
|
+
modelValue: b.score[0],
|
|
2650
|
+
"onUpdate:modelValue": (B) => b.score[0] = B,
|
|
2651
|
+
size: "small",
|
|
2652
|
+
"controls-position": "right"
|
|
2653
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2654
|
+
kl,
|
|
2655
|
+
V(O, {
|
|
2656
|
+
modelValue: b.score[1],
|
|
2657
|
+
"onUpdate:modelValue": (B) => b.score[1] = B,
|
|
2658
|
+
size: "small",
|
|
2659
|
+
"controls-position": "right"
|
|
2660
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2661
|
+
])
|
|
2662
|
+
]),
|
|
2663
|
+
_: 2
|
|
2664
|
+
}, 1032, ["prop", "rules"]),
|
|
2665
|
+
V(S, {
|
|
2666
|
+
onClick: (B) => p(z)
|
|
2667
|
+
}, {
|
|
2668
|
+
default: F(() => [
|
|
2669
|
+
V(u(pr))
|
|
2670
|
+
]),
|
|
2671
|
+
_: 2
|
|
2672
|
+
}, 1032, ["onClick"])
|
|
2673
|
+
]))), 256)),
|
|
2674
|
+
V(m, {
|
|
2675
|
+
type: "primary",
|
|
2676
|
+
plain: "",
|
|
2677
|
+
size: "small",
|
|
2678
|
+
icon: u(at),
|
|
2679
|
+
onClick: x
|
|
2680
|
+
}, {
|
|
2681
|
+
default: F(() => [
|
|
2682
|
+
R("添加因子")
|
|
2683
|
+
]),
|
|
2684
|
+
_: 1
|
|
2685
|
+
}, 8, ["icon"])
|
|
2686
|
+
]),
|
|
2687
|
+
_: 1
|
|
2688
|
+
}, 8, ["model"])
|
|
2689
|
+
]),
|
|
2690
|
+
_: 1
|
|
2691
|
+
}, 8, ["modelValue"])
|
|
2692
|
+
]);
|
|
2693
|
+
};
|
|
2694
|
+
}
|
|
2695
|
+
}, $l = /* @__PURE__ */ Ot(Sl, [["__scopeId", "data-v-a6a3b89f"]]);
|
|
2696
|
+
const It = (n) => (bt("data-v-0a691a79"), n = n(), ht(), n), Fl = {
|
|
2697
|
+
key: 0,
|
|
2698
|
+
class: "common-indicator"
|
|
2699
|
+
}, El = { class: "indicator" }, Vl = /* @__PURE__ */ It(() => /* @__PURE__ */ N("div", { class: "title" }, [
|
|
2700
|
+
/* @__PURE__ */ N("span", null, "常用指标: "),
|
|
2701
|
+
/* @__PURE__ */ N("span", null, "不限")
|
|
2702
|
+
], -1)), Tl = { class: "options" }, Cl = ["onClick"], Nl = { class: "tags" }, Al = ["onClick"], Ml = {
|
|
2703
|
+
key: 0,
|
|
2704
|
+
class: "convenient-option-box"
|
|
2705
|
+
}, jl = { class: "out-box" }, Pl = /* @__PURE__ */ It(() => /* @__PURE__ */ N("span", null, "自定义: ", -1)), ql = { key: 0 }, Rl = { key: 0 }, Ul = { key: 0 }, Dl = { key: 1 }, Bl = { class: "tFeaturelncomes-option-box" }, Ll = { class: "tFeaturelncomes-out-box" }, zl = /* @__PURE__ */ It(() => /* @__PURE__ */ N("span", null, "自定义: ", -1)), Wl = { key: 2 }, Gl = { class: "dialog-footer" }, Kl = {
|
|
2706
|
+
__name: "index",
|
|
2707
|
+
props: /* @__PURE__ */ gt({
|
|
2708
|
+
config: { type: Object, default: () => {
|
|
2709
|
+
} },
|
|
2710
|
+
varietyMarket: { type: Number, default: () => null },
|
|
2711
|
+
// 已选品种市场
|
|
2712
|
+
commonOption: { type: Array, default: () => [] }
|
|
2713
|
+
// 已选常用选项
|
|
2714
|
+
}, {
|
|
2715
|
+
data: { default: [] },
|
|
2716
|
+
dataModifiers: {}
|
|
2717
|
+
}),
|
|
2718
|
+
emits: ["update:data"],
|
|
2719
|
+
setup(n) {
|
|
2720
|
+
const e = n, t = yt(n, "data"), r = T(() => {
|
|
2721
|
+
let g = [];
|
|
2722
|
+
return e.varietyMarket === null && !e.commonOption.length ? g = e.config.options : (g = e.config.options, e.varietyMarket && (g = g.filter(({ parent: c }) => c.varietyMarketIds.includes(e.varietyMarket))), e.commonOption.length && (g = g.filter(({ parent: c }) => {
|
|
2723
|
+
const { commonOptionIds: v } = c;
|
|
2724
|
+
return [.../* @__PURE__ */ new Set([...v, ...e.commonOption])].length !== [...v, ...e.commonOption].length;
|
|
2725
|
+
}))), g;
|
|
2726
|
+
});
|
|
2727
|
+
me(
|
|
2728
|
+
() => r.value,
|
|
2729
|
+
() => {
|
|
2730
|
+
t.value.length && (t.value = t.value.filter(({ key: g }) => r.value.find((c) => c.key === g)));
|
|
2731
|
+
}
|
|
2732
|
+
);
|
|
2733
|
+
const a = G(!1), l = G({}), o = G({}), i = (g) => {
|
|
2734
|
+
l.value = g;
|
|
2735
|
+
const c = {
|
|
2736
|
+
label: g.label,
|
|
2737
|
+
key: g.key,
|
|
2738
|
+
type: g.type
|
|
2739
|
+
};
|
|
2740
|
+
g.type === void 0 ? o.value = {
|
|
2741
|
+
...c,
|
|
2742
|
+
range: [null, null],
|
|
2743
|
+
unit: g.defaultUnit.length ? [...g.defaultUnit] : [null, null]
|
|
2744
|
+
} : g.key === "st" ? o.value = { ...c, st: null } : g.key === "tFeaturelncomes" ? o.value = {
|
|
2745
|
+
...c,
|
|
2746
|
+
rule: 1,
|
|
2747
|
+
// 1超 2跌
|
|
2748
|
+
withFewYears: null,
|
|
2749
|
+
yearsCount: null,
|
|
2750
|
+
netProfit: null
|
|
2751
|
+
} : g.key === "optionsCpType" && (o.value = {
|
|
2752
|
+
...c,
|
|
2753
|
+
optionsCpType: null
|
|
2754
|
+
// 1看涨 2看跌
|
|
2755
|
+
}), a.value = !0;
|
|
2756
|
+
}, f = (g) => {
|
|
2757
|
+
o.value.range = [...g.range], o.value.unit = [...g.unit];
|
|
2758
|
+
}, x = (g) => {
|
|
2759
|
+
switch (g) {
|
|
2760
|
+
case "≤0":
|
|
2761
|
+
Object.assign(o.value, {
|
|
2762
|
+
rule: 2,
|
|
2763
|
+
// 1超 2跌
|
|
2764
|
+
withFewYears: 1,
|
|
2765
|
+
yearsCount: 1,
|
|
2766
|
+
netProfit: 0
|
|
2767
|
+
});
|
|
2768
|
+
break;
|
|
2769
|
+
case "≥0":
|
|
2770
|
+
Object.assign(o.value, {
|
|
2771
|
+
rule: 1,
|
|
2772
|
+
withFewYears: 1,
|
|
2773
|
+
yearsCount: 1,
|
|
2774
|
+
netProfit: 0
|
|
2775
|
+
});
|
|
2776
|
+
break;
|
|
2777
|
+
case "五年内有四年以上盈利超过5千万":
|
|
2778
|
+
Object.assign(o.value, {
|
|
2779
|
+
rule: 1,
|
|
2780
|
+
withFewYears: 5,
|
|
2781
|
+
yearsCount: 4,
|
|
2782
|
+
netProfit: 0.5
|
|
2783
|
+
});
|
|
2784
|
+
break;
|
|
2785
|
+
case "≥10亿":
|
|
2786
|
+
Object.assign(o.value, {
|
|
2787
|
+
rule: 1,
|
|
2788
|
+
withFewYears: 1,
|
|
2789
|
+
yearsCount: 1,
|
|
2790
|
+
netProfit: 10
|
|
2791
|
+
});
|
|
2792
|
+
break;
|
|
2793
|
+
case "≥20亿":
|
|
2794
|
+
Object.assign(o.value, {
|
|
2795
|
+
rule: 1,
|
|
2796
|
+
withFewYears: 1,
|
|
2797
|
+
yearsCount: 1,
|
|
2798
|
+
netProfit: 20
|
|
2799
|
+
});
|
|
2800
|
+
break;
|
|
2801
|
+
}
|
|
2802
|
+
}, p = () => {
|
|
2803
|
+
if (o.value.type === void 0) {
|
|
2804
|
+
const { label: c, range: v, unit: m } = o.value;
|
|
2805
|
+
if (["", null].includes(v[0]) && ["", null].includes(v[1]))
|
|
2806
|
+
return Ue.warning("格式错误: 请至少填写一个值");
|
|
2807
|
+
!["", null].includes(v[0]) && !["", null].includes(v[1]) ? o.value.tagText = `${c}: ${v[0]}${m[0] ?? ""} ~ ${v[1]}${m[1] ?? ""}` : ["", null].includes(v[0]) ? o.value.tagText = `${c}: ≤${v[1]}${m[1] ?? ""}` : o.value.tagText = `${c}: ≥${v[0]}${m[0] ?? ""}`;
|
|
2808
|
+
} else if (o.value.key === "st") {
|
|
2809
|
+
const { label: c, st: v } = o.value;
|
|
2810
|
+
if (v === null)
|
|
2811
|
+
return Ue.warning("格式错误: 请至少选择一个值");
|
|
2812
|
+
o.value.tagText = `${c}: ${v ? "是" : "否"}`;
|
|
2813
|
+
} else if (o.value.key === "tFeaturelncomes") {
|
|
2814
|
+
const { label: c, rule: v, withFewYears: m, yearsCount: s, netProfit: w } = o.value;
|
|
2815
|
+
if (["", null].includes(m) || ["", null].includes(s) || ["", null].includes(w))
|
|
2816
|
+
return Ue.warning("格式错误: 请填写完整");
|
|
2817
|
+
o.value.tagText = `${c}: ${m}年内${s}年以上盈利${v === 1 ? "超" : "跌"}过${w}亿`;
|
|
2818
|
+
} else if (o.value.key === "optionsCpType") {
|
|
2819
|
+
const { label: c, optionsCpType: v } = o.value;
|
|
2820
|
+
if (v === null)
|
|
2821
|
+
return Ue.warning("格式错误: 请至少选择一个值");
|
|
2822
|
+
o.value.tagText = `${c}: ${v === 1 ? "看涨" : "看跌"}`;
|
|
2823
|
+
}
|
|
2824
|
+
const g = t.value.findIndex(({ key: c }) => c === o.value.key);
|
|
2825
|
+
g === -1 ? t.value.push(o.value) : t.value.splice(g, 1, o.value), a.value = !1;
|
|
2826
|
+
}, d = (g) => {
|
|
2827
|
+
t.value.splice(g, 1);
|
|
2828
|
+
}, _ = (g) => {
|
|
2829
|
+
l.value = r.value.find(({ key: c }) => c === g.key), o.value = g, a.value = !0;
|
|
2830
|
+
};
|
|
2831
|
+
return (g, c) => {
|
|
2832
|
+
const v = sn, m = vn, s = un, w = dn, h = ln, O = Cn, S = Nn, C = An, $ = on;
|
|
2833
|
+
return n.config.show && r.value.length ? (k(), A("div", Fl, [
|
|
2834
|
+
N("div", El, [
|
|
2835
|
+
Vl,
|
|
2836
|
+
N("div", Tl, [
|
|
2837
|
+
(k(!0), A(Q, null, ie(r.value, (b) => (k(), A("span", {
|
|
2838
|
+
key: b.key,
|
|
2839
|
+
onClick: (z) => i(b)
|
|
2840
|
+
}, X(b.label), 9, Cl))), 128))
|
|
2841
|
+
])
|
|
2842
|
+
]),
|
|
2843
|
+
N("div", Nl, [
|
|
2844
|
+
(k(!0), A(Q, null, ie(t.value, (b, z) => (k(), L(v, {
|
|
2845
|
+
closable: "",
|
|
2846
|
+
type: "info",
|
|
2847
|
+
onClose: (B) => d(z)
|
|
2848
|
+
}, {
|
|
2849
|
+
default: F(() => [
|
|
2850
|
+
N("span", null, X(b.tagText), 1),
|
|
2851
|
+
N("span", {
|
|
2852
|
+
class: "edit",
|
|
2853
|
+
onClick: (B) => _(b)
|
|
2854
|
+
}, "编辑", 8, Al)
|
|
2855
|
+
]),
|
|
2856
|
+
_: 2
|
|
2857
|
+
}, 1032, ["onClose"]))), 256))
|
|
2858
|
+
]),
|
|
2859
|
+
V($, {
|
|
2860
|
+
modelValue: a.value,
|
|
2861
|
+
"onUpdate:modelValue": c[14] || (c[14] = (b) => a.value = b),
|
|
2862
|
+
title: l.value.label,
|
|
2863
|
+
width: "600",
|
|
2864
|
+
"align-center": "",
|
|
2865
|
+
"destroy-on-close": ""
|
|
2866
|
+
}, {
|
|
2867
|
+
footer: F(() => [
|
|
2868
|
+
N("div", Gl, [
|
|
2869
|
+
V(m, {
|
|
2870
|
+
type: "primary",
|
|
2871
|
+
onClick: p
|
|
2872
|
+
}, {
|
|
2873
|
+
default: F(() => [
|
|
2874
|
+
R("确定")
|
|
2875
|
+
]),
|
|
2876
|
+
_: 1
|
|
2877
|
+
})
|
|
2878
|
+
])
|
|
2879
|
+
]),
|
|
2880
|
+
default: F(() => [
|
|
2881
|
+
l.value.type === void 0 ? (k(), A(Q, { key: 0 }, [
|
|
2882
|
+
l.value.convenientOptions.length ? (k(), A("div", Ml, [
|
|
2883
|
+
(k(!0), A(Q, null, ie(l.value.convenientOptions, (b) => (k(), L(m, {
|
|
2884
|
+
key: b.text,
|
|
2885
|
+
onClick: (z) => f(b)
|
|
2886
|
+
}, {
|
|
2887
|
+
default: F(() => [
|
|
2888
|
+
R(X(b.text), 1)
|
|
2889
|
+
]),
|
|
2890
|
+
_: 2
|
|
2891
|
+
}, 1032, ["onClick"]))), 128))
|
|
2892
|
+
])) : K("", !0),
|
|
2893
|
+
N("div", jl, [
|
|
2894
|
+
Pl,
|
|
2895
|
+
V(h, {
|
|
2896
|
+
modelValue: o.value.range[0],
|
|
2897
|
+
"onUpdate:modelValue": c[1] || (c[1] = (b) => o.value.range[0] = b),
|
|
2898
|
+
style: { flex: "1" }
|
|
2899
|
+
}, Vt({ _: 2 }, [
|
|
2900
|
+
l.value.unitOptions.length ? {
|
|
2901
|
+
name: "append",
|
|
2902
|
+
fn: F(() => [
|
|
2903
|
+
l.value.unitOptions.length === 1 ? (k(), A("span", ql, X(o.value.unit[0]), 1)) : (k(), L(w, {
|
|
2904
|
+
key: 1,
|
|
2905
|
+
modelValue: o.value.unit[0],
|
|
2906
|
+
"onUpdate:modelValue": c[0] || (c[0] = (b) => o.value.unit[0] = b),
|
|
2907
|
+
style: { width: "72px" }
|
|
2908
|
+
}, {
|
|
2909
|
+
default: F(() => [
|
|
2910
|
+
(k(!0), A(Q, null, ie(l.value.unitOptions, (b) => (k(), L(s, {
|
|
2911
|
+
label: b,
|
|
2912
|
+
value: b
|
|
2913
|
+
}, null, 8, ["label", "value"]))), 256))
|
|
2914
|
+
]),
|
|
2915
|
+
_: 1
|
|
2916
|
+
}, 8, ["modelValue"]))
|
|
2917
|
+
]),
|
|
2918
|
+
key: "0"
|
|
2919
|
+
} : void 0
|
|
2920
|
+
]), 1032, ["modelValue"]),
|
|
2921
|
+
R(" ~ "),
|
|
2922
|
+
V(h, {
|
|
2923
|
+
modelValue: o.value.range[1],
|
|
2924
|
+
"onUpdate:modelValue": c[3] || (c[3] = (b) => o.value.range[1] = b),
|
|
2925
|
+
style: { flex: "1" }
|
|
2926
|
+
}, Vt({ _: 2 }, [
|
|
2927
|
+
l.value.unitOptions.length ? {
|
|
2928
|
+
name: "append",
|
|
2929
|
+
fn: F(() => [
|
|
2930
|
+
l.value.unitOptions.length === 1 ? (k(), A("span", Rl, X(o.value.unit[1]), 1)) : (k(), L(w, {
|
|
2931
|
+
key: 1,
|
|
2932
|
+
modelValue: o.value.unit[1],
|
|
2933
|
+
"onUpdate:modelValue": c[2] || (c[2] = (b) => o.value.unit[1] = b),
|
|
2934
|
+
style: { width: "72px" }
|
|
2935
|
+
}, {
|
|
2936
|
+
default: F(() => [
|
|
2937
|
+
(k(!0), A(Q, null, ie(l.value.unitOptions, (b) => (k(), L(s, {
|
|
2938
|
+
label: b,
|
|
2939
|
+
value: b
|
|
2940
|
+
}, null, 8, ["label", "value"]))), 256))
|
|
2941
|
+
]),
|
|
2942
|
+
_: 1
|
|
2943
|
+
}, 8, ["modelValue"]))
|
|
2944
|
+
]),
|
|
2945
|
+
key: "0"
|
|
2946
|
+
} : void 0
|
|
2947
|
+
]), 1032, ["modelValue"])
|
|
2948
|
+
])
|
|
2949
|
+
], 64)) : (k(), A(Q, { key: 1 }, [
|
|
2950
|
+
l.value.key === "st" ? (k(), A("div", Ul, [
|
|
2951
|
+
V(S, {
|
|
2952
|
+
modelValue: o.value.st,
|
|
2953
|
+
"onUpdate:modelValue": c[4] || (c[4] = (b) => o.value.st = b)
|
|
2954
|
+
}, {
|
|
2955
|
+
default: F(() => [
|
|
2956
|
+
V(O, { label: 1 }, {
|
|
2957
|
+
default: F(() => [
|
|
2958
|
+
R("是")
|
|
2959
|
+
]),
|
|
2960
|
+
_: 1
|
|
2961
|
+
}),
|
|
2962
|
+
V(O, { label: 0 }, {
|
|
2963
|
+
default: F(() => [
|
|
2964
|
+
R("否")
|
|
2965
|
+
]),
|
|
2966
|
+
_: 1
|
|
2967
|
+
})
|
|
2968
|
+
]),
|
|
2969
|
+
_: 1
|
|
2970
|
+
}, 8, ["modelValue"])
|
|
2971
|
+
])) : K("", !0),
|
|
2972
|
+
l.value.key === "tFeaturelncomes" ? (k(), A("div", Dl, [
|
|
2973
|
+
N("div", Bl, [
|
|
2974
|
+
V(m, {
|
|
2975
|
+
onClick: c[5] || (c[5] = (b) => x("≤0"))
|
|
2976
|
+
}, {
|
|
2977
|
+
default: F(() => [
|
|
2978
|
+
R("≤0")
|
|
2979
|
+
]),
|
|
2980
|
+
_: 1
|
|
2981
|
+
}),
|
|
2982
|
+
V(m, {
|
|
2983
|
+
onClick: c[6] || (c[6] = (b) => x("≥0"))
|
|
2984
|
+
}, {
|
|
2985
|
+
default: F(() => [
|
|
2986
|
+
R("≥0")
|
|
2987
|
+
]),
|
|
2988
|
+
_: 1
|
|
2989
|
+
}),
|
|
2990
|
+
V(m, {
|
|
2991
|
+
onClick: c[7] || (c[7] = (b) => x("五年内有四年以上盈利超过5千万"))
|
|
2992
|
+
}, {
|
|
2993
|
+
default: F(() => [
|
|
2994
|
+
R("五年内有四年以上盈利超过5千万")
|
|
2995
|
+
]),
|
|
2996
|
+
_: 1
|
|
2997
|
+
}),
|
|
2998
|
+
V(m, {
|
|
2999
|
+
onClick: c[8] || (c[8] = (b) => x("≥10亿"))
|
|
3000
|
+
}, {
|
|
3001
|
+
default: F(() => [
|
|
3002
|
+
R("≥10亿")
|
|
3003
|
+
]),
|
|
3004
|
+
_: 1
|
|
3005
|
+
}),
|
|
3006
|
+
V(m, {
|
|
3007
|
+
onClick: c[9] || (c[9] = (b) => x("≥20亿"))
|
|
3008
|
+
}, {
|
|
3009
|
+
default: F(() => [
|
|
3010
|
+
R("≥20亿")
|
|
3011
|
+
]),
|
|
3012
|
+
_: 1
|
|
3013
|
+
})
|
|
3014
|
+
]),
|
|
3015
|
+
N("div", Ll, [
|
|
3016
|
+
zl,
|
|
3017
|
+
N("div", null, [
|
|
3018
|
+
V(C, {
|
|
3019
|
+
modelValue: o.value.withFewYears,
|
|
3020
|
+
"onUpdate:modelValue": c[10] || (c[10] = (b) => o.value.withFewYears = b),
|
|
3021
|
+
"controls-position": "right"
|
|
3022
|
+
}, null, 8, ["modelValue"]),
|
|
3023
|
+
R(" 年内 "),
|
|
3024
|
+
V(C, {
|
|
3025
|
+
modelValue: o.value.yearsCount,
|
|
3026
|
+
"onUpdate:modelValue": c[11] || (c[11] = (b) => o.value.yearsCount = b),
|
|
3027
|
+
"controls-position": "right"
|
|
3028
|
+
}, null, 8, ["modelValue"]),
|
|
3029
|
+
R(" 年以上盈利" + X(o.value.rule === 1 ? "超" : "跌") + "过 ", 1),
|
|
3030
|
+
V(C, {
|
|
3031
|
+
modelValue: o.value.netProfit,
|
|
3032
|
+
"onUpdate:modelValue": c[12] || (c[12] = (b) => o.value.netProfit = b),
|
|
3033
|
+
"controls-position": "right"
|
|
3034
|
+
}, null, 8, ["modelValue"]),
|
|
3035
|
+
R(" 亿 ")
|
|
3036
|
+
])
|
|
3037
|
+
])
|
|
3038
|
+
])) : K("", !0),
|
|
3039
|
+
l.value.key === "optionsCpType" ? (k(), A("div", Wl, [
|
|
3040
|
+
V(S, {
|
|
3041
|
+
modelValue: o.value.optionsCpType,
|
|
3042
|
+
"onUpdate:modelValue": c[13] || (c[13] = (b) => o.value.optionsCpType = b)
|
|
3043
|
+
}, {
|
|
3044
|
+
default: F(() => [
|
|
3045
|
+
V(O, { label: 1 }, {
|
|
3046
|
+
default: F(() => [
|
|
3047
|
+
R("看涨")
|
|
3048
|
+
]),
|
|
3049
|
+
_: 1
|
|
3050
|
+
}),
|
|
3051
|
+
V(O, { label: 2 }, {
|
|
3052
|
+
default: F(() => [
|
|
3053
|
+
R("看跌")
|
|
3054
|
+
]),
|
|
3055
|
+
_: 1
|
|
3056
|
+
})
|
|
3057
|
+
]),
|
|
3058
|
+
_: 1
|
|
3059
|
+
}, 8, ["modelValue"])
|
|
3060
|
+
])) : K("", !0)
|
|
3061
|
+
], 64))
|
|
3062
|
+
]),
|
|
3063
|
+
_: 1
|
|
3064
|
+
}, 8, ["modelValue", "title"])
|
|
3065
|
+
])) : K("", !0);
|
|
3066
|
+
};
|
|
3067
|
+
}
|
|
3068
|
+
}, Yl = /* @__PURE__ */ Ot(Kl, [["__scopeId", "data-v-0a691a79"]]);
|
|
3069
|
+
const Xe = (n) => (bt("data-v-931c484e"), n = n(), ht(), n), Hl = { class: "variety-search" }, Jl = {
|
|
3070
|
+
key: 0,
|
|
3071
|
+
class: "variety-search-row"
|
|
3072
|
+
}, Zl = { class: "title" }, Ql = /* @__PURE__ */ Xe(() => /* @__PURE__ */ N("span", null, "品种市场: ", -1)), Xl = {
|
|
3073
|
+
key: 1,
|
|
3074
|
+
class: "variety-search-row"
|
|
3075
|
+
}, ei = { class: "title" }, ti = /* @__PURE__ */ Xe(() => /* @__PURE__ */ N("span", null, "常用选项: ", -1)), ni = {
|
|
3076
|
+
key: 2,
|
|
3077
|
+
class: "variety-search-row"
|
|
3078
|
+
}, ri = { class: "title" }, ai = /* @__PURE__ */ Xe(() => /* @__PURE__ */ N("span", null, "自定标签: ", -1)), oi = {
|
|
3079
|
+
key: 3,
|
|
3080
|
+
class: "variety-search-row"
|
|
3081
|
+
}, li = { class: "title" }, ii = /* @__PURE__ */ Xe(() => /* @__PURE__ */ N("span", null, "因子筛选: ", -1)), si = {
|
|
3082
|
+
__name: "index",
|
|
3083
|
+
props: /* @__PURE__ */ gt({
|
|
3084
|
+
// 配置项
|
|
3085
|
+
config: { type: Object, default: {} }
|
|
3086
|
+
}, {
|
|
3087
|
+
searchData: {
|
|
3088
|
+
default: {
|
|
3089
|
+
varietyMarket: null,
|
|
3090
|
+
// 品种市场[单选]
|
|
3091
|
+
commonOption: [],
|
|
3092
|
+
// 常用选项[多选]
|
|
3093
|
+
customTag: [],
|
|
3094
|
+
// 自定标签[多选]
|
|
3095
|
+
factorScreen: [],
|
|
3096
|
+
// 因子筛选
|
|
3097
|
+
commonIndicator: []
|
|
3098
|
+
// 常用指标
|
|
3099
|
+
}
|
|
3100
|
+
},
|
|
3101
|
+
searchDataModifiers: {}
|
|
3102
|
+
}),
|
|
3103
|
+
emits: ["update:searchData"],
|
|
3104
|
+
setup(n, { expose: e }) {
|
|
3105
|
+
const t = n, r = yt(n, "searchData"), a = T(() => {
|
|
3106
|
+
const p = {};
|
|
3107
|
+
return Object.keys(Wt).forEach((d) => {
|
|
3108
|
+
const _ = Wt[d], g = t.config[d] ?? {}, c = { ..._, ...g };
|
|
3109
|
+
p[d] = c;
|
|
3110
|
+
}), p;
|
|
3111
|
+
}), l = T(() => a.value.varietyMarket.options), o = T(() => {
|
|
3112
|
+
const { varietyMarket: p } = r.value;
|
|
3113
|
+
if (p) {
|
|
3114
|
+
const d = l.value.find(({ value: _ }) => _ === p).memo;
|
|
3115
|
+
return a.value.commonOption.options.filter(({ value: _ }) => d.includes(_));
|
|
3116
|
+
} else
|
|
3117
|
+
return a.value.commonOption.options;
|
|
3118
|
+
});
|
|
3119
|
+
me(
|
|
3120
|
+
() => o.value,
|
|
3121
|
+
(p) => {
|
|
3122
|
+
r.value.commonOption.length && (r.value.commonOption = r.value.commonOption.filter((d) => p.find(({ value: _ }) => _ === d)));
|
|
3123
|
+
}
|
|
3124
|
+
);
|
|
3125
|
+
const i = T(() => a.value.customTag.options), f = (p) => {
|
|
3126
|
+
["commonOption", "customTag", "factorScreen", "commonIndicator"].includes(p) ? r.value[p] = [] : r.value[p] = null;
|
|
3127
|
+
};
|
|
3128
|
+
return e({ formatData: (p) => {
|
|
3129
|
+
const d = {};
|
|
3130
|
+
p.varietyMarket && (d.exchangeId = String(p.varietyMarket)), p.commonOption && p.commonOption.length && (d.optionId = p.commonOption.join(",")), p.customTag && p.customTag.length && (d.tagIds = p.customTag), p.factorScreen && p.factorScreen.length && (d.tbFeatureFactorScores = p.factorScreen.map((s) => ({
|
|
3131
|
+
freqId: s.cycle,
|
|
3132
|
+
factorId: s.factor,
|
|
3133
|
+
startScore: s.score[0],
|
|
3134
|
+
endScore: s.score[1]
|
|
3135
|
+
})));
|
|
3136
|
+
const _ = [
|
|
3137
|
+
"expireDays",
|
|
3138
|
+
"virtualRealDegree",
|
|
3139
|
+
"yearProfitRate",
|
|
3140
|
+
"impliedVolatility",
|
|
3141
|
+
"levelMultiplier",
|
|
3142
|
+
"turnover",
|
|
3143
|
+
"volume",
|
|
3144
|
+
"openInterest",
|
|
3145
|
+
"optionsCpType",
|
|
3146
|
+
"optionGear"
|
|
3147
|
+
], g = p.commonIndicator.reduce((s, w) => {
|
|
3148
|
+
const { key: h, type: O, range: S, unit: C } = w;
|
|
3149
|
+
if (O === void 0 && !_.includes(h)) {
|
|
3150
|
+
let [$, b] = S;
|
|
3151
|
+
if (!["", null].includes($))
|
|
3152
|
+
switch (C[0]) {
|
|
3153
|
+
case "亿":
|
|
3154
|
+
$ = $ * 1e8;
|
|
3155
|
+
break;
|
|
3156
|
+
case "千万":
|
|
3157
|
+
$ = $ * 1e7;
|
|
3158
|
+
break;
|
|
3159
|
+
default:
|
|
3160
|
+
$ = $;
|
|
3161
|
+
break;
|
|
3162
|
+
}
|
|
3163
|
+
if (!["", null].includes(b))
|
|
3164
|
+
switch (C[1]) {
|
|
3165
|
+
case "亿":
|
|
3166
|
+
b = b * 1e8;
|
|
3167
|
+
break;
|
|
3168
|
+
case "千万":
|
|
3169
|
+
b = b * 1e7;
|
|
3170
|
+
break;
|
|
3171
|
+
default:
|
|
3172
|
+
b = b;
|
|
3173
|
+
break;
|
|
3174
|
+
}
|
|
3175
|
+
s.push({
|
|
3176
|
+
column: w.key,
|
|
3177
|
+
start: $,
|
|
3178
|
+
end: b
|
|
3179
|
+
});
|
|
3180
|
+
}
|
|
3181
|
+
return s;
|
|
3182
|
+
}, []);
|
|
3183
|
+
g.length && (d.query = g);
|
|
3184
|
+
const c = p.commonIndicator.find(({ key: s }) => s === "st");
|
|
3185
|
+
c && (d.st = c.st);
|
|
3186
|
+
const v = p.commonIndicator.find(({ key: s }) => s === "tFeaturelncomes");
|
|
3187
|
+
v && (d.netProfitQueryDto = { ...v, netProfit: v.netProfit * 1e8 });
|
|
3188
|
+
const m = {};
|
|
3189
|
+
return p.commonIndicator.forEach((s) => {
|
|
3190
|
+
const { key: w } = s;
|
|
3191
|
+
switch (w) {
|
|
3192
|
+
case "expireDays":
|
|
3193
|
+
["", null].includes(s.range[0]) || (m.minExpireDays = s.range[0]), ["", null].includes(s.range[1]) || (m.maxExpireDays = s.range[1]);
|
|
3194
|
+
break;
|
|
3195
|
+
case "virtualRealDegree":
|
|
3196
|
+
["", null].includes(s.range[0]) || (m.minVirtualRealDegree = s.range[0] / 100), ["", null].includes(s.range[1]) || (m.maxVirtualRealDegree = s.range[1] / 100);
|
|
3197
|
+
break;
|
|
3198
|
+
case "yearProfitRate":
|
|
3199
|
+
["", null].includes(s.range[0]) || (m.minYearProfitRate = s.range[0] / 100), ["", null].includes(s.range[1]) || (m.maxYearProfitRate = s.range[1] / 100);
|
|
3200
|
+
break;
|
|
3201
|
+
case "impliedVolatility":
|
|
3202
|
+
["", null].includes(s.range[0]) || (m.minImpliedVolatility = s.range[0] / 100), ["", null].includes(s.range[1]) || (m.maxImpliedVolatility = s.range[1] / 100);
|
|
3203
|
+
break;
|
|
3204
|
+
case "levelMultiplier":
|
|
3205
|
+
["", null].includes(s.range[0]) || (m.minLevelMultiplier = s.range[0]), ["", null].includes(s.range[1]) || (m.maxLevelMultiplier = s.range[1]);
|
|
3206
|
+
break;
|
|
3207
|
+
case "turnover":
|
|
3208
|
+
["", null].includes(s.range[0]) || (m.minTurnover = s.range[0] * 1e4), ["", null].includes(s.range[1]) || (m.maxTurnover = s.range[1] * 1e4);
|
|
3209
|
+
break;
|
|
3210
|
+
case "volume":
|
|
3211
|
+
["", null].includes(s.range[0]) || (m.minVolume = s.range[0]), ["", null].includes(s.range[1]) || (m.maxVolume = s.range[1]);
|
|
3212
|
+
break;
|
|
3213
|
+
case "openInterest":
|
|
3214
|
+
["", null].includes(s.range[0]) || (m.minOpenInterest = s.range[0]), ["", null].includes(s.range[1]) || (m.maxOpenInterest = s.range[1]);
|
|
3215
|
+
break;
|
|
3216
|
+
case "optionsCpType":
|
|
3217
|
+
m.optionsCpType = s.optionsCpType;
|
|
3218
|
+
break;
|
|
3219
|
+
case "optionGear":
|
|
3220
|
+
["", null].includes(s.range[0]) || (m.minOptionGear = s.range[0]), ["", null].includes(s.range[1]) || (m.maxOptionGear = s.range[1]);
|
|
3221
|
+
break;
|
|
3222
|
+
}
|
|
3223
|
+
}), Object.keys(m).length && (d.searchOptionDto = m), d;
|
|
3224
|
+
} }), (p, d) => {
|
|
3225
|
+
var m, s, w, h;
|
|
3226
|
+
const _ = Cn, g = Nn, c = Qn, v = Xn;
|
|
3227
|
+
return k(), A("div", Hl, [
|
|
3228
|
+
(m = a.value.varietyMarket) != null && m.show ? (k(), A("div", Jl, [
|
|
3229
|
+
N("div", Zl, [
|
|
3230
|
+
Ql,
|
|
3231
|
+
N("span", {
|
|
3232
|
+
onClick: d[0] || (d[0] = (O) => f("varietyMarket"))
|
|
3233
|
+
}, "不限")
|
|
3234
|
+
]),
|
|
3235
|
+
V(g, {
|
|
3236
|
+
modelValue: r.value.varietyMarket,
|
|
3237
|
+
"onUpdate:modelValue": d[1] || (d[1] = (O) => r.value.varietyMarket = O),
|
|
3238
|
+
size: "small"
|
|
3239
|
+
}, {
|
|
3240
|
+
default: F(() => [
|
|
3241
|
+
(k(!0), A(Q, null, ie(l.value, ({ label: O, value: S }) => (k(), L(_, {
|
|
3242
|
+
label: S,
|
|
3243
|
+
key: S
|
|
3244
|
+
}, {
|
|
3245
|
+
default: F(() => [
|
|
3246
|
+
R(X(O), 1)
|
|
3247
|
+
]),
|
|
3248
|
+
_: 2
|
|
3249
|
+
}, 1032, ["label"]))), 128))
|
|
3250
|
+
]),
|
|
3251
|
+
_: 1
|
|
3252
|
+
}, 8, ["modelValue"])
|
|
3253
|
+
])) : K("", !0),
|
|
3254
|
+
(s = a.value.commonOption) != null && s.show && o.value.length ? (k(), A("div", Xl, [
|
|
3255
|
+
N("div", ei, [
|
|
3256
|
+
ti,
|
|
3257
|
+
N("span", {
|
|
3258
|
+
onClick: d[2] || (d[2] = (O) => f("commonOption"))
|
|
3259
|
+
}, "不限")
|
|
3260
|
+
]),
|
|
3261
|
+
V(v, {
|
|
3262
|
+
modelValue: r.value.commonOption,
|
|
3263
|
+
"onUpdate:modelValue": d[3] || (d[3] = (O) => r.value.commonOption = O),
|
|
3264
|
+
size: "small"
|
|
3265
|
+
}, {
|
|
3266
|
+
default: F(() => [
|
|
3267
|
+
(k(!0), A(Q, null, ie(o.value, ({ label: O, value: S }) => (k(), L(c, {
|
|
3268
|
+
label: S,
|
|
3269
|
+
key: S
|
|
3270
|
+
}, {
|
|
3271
|
+
default: F(() => [
|
|
3272
|
+
R(X(O), 1)
|
|
3273
|
+
]),
|
|
3274
|
+
_: 2
|
|
3275
|
+
}, 1032, ["label"]))), 128))
|
|
3276
|
+
]),
|
|
3277
|
+
_: 1
|
|
3278
|
+
}, 8, ["modelValue"])
|
|
3279
|
+
])) : K("", !0),
|
|
3280
|
+
(w = a.value.customTag) != null && w.show && i.value.length ? (k(), A("div", ni, [
|
|
3281
|
+
N("div", ri, [
|
|
3282
|
+
ai,
|
|
3283
|
+
N("span", {
|
|
3284
|
+
onClick: d[4] || (d[4] = (O) => f("customTag"))
|
|
3285
|
+
}, "不限")
|
|
3286
|
+
]),
|
|
3287
|
+
V(v, {
|
|
3288
|
+
modelValue: r.value.customTag,
|
|
3289
|
+
"onUpdate:modelValue": d[5] || (d[5] = (O) => r.value.customTag = O),
|
|
3290
|
+
size: "small"
|
|
3291
|
+
}, {
|
|
3292
|
+
default: F(() => [
|
|
3293
|
+
(k(!0), A(Q, null, ie(i.value, ({ label: O, value: S }) => (k(), L(c, {
|
|
3294
|
+
label: S,
|
|
3295
|
+
key: S
|
|
3296
|
+
}, {
|
|
3297
|
+
default: F(() => [
|
|
3298
|
+
R(X(O), 1)
|
|
3299
|
+
]),
|
|
3300
|
+
_: 2
|
|
3301
|
+
}, 1032, ["label"]))), 128))
|
|
3302
|
+
]),
|
|
3303
|
+
_: 1
|
|
3304
|
+
}, 8, ["modelValue"])
|
|
3305
|
+
])) : K("", !0),
|
|
3306
|
+
(h = a.value.factorScreen) != null && h.show ? (k(), A("div", oi, [
|
|
3307
|
+
N("div", li, [
|
|
3308
|
+
ii,
|
|
3309
|
+
N("span", {
|
|
3310
|
+
onClick: d[6] || (d[6] = (O) => f("factorScreen"))
|
|
3311
|
+
}, "不限")
|
|
3312
|
+
]),
|
|
3313
|
+
V($l, {
|
|
3314
|
+
data: r.value.factorScreen,
|
|
3315
|
+
"onUpdate:data": d[7] || (d[7] = (O) => r.value.factorScreen = O),
|
|
3316
|
+
config: a.value.factorScreen
|
|
3317
|
+
}, null, 8, ["data", "config"])
|
|
3318
|
+
])) : K("", !0),
|
|
3319
|
+
V(Yl, {
|
|
3320
|
+
data: r.value.commonIndicator,
|
|
3321
|
+
"onUpdate:data": d[8] || (d[8] = (O) => r.value.commonIndicator = O),
|
|
3322
|
+
varietyMarket: r.value.varietyMarket,
|
|
3323
|
+
commonOption: r.value.commonOption,
|
|
3324
|
+
config: a.value.commonIndicator
|
|
3325
|
+
}, null, 8, ["data", "varietyMarket", "commonOption", "config"])
|
|
3326
|
+
]);
|
|
3327
|
+
};
|
|
3328
|
+
}
|
|
3329
|
+
}, ui = /* @__PURE__ */ Ot(si, [["__scopeId", "data-v-931c484e"]]), $i = {
|
|
3330
|
+
install(n) {
|
|
3331
|
+
n.component("st-varietySearch", ui);
|
|
3332
|
+
}
|
|
3333
|
+
};
|
|
3334
|
+
export {
|
|
3335
|
+
$i as default
|
|
3336
|
+
};
|