st-comp 0.0.186 → 0.0.187
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/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +13 -12
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +21 -18
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +27 -24
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +14 -11
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +23 -20
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +18 -15
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +13 -10
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +16 -13
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +63 -60
- package/es/Table.cjs +1 -1
- package/es/Table.js +31 -29
- package/es/User.cjs +1 -1
- package/es/User.js +50 -47
- package/es/VarSelectDialog.cjs +3 -3
- package/es/VarSelectDialog.js +165 -478
- package/es/VarietyAutoComplete.cjs +1 -0
- package/es/VarietyAutoComplete.js +84 -0
- package/es/VarietySearch.cjs +6 -6
- package/es/VarietySearch.js +47 -44
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +31 -29
- package/es/_initCloneObject-25b9751e.cjs +1 -0
- package/es/{_initCloneObject-00cee14a.js → _initCloneObject-e473908b.js} +24 -23
- package/es/config-provider-87edaad3.cjs +1 -0
- package/es/{config-provider-89aba243.js → config-provider-8863d600.js} +10 -9
- package/es/{debounce-0b77a317.cjs → debounce-62f5b6e8.cjs} +1 -1
- package/es/{debounce-5f2ec4be.js → debounce-ccdceb02.js} +18 -18
- package/es/{dropdown-babf55db.cjs → dropdown-41097c52.cjs} +1 -1
- package/es/{dropdown-0fd8bdbd.js → dropdown-9b1f2f66.js} +2 -2
- package/es/el-autocomplete-03bc5b82.cjs +1 -0
- package/es/el-autocomplete-79142038.js +328 -0
- package/es/{el-button-338a49b7.cjs → el-button-8dd00125.cjs} +1 -1
- package/es/{el-button-f44cb2cf.js → el-button-e9ca802c.js} +2 -2
- package/es/{el-dialog-c2451c86.js → el-dialog-98b77ce1.js} +7 -7
- package/es/{el-dialog-45250561.cjs → el-dialog-ae8da57b.cjs} +1 -1
- package/es/el-empty-1697ded8.cjs +1 -0
- package/es/{el-empty-87a86f30.js → el-empty-34086220.js} +11 -10
- package/es/{el-form-item-64c14a64.js → el-form-item-1117a48f.js} +52 -51
- package/es/el-form-item-f66f8499.cjs +12 -0
- package/es/{el-input-ef6edbf3.js → el-input-2714f71f.js} +3 -3
- package/es/{el-input-c663697a.cjs → el-input-fc445025.cjs} +1 -1
- package/es/{el-input-number-5fda0890.cjs → el-input-number-25e0cdc0.cjs} +1 -1
- package/es/{el-input-number-cda5c4e1.js → el-input-number-657ec056.js} +4 -4
- package/es/{el-loading-8c3379d5.cjs → el-loading-4028e070.cjs} +1 -1
- package/es/{el-loading-1be77e7c.js → el-loading-a980dadc.js} +1 -1
- package/es/{el-menu-item-cf9e0e36.cjs → el-menu-item-940c40eb.cjs} +1 -1
- package/es/{el-menu-item-84a4b594.js → el-menu-item-c2ccd259.js} +4 -4
- package/es/{el-message-c500161d.cjs → el-message-0a3a0f2a.cjs} +1 -1
- package/es/{el-message-ba131b90.js → el-message-25e15a78.js} +4 -4
- package/es/{el-message-box-38779ab9.js → el-message-box-08498df3.js} +9 -9
- package/es/{el-message-box-743c461a.cjs → el-message-box-194cfd71.cjs} +1 -1
- package/es/{el-overlay-a6f43919.js → el-overlay-55b8b63b.js} +17 -17
- package/es/{el-overlay-39e2e96f.cjs → el-overlay-f42f765e.cjs} +1 -1
- package/es/{el-popconfirm-08b4221f.cjs → el-popconfirm-204d8607.cjs} +1 -1
- package/es/{el-popconfirm-16597a41.js → el-popconfirm-a1637c22.js} +4 -4
- package/es/{el-popper-05a8f271.js → el-popper-26aebdb6.js} +54 -54
- package/es/{el-popper-dca2de0d.cjs → el-popper-f194e471.cjs} +1 -1
- package/es/el-scrollbar-1c9093bf.cjs +1 -0
- package/es/el-scrollbar-e74f90d9.js +395 -0
- package/es/{el-segmented-c2952e4c.cjs → el-segmented-51f6d786.cjs} +1 -1
- package/es/{el-segmented-d68dfe31.js → el-segmented-85c9467d.js} +3 -3
- package/es/{el-select-7846f331.js → el-select-7b52dfc9.js} +106 -103
- package/es/el-select-f416ce28.cjs +1 -0
- package/es/el-table-column-8e24a62f.cjs +14 -0
- package/es/{el-table-column-cd63e722.js → el-table-column-f8a4f27b.js} +144 -142
- package/es/el-tag-65658264.cjs +1 -0
- package/es/{el-tag-914c96a9.js → el-tag-7de14b18.js} +23 -22
- package/es/index-02f7b722.cjs +1 -0
- package/es/{index-b132c1b1.js → index-30e29356.js} +1 -1
- package/es/index-482f09b5.js +204 -0
- package/es/{index-1c409d46.cjs → index-4a8be5b9.cjs} +1 -1
- package/es/{index-e6deec5d.cjs → index-4cd86c5e.cjs} +1 -1
- package/es/{index-20749652.js → index-520cfefa.js} +2 -2
- package/es/index-62df8bda.cjs +1 -0
- package/es/index-89502796.js +314 -0
- package/es/index-9780a537.cjs +1 -0
- package/es/index-b9cbb01d.js +60 -0
- package/es/index-bb833443.cjs +1 -0
- package/es/index-fee2efa8.js +375 -0
- package/es/style.css +1 -1
- package/es/use-global-config-51cce73d.js +72 -0
- package/es/use-global-config-b6bc4c2f.cjs +1 -0
- package/es/{validator-f66b0f34.cjs → validator-ed9fb862.cjs} +1 -1
- package/es/{validator-90d3e848.js → validator-fe13c731.js} +1 -1
- package/es/vnode-b906ae6d.cjs +1 -0
- package/es/vnode-c51c8aa3.js +14 -0
- package/es/{zh-cn-de7ae601.cjs → zh-cn-3771d788.cjs} +1 -1
- package/es/{zh-cn-530f1ed1.js → zh-cn-4fb50443.js} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +130 -130
- package/lib/{index-26fab3e5.js → index-73ca8189.js} +4620 -4552
- package/lib/{python-c34eeb40.js → python-a61cab9a.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietyAutoComplete/index.ts +8 -0
- package/packages/VarietyAutoComplete/index.vue +89 -0
- package/packages/index.ts +2 -0
- package/src/pages/VarietyAutoComplete/index.vue +19 -0
- package/src/router/routes.ts +5 -0
- package/es/_initCloneObject-4dd3c9a4.cjs +0 -1
- package/es/config-provider-d82ea78c.cjs +0 -1
- package/es/el-empty-bb2b0235.cjs +0 -1
- package/es/el-form-item-b5f6081b.cjs +0 -12
- package/es/el-scrollbar-31d72626.js +0 -763
- package/es/el-scrollbar-802d874d.cjs +0 -1
- package/es/el-select-8337856d.cjs +0 -1
- package/es/el-table-column-34f080b5.cjs +0 -14
- package/es/el-tag-a2e99294.cjs +0 -1
- package/es/index-34592e82.js +0 -513
- package/es/index-3a74eae4.cjs +0 -1
- package/es/use-global-config-53be2b7d.js +0 -71
- package/es/use-global-config-f3664595.cjs +0 -1
- package/es/vnode-6d51e502.cjs +0 -1
- package/es/vnode-8ddc4f78.js +0 -70
package/es/VarSelectDialog.js
CHANGED
|
@@ -1,346 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { E as
|
|
3
|
-
import "./el-overlay-
|
|
1
|
+
import "./base-62a70f61.js";
|
|
2
|
+
import { E as M } from "./el-dialog-98b77ce1.js";
|
|
3
|
+
import "./el-overlay-55b8b63b.js";
|
|
4
4
|
import "./el-tooltip-4ed993c7.js";
|
|
5
|
-
import {
|
|
6
|
-
import { E as
|
|
7
|
-
import {
|
|
8
|
-
import "./el-tag-
|
|
9
|
-
import { E as
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
5
|
+
import { E as O } from "./el-popper-26aebdb6.js";
|
|
6
|
+
import { E as R } from "./el-button-e9ca802c.js";
|
|
7
|
+
import { E as W } from "./el-input-2714f71f.js";
|
|
8
|
+
import "./el-tag-7de14b18.js";
|
|
9
|
+
import { E as G, a as H } from "./el-select-7b52dfc9.js";
|
|
10
|
+
import "./el-scrollbar-e74f90d9.js";
|
|
11
|
+
import { inject as A, ref as $, openBlock as a, createElementBlock as n, createCommentVNode as h, createVNode as y, withCtx as m, createElementVNode as c, toDisplayString as C, computed as J, onMounted as K, createBlock as N, Fragment as E, renderList as L, unref as T, createTextVNode as Q, pushScopeId as X, popScopeId as Y } from "vue";
|
|
12
|
+
import { c as Z, i as ee, E as te } from "./index-35129268.js";
|
|
13
|
+
import { E as le } from "./el-autocomplete-79142038.js";
|
|
14
|
+
import { V as oe } from "./index-7ed0999e.js";
|
|
15
|
+
import { _ as F } from "./_plugin-vue_export-helper-dad06003.js";
|
|
16
|
+
import { E as j } from "./el-message-25e15a78.js";
|
|
17
|
+
import "./index-482f09b5.js";
|
|
18
|
+
import "./index-89502796.js";
|
|
18
19
|
import "./index-2e331d74.js";
|
|
19
|
-
import "./vnode-
|
|
20
|
+
import "./vnode-c51c8aa3.js";
|
|
20
21
|
import "./scroll-7d352c1f.js";
|
|
21
|
-
import "./use-global-config-
|
|
22
|
+
import "./use-global-config-51cce73d.js";
|
|
23
|
+
import "./index-fee2efa8.js";
|
|
22
24
|
import "./index-657047bb.js";
|
|
23
25
|
import "./typescript-7ae59c4c.js";
|
|
24
|
-
import "./index-
|
|
25
|
-
import "./
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
type: String,
|
|
30
|
-
default: "value"
|
|
31
|
-
},
|
|
32
|
-
modelValue: {
|
|
33
|
-
type: [String, Number],
|
|
34
|
-
default: ""
|
|
35
|
-
},
|
|
36
|
-
debounce: {
|
|
37
|
-
type: Number,
|
|
38
|
-
default: 300
|
|
39
|
-
},
|
|
40
|
-
placement: {
|
|
41
|
-
type: ie(String),
|
|
42
|
-
values: [
|
|
43
|
-
"top",
|
|
44
|
-
"top-start",
|
|
45
|
-
"top-end",
|
|
46
|
-
"bottom",
|
|
47
|
-
"bottom-start",
|
|
48
|
-
"bottom-end"
|
|
49
|
-
],
|
|
50
|
-
default: "bottom-start"
|
|
51
|
-
},
|
|
52
|
-
fetchSuggestions: {
|
|
53
|
-
type: ie([Function, Array]),
|
|
54
|
-
default: Ue
|
|
55
|
-
},
|
|
56
|
-
popperClass: {
|
|
57
|
-
type: String,
|
|
58
|
-
default: ""
|
|
59
|
-
},
|
|
60
|
-
triggerOnFocus: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
default: !0
|
|
63
|
-
},
|
|
64
|
-
selectWhenUnmatched: Boolean,
|
|
65
|
-
hideLoading: Boolean,
|
|
66
|
-
teleported: ce.teleported,
|
|
67
|
-
appendTo: ce.appendTo,
|
|
68
|
-
highlightFirstItem: Boolean,
|
|
69
|
-
fitInputWidth: Boolean
|
|
70
|
-
}), it = {
|
|
71
|
-
[G]: (a) => Z(a) || ee(a),
|
|
72
|
-
[le]: (a) => Z(a) || ee(a),
|
|
73
|
-
[me]: (a) => Z(a) || ee(a),
|
|
74
|
-
focus: (a) => a instanceof FocusEvent,
|
|
75
|
-
blur: (a) => a instanceof FocusEvent,
|
|
76
|
-
clear: () => !0,
|
|
77
|
-
select: (a) => Le(a)
|
|
78
|
-
}, ke = "ElAutocomplete", ct = _e({
|
|
79
|
-
name: ke,
|
|
80
|
-
inheritAttrs: !1
|
|
81
|
-
}), pt = /* @__PURE__ */ _e({
|
|
82
|
-
...ct,
|
|
83
|
-
props: ut,
|
|
84
|
-
emits: it,
|
|
85
|
-
setup(a, { expose: R, emit: _ }) {
|
|
86
|
-
const d = a, I = z(() => qe(d, Object.keys(ge))), N = Xe(), F = Je(), f = Oe("autocomplete"), y = b(), E = b(), V = b(), p = b();
|
|
87
|
-
let u = !1, x = !1;
|
|
88
|
-
const i = b([]), o = b(-1), D = b(""), m = b(!1), k = b(!1), n = b(!1), l = nt(), B = z(() => N.style), t = z(() => (i.value.length > 0 || n.value) && m.value), T = z(() => !d.hideLoading && n.value), S = z(() => y.value ? Array.from(y.value.$el.querySelectorAll("input")) : []), q = () => {
|
|
89
|
-
t.value && (D.value = `${y.value.$el.offsetWidth}px`);
|
|
90
|
-
}, J = () => {
|
|
91
|
-
o.value = -1;
|
|
92
|
-
}, oe = async (e) => {
|
|
93
|
-
if (k.value)
|
|
94
|
-
return;
|
|
95
|
-
const c = (v) => {
|
|
96
|
-
n.value = !1, !k.value && (te(v) ? (i.value = v, o.value = d.highlightFirstItem ? 0 : -1) : We(ke, "autocomplete suggestions must be an array"));
|
|
97
|
-
};
|
|
98
|
-
if (n.value = !0, te(d.fetchSuggestions))
|
|
99
|
-
c(d.fetchSuggestions);
|
|
100
|
-
else {
|
|
101
|
-
const v = await d.fetchSuggestions(e, c);
|
|
102
|
-
te(v) && c(v);
|
|
103
|
-
}
|
|
104
|
-
}, ae = rt(oe, d.debounce), $e = (e) => {
|
|
105
|
-
const c = !!e;
|
|
106
|
-
if (_(le, e), _(G, e), k.value = !1, m.value || (m.value = c), !d.triggerOnFocus && !e) {
|
|
107
|
-
k.value = !0, i.value = [];
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
ae(e);
|
|
111
|
-
}, Ce = (e) => {
|
|
112
|
-
var c;
|
|
113
|
-
F.value || (((c = e.target) == null ? void 0 : c.tagName) !== "INPUT" || S.value.includes(document.activeElement)) && (m.value = !0);
|
|
114
|
-
}, we = (e) => {
|
|
115
|
-
_(me, e);
|
|
116
|
-
}, Ie = (e) => {
|
|
117
|
-
var c;
|
|
118
|
-
if (x)
|
|
119
|
-
x = !1;
|
|
120
|
-
else {
|
|
121
|
-
m.value = !0, _("focus", e);
|
|
122
|
-
const v = (c = d.modelValue) != null ? c : "";
|
|
123
|
-
d.triggerOnFocus && !u && ae(String(v));
|
|
124
|
-
}
|
|
125
|
-
}, Ne = (e) => {
|
|
126
|
-
setTimeout(() => {
|
|
127
|
-
var c;
|
|
128
|
-
if ((c = V.value) != null && c.isFocusInsideContent()) {
|
|
129
|
-
x = !0;
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
m.value && M(), _("blur", e);
|
|
133
|
-
});
|
|
134
|
-
}, xe = () => {
|
|
135
|
-
m.value = !1, _(G, ""), _("clear");
|
|
136
|
-
}, se = async () => {
|
|
137
|
-
var e;
|
|
138
|
-
(e = y.value) != null && e.isComposing || (t.value && o.value >= 0 && o.value < i.value.length ? Q(i.value[o.value]) : d.selectWhenUnmatched && (_("select", { value: d.modelValue }), i.value = [], o.value = -1));
|
|
139
|
-
}, Te = (e) => {
|
|
140
|
-
t.value && (e.preventDefault(), e.stopPropagation(), M());
|
|
141
|
-
}, M = () => {
|
|
142
|
-
m.value = !1;
|
|
143
|
-
}, Ae = () => {
|
|
144
|
-
var e;
|
|
145
|
-
(e = y.value) == null || e.focus();
|
|
146
|
-
}, Be = () => {
|
|
147
|
-
var e;
|
|
148
|
-
(e = y.value) == null || e.blur();
|
|
149
|
-
}, Q = async (e) => {
|
|
150
|
-
_(le, e[d.valueKey]), _(G, e[d.valueKey]), _("select", e), i.value = [], o.value = -1;
|
|
151
|
-
}, X = (e) => {
|
|
152
|
-
var c, v;
|
|
153
|
-
if (!t.value || n.value)
|
|
154
|
-
return;
|
|
155
|
-
if (e < 0) {
|
|
156
|
-
o.value = -1;
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
e >= i.value.length && (e = i.value.length - 1);
|
|
160
|
-
const w = E.value.querySelector(`.${f.be("suggestion", "wrap")}`), Pe = w.querySelectorAll(`.${f.be("suggestion", "list")} li`)[e], re = w.scrollTop, { offsetTop: ue, scrollHeight: Y } = Pe;
|
|
161
|
-
ue + Y > re + w.clientHeight && (w.scrollTop += Y), ue < re && (w.scrollTop -= Y), o.value = e, (v = (c = y.value) == null ? void 0 : c.ref) == null || v.setAttribute("aria-activedescendant", `${l.value}-item-${o.value}`);
|
|
162
|
-
}, ne = Qe(p, () => {
|
|
163
|
-
var e;
|
|
164
|
-
(e = V.value) != null && e.isFocusInsideContent() || t.value && M();
|
|
165
|
-
});
|
|
166
|
-
return Ye(() => {
|
|
167
|
-
ne == null || ne();
|
|
168
|
-
}), ye(() => {
|
|
169
|
-
var e;
|
|
170
|
-
const c = (e = y.value) == null ? void 0 : e.ref;
|
|
171
|
-
c && ([
|
|
172
|
-
{ key: "role", value: "textbox" },
|
|
173
|
-
{ key: "aria-autocomplete", value: "list" },
|
|
174
|
-
{ key: "aria-controls", value: "id" },
|
|
175
|
-
{
|
|
176
|
-
key: "aria-activedescendant",
|
|
177
|
-
value: `${l.value}-item-${o.value}`
|
|
178
|
-
}
|
|
179
|
-
].forEach(({ key: v, value: w }) => c.setAttribute(v, w)), u = c.hasAttribute("readonly"));
|
|
180
|
-
}), R({
|
|
181
|
-
highlightedIndex: o,
|
|
182
|
-
activated: m,
|
|
183
|
-
loading: n,
|
|
184
|
-
inputRef: y,
|
|
185
|
-
popperRef: V,
|
|
186
|
-
suggestions: i,
|
|
187
|
-
handleSelect: Q,
|
|
188
|
-
handleKeyEnter: se,
|
|
189
|
-
focus: Ae,
|
|
190
|
-
blur: Be,
|
|
191
|
-
close: M,
|
|
192
|
-
highlight: X,
|
|
193
|
-
getData: oe
|
|
194
|
-
}), (e, c) => (r(), K(s(ve), {
|
|
195
|
-
ref_key: "popperRef",
|
|
196
|
-
ref: V,
|
|
197
|
-
visible: s(t),
|
|
198
|
-
placement: e.placement,
|
|
199
|
-
"fallback-placements": ["bottom-start", "top-start"],
|
|
200
|
-
"popper-class": [s(f).e("popper"), e.popperClass],
|
|
201
|
-
teleported: e.teleported,
|
|
202
|
-
"append-to": e.appendTo,
|
|
203
|
-
"gpu-acceleration": !1,
|
|
204
|
-
pure: "",
|
|
205
|
-
"manual-mode": "",
|
|
206
|
-
effect: "light",
|
|
207
|
-
trigger: "click",
|
|
208
|
-
transition: `${s(f).namespace.value}-zoom-in-top`,
|
|
209
|
-
persistent: "",
|
|
210
|
-
role: "listbox",
|
|
211
|
-
onBeforeShow: q,
|
|
212
|
-
onHide: J
|
|
213
|
-
}, {
|
|
214
|
-
content: h(() => [
|
|
215
|
-
$("div", {
|
|
216
|
-
ref_key: "regionRef",
|
|
217
|
-
ref: E,
|
|
218
|
-
class: O([s(f).b("suggestion"), s(f).is("loading", s(T))]),
|
|
219
|
-
style: pe({
|
|
220
|
-
[e.fitInputWidth ? "width" : "minWidth"]: D.value,
|
|
221
|
-
outline: "none"
|
|
222
|
-
}),
|
|
223
|
-
role: "region"
|
|
224
|
-
}, [
|
|
225
|
-
e.$slots.header ? (r(), g("div", {
|
|
226
|
-
key: 0,
|
|
227
|
-
class: O(s(f).be("suggestion", "header")),
|
|
228
|
-
onClick: H(() => {
|
|
229
|
-
}, ["stop"])
|
|
230
|
-
}, [
|
|
231
|
-
P(e.$slots, "header")
|
|
232
|
-
], 10, ["onClick"])) : A("v-if", !0),
|
|
233
|
-
C(s(Me), {
|
|
234
|
-
id: s(l),
|
|
235
|
-
tag: "ul",
|
|
236
|
-
"wrap-class": s(f).be("suggestion", "wrap"),
|
|
237
|
-
"view-class": s(f).be("suggestion", "list"),
|
|
238
|
-
role: "listbox"
|
|
239
|
-
}, {
|
|
240
|
-
default: h(() => [
|
|
241
|
-
s(T) ? (r(), g("li", { key: 0 }, [
|
|
242
|
-
P(e.$slots, "loading", {}, () => [
|
|
243
|
-
C(s(Se), {
|
|
244
|
-
class: O(s(f).is("loading"))
|
|
245
|
-
}, {
|
|
246
|
-
default: h(() => [
|
|
247
|
-
C(s(lt))
|
|
248
|
-
]),
|
|
249
|
-
_: 1
|
|
250
|
-
}, 8, ["class"])
|
|
251
|
-
])
|
|
252
|
-
])) : (r(!0), g(U, { key: 1 }, j(i.value, (v, w) => (r(), g("li", {
|
|
253
|
-
id: `${s(l)}-item-${w}`,
|
|
254
|
-
key: w,
|
|
255
|
-
class: O({ highlighted: o.value === w }),
|
|
256
|
-
role: "option",
|
|
257
|
-
"aria-selected": o.value === w,
|
|
258
|
-
onClick: (Fe) => Q(v)
|
|
259
|
-
}, [
|
|
260
|
-
P(e.$slots, "default", { item: v }, () => [
|
|
261
|
-
be(L(v[e.valueKey]), 1)
|
|
262
|
-
])
|
|
263
|
-
], 10, ["id", "aria-selected", "onClick"]))), 128))
|
|
264
|
-
]),
|
|
265
|
-
_: 3
|
|
266
|
-
}, 8, ["id", "wrap-class", "view-class"]),
|
|
267
|
-
e.$slots.footer ? (r(), g("div", {
|
|
268
|
-
key: 1,
|
|
269
|
-
class: O(s(f).be("suggestion", "footer")),
|
|
270
|
-
onClick: H(() => {
|
|
271
|
-
}, ["stop"])
|
|
272
|
-
}, [
|
|
273
|
-
P(e.$slots, "footer")
|
|
274
|
-
], 10, ["onClick"])) : A("v-if", !0)
|
|
275
|
-
], 6)
|
|
276
|
-
]),
|
|
277
|
-
default: h(() => [
|
|
278
|
-
$("div", {
|
|
279
|
-
ref_key: "listboxRef",
|
|
280
|
-
ref: p,
|
|
281
|
-
class: O([s(f).b(), e.$attrs.class]),
|
|
282
|
-
style: pe(s(B)),
|
|
283
|
-
role: "combobox",
|
|
284
|
-
"aria-haspopup": "listbox",
|
|
285
|
-
"aria-expanded": s(t),
|
|
286
|
-
"aria-owns": s(l)
|
|
287
|
-
}, [
|
|
288
|
-
C(s(he), de({
|
|
289
|
-
ref_key: "inputRef",
|
|
290
|
-
ref: y
|
|
291
|
-
}, de(s(I), e.$attrs), {
|
|
292
|
-
"model-value": e.modelValue,
|
|
293
|
-
disabled: s(F),
|
|
294
|
-
onInput: $e,
|
|
295
|
-
onChange: we,
|
|
296
|
-
onFocus: Ie,
|
|
297
|
-
onBlur: Ne,
|
|
298
|
-
onClear: xe,
|
|
299
|
-
onKeydown: [
|
|
300
|
-
W(H((v) => X(o.value - 1), ["prevent"]), ["up"]),
|
|
301
|
-
W(H((v) => X(o.value + 1), ["prevent"]), ["down"]),
|
|
302
|
-
W(se, ["enter"]),
|
|
303
|
-
W(M, ["tab"]),
|
|
304
|
-
W(Te, ["esc"])
|
|
305
|
-
],
|
|
306
|
-
onMousedown: Ce
|
|
307
|
-
}), Ze({
|
|
308
|
-
_: 2
|
|
309
|
-
}, [
|
|
310
|
-
e.$slots.prepend ? {
|
|
311
|
-
name: "prepend",
|
|
312
|
-
fn: h(() => [
|
|
313
|
-
P(e.$slots, "prepend")
|
|
314
|
-
])
|
|
315
|
-
} : void 0,
|
|
316
|
-
e.$slots.append ? {
|
|
317
|
-
name: "append",
|
|
318
|
-
fn: h(() => [
|
|
319
|
-
P(e.$slots, "append")
|
|
320
|
-
])
|
|
321
|
-
} : void 0,
|
|
322
|
-
e.$slots.prefix ? {
|
|
323
|
-
name: "prefix",
|
|
324
|
-
fn: h(() => [
|
|
325
|
-
P(e.$slots, "prefix")
|
|
326
|
-
])
|
|
327
|
-
} : void 0,
|
|
328
|
-
e.$slots.suffix ? {
|
|
329
|
-
name: "suffix",
|
|
330
|
-
fn: h(() => [
|
|
331
|
-
P(e.$slots, "suffix")
|
|
332
|
-
])
|
|
333
|
-
} : void 0
|
|
334
|
-
]), 1040, ["model-value", "disabled", "onKeydown"])
|
|
335
|
-
], 14, ["aria-expanded", "aria-owns"])
|
|
336
|
-
]),
|
|
337
|
-
_: 3
|
|
338
|
-
}, 8, ["visible", "placement", "popper-class", "teleported", "append-to", "transition"]));
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
var dt = /* @__PURE__ */ ze(pt, [["__file", "autocomplete.vue"]]);
|
|
342
|
-
const ft = Ke(dt);
|
|
343
|
-
const mt = { class: "variety-auto-complete" }, vt = { key: 0 }, gt = { class: "label" }, ht = {
|
|
26
|
+
import "./index-b9cbb01d.js";
|
|
27
|
+
import "./index-30e29356.js";
|
|
28
|
+
import "./debounce-ccdceb02.js";
|
|
29
|
+
import "./config-provider-8863d600.js";
|
|
30
|
+
const ae = { class: "variety-auto-complete" }, se = { key: 0 }, ne = { class: "label" }, re = {
|
|
344
31
|
__name: "VarietySelect",
|
|
345
32
|
props: {
|
|
346
33
|
size: { type: String, default: "default" },
|
|
@@ -351,53 +38,53 @@ const mt = { class: "variety-auto-complete" }, vt = { key: 0 }, gt = { class: "l
|
|
|
351
38
|
// 是否开启选择回调后清除输入框值
|
|
352
39
|
},
|
|
353
40
|
emits: ["select", "change"],
|
|
354
|
-
setup(
|
|
355
|
-
const
|
|
356
|
-
if (
|
|
357
|
-
|
|
41
|
+
setup(p, { emit: U }) {
|
|
42
|
+
const q = A("stConfig"), I = U, _ = p, f = $(""), k = async (d, v) => {
|
|
43
|
+
if (d === "" || d === "null")
|
|
44
|
+
v([]);
|
|
358
45
|
else {
|
|
359
|
-
const
|
|
360
|
-
keyWord:
|
|
46
|
+
const o = {
|
|
47
|
+
keyWord: d,
|
|
361
48
|
pageNum: 1,
|
|
362
49
|
pageSize: 999,
|
|
363
|
-
userId:
|
|
50
|
+
userId: oe("id"),
|
|
364
51
|
hotSearchFlag: 1
|
|
365
|
-
}, { body:
|
|
366
|
-
label: `${
|
|
367
|
-
value:
|
|
52
|
+
}, { body: l } = await q.request.post("/common/qt/getFeatureInfosByPage", o), S = l.list.map(({ code: u, featureName: r }) => ({
|
|
53
|
+
label: `${u} ${r}`,
|
|
54
|
+
value: u
|
|
368
55
|
}));
|
|
369
|
-
|
|
56
|
+
v(S);
|
|
370
57
|
}
|
|
371
|
-
},
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
},
|
|
375
|
-
|
|
58
|
+
}, w = ({ label: d, value: v }) => {
|
|
59
|
+
const o = d.split(" ").at(-1);
|
|
60
|
+
I("select", { name: o, code: v }), _.selectClearEnable && (f.value = "");
|
|
61
|
+
}, z = (d) => {
|
|
62
|
+
I("change", d);
|
|
376
63
|
};
|
|
377
|
-
return (
|
|
378
|
-
const
|
|
379
|
-
return
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
modelValue:
|
|
383
|
-
"onUpdate:modelValue":
|
|
64
|
+
return (d, v) => {
|
|
65
|
+
const o = le;
|
|
66
|
+
return a(), n("div", ae, [
|
|
67
|
+
p.labelShowEnable ? (a(), n("span", se, "品种搜索:")) : h("", !0),
|
|
68
|
+
y(o, {
|
|
69
|
+
modelValue: f.value,
|
|
70
|
+
"onUpdate:modelValue": v[0] || (v[0] = (l) => f.value = l),
|
|
384
71
|
clearable: "",
|
|
385
|
-
size:
|
|
386
|
-
placeholder:
|
|
387
|
-
"fetch-suggestions":
|
|
388
|
-
onSelect:
|
|
389
|
-
onChange:
|
|
72
|
+
size: _.size,
|
|
73
|
+
placeholder: _.placeholder,
|
|
74
|
+
"fetch-suggestions": k,
|
|
75
|
+
onSelect: w,
|
|
76
|
+
onChange: z
|
|
390
77
|
}, {
|
|
391
|
-
default:
|
|
392
|
-
|
|
78
|
+
default: m(({ item: l }) => [
|
|
79
|
+
c("div", ne, C(l.label), 1)
|
|
393
80
|
]),
|
|
394
81
|
_: 1
|
|
395
82
|
}, 8, ["modelValue", "size", "placeholder"])
|
|
396
83
|
]);
|
|
397
84
|
};
|
|
398
85
|
}
|
|
399
|
-
},
|
|
400
|
-
const
|
|
86
|
+
}, ie = /* @__PURE__ */ F(re, [["__scopeId", "data-v-d433c4b8"]]);
|
|
87
|
+
const ue = (p) => (X("data-v-e4f6c06a"), p = p(), Y(), p), ce = { class: "custom-header" }, pe = { class: "left" }, de = /* @__PURE__ */ ue(() => /* @__PURE__ */ c("span", null, " 选择变量 ", -1)), me = { class: "right" }, _e = { class: "custom-body" }, fe = { class: "config-list" }, ve = { class: "config-item" }, he = { key: 0 }, ye = { key: 0 }, Ve = { key: 1 }, be = { key: 0 }, ge = { style: { "max-width": "820px" } }, xe = { style: { "white-space": "pre-line" } }, Se = {
|
|
401
88
|
__name: "index",
|
|
402
89
|
props: {
|
|
403
90
|
useCase: {
|
|
@@ -406,75 +93,75 @@ const yt = (a) => (et("data-v-e4f6c06a"), a = a(), tt(), a), bt = { class: "cust
|
|
|
406
93
|
// 1-选股, 2-回测
|
|
407
94
|
}
|
|
408
95
|
},
|
|
409
|
-
setup(
|
|
410
|
-
const
|
|
411
|
-
var
|
|
412
|
-
return ((
|
|
413
|
-
}),
|
|
414
|
-
const
|
|
96
|
+
setup(p, { expose: U }) {
|
|
97
|
+
const q = A("stConfig"), I = p, _ = $(null), f = $(!1), k = $(null), w = $([]), z = J(() => {
|
|
98
|
+
var o;
|
|
99
|
+
return ((o = w.value.find((l) => l.varName === k.value)) == null ? void 0 : o.formatList) ?? [];
|
|
100
|
+
}), d = (o) => o.replace(/^\[|\]$/g, "").split("],[").map((u) => {
|
|
101
|
+
const r = u.replace(/\[|\]/g, ""), [B, V] = r.split(",");
|
|
415
102
|
return {
|
|
416
|
-
label:
|
|
417
|
-
value:
|
|
103
|
+
label: B.trim(),
|
|
104
|
+
value: V.trim()
|
|
418
105
|
};
|
|
419
|
-
}),
|
|
420
|
-
const
|
|
421
|
-
for (let
|
|
422
|
-
const
|
|
423
|
-
switch (console.log(
|
|
106
|
+
}), v = (o) => {
|
|
107
|
+
const l = [];
|
|
108
|
+
for (let b = 0; b < o.length; b++) {
|
|
109
|
+
const s = o[b];
|
|
110
|
+
switch (console.log(s), s.vtype) {
|
|
424
111
|
case "text": {
|
|
425
|
-
|
|
112
|
+
l.push(s.param);
|
|
426
113
|
break;
|
|
427
114
|
}
|
|
428
115
|
default: {
|
|
429
|
-
if (!
|
|
430
|
-
return
|
|
431
|
-
let
|
|
432
|
-
|
|
116
|
+
if (!s.modelValue)
|
|
117
|
+
return j.error("请检查插入格式内是否填写完整");
|
|
118
|
+
let e = s.modelValue;
|
|
119
|
+
s.prefix && (e = `${s.prefix}${e}`), s.suffix && (e = `${e}${s.suffix}`), l.push(e);
|
|
433
120
|
break;
|
|
434
121
|
}
|
|
435
122
|
}
|
|
436
123
|
}
|
|
437
|
-
if (!
|
|
438
|
-
return
|
|
439
|
-
const
|
|
124
|
+
if (!_.value)
|
|
125
|
+
return j.error("未检测到编辑器实例");
|
|
126
|
+
const S = l.join("_"), u = _.value.getInstance(), r = u.getPosition(), V = _.value.getValue().split(`
|
|
440
127
|
`);
|
|
441
|
-
if (
|
|
442
|
-
const
|
|
443
|
-
let
|
|
444
|
-
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
-
const
|
|
128
|
+
if (r.lineNumber <= V.length) {
|
|
129
|
+
const b = r.lineNumber - 1, s = V[b], e = r.column - 1, g = e > 0 ? s[e - 1] : "", t = e < s.length ? s[e] : "";
|
|
130
|
+
let x = S;
|
|
131
|
+
g && g !== " " && !/[\s({[ ]/.test(g) && (x = " " + x), t && t !== " " && !/[\s)}\]]/.test(t) && (x = x + " ");
|
|
132
|
+
const i = s.substring(0, e) + x + s.substring(e);
|
|
133
|
+
V[b] = i;
|
|
134
|
+
const D = V.join(`
|
|
448
135
|
`);
|
|
449
|
-
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
lineNumber:
|
|
453
|
-
column:
|
|
454
|
-
}),
|
|
136
|
+
_.value.setValue(D);
|
|
137
|
+
const P = r.column + x.length;
|
|
138
|
+
u.setPosition({
|
|
139
|
+
lineNumber: r.lineNumber,
|
|
140
|
+
column: P
|
|
141
|
+
}), u.focus();
|
|
455
142
|
}
|
|
456
143
|
};
|
|
457
|
-
return
|
|
458
|
-
const { body:
|
|
459
|
-
|
|
460
|
-
}),
|
|
144
|
+
return K(async () => {
|
|
145
|
+
const { body: o } = await q.request.post("/common/conf/queryAllBackVariables", { useCase: I.useCase });
|
|
146
|
+
w.value = o ?? [];
|
|
147
|
+
}), U({
|
|
461
148
|
/**
|
|
462
149
|
* @description: 打开变量选择器窗口
|
|
463
150
|
* @editor 脚本编辑器实例
|
|
464
151
|
* @newZindex Number 窗口定位层级
|
|
465
152
|
*/
|
|
466
|
-
open: (
|
|
467
|
-
|
|
153
|
+
open: (o) => {
|
|
154
|
+
_.value = o, f.value = !0;
|
|
468
155
|
},
|
|
469
156
|
close: () => {
|
|
470
|
-
|
|
157
|
+
f.value = !1;
|
|
471
158
|
}
|
|
472
|
-
}), (
|
|
473
|
-
const
|
|
474
|
-
return
|
|
159
|
+
}), (o, l) => {
|
|
160
|
+
const S = G, u = H, r = te, B = W, V = R, b = O, s = M;
|
|
161
|
+
return a(), N(s, {
|
|
475
162
|
"modal-class": "var-select-dialog",
|
|
476
|
-
modelValue:
|
|
477
|
-
"onUpdate:modelValue":
|
|
163
|
+
modelValue: f.value,
|
|
164
|
+
"onUpdate:modelValue": l[2] || (l[2] = (e) => f.value = e),
|
|
478
165
|
"align-center": "",
|
|
479
166
|
"append-to-body": "",
|
|
480
167
|
"destroy-on-close": "",
|
|
@@ -484,134 +171,134 @@ const yt = (a) => (et("data-v-e4f6c06a"), a = a(), tt(), a), bt = { class: "cust
|
|
|
484
171
|
"modal-penetrable": !0,
|
|
485
172
|
"show-close": !1
|
|
486
173
|
}, {
|
|
487
|
-
header:
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
modelValue:
|
|
493
|
-
"onUpdate:modelValue":
|
|
174
|
+
header: m(() => [
|
|
175
|
+
c("div", ce, [
|
|
176
|
+
c("div", pe, [
|
|
177
|
+
de,
|
|
178
|
+
y(u, {
|
|
179
|
+
modelValue: k.value,
|
|
180
|
+
"onUpdate:modelValue": l[0] || (l[0] = (e) => k.value = e),
|
|
494
181
|
placeholder: "选择变量",
|
|
495
182
|
filterable: "",
|
|
496
183
|
clearable: ""
|
|
497
184
|
}, {
|
|
498
|
-
default:
|
|
499
|
-
(
|
|
500
|
-
key:
|
|
501
|
-
label:
|
|
502
|
-
value:
|
|
185
|
+
default: m(() => [
|
|
186
|
+
(a(!0), n(E, null, L(w.value, (e, g) => (a(), N(S, {
|
|
187
|
+
key: g,
|
|
188
|
+
label: e.varName,
|
|
189
|
+
value: e.varName
|
|
503
190
|
}, null, 8, ["label", "value"]))), 128))
|
|
504
191
|
]),
|
|
505
192
|
_: 1
|
|
506
193
|
}, 8, ["modelValue"])
|
|
507
194
|
]),
|
|
508
|
-
|
|
509
|
-
|
|
195
|
+
c("div", me, [
|
|
196
|
+
y(r, {
|
|
510
197
|
class: "el-icon--left",
|
|
511
|
-
onClick:
|
|
198
|
+
onClick: l[1] || (l[1] = (e) => f.value = !1)
|
|
512
199
|
}, {
|
|
513
|
-
default:
|
|
514
|
-
|
|
200
|
+
default: m(() => [
|
|
201
|
+
y(T(Z))
|
|
515
202
|
]),
|
|
516
203
|
_: 1
|
|
517
204
|
})
|
|
518
205
|
])
|
|
519
206
|
])
|
|
520
207
|
]),
|
|
521
|
-
default:
|
|
522
|
-
|
|
523
|
-
|
|
208
|
+
default: m(() => [
|
|
209
|
+
c("div", _e, [
|
|
210
|
+
z.value.length ? (a(!0), n(E, { key: 0 }, L(z.value, (e, g) => (a(), n("div", {
|
|
524
211
|
class: "format-item",
|
|
525
|
-
key:
|
|
212
|
+
key: g
|
|
526
213
|
}, [
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
(
|
|
530
|
-
|
|
531
|
-
t.vtype === "text" ? (
|
|
532
|
-
t.vtype === "inputVariety" ? (
|
|
214
|
+
c("span", null, "格式" + C(g + 1) + ":", 1),
|
|
215
|
+
c("div", fe, [
|
|
216
|
+
(a(!0), n(E, null, L(e.configList, (t, x) => (a(), n(E, null, [
|
|
217
|
+
c("div", ve, [
|
|
218
|
+
t.vtype === "text" ? (a(), n("span", he, C(t.param), 1)) : h("", !0),
|
|
219
|
+
t.vtype === "inputVariety" ? (a(), N(ie, {
|
|
533
220
|
key: 1,
|
|
534
221
|
size: "small",
|
|
535
222
|
placeholder: t.param,
|
|
536
223
|
selectClearEnable: !1,
|
|
537
224
|
labelShowEnable: !1,
|
|
538
|
-
onSelect: ({ name:
|
|
539
|
-
onChange: (
|
|
225
|
+
onSelect: ({ name: i, code: D }) => t.modelValue = D,
|
|
226
|
+
onChange: (i) => t.modelValue = i,
|
|
540
227
|
style: { width: "100px" }
|
|
541
|
-
}, null, 8, ["placeholder", "onSelect", "onChange"])) :
|
|
542
|
-
t.vtype === "input" ? (
|
|
543
|
-
t.prefix ? (
|
|
544
|
-
|
|
228
|
+
}, null, 8, ["placeholder", "onSelect", "onChange"])) : h("", !0),
|
|
229
|
+
t.vtype === "input" ? (a(), n(E, { key: 2 }, [
|
|
230
|
+
t.prefix ? (a(), n("span", ye, C(t.prefix), 1)) : h("", !0),
|
|
231
|
+
y(B, {
|
|
545
232
|
modelValue: t.modelValue,
|
|
546
|
-
"onUpdate:modelValue": (
|
|
233
|
+
"onUpdate:modelValue": (i) => t.modelValue = i,
|
|
547
234
|
placeholder: t.param,
|
|
548
235
|
size: "small"
|
|
549
236
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
550
|
-
t.suffix ? (
|
|
551
|
-
], 64)) :
|
|
552
|
-
t.vtype === "select" ? (
|
|
237
|
+
t.suffix ? (a(), n("span", Ve, C(t.suffix), 1)) : h("", !0)
|
|
238
|
+
], 64)) : h("", !0),
|
|
239
|
+
t.vtype === "select" ? (a(), N(u, {
|
|
553
240
|
key: 3,
|
|
554
241
|
modelValue: t.modelValue,
|
|
555
|
-
"onUpdate:modelValue": (
|
|
242
|
+
"onUpdate:modelValue": (i) => t.modelValue = i,
|
|
556
243
|
placeholder: t.param,
|
|
557
244
|
clearable: "",
|
|
558
245
|
size: "small"
|
|
559
246
|
}, {
|
|
560
|
-
default:
|
|
561
|
-
(
|
|
562
|
-
key:
|
|
563
|
-
label:
|
|
564
|
-
value:
|
|
247
|
+
default: m(() => [
|
|
248
|
+
(a(!0), n(E, null, L(d(t.optionsStr), (i) => (a(), N(S, {
|
|
249
|
+
key: i.value,
|
|
250
|
+
label: i.label,
|
|
251
|
+
value: i.value
|
|
565
252
|
}, null, 8, ["label", "value"]))), 128))
|
|
566
253
|
]),
|
|
567
254
|
_: 2
|
|
568
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
255
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : h("", !0)
|
|
569
256
|
]),
|
|
570
|
-
|
|
257
|
+
x !== e.configList.length - 1 ? (a(), n("span", be, "_")) : h("", !0)
|
|
571
258
|
], 64))), 256))
|
|
572
259
|
]),
|
|
573
|
-
|
|
260
|
+
y(V, {
|
|
574
261
|
type: "primary",
|
|
575
262
|
plain: "",
|
|
576
263
|
size: "small",
|
|
577
|
-
onClick: (t) =>
|
|
264
|
+
onClick: (t) => v(e.configList)
|
|
578
265
|
}, {
|
|
579
|
-
default:
|
|
580
|
-
|
|
266
|
+
default: m(() => [
|
|
267
|
+
Q(" 插入变量 ")
|
|
581
268
|
]),
|
|
582
269
|
_: 2
|
|
583
270
|
}, 1032, ["onClick"]),
|
|
584
|
-
|
|
271
|
+
y(b, {
|
|
585
272
|
effect: "dark",
|
|
586
273
|
placement: "top-start"
|
|
587
274
|
}, {
|
|
588
|
-
content:
|
|
589
|
-
|
|
590
|
-
|
|
275
|
+
content: m(() => [
|
|
276
|
+
c("div", ge, [
|
|
277
|
+
c("span", xe, C(e.tip), 1)
|
|
591
278
|
])
|
|
592
279
|
]),
|
|
593
|
-
default:
|
|
594
|
-
|
|
595
|
-
default:
|
|
596
|
-
|
|
280
|
+
default: m(() => [
|
|
281
|
+
y(r, null, {
|
|
282
|
+
default: m(() => [
|
|
283
|
+
y(T(ee))
|
|
597
284
|
]),
|
|
598
285
|
_: 1
|
|
599
286
|
})
|
|
600
287
|
]),
|
|
601
288
|
_: 2
|
|
602
289
|
}, 1024)
|
|
603
|
-
]))), 128)) :
|
|
290
|
+
]))), 128)) : h("", !0)
|
|
604
291
|
])
|
|
605
292
|
]),
|
|
606
293
|
_: 1
|
|
607
294
|
}, 8, ["modelValue"]);
|
|
608
295
|
};
|
|
609
296
|
}
|
|
610
|
-
},
|
|
611
|
-
install(
|
|
612
|
-
|
|
297
|
+
}, Ee = /* @__PURE__ */ F(Se, [["__scopeId", "data-v-e4f6c06a"]]), et = {
|
|
298
|
+
install(p) {
|
|
299
|
+
p.component("st-varSelectDialog", Ee);
|
|
613
300
|
}
|
|
614
301
|
};
|
|
615
302
|
export {
|
|
616
|
-
|
|
303
|
+
et as default
|
|
617
304
|
};
|