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.
@@ -1,20 +1,20 @@
1
- import { b as De, e as ue, N as Ue, c as Y, p as Z, f as Le, u as Oe, _ as ze, j as ee, w as Ke } from "./base-62a70f61.js";
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 ie, U as H, I as te, C as fe, p as qe, E as me, g as Me, b as We } from "./el-popper-05a8f271.js";
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 ve, E as ge } from "./el-input-ef6edbf3.js";
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 he, computed as O, useAttrs as Xe, ref as b, onBeforeUnmount as Ye, onMounted as _e, openBlock as n, createBlock as z, unref as a, withCtx as h, createElementVNode as k, normalizeClass as L, normalizeStyle as ce, createElementBlock as g, withModifiers as j, renderSlot as F, createCommentVNode as T, createVNode as $, Fragment as D, renderList as M, createTextVNode as ye, toDisplayString as U, mergeProps as pe, withKeys as q, createSlots as Ze, inject as be, pushScopeId as et, popScopeId as tt } from "vue";
12
- import { E as Ve, l as lt, c as ot, i as at } from "./index-35129268.js";
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 Se } from "./_plugin-vue_export-helper-dad06003.js";
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 de } from "./el-message-ba131b90.js";
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
- ...ve,
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: ue(String),
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: ue([Function, Array]),
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: ie.teleported,
67
- appendTo: ie.appendTo,
66
+ teleported: ce.teleported,
67
+ appendTo: ce.appendTo,
68
68
  highlightFirstItem: Boolean,
69
69
  fitInputWidth: Boolean
