st-comp 0.0.169 → 0.0.170

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/KlineConfig.js CHANGED
@@ -1,15 +1,15 @@
1
- import { k as se, u as ne, q as ie, _ as re, w as de, m as me, s as G, a as Q, v as X, f as ae, x as te, t as ve } from "./base-4bcd2756.js";
2
- import { d as fe, b as be, c as ye, E as he } from "./el-overlay-690b50aa.js";
3
- import { E as ge } from "./el-button-d39472d3.js";
1
+ import { k as se, u as ie, q as ne, _ as re, w as de, m as me, s as W, a as X, v as Y, f as te, x as ae, t as ve } from "./base-4bcd2756.js";
2
+ import { d as fe, b as be, c as ye, E as ge } from "./el-overlay-690b50aa.js";
3
+ import { E as he } from "./el-button-d39472d3.js";
4
4
  import "./el-scrollbar-bcf29780.js";
5
5
  import { i as _e, E as Ce } from "./el-segmented-84707138.js";
6
6
  import "./el-tag-6036f51c.js";
7
7
  import { E as ke, a as Ve } from "./el-select-d3bce4d1.js";
8
8
  import { u as we, a as Se } from "./el-popper-85365d5b.js";
9
9
  import { E as Ie } from "./el-divider-7cf13678.js";
10
- import { defineComponent as W, useSlots as Ee, computed as w, ref as N, openBlock as t, createBlock as h, unref as e, withCtx as p, createVNode as c, Transition as Te, withDirectives as Ne, createElementVNode as n, mergeProps as Be, withModifiers as ue, normalizeClass as v, createElementBlock as m, renderSlot as R, toDisplayString as z, createCommentVNode as b, vShow as Ae, watch as oe, onMounted as ce, withKeys as Le, resolveDynamicComponent as K, normalizeStyle as Pe, nextTick as Oe, inject as Ue, reactive as De, createTextVNode as H, Fragment as q, renderList as M, pushScopeId as Fe, popScopeId as Re } from "vue";
10
+ import { defineComponent as Q, useSlots as Ee, computed as S, ref as B, openBlock as a, createBlock as h, unref as e, withCtx as p, createVNode as c, Transition as Te, withDirectives as Ne, createElementVNode as i, mergeProps as Be, withModifiers as ue, normalizeClass as v, createElementBlock as m, renderSlot as R, toDisplayString as z, createCommentVNode as y, vShow as Ae, watch as oe, onMounted as ce, withKeys as Le, resolveDynamicComponent as K, normalizeStyle as Oe, nextTick as Pe, inject as Ue, reactive as De, createTextVNode as H, Fragment as q, renderList as M, pushScopeId as Fe, popScopeId as Re } from "vue";
11
11
  import { _ as ze } from "./_plugin-vue_export-helper-dad06003.js";
12
- import { E as D, c as $e, l as Ke } from "./index-3425f2f0.js";
12
+ import { E as F, c as $e, l as Ke } from "./index-3425f2f0.js";
13
13
  import { i as J, u as qe, b as Me, c as je, d as He } from "./use-form-common-props-54c31983.js";
14
14
  import { b as Je, a as Ge, U as Z, C as x, I as ee } from "./index-21fb27eb.js";
15
15
  import { u as We } from "./index-c45ac024.js";
@@ -45,143 +45,143 @@ const Xe = se({
45
45
  type: String,
46
46
  default: "2"
47
47
  }
48
- }), Ye = be, Ze = W({
48
+ }), Ye = be, Ze = Q({
49
49
  name: "ElDrawer",
50
50
  inheritAttrs: !1
51
- }), xe = /* @__PURE__ */ W({
51
+ }), xe = /* @__PURE__ */ Q({
52
52
  ...Ze,
53
53
  props: Xe,
54
54
  emits: Ye,
55
- setup(r, { expose: B }) {
56
- const y = r, d = Ee();
55
+ setup(r, { expose: A }) {
56
+ const g = r, d = Ee();
57
57
  We({
58
58
  scope: "el-drawer",
59
59
  from: "the title slot",
60
60
  replacement: "the header slot",
61
61
  version: "3.0.0",
62
62
  ref: "https://element-plus.org/en-US/component/drawer.html#slots"
63
- }, w(() => !!d.title));
64
- const V = N(), F = N(), o = ne("drawer"), { t: s } = Qe(), {
63
+ }, S(() => !!d.title));
64
+ const V = B(), w = B(), s = ie("drawer"), { t: o } = Qe(), {
65
65
  afterEnter: _,
66
- afterLeave: T,
67
- beforeLeave: I,
68
- visible: A,
66
+ afterLeave: N,
67
+ beforeLeave: E,
68
+ visible: L,
69
69
  rendered: $,
70
- titleId: L,
71
- bodyId: g,
72
- zIndex: i,
70
+ titleId: O,
71
+ bodyId: f,
72
+ zIndex: n,
73
73
  onModalClick: P,
74
74
  onOpenAutoFocus: u,
75
75
  onCloseAutoFocus: C,
76
- onFocusoutPrevented: O,
77
- onCloseRequested: E,
78
- handleClose: a
79
- } = ye(y, V), f = w(() => y.direction === "rtl" || y.direction === "ltr"), U = w(() => ie(y.size));
80
- return B({
81
- handleClose: a,
76
+ onFocusoutPrevented: U,
77
+ onCloseRequested: T,
78
+ handleClose: t
79
+ } = ye(g, V), b = S(() => g.direction === "rtl" || g.direction === "ltr"), D = S(() => ne(g.size));
80
+ return A({
81
+ handleClose: t,
82
82
  afterEnter: _,
83
- afterLeave: T
84
- }), (l, k) => (t(), h(e(Je), {
83
+ afterLeave: N
84
+ }), (l, k) => (a(), h(e(Je), {
85
85
  to: l.appendTo,
86
86
  disabled: l.appendTo !== "body" ? !1 : !l.appendToBody
87
87
  }, {
88
88
  default: p(() => [
89
89
  c(Te, {
90
- name: e(o).b("fade"),
90
+ name: e(s).b("fade"),
91
91
  onAfterEnter: e(_),
92
- onAfterLeave: e(T),
93
- onBeforeLeave: e(I),
92
+ onAfterLeave: e(N),
93
+ onBeforeLeave: e(E),
94
94
  persisted: ""
95
95
  }, {
96
96
  default: p(() => [
97
- Ne(c(e(he), {
97
+ Ne(c(e(ge), {
98
98
  mask: l.modal,
99
99
  "overlay-class": l.modalClass,
100
- "z-index": e(i),
100
+ "z-index": e(n),
101
101
  onClick: e(P)
102
102
  }, {
103
103
  default: p(() => [
104
104
  c(e(Ge), {
105
105
  loop: "",
106
- trapped: e(A),
106
+ trapped: e(L),
107
107
  "focus-trap-el": V.value,
108
- "focus-start-el": F.value,
108
+ "focus-start-el": w.value,
109
109
  onFocusAfterTrapped: e(u),
110
110
  onFocusAfterReleased: e(C),
111
- onFocusoutPrevented: e(O),
112
- onReleaseRequested: e(E)
111
+ onFocusoutPrevented: e(U),
112
+ onReleaseRequested: e(T)
113
113
  }, {
114
114
  default: p(() => [
115
- n("div", Be({
115
+ i("div", Be({
116
116
  ref_key: "drawerRef",
117
117
  ref: V,
118
118
  "aria-modal": "true",
119
119
  "aria-label": l.title || void 0,
120
- "aria-labelledby": l.title ? void 0 : e(L),
121
- "aria-describedby": e(g)
120
+ "aria-labelledby": l.title ? void 0 : e(O),
121
+ "aria-describedby": e(f)
122
122
  }, l.$attrs, {
123
- class: [e(o).b(), l.direction, e(A) && "open"],
124
- style: e(f) ? "width: " + e(U) : "height: " + e(U),
123
+ class: [e(s).b(), l.direction, e(L) && "open"],
124
+ style: e(b) ? "width: " + e(D) : "height: " + e(D),
125
125
  role: "dialog",
126
126
  onClick: ue(() => {
127
127
  }, ["stop"])
128
128
  }), [
129
- n("span", {
129
+ i("span", {
130
130
  ref_key: "focusStartRef",
131
- ref: F,
132
- class: v(e(o).e("sr-focus")),
131
+ ref: w,
132
+ class: v(e(s).e("sr-focus")),
133
133
  tabindex: "-1"
134
134
  }, null, 2),
135
- l.withHeader ? (t(), m("header", {
135
+ l.withHeader ? (a(), m("header", {
136
136
  key: 0,
137
- class: v([e(o).e("header"), l.headerClass])
137
+ class: v([e(s).e("header"), l.headerClass])
138
138
  }, [
139
139
  l.$slots.title ? R(l.$slots, "title", { key: 1 }, () => [
140
- b(" DEPRECATED SLOT ")
140
+ y(" DEPRECATED SLOT ")
141
141
  ]) : R(l.$slots, "header", {
142
142
  key: 0,
143
- close: e(a),
144
- titleId: e(L),
145
- titleClass: e(o).e("title")
143
+ close: e(t),
144
+ titleId: e(O),
145
+ titleClass: e(s).e("title")
146
146
  }, () => [
147
- l.$slots.title ? b("v-if", !0) : (t(), m("span", {
147
+ l.$slots.title ? y("v-if", !0) : (a(), m("span", {
148
148
  key: 0,
149
- id: e(L),
149
+ id: e(O),
150
150
  role: "heading",
151
151
  "aria-level": l.headerAriaLevel,
152
- class: v(e(o).e("title"))
152
+ class: v(e(s).e("title"))
153
153
  }, z(l.title), 11, ["id", "aria-level"]))
154
154
  ]),
155
- l.showClose ? (t(), m("button", {
155
+ l.showClose ? (a(), m("button", {
156
156
  key: 2,
157
- "aria-label": e(s)("el.drawer.close"),
158
- class: v(e(o).e("close-btn")),
157
+ "aria-label": e(o)("el.drawer.close"),
158
+ class: v(e(s).e("close-btn")),
159
159
  type: "button",
160
- onClick: e(a)
160
+ onClick: e(t)
161
161
  }, [
162
- c(e(D), {
163
- class: v(e(o).e("close"))
162
+ c(e(F), {
163
+ class: v(e(s).e("close"))
164
164
  }, {
165
165
  default: p(() => [
166
166
  c(e($e))
167
167
  ]),
168
168
  _: 1
169
169
  }, 8, ["class"])
170
- ], 10, ["aria-label", "onClick"])) : b("v-if", !0)
171
- ], 2)) : b("v-if", !0),
172
- e($) ? (t(), m("div", {
170
+ ], 10, ["aria-label", "onClick"])) : y("v-if", !0)
171
+ ], 2)) : y("v-if", !0),
172
+ e($) ? (a(), m("div", {
173
173
  key: 1,
174
- id: e(g),
175
- class: v([e(o).e("body"), l.bodyClass])
174
+ id: e(f),
175
+ class: v([e(s).e("body"), l.bodyClass])
176
176
  }, [
177
177
  R(l.$slots, "default")
178
- ], 10, ["id"])) : b("v-if", !0),
179
- l.$slots.footer ? (t(), m("div", {
178
+ ], 10, ["id"])) : y("v-if", !0),
179
+ l.$slots.footer ? (a(), m("div", {
180
180
  key: 2,
181
- class: v([e(o).e("footer"), l.footerClass])
181
+ class: v([e(s).e("footer"), l.footerClass])
182
182
  }, [
183
183
  R(l.$slots, "footer")
184
- ], 2)) : b("v-if", !0)
184
+ ], 2)) : y("v-if", !0)
185
185
  ], 16, ["aria-label", "aria-labelledby", "aria-describedby", "onClick"])
186
186
  ]),
187
187
  _: 3
@@ -189,7 +189,7 @@ const Xe = se({
189
189
  ]),
190
190
  _: 3
191
191
  }, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
192
- [Ae, e(A)]
192
+ [Ae, e(L)]
193
193
  ])
194
194
  ]),
195
195
  _: 3
@@ -200,7 +200,7 @@ const Xe = se({
200
200
  }
201
201
  });
202
202
  var el = /* @__PURE__ */ re(xe, [["__file", "drawer.vue"]]);
203
- const ll = de(el), al = se({
203
+ const ll = de(el), tl = se({
204
204
  modelValue: {
205
205
  type: [Boolean, String, Number],
206
206
  default: !1
@@ -260,187 +260,187 @@ const ll = de(el), al = se({
260
260
  type: [String, Number]
261
261
  },
262
262
  ...we(["ariaLabel"])
263
- }), tl = {
264
- [Z]: (r) => G(r) || Q(r) || X(r),
265
- [x]: (r) => G(r) || Q(r) || X(r),
266
- [ee]: (r) => G(r) || Q(r) || X(r)
267
- }, le = "ElSwitch", ol = W({
263
+ }), al = {
264
+ [Z]: (r) => W(r) || X(r) || Y(r),
265
+ [x]: (r) => W(r) || X(r) || Y(r),
266
+ [ee]: (r) => W(r) || X(r) || Y(r)
267
+ }, le = "ElSwitch", ol = Q({
268
268
  name: le
269
- }), sl = /* @__PURE__ */ W({
269
+ }), sl = /* @__PURE__ */ Q({
270
270
  ...ol,
271
- props: al,
272
- emits: tl,
273
- setup(r, { expose: B, emit: y }) {
274
- const d = r, { formItem: V } = qe(), F = Me(), o = ne("switch"), { inputId: s } = je(d, {
271
+ props: tl,
272
+ emits: al,
273
+ setup(r, { expose: A, emit: g }) {
274
+ const d = r, { formItem: V } = qe(), w = Me(), s = ie("switch"), { inputId: o } = je(d, {
275
275
  formItemContext: V
276
- }), _ = He(w(() => d.loading)), T = N(d.modelValue !== !1), I = N(), A = N(), $ = w(() => [
277
- o.b(),
278
- o.m(F.value),
279
- o.is("disabled", _.value),
280
- o.is("checked", u.value)
281
- ]), L = w(() => [
282
- o.e("label"),
283
- o.em("label", "left"),
284
- o.is("active", !u.value)
285
- ]), g = w(() => [
286
- o.e("label"),
287
- o.em("label", "right"),
288
- o.is("active", u.value)
289
- ]), i = w(() => ({
290
- width: ie(d.width)
276
+ }), _ = He(S(() => d.loading)), N = B(d.modelValue !== !1), E = B(), L = B(), $ = S(() => [
277
+ s.b(),
278
+ s.m(w.value),
279
+ s.is("disabled", _.value),
280
+ s.is("checked", u.value)
281
+ ]), O = S(() => [
282
+ s.e("label"),
283
+ s.em("label", "left"),
284
+ s.is("active", !u.value)
285
+ ]), f = S(() => [
286
+ s.e("label"),
287
+ s.em("label", "right"),
288
+ s.is("active", u.value)
289
+ ]), n = S(() => ({
290
+ width: ne(d.width)
291
291
  }));
292
292
  oe(() => d.modelValue, () => {
293
- T.value = !0;
293
+ N.value = !0;
294
294
  });
295
- const P = w(() => T.value ? d.modelValue : !1), u = w(() => P.value === d.activeValue);
296
- [d.activeValue, d.inactiveValue].includes(P.value) || (y(Z, d.inactiveValue), y(x, d.inactiveValue), y(ee, d.inactiveValue)), oe(u, (a) => {
297
- var f;
298
- I.value.checked = a, d.validateEvent && ((f = V == null ? void 0 : V.validate) == null || f.call(V, "change").catch((U) => ae(U)));
295
+ const P = S(() => N.value ? d.modelValue : !1), u = S(() => P.value === d.activeValue);
296
+ [d.activeValue, d.inactiveValue].includes(P.value) || (g(Z, d.inactiveValue), g(x, d.inactiveValue), g(ee, d.inactiveValue)), oe(u, (t) => {
297
+ var b;
298
+ E.value.checked = t, d.validateEvent && ((b = V == null ? void 0 : V.validate) == null || b.call(V, "change").catch((D) => te(D)));
299
299
  });
300
300
  const C = () => {
301
- const a = u.value ? d.inactiveValue : d.activeValue;
302
- y(Z, a), y(x, a), y(ee, a), Oe(() => {
303
- I.value.checked = u.value;
301
+ const t = u.value ? d.inactiveValue : d.activeValue;
302
+ g(Z, t), g(x, t), g(ee, t), Pe(() => {
303
+ E.value.checked = u.value;
304
304
  });
305
- }, O = () => {
305
+ }, U = () => {
306
306
  if (_.value)
307
307
  return;
308
- const { beforeChange: a } = d;
309
- if (!a) {
308
+ const { beforeChange: t } = d;
309
+ if (!t) {
310
310
  C();
311
311
  return;
312
312
  }
313
- const f = a();
313
+ const b = t();
314
314
  [
315
- te(f),
316
- G(f)
317
- ].includes(!0) || ve(le, "beforeChange must return type `Promise<boolean>` or `boolean`"), te(f) ? f.then((l) => {
315
+ ae(b),
316
+ W(b)
317
+ ].includes(!0) || ve(le, "beforeChange must return type `Promise<boolean>` or `boolean`"), ae(b) ? b.then((l) => {
318
318
  l && C();
319
319
  }).catch((l) => {
320
- ae(le, `some error occurred: ${l}`);
321
- }) : f && C();
322
- }, E = () => {
323
- var a, f;
324
- (f = (a = I.value) == null ? void 0 : a.focus) == null || f.call(a);
320
+ te(le, `some error occurred: ${l}`);
321
+ }) : b && C();
322
+ }, T = () => {
323
+ var t, b;
324
+ (b = (t = E.value) == null ? void 0 : t.focus) == null || b.call(t);
325
325
  };
326
326
  return ce(() => {
327
- I.value.checked = u.value;
328
- }), B({
329
- focus: E,
327
+ E.value.checked = u.value;
328
+ }), A({
329
+ focus: T,
330
330
  checked: u
331
- }), (a, f) => (t(), m("div", {
331
+ }), (t, b) => (a(), m("div", {
332
332
  class: v(e($)),
333
- onClick: ue(O, ["prevent"])
333
+ onClick: ue(U, ["prevent"])
334
334
  }, [
335
- n("input", {
336
- id: e(s),
335
+ i("input", {
336
+ id: e(o),
337
337
  ref_key: "input",
338
- ref: I,
339
- class: v(e(o).e("input")),
338
+ ref: E,
339
+ class: v(e(s).e("input")),
340
340
  type: "checkbox",
341
341
  role: "switch",
342
342
  "aria-checked": e(u),
343
343
  "aria-disabled": e(_),
344
- "aria-label": a.ariaLabel,
345
- name: a.name,
346
- "true-value": a.activeValue,
347
- "false-value": a.inactiveValue,
344
+ "aria-label": t.ariaLabel,
345
+ name: t.name,
346
+ "true-value": t.activeValue,
347
+ "false-value": t.inactiveValue,
348
348
  disabled: e(_),
349
- tabindex: a.tabindex,
349
+ tabindex: t.tabindex,
350
350
  onChange: C,
351
- onKeydown: Le(O, ["enter"])
351
+ onKeydown: Le(U, ["enter"])
352
352
  }, null, 42, ["id", "aria-checked", "aria-disabled", "aria-label", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"]),
353
- !a.inlinePrompt && (a.inactiveIcon || a.inactiveText) ? (t(), m("span", {
353
+ !t.inlinePrompt && (t.inactiveIcon || t.inactiveText) ? (a(), m("span", {
354
354
  key: 0,
355
- class: v(e(L))
355
+ class: v(e(O))
356
356
  }, [
357
- a.inactiveIcon ? (t(), h(e(D), { key: 0 }, {
357
+ t.inactiveIcon ? (a(), h(e(F), { key: 0 }, {
358
358
  default: p(() => [
359
- (t(), h(K(a.inactiveIcon)))
359
+ (a(), h(K(t.inactiveIcon)))
360
360
  ]),
361
361
  _: 1
362
- })) : b("v-if", !0),
363
- !a.inactiveIcon && a.inactiveText ? (t(), m("span", {
362
+ })) : y("v-if", !0),
363
+ !t.inactiveIcon && t.inactiveText ? (a(), m("span", {
364
364
  key: 1,
365
365
  "aria-hidden": e(u)
366
- }, z(a.inactiveText), 9, ["aria-hidden"])) : b("v-if", !0)
367
- ], 2)) : b("v-if", !0),
368
- n("span", {
366
+ }, z(t.inactiveText), 9, ["aria-hidden"])) : y("v-if", !0)
367
+ ], 2)) : y("v-if", !0),
368
+ i("span", {
369
369
  ref_key: "core",
370
- ref: A,
371
- class: v(e(o).e("core")),
372
- style: Pe(e(i))
370
+ ref: L,
371
+ class: v(e(s).e("core")),
372
+ style: Oe(e(n))
373
373
  }, [
374
- a.inlinePrompt ? (t(), m("div", {
374
+ t.inlinePrompt ? (a(), m("div", {
375
375
  key: 0,
376
- class: v(e(o).e("inner"))
376
+ class: v(e(s).e("inner"))
377
377
  }, [
378
- a.activeIcon || a.inactiveIcon ? (t(), h(e(D), {
378
+ t.activeIcon || t.inactiveIcon ? (a(), h(e(F), {
379
379
  key: 0,
380
- class: v(e(o).is("icon"))
380
+ class: v(e(s).is("icon"))
381
381
  }, {
382
382
  default: p(() => [
383
- (t(), h(K(e(u) ? a.activeIcon : a.inactiveIcon)))
383
+ (a(), h(K(e(u) ? t.activeIcon : t.inactiveIcon)))
384
384
  ]),
385
385
  _: 1
386
- }, 8, ["class"])) : a.activeText || a.inactiveText ? (t(), m("span", {
386
+ }, 8, ["class"])) : t.activeText || t.inactiveText ? (a(), m("span", {
387
387
  key: 1,
388
- class: v(e(o).is("text")),
388
+ class: v(e(s).is("text")),
389
389
  "aria-hidden": !e(u)
390
- }, z(e(u) ? a.activeText : a.inactiveText), 11, ["aria-hidden"])) : b("v-if", !0)
391
- ], 2)) : b("v-if", !0),
392
- n("div", {
393
- class: v(e(o).e("action"))
390
+ }, z(e(u) ? t.activeText : t.inactiveText), 11, ["aria-hidden"])) : y("v-if", !0)
391
+ ], 2)) : y("v-if", !0),
392
+ i("div", {
393
+ class: v(e(s).e("action"))
394
394
  }, [
395
- a.loading ? (t(), h(e(D), {
395
+ t.loading ? (a(), h(e(F), {
396
396
  key: 0,
397
- class: v(e(o).is("loading"))
397
+ class: v(e(s).is("loading"))
398
398
  }, {
399
399
  default: p(() => [
400
400
  c(e(Ke))
401
401
  ]),
402
402
  _: 1
403
- }, 8, ["class"])) : e(u) ? R(a.$slots, "active-action", { key: 1 }, () => [
404
- a.activeActionIcon ? (t(), h(e(D), { key: 0 }, {
403
+ }, 8, ["class"])) : e(u) ? R(t.$slots, "active-action", { key: 1 }, () => [
404
+ t.activeActionIcon ? (a(), h(e(F), { key: 0 }, {
405
405
  default: p(() => [
406
- (t(), h(K(a.activeActionIcon)))
406
+ (a(), h(K(t.activeActionIcon)))
407
407
  ]),
408
408
  _: 1
409
- })) : b("v-if", !0)
410
- ]) : e(u) ? b("v-if", !0) : R(a.$slots, "inactive-action", { key: 2 }, () => [
411
- a.inactiveActionIcon ? (t(), h(e(D), { key: 0 }, {
409
+ })) : y("v-if", !0)
410
+ ]) : e(u) ? y("v-if", !0) : R(t.$slots, "inactive-action", { key: 2 }, () => [
411
+ t.inactiveActionIcon ? (a(), h(e(F), { key: 0 }, {
412
412
  default: p(() => [
413
- (t(), h(K(a.inactiveActionIcon)))
413
+ (a(), h(K(t.inactiveActionIcon)))
414
414
  ]),
415
415
  _: 1
416
- })) : b("v-if", !0)
416
+ })) : y("v-if", !0)
417
417
  ])
418
418
  ], 2)
419
419
  ], 6),
420
- !a.inlinePrompt && (a.activeIcon || a.activeText) ? (t(), m("span", {
420
+ !t.inlinePrompt && (t.activeIcon || t.activeText) ? (a(), m("span", {
421
421
  key: 1,
422
- class: v(e(g))
422
+ class: v(e(f))
423
423
  }, [
424
- a.activeIcon ? (t(), h(e(D), { key: 0 }, {
424
+ t.activeIcon ? (a(), h(e(F), { key: 0 }, {
425
425
  default: p(() => [
426
- (t(), h(K(a.activeIcon)))
426
+ (a(), h(K(t.activeIcon)))
427
427
  ]),
428
428
  _: 1
429
- })) : b("v-if", !0),
430
- !a.activeIcon && a.activeText ? (t(), m("span", {
429
+ })) : y("v-if", !0),
430
+ !t.activeIcon && t.activeText ? (a(), m("span", {
431
431
  key: 1,
432
432
  "aria-hidden": !e(u)
433
- }, z(a.activeText), 9, ["aria-hidden"])) : b("v-if", !0)
434
- ], 2)) : b("v-if", !0)
433
+ }, z(t.activeText), 9, ["aria-hidden"])) : y("v-if", !0)
434
+ ], 2)) : y("v-if", !0)
435
435
  ], 10, ["onClick"]));
436
436
  }
437
437
  });
438
- var nl = /* @__PURE__ */ re(sl, [["__file", "switch.vue"]]);
439
- const il = de(nl);
438
+ var il = /* @__PURE__ */ re(sl, [["__file", "switch.vue"]]);
439
+ const nl = de(il);
440
440
  const rl = [
441
441
  { label: "买卖", value: 0 },
442
442
  { label: "开平", value: 1 }
443
- ], Y = () => ({
443
+ ], G = () => ({
444
444
  /**
445
445
  * @description: 偏好设置
446
446
  */
@@ -470,53 +470,65 @@ const rl = [
470
470
  // 是否开启双击打开单周期
471
471
  enable_showScreenTimeRange: !0
472
472
  // 是否开启显示K线当屏时间范围
473
- }), dl = (r, B) => {
474
- var y;
475
- return ((y = B.find((d) => d.value === r)) == null ? void 0 : y.label) ?? "-";
473
+ }), dl = (r, A) => {
474
+ var g;
475
+ return ((g = A.find((d) => d.value === r)) == null ? void 0 : g.label) ?? "-";
476
476
  };
477
- const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline-config element-dark" }, cl = { class: "setting-item" }, pl = /* @__PURE__ */ S(() => /* @__PURE__ */ n("span", { class: "label" }, "默认主图指标: ", -1)), ml = { class: "setting-item" }, vl = /* @__PURE__ */ S(() => /* @__PURE__ */ n("span", { class: "label" }, "成交点显示模式: ", -1)), fl = { class: "setting-item" }, bl = /* @__PURE__ */ S(() => /* @__PURE__ */ n("span", { class: "label" }, "单周期默认展示: ", -1)), yl = { class: "setting-item" }, hl = /* @__PURE__ */ S(() => /* @__PURE__ */ n("span", { class: "label" }, "多周期默认展示: ", -1)), gl = { class: "mode" }, _l = { class: "cycleName" }, Cl = { class: "content" }, kl = { class: "setting-item" }, Vl = /* @__PURE__ */ S(() => /* @__PURE__ */ n("span", { class: "label" }, "默认展示模块: ", -1)), wl = { class: "setting-item" }, Sl = /* @__PURE__ */ S(() => /* @__PURE__ */ n("span", { class: "label" }, "启用副图: ", -1)), Il = { class: "setting-item" }, El = /* @__PURE__ */ S(() => /* @__PURE__ */ n("span", { class: "label" }, "启用拖拽轴: ", -1)), Tl = { class: "setting-item" }, Nl = /* @__PURE__ */ S(() => /* @__PURE__ */ n("span", { class: "label" }, "交易范围高亮: ", -1)), Bl = { class: "setting-item" }, Al = /* @__PURE__ */ S(() => /* @__PURE__ */ n("span", { class: "label" }, "双击跳转单周期: ", -1)), Ll = { class: "setting-item" }, Pl = /* @__PURE__ */ S(() => /* @__PURE__ */ n("span", { class: "label" }, "显示K线当屏时间范围: ", -1)), Ol = { class: "setting-footer" }, Ul = {
477
+ const I = (r) => (Fe("data-v-db5abf51"), r = r(), Re(), r), ul = { class: "kline-config element-dark" }, cl = { class: "setting-item" }, pl = /* @__PURE__ */ I(() => /* @__PURE__ */ i("span", { class: "label" }, "默认主图指标: ", -1)), ml = { class: "setting-item" }, vl = /* @__PURE__ */ I(() => /* @__PURE__ */ i("span", { class: "label" }, "成交点显示模式: ", -1)), fl = { class: "setting-item" }, bl = /* @__PURE__ */ I(() => /* @__PURE__ */ i("span", { class: "label" }, "单周期默认展示: ", -1)), yl = { class: "setting-item" }, gl = /* @__PURE__ */ I(() => /* @__PURE__ */ i("span", { class: "label" }, "多周期默认展示: ", -1)), hl = { class: "mode" }, _l = { class: "cycleName" }, Cl = { class: "content" }, kl = { class: "setting-item" }, Vl = /* @__PURE__ */ I(() => /* @__PURE__ */ i("span", { class: "label" }, "默认展示模块: ", -1)), wl = { class: "setting-item" }, Sl = /* @__PURE__ */ I(() => /* @__PURE__ */ i("span", { class: "label" }, "启用副图: ", -1)), Il = { class: "setting-item" }, El = /* @__PURE__ */ I(() => /* @__PURE__ */ i("span", { class: "label" }, "启用拖拽轴: ", -1)), Tl = { class: "setting-item" }, Nl = /* @__PURE__ */ I(() => /* @__PURE__ */ i("span", { class: "label" }, "交易范围高亮: ", -1)), Bl = { class: "setting-item" }, Al = /* @__PURE__ */ I(() => /* @__PURE__ */ i("span", { class: "label" }, "双击跳转单周期: ", -1)), Ll = { class: "setting-item" }, Ol = /* @__PURE__ */ I(() => /* @__PURE__ */ i("span", { class: "label" }, "显示K线当屏时间范围: ", -1)), Pl = { class: "setting-footer" }, Ul = {
478
478
  __name: "index",
479
479
  props: {
480
- indicatorStore: { type: Object, default: () => ({}) }
480
+ indicatorStore: { type: Object, default: () => ({}) },
481
481
  // 指标配置Store
482
+ origin: { type: String, default: "server" },
483
+ // 数据来源: server服务器, local本地
484
+ // 如果server此项不用管, 如果local则使用此项
485
+ cycleOptions: { type: Array, default: () => [] }
482
486
  },
483
487
  emits: "callBack",
484
- setup(r, { expose: B, emit: y }) {
485
- const { request: d } = Ue("stConfig"), V = y, F = r, o = N(!1), s = De({}), _ = N([]), T = N([]), I = () => {
486
- Object.assign(s, Y());
487
- }, A = async () => {
488
- const g = JSON.stringify(s);
489
- await d.post("/common/qt/updateUserConfig", { appId: 1, json: g }), V("callBack", g), o.value = !1;
490
- }, $ = async () => {
491
- const { body: g } = await d.post("/common/qt/getUserConfig", { appId: 1 });
492
- Object.assign(s, Y(), g ? JSON.parse(g) : {});
488
+ setup(r, { expose: A, emit: g }) {
489
+ const { request: d } = Ue("stConfig"), V = g, w = r, s = B(!1), o = De({}), _ = B([]), N = B([]), E = () => {
490
+ Object.assign(o, G());
493
491
  }, L = async () => {
494
- const { body: g } = await d.post("/common/qt/getDict", { dictIds: [1002] });
495
- _.value = g[1002].map((i) => ({
496
- label: i.dictName,
497
- value: i.dictCode
498
- }));
492
+ const f = JSON.stringify(o);
493
+ w.origin === "server" ? await d.post("/common/qt/updateUserConfig", { appId: 1, json: f }) : localStorage.setItem("userKlineConfig", f), V("callBack", f), s.value = !1;
494
+ }, $ = async () => {
495
+ if (w.origin === "server") {
496
+ const { body: f } = await d.post("/common/qt/getUserConfig", { appId: 1 });
497
+ Object.assign(o, G(), f ? JSON.parse(f) : {});
498
+ } else {
499
+ const f = localStorage.getItem("userKlineConfig");
500
+ Object.assign(o, G(), f ? JSON.parse(f) : {});
501
+ }
502
+ }, O = async () => {
503
+ if (w.origin === "server") {
504
+ const { body: f } = await d.post("/common/qt/getDict", { dictIds: [1002] });
505
+ _.value = f[1002].map((n) => ({
506
+ label: n.dictName,
507
+ value: n.dictCode
508
+ }));
509
+ } else
510
+ _.value = w.cycleOptions;
499
511
  };
500
512
  return ce(() => {
501
- L(), T.value = F.indicatorStore.mainIndicatorList ?? [];
502
- }), B({
513
+ O(), N.value = w.indicatorStore.mainIndicatorList ?? [];
514
+ }), A({
503
515
  // 打开
504
516
  open: async () => {
505
- await $(), o.value = !0;
517
+ await $(), s.value = !0;
506
518
  },
507
519
  // 获取默认配置
508
- getDefaultUserKlineConfig: Y
509
- }), (g, i) => {
510
- const P = Ie, u = ke, C = Ve, O = Ce, E = il, a = Se, f = ge, U = ll;
511
- return t(), m("div", ul, [
512
- c(U, {
513
- modelValue: o.value,
514
- "onUpdate:modelValue": i[10] || (i[10] = (l) => o.value = l),
520
+ getDefaultUserKlineConfig: G
521
+ }), (f, n) => {
522
+ const P = Ie, u = ke, C = Ve, U = Ce, T = nl, t = Se, b = he, D = ll;
523
+ return a(), m("div", ul, [
524
+ c(D, {
525
+ modelValue: s.value,
526
+ "onUpdate:modelValue": n[10] || (n[10] = (l) => s.value = l),
515
527
  title: "K线自定义配置",
516
528
  size: 320
517
529
  }, {
518
530
  default: p(() => [
519
- c(a, { class: "setting-main" }, {
531
+ c(t, { class: "setting-main" }, {
520
532
  default: p(() => [
521
533
  c(P, { style: { "margin-top": "8px" } }, {
522
534
  default: p(() => [
@@ -524,15 +536,15 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
524
536
  ]),
525
537
  _: 1
526
538
  }),
527
- n("div", cl, [
539
+ i("div", cl, [
528
540
  pl,
529
541
  c(C, {
530
- modelValue: s.mainIndicator,
531
- "onUpdate:modelValue": i[0] || (i[0] = (l) => s.mainIndicator = l),
542
+ modelValue: o.mainIndicator,
543
+ "onUpdate:modelValue": n[0] || (n[0] = (l) => o.mainIndicator = l),
532
544
  "popper-class": "element-dark"
533
545
  }, {
534
546
  default: p(() => [
535
- (t(!0), m(q, null, M(T.value, (l, k) => (t(), h(u, {
547
+ (a(!0), m(q, null, M(N.value, (l, k) => (a(), h(u, {
536
548
  key: k,
537
549
  label: l.label,
538
550
  value: l.value
@@ -541,15 +553,15 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
541
553
  _: 1
542
554
  }, 8, ["modelValue"])
543
555
  ]),
544
- n("div", ml, [
556
+ i("div", ml, [
545
557
  vl,
546
558
  c(C, {
547
- modelValue: s.sellBuy,
548
- "onUpdate:modelValue": i[1] || (i[1] = (l) => s.sellBuy = l),
559
+ modelValue: o.sellBuy,
560
+ "onUpdate:modelValue": n[1] || (n[1] = (l) => o.sellBuy = l),
549
561
  "popper-class": "element-dark"
550
562
  }, {
551
563
  default: p(() => [
552
- (t(!0), m(q, null, M(e(rl), (l, k) => (t(), h(u, {
564
+ (a(!0), m(q, null, M(e(rl), (l, k) => (a(), h(u, {
553
565
  key: k,
554
566
  label: l.label,
555
567
  value: l.value
@@ -558,15 +570,15 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
558
570
  _: 1
559
571
  }, 8, ["modelValue"])
560
572
  ]),
561
- n("div", fl, [
573
+ i("div", fl, [
562
574
  bl,
563
575
  c(C, {
564
- modelValue: s.singelCycle,
565
- "onUpdate:modelValue": i[2] || (i[2] = (l) => s.singelCycle = l),
576
+ modelValue: o.singelCycle,
577
+ "onUpdate:modelValue": n[2] || (n[2] = (l) => o.singelCycle = l),
566
578
  "popper-class": "element-dark"
567
579
  }, {
568
580
  default: p(() => [
569
- (t(!0), m(q, null, M(_.value, (l, k) => (t(), h(u, {
581
+ (a(!0), m(q, null, M(_.value, (l, k) => (a(), h(u, {
570
582
  key: k,
571
583
  label: l.label,
572
584
  value: l.value
@@ -575,12 +587,12 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
575
587
  _: 1
576
588
  }, 8, ["modelValue"])
577
589
  ]),
578
- n("div", yl, [
579
- hl,
580
- c(O, {
590
+ i("div", yl, [
591
+ gl,
592
+ c(U, {
581
593
  size: "small",
582
- modelValue: s.multiCycleNum,
583
- "onUpdate:modelValue": i[3] || (i[3] = (l) => s.multiCycleNum = l),
594
+ modelValue: o.multiCycleNum,
595
+ "onUpdate:modelValue": n[3] || (n[3] = (l) => o.multiCycleNum = l),
584
596
  options: [
585
597
  { label: "二图", value: 2 },
586
598
  { label: "四图", value: 4 },
@@ -589,19 +601,19 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
589
601
  style: { height: "26px" }
590
602
  }, null, 8, ["modelValue"])
591
603
  ]),
592
- n("div", {
593
- class: v(`setting-multi-box grid-${s.multiCycleNum}`)
604
+ i("div", {
605
+ class: v(`setting-multi-box grid-${o.multiCycleNum}`)
594
606
  }, [
595
- (t(!0), m(q, null, M(s.multiCycleList.slice(0, s.multiCycleNum), (l, k) => (t(), m("div", gl, [
596
- n("div", _l, [
597
- n("span", null, z(e(dl)(s.multiCycleList[k], _.value)), 1),
607
+ (a(!0), m(q, null, M(o.multiCycleList.slice(0, o.multiCycleNum), (l, k) => (a(), m("div", hl, [
608
+ i("div", _l, [
609
+ i("span", null, z(e(dl)(o.multiCycleList[k], _.value)), 1),
598
610
  c(C, {
599
- modelValue: s.multiCycleList[k],
600
- "onUpdate:modelValue": (j) => s.multiCycleList[k] = j,
611
+ modelValue: o.multiCycleList[k],
612
+ "onUpdate:modelValue": (j) => o.multiCycleList[k] = j,
601
613
  "popper-class": "element-dark"
602
614
  }, {
603
615
  default: p(() => [
604
- (t(!0), m(q, null, M(_.value, (j, pe) => (t(), h(u, {
616
+ (a(!0), m(q, null, M(_.value, (j, pe) => (a(), h(u, {
605
617
  key: pe,
606
618
  label: j.label,
607
619
  value: j.value
@@ -610,15 +622,15 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
610
622
  _: 2
611
623
  }, 1032, ["modelValue", "onUpdate:modelValue"])
612
624
  ]),
613
- n("span", Cl, z(k + 1) + "号位K线", 1)
625
+ i("span", Cl, z(k + 1) + "号位K线", 1)
614
626
  ]))), 256))
615
627
  ], 2),
616
- n("div", kl, [
628
+ i("div", kl, [
617
629
  Vl,
618
- c(O, {
630
+ c(U, {
619
631
  size: "small",
620
- modelValue: s.pageType,
621
- "onUpdate:modelValue": i[4] || (i[4] = (l) => s.pageType = l),
632
+ modelValue: o.pageType,
633
+ "onUpdate:modelValue": n[4] || (n[4] = (l) => o.pageType = l),
622
634
  options: [
623
635
  { label: "单周期", value: 1 },
624
636
  { label: "多周期", value: 2 }
@@ -632,54 +644,54 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
632
644
  ]),
633
645
  _: 1
634
646
  }),
635
- n("div", wl, [
647
+ i("div", wl, [
636
648
  Sl,
637
- c(E, {
638
- modelValue: s.enable_subChart,
639
- "onUpdate:modelValue": i[5] || (i[5] = (l) => s.enable_subChart = l)
649
+ c(T, {
650
+ modelValue: o.enable_subChart,
651
+ "onUpdate:modelValue": n[5] || (n[5] = (l) => o.enable_subChart = l)
640
652
  }, null, 8, ["modelValue"])
641
653
  ]),
642
- n("div", Il, [
654
+ i("div", Il, [
643
655
  El,
644
- c(E, {
645
- modelValue: s.enable_sliderChart,
646
- "onUpdate:modelValue": i[6] || (i[6] = (l) => s.enable_sliderChart = l)
656
+ c(T, {
657
+ modelValue: o.enable_sliderChart,
658
+ "onUpdate:modelValue": n[6] || (n[6] = (l) => o.enable_sliderChart = l)
647
659
  }, null, 8, ["modelValue"])
648
660
  ]),
649
- n("div", Tl, [
661
+ i("div", Tl, [
650
662
  Nl,
651
- c(E, {
652
- modelValue: s.enable_tradeLogBrush,
653
- "onUpdate:modelValue": i[7] || (i[7] = (l) => s.enable_tradeLogBrush = l)
663
+ c(T, {
664
+ modelValue: o.enable_tradeLogBrush,
665
+ "onUpdate:modelValue": n[7] || (n[7] = (l) => o.enable_tradeLogBrush = l)
654
666
  }, null, 8, ["modelValue"])
655
667
  ]),
656
- n("div", Bl, [
668
+ i("div", Bl, [
657
669
  Al,
658
- c(E, {
659
- modelValue: s.enable_dbClickOpenSingel,
660
- "onUpdate:modelValue": i[8] || (i[8] = (l) => s.enable_dbClickOpenSingel = l)
670
+ c(T, {
671
+ modelValue: o.enable_dbClickOpenSingel,
672
+ "onUpdate:modelValue": n[8] || (n[8] = (l) => o.enable_dbClickOpenSingel = l)
661
673
  }, null, 8, ["modelValue"])
662
674
  ]),
663
- n("div", Ll, [
664
- Pl,
665
- c(E, {
666
- modelValue: s.enable_showScreenTimeRange,
667
- "onUpdate:modelValue": i[9] || (i[9] = (l) => s.enable_showScreenTimeRange = l)
675
+ i("div", Ll, [
676
+ Ol,
677
+ c(T, {
678
+ modelValue: o.enable_showScreenTimeRange,
679
+ "onUpdate:modelValue": n[9] || (n[9] = (l) => o.enable_showScreenTimeRange = l)
668
680
  }, null, 8, ["modelValue"])
669
681
  ])
670
682
  ]),
671
683
  _: 1
672
684
  }),
673
- n("div", Ol, [
674
- c(f, { onClick: I }, {
685
+ i("div", Pl, [
686
+ c(b, { onClick: E }, {
675
687
  default: p(() => [
676
688
  H(" 恢复默认 ")
677
689
  ]),
678
690
  _: 1
679
691
  }),
680
- c(f, {
692
+ c(b, {
681
693
  type: "primary",
682
- onClick: A
694
+ onClick: L
683
695
  }, {
684
696
  default: p(() => [
685
697
  H(" 保存配置 ")
@@ -693,11 +705,11 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
693
705
  ]);
694
706
  };
695
707
  }
696
- }, Dl = /* @__PURE__ */ ze(Ul, [["__scopeId", "data-v-ca16523c"]]), ia = {
708
+ }, Dl = /* @__PURE__ */ ze(Ul, [["__scopeId", "data-v-db5abf51"]]), nt = {
697
709
  install(r) {
698
710
  r.component("st-klineConfig", Dl);
699
711
  }
700
712
  };
701
713
  export {
702
- ia as default
714
+ nt as default
703
715
  };