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