70
70
  }), it = {
71
- [H]: (o) => Y(o) || Z(o),
72
- [te]: (o) => Y(o) || Z(o),
73
- [fe]: (o) => Y(o) || Z(o),
74
- focus: (o) => o instanceof FocusEvent,
75
- blur: (o) => o instanceof FocusEvent,
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: (o) => Le(o)
78
- }, Ee = "ElAutocomplete", ct = he({
79
- name: Ee,
77
+ select: (a) => Le(a)
78
+ }, ke = "ElAutocomplete", ct = _e({
79
+ name: ke,
80
80
  inheritAttrs: !1
81
- }), pt = /* @__PURE__ */ he({
81
+ }), pt = /* @__PURE__ */ _e({
82
82
  ...ct,
83
83
  props: ut,
84
84
  emits: it,
85
- setup(o, { expose: K, emit: _ }) {
86
- const d = o, I = O(() => qe(d, Object.keys(ve))), x = Xe(), A = Je(), f = Oe("autocomplete"), y = b(), S = b(), V = b(), c = b();
87
- let r = !1, C = !1;
88
- const u = b([]), t = b(-1), P = b(""), m = b(!1), E = b(!1), p = b(!1), s = nt(), B = O(() => x.style), l = O(() => (u.value.length > 0 || p.value) && m.value), W = O(() => !d.hideLoading && p.value), w = O(() => y.value ? Array.from(y.value.$el.querySelectorAll("input")) : []), G = () => {
89
- l.value && (P.value = `${y.value.$el.offsetWidth}px`);
90
- }, ke = () => {
91
- t.value = -1;
92
- }, le = async (e) => {
93
- if (E.value)
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 i = (v) => {
96
- p.value = !1, !E.value && (ee(v) ? (u.value = v, t.value = d.highlightFirstItem ? 0 : -1) : We(Ee, "autocomplete suggestions must be an array"));
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 (p.value = !0, ee(d.fetchSuggestions))
99
- i(d.fetchSuggestions);
98
+ if (n.value = !0, te(d.fetchSuggestions))
99
+ c(d.fetchSuggestions);
100
100
  else {
101
- const v = await d.fetchSuggestions(e, i);
102
- ee(v) && i(v);
101
+ const v = await d.fetchSuggestions(e, c);
102
+ te(v) && c(v);
103
103
  }
104
- }, oe = rt(le, d.debounce), $e = (e) => {
105
- const i = !!e;
106
- if (_(te, e), _(H, e), E.value = !1, m.value || (m.value = i), !d.triggerOnFocus && !e) {
107
- E.value = !0, u.value = [];
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
- oe(e);
110
+ ae(e);
111
111
  }, Ce = (e) => {
112
- var i;
113
- A.value || (((i = e.target) == null ? void 0 : i.tagName) !== "INPUT" || w.value.includes(document.activeElement)) && (m.value = !0);
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
- _(fe, e);
116
- }, Ne = (e) => {
117
- var i;
118
- if (C)
119
- C = !1;
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 = (i = d.modelValue) != null ? i : "";
123
- d.triggerOnFocus && !r && oe(String(v));
122
+ const v = (c = d.modelValue) != null ? c : "";
123
+ d.triggerOnFocus && !u && ae(String(v));
124
124
  }
125
- }, Ie = (e) => {
125
+ }, Ne = (e) => {
126
126
  setTimeout(() => {
127
- var i;
128
- if ((i = V.value) != null && i.isFocusInsideContent()) {
129
- C = !0;
127
+ var c;
128
+ if ((c = V.value) != null && c.isFocusInsideContent()) {
129
+ x = !0;
130
130
  return;
131
131
  }
132
- m.value && R(), _("blur", e);
132
+ m.value && M(), _("blur", e);
133
133
  });
134
134
  }, xe = () => {
135
- m.value = !1, _(H, ""), _("clear");
136
- }, ae = async () => {
135
+ m.value = !1, _(G, ""), _("clear");
136
+ }, se = async () => {
137
137
  var e;
138
- (e = y.value) != null && e.isComposing || (l.value && t.value >= 0 && t.value < u.value.length ? J(u.value[t.value]) : d.selectWhenUnmatched && (_("select", { value: d.modelValue }), u.value = [], t.value = -1));
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
- l.value && (e.preventDefault(), e.stopPropagation(), R());
141
- }, R = () => {
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
- }, J = async (e) => {
150
- _(te, e[d.valueKey]), _(H, e[d.valueKey]), _("select", e), u.value = [], t.value = -1;
151
- }, Q = (e) => {
152
- var i, v;
153
- if (!l.value || p.value)
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
- t.value = -1;
156
+ o.value = -1;
157
157
  return;
158
158
  }
159
- e >= u.value.length && (e = u.value.length - 1);
160
- const N = S.value.querySelector(`.${f.be("suggestion", "wrap")}`), Pe = N.querySelectorAll(`.${f.be("suggestion", "list")} li`)[e], ne = N.scrollTop, { offsetTop: re, scrollHeight: X } = Pe;
161
- re + X > ne + N.clientHeight && (N.scrollTop += X), re < ne && (N.scrollTop -= X), t.value = e, (v = (i = y.value) == null ? void 0 : i.ref) == null || v.setAttribute("aria-activedescendant", `${s.value}-item-${t.value}`);
162
- }, se = Qe(c, () => {
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() || l.value && R();
164
+ (e = V.value) != null && e.isFocusInsideContent() || t.value && M();
165
165
  });
166
166
  return Ye(() => {
167
- se == null || se();
168
- }), _e(() => {
167
+ ne == null || ne();
168
+ }), ye(() => {
169
169
  var e;
170
- const i = (e = y.value) == null ? void 0 : e.ref;
171
- i && ([
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: `${s.value}-item-${t.value}`
177
+ value: `${l.value}-item-${o.value}`
178
178
  }
179
- ].forEach(({ key: v, value: N }) => i.setAttribute(v, N)), r = i.hasAttribute("readonly"));
180
- }), K({
181
- highlightedIndex: t,
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: p,
183
+ loading: n,
184
184
  inputRef: y,
185
185
  popperRef: V,
186
- suggestions: u,
187
- handleSelect: J,
188
- handleKeyEnter: ae,
186
+ suggestions: i,
187
+ handleSelect: Q,
188
+ handleKeyEnter: se,
189
189
  focus: Ae,
190
190
  blur: Be,
191
- close: R,
192
- highlight: Q,
193
- getData: le
194
- }), (e, i) => (n(), z(a(me), {
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: a(l),
197
+ visible: s(t),
198
198
  placement: e.placement,
199
199
  "fallback-placements": ["bottom-start", "top-start"],
200
- "popper-class": [a(f).e("popper"), e.popperClass],
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: `${a(f).namespace.value}-zoom-in-top`,
208
+ transition: `${s(f).namespace.value}-zoom-in-top`,
209
209
  persistent: "",
210
210
  role: "listbox",
211
- onBeforeShow: G,
212
- onHide: ke
211
+ onBeforeShow: q,
212
+ onHide: J
213
213
  }, {
214
214
  content: h(() => [
215
- k("div", {
215
+ $("div", {
216
216
  ref_key: "regionRef",
217
- ref: S,
218
- class: L([a(f).b("suggestion"), a(f).is("loading", a(W))]),
219
- style: ce({
220
- [e.fitInputWidth ? "width" : "minWidth"]: P.value,
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 ? (n(), g("div", {
225
+ e.$slots.header ? (r(), g("div", {
226
226
  key: 0,
227
- class: L(a(f).be("suggestion", "header")),
228
- onClick: j(() => {
227
+ class: O(s(f).be("suggestion", "header")),
228
+ onClick: H(() => {
229
229
  }, ["stop"])
230
230
  }, [
231
- F(e.$slots, "header")
232
- ], 10, ["onClick"])) : T("v-if", !0),
233
- $(a(Me), {
234
- id: a(s),
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": a(f).be("suggestion", "wrap"),
237
- "view-class": a(f).be("suggestion", "list"),
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
- a(W) ? (n(), g("li", { key: 0 }, [
242
- F(e.$slots, "loading", {}, () => [
243
- $(a(Ve), {
244
- class: L(a(f).is("loading"))
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
- $(a(lt))
247
+ C(s(lt))
248
248
  ]),
249
249
  _: 1
250
250
  }, 8, ["class"])
251
251
  ])
252
- ])) : (n(!0), g(D, { key: 1 }, M(u.value, (v, N) => (n(), g("li", {
253
- id: `${a(s)}-item-${N}`,
254
- key: N,
255
- class: L({ highlighted: t.value === N }),
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": t.value === N,
258
- onClick: (Fe) => J(v)
257
+ "aria-selected": o.value === w,
258
+ onClick: (Fe) => Q(v)
259
259
  }, [
260
- F(e.$slots, "default", { item: v }, () => [
261
- ye(U(v[e.valueKey]), 1)
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 ? (n(), g("div", {
267
+ e.$slots.footer ? (r(), g("div", {
268
268
  key: 1,
269
- class: L(a(f).be("suggestion", "footer")),
270
- onClick: j(() => {
269
+ class: O(s(f).be("suggestion", "footer")),
270
+ onClick: H(() => {
271
271
  }, ["stop"])
272
272
  }, [
273
- F(e.$slots, "footer")
274
- ], 10, ["onClick"])) : T("v-if", !0)
273
+ P(e.$slots, "footer")
274
+ ], 10, ["onClick"])) : A("v-if", !0)
275
275
  ], 6)
276
276
  ]),
277
277
  default: h(() => [
278
- k("div", {
278
+ $("div", {
279
279
  ref_key: "listboxRef",
280
- ref: c,
281
- class: L([a(f).b(), e.$attrs.class]),
282
- style: ce(a(B)),
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": a(l),
286
- "aria-owns": a(s)
285
+ "aria-expanded": s(t),
286
+ "aria-owns": s(l)
287
287
  }, [
288
- $(a(ge), pe({
288
+ C(s(he), de({
289
289
  ref_key: "inputRef",
290
290
  ref: y
291
- }, pe(a(I), e.$attrs), {
291
+ }, de(s(I), e.$attrs), {
292
292
  "model-value": e.modelValue,
293
- disabled: a(A),
293
+ disabled: s(F),
294
294
  onInput: $e,
295
295
  onChange: we,
296
- onFocus: Ne,
297
- onBlur: Ie,
296
+ onFocus: Ie,
297
+ onBlur: Ne,
298
298
  onClear: xe,
299
299
  onKeydown: [
300
- q(j((v) => Q(t.value - 1), ["prevent"]), ["up"]),
301
- q(j((v) => Q(t.value + 1), ["prevent"]), ["down"]),
302
- q(ae, ["enter"]),
303
- q(R, ["tab"]),
304
- q(Te, ["esc"])
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
- F(e.$slots, "prepend")
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
- F(e.$slots, "append")
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
- F(e.$slots, "prefix")
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
- F(e.$slots, "suffix")
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(o, { emit: K }) {
355
- const _ = be("stConfig"), d = K, I = o, x = b(""), A = async (S, V) => {
356
- if (S === "" || S === "null")
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 c = {
360
- keyWord: S,
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: r } = await _.request.post("/common/qt/getFeatureInfosByPage", c), C = r.list.map(({ code: u, featureName: t }) => ({
366
- label: `${u}   ${t}`,
367
- value: u
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(C);
369
+ V(x);
370
370
  }
371
- }, f = ({ label: S, value: V }) => {
372
- const c = S.split(" ").at(-1);
373
- d("select", { name: c, code: V }), I.selectClearEnable && (x.value = "");
374
- }, y = (S) => {
375
- d("change", S);
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 (S, V) => {
378
- const c = ft;
379
- return n(), g("div", mt, [
380
- o.labelShowEnable ? (n(), g("span", vt, "品种搜索:")) : T("", !0),
381
- $(c, {
382
- modelValue: x.value,
383
- "onUpdate:modelValue": V[0] || (V[0] = (r) => x.value = r),
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": A,
387
+ "fetch-suggestions": F,
388
388
  onSelect: f,
389
389
  onChange: y
390
390
  }, {
391
- default: h(({ item: r }) => [
392
- k("div", gt, U(r.label), 1)
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__ */ Se(ht, [["__scopeId", "data-v-d433c4b8"]]);
400
- const yt = (o) => (et("data-v-e4459978"), o = o(), tt(), o), bt = { class: "custom-header" }, Vt = { class: "left" }, St = /* @__PURE__ */ yt(() => /* @__PURE__ */ k("span", null, " 选择变量 ", -1)), Et = { class: "right" }, kt = { class: "custom-body" }, $t = { class: "config-list" }, Ct = { class: "config-item" }, wt = { key: 0 }, Nt = { key: 0 }, It = { key: 1 }, xt = { key: 0 }, Tt = { style: { "max-width": "820px" } }, At = { style: { "white-space": "pre-line" } }, Bt = {
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(o, { expose: K }) {
410
- const _ = be("stConfig"), d = o, I = b(null), x = b(!1), A = b(null), f = b([]), y = O(() => {
411
- var c;
412
- return ((c = f.value.find((r) => r.varName === A.value)) == null ? void 0 : c.formatList) ?? [];
413
- }), S = (c) => c.replace(/^\[|\]$/g, "").split("],[").map((u) => {
414
- const t = u.replace(/\[|\]/g, ""), [P, m] = t.split(",");
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: P.trim(),
416
+ label: D.trim(),
417
417
  value: m.trim()
418
418
  };
419
- }), V = (c) => {
420
- const r = [];
421
- for (let E = 0; E < c.length; E++) {
422
- const p = c[E];
423
- switch (console.log(p), p.vtype) {
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
- r.push(p.param);
425
+ u.push(n.param);
426
426
  break;
427
427
  }
428
428
  default: {
429
- if (!p.modelValue)
430
- return de.error("请检查插入格式内是否填写完整");
431
- let s = p.modelValue;
432
- p.prefix && (s = `${p.prefix}${s}`), p.suffix && (s = `${s}${p.suffix}`), r.push(s);
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 de.error("未检测到编辑器实例");
439
- const C = r.join("_"), u = I.value.getInstance(), t = u.getPosition(), m = I.value.getValue().split(`
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 (t.lineNumber <= m.length) {
442
- const E = t.lineNumber - 1, p = m[E], s = p.substring(0, t.column - 1) + C + p.substring(t.column - 1);
443
- m[E] = s;
444
- const B = m.join(`
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(B);
447
- const l = t.column + C.length;
448
- u.setPosition({
449
- lineNumber: t.lineNumber,
450
- column: l
451
- }), u.focus();
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 _e(async () => {
455
- const { body: c } = await _.request.post("/common/conf/queryAllBackVariables", { useCase: d.useCase });
456
- f.value = c ?? [];
457
- }), K({
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: (c) => {
464
- I.value = c, x.value = !0;
466
+ open: (p) => {
467
+ I.value = p, N.value = !0;
465
468
  },
466
469
  close: () => {
467
- x.value = !1;
470
+ N.value = !1;
468
471
  }
469
- }), (c, r) => {
470
- const C = He, u = Ge, t = Ve, P = ge, m = je, E = me, p = Re;
471
- return n(), z(p, {
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: x.value,
474
- "onUpdate:modelValue": r[2] || (r[2] = (s) => x.value = s),
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
- k("div", bt, [
486
- k("div", Vt, [
488
+ $("div", bt, [
489
+ $("div", Vt, [
487
490
  St,
488
- $(u, {
489
- modelValue: A.value,
490
- "onUpdate:modelValue": r[0] || (r[0] = (s) => A.value = s),
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
- (n(!0), g(D, null, M(f.value, (s, B) => (n(), z(C, {
499
+ (r(!0), g(U, null, j(f.value, (l, B) => (r(), K(x, {
497
500
  key: B,
498
- label: s.varName,
499
- value: s.varName
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
- k("div", Et, [
506
- $(t, {
508
+ $("div", Et, [
509
+ C(o, {
507
510
  class: "el-icon--left",
508
- onClick: r[1] || (r[1] = (s) => x.value = !1)
511
+ onClick: u[1] || (u[1] = (l) => N.value = !1)
509
512
  }, {
510
513
  default: h(() => [
511
- $(a(ot))
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
- k("div", kt, [
520
- y.value.length ? (n(!0), g(D, { key: 0 }, M(y.value, (s, B) => (n(), g("div", {
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
- k("span", null, "格式" + U(B + 1) + ":", 1),
525
- k("div", $t, [
526
- (n(!0), g(D, null, M(s.configList, (l, W) => (n(), g(D, null, [
527
- k("div", Ct, [
528
- l.vtype === "text" ? (n(), g("span", wt, U(l.param), 1)) : T("", !0),
529
- l.vtype === "inputVariety" ? (n(), z(_t, {
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: l.param,
535
+ placeholder: t.param,
533
536
  selectClearEnable: !1,
534
537
  labelShowEnable: !1,
535
- onSelect: ({ name: w, code: G }) => l.modelValue = G,
536
- onChange: (w) => l.modelValue = w,
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"])) : T("", !0),
539
- l.vtype === "input" ? (n(), g(D, { key: 2 }, [
540
- l.prefix ? (n(), g("span", Nt, U(l.prefix), 1)) : T("", !0),
541
- $(P, {
542
- modelValue: l.modelValue,
543
- "onUpdate:modelValue": (w) => l.modelValue = w,
544
- placeholder: l.param,
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
- l.suffix ? (n(), g("span", It, U(l.suffix), 1)) : T("", !0)
548
- ], 64)) : T("", !0),
549
- l.vtype === "select" ? (n(), z(u, {
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: l.modelValue,
552
- "onUpdate:modelValue": (w) => l.modelValue = w,
553
- placeholder: l.param,
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
- (n(!0), g(D, null, M(S(l.optionsStr), (w) => (n(), z(C, {
559
- key: w.value,
560
- label: w.label,
561
- value: w.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"])) : T("", !0)
568
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : A("", !0)
566
569
  ]),
567
- W !== s.configList.length - 1 ? (n(), g("span", xt, "_")) : T("", !0)
570
+ T !== l.configList.length - 1 ? (r(), g("span", xt, "_")) : A("", !0)
568
571
  ], 64))), 256))
569
572
  ]),
570
- $(m, {
573
+ C(m, {
571
574
  type: "primary",
572
575
  plain: "",
573
576
  size: "small",
574
- onClick: (l) => V(s.configList)
577
+ onClick: (t) => V(l.configList)
575
578
  }, {
576
579
  default: h(() => [
577
- ye(" 插入变量 ")
580
+ be(" 插入变量 ")
578
581
  ]),
579
582
  _: 2
580
583
  }, 1032, ["onClick"]),
581
- $(E, {
584
+ C(k, {
582
585
  effect: "dark",
583
586
  placement: "top-start"
584
587
  }, {
585
588
  content: h(() => [
586
- k("div", Tt, [
587
- k("span", At, U(s.tip), 1)
589
+ $("div", Tt, [
590
+ $("span", At, L(l.tip), 1)
588
591
  ])
589
592
  ]),
590
593
  default: h(() => [
591
- $(t, null, {
594
+ C(o, null, {
592
595
  default: h(() => [
593
- $(a(at))
596
+ C(s(at))
594
597
  ]),
595
598
  _: 1
596
599
  })
597
600
  ]),
598
601
  _: 2
599
602
  }, 1024)
600
- ]))), 128)) : T("", !0)
603
+ ]))), 128)) : A("", !0)
601
604
  ])
602
605
  ]),
603
606
  _: 1
604
607
  }, 8, ["modelValue"]);
605
608
  };
606
609
  }
607
- }, Ft = /* @__PURE__ */ Se(Bt, [["__scopeId", "data-v-e4459978"]]), nl = {
608
- install(o) {
609
- o.component("st-varSelectDialog", Ft);
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 {