st-comp 0.0.169 → 0.0.171

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 A, openBlock as a, createBlock as h, unref as e, withCtx as p, createVNode as u, 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 q, Fragment as M, renderList as j, 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: L }) {
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 = A(), w = A(), 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: O,
69
69
  rendered: $,
70
- titleId: L,
71
- bodyId: g,
72
- zIndex: i,
73
- onModalClick: P,
74
- onOpenAutoFocus: u,
70
+ titleId: P,
71
+ bodyId: f,
72
+ zIndex: n,
73
+ onModalClick: B,
74
+ onOpenAutoFocus: c,
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 L({
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
- c(Te, {
90
- name: e(o).b("fade"),
89
+ u(Te, {
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(u(e(ge), {
98
98
  mask: l.modal,
99
99
  "overlay-class": l.modalClass,
100
- "z-index": e(i),
101
- onClick: e(P)
100
+ "z-index": e(n),
101
+ onClick: e(B)
102
102
  }, {
103
103
  default: p(() => [
104
- c(e(Ge), {
104
+ u(e(Ge), {
105
105
  loop: "",
106
- trapped: e(A),
106
+ trapped: e(O),
107
107
  "focus-trap-el": V.value,
108
- "focus-start-el": F.value,
109
- onFocusAfterTrapped: e(u),
108
+ "focus-start-el": w.value,
109
+ onFocusAfterTrapped: e(c),
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(P),
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(O) && "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(P),
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(P),
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
+ u(e(F), {
163
+ class: v(e(s).e("close"))
164
164
  }, {
165
165
  default: p(() => [
166
- c(e($e))
166
+ u(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(O)]
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: L, 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 = A(d.modelValue !== !1), E = A(), O = A(), $ = S(() => [
277
+ s.b(),
278
+ s.m(w.value),
279
+ s.is("disabled", _.value),
280
+ s.is("checked", c.value)
281
+ ]), P = S(() => [
282
+ s.e("label"),
283
+ s.em("label", "left"),
284
+ s.is("active", !c.value)
285
+ ]), f = S(() => [
286
+ s.e("label"),
287
+ s.em("label", "right"),
288
+ s.is("active", c.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 B = S(() => N.value ? d.modelValue : !1), c = S(() => B.value === d.activeValue);
296
+ [d.activeValue, d.inactiveValue].includes(B.value) || (g(Z, d.inactiveValue), g(x, d.inactiveValue), g(ee, d.inactiveValue)), oe(c, (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 = c.value ? d.inactiveValue : d.activeValue;
302
+ g(Z, t), g(x, t), g(ee, t), Pe(() => {
303
+ E.value.checked = c.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,
330
- checked: u
331
- }), (a, f) => (t(), m("div", {
327
+ E.value.checked = c.value;
328
+ }), L({
329
+ focus: T,
330
+ checked: c
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
- "aria-checked": e(u),
342
+ "aria-checked": e(c),
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(P))
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
- "aria-hidden": e(u)
366
- }, z(a.inactiveText), 9, ["aria-hidden"])) : b("v-if", !0)
367
- ], 2)) : b("v-if", !0),
368
- n("span", {
365
+ "aria-hidden": e(c)
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: O,
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(c) ? 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")),
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"))
388
+ class: v(e(s).is("text")),
389
+ "aria-hidden": !e(c)
390
+ }, z(e(c) ? 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
- c(e(Ke))
400
+ u(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(c) ? 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(c) ? 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
- "aria-hidden": !e(u)
433
- }, z(a.activeText), 9, ["aria-hidden"])) : b("v-if", !0)
434
- ], 2)) : b("v-if", !0)
432
+ "aria-hidden": !e(c)
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
  */
@@ -460,79 +460,94 @@ const rl = [
460
460
  /**
461
461
  * @description: 功能配置
462
462
  */
463
+ enable_tradeLogBrush: !0,
464
+ // 高亮交易范围
465
+ enable_showScreenTimeRange: !0,
466
+ // 展示当屏时间范围
467
+ enable_dbClickOpenSingel: !0,
468
+ // 多周期双击图表切换至单周期
469
+ /**
470
+ * @description: 组件开关
471
+ */
463
472
  enable_subChart: !0,
464
473
  // 是否启用副图
465
- enable_sliderChart: !0,
474
+ enable_sliderChart: !0
466
475
  // 是否启用拖拽轴
467
- enable_tradeLogBrush: !0,
468
- // 是否开启交易范围高亮
469
- enable_dbClickOpenSingel: !0,
470
- // 是否开启双击打开单周期
471
- enable_showScreenTimeRange: !0
472
- // 是否开启显示K线当屏时间范围
473
- }), dl = (r, B) => {
474
- var y;
475
- return ((y = B.find((d) => d.value === r)) == null ? void 0 : y.label) ?? "-";
476
+ }), dl = (r, L) => {
477
+ var g;
478
+ return ((g = L.find((d) => d.value === r)) == null ? void 0 : g.label) ?? "-";
476
479
  };
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 = {
480
+ const I = (r) => (Fe("data-v-0cecb8f3"), 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" }, "开启拖拽轴: ", -1)), Pl = { class: "setting-footer" }, Ul = {
478
481
  __name: "index",
479
482
  props: {
480
- indicatorStore: { type: Object, default: () => ({}) }
483
+ indicatorStore: { type: Object, default: () => ({}) },
481
484
  // 指标配置Store
485
+ origin: { type: String, default: "server" },
486
+ // 数据来源: server服务器, local本地
487
+ // 如果server此项不用管, 如果local则使用此项
488
+ cycleOptions: { type: Array, default: () => [] }
482
489
  },
483
490
  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;
491
+ setup(r, { expose: L, emit: g }) {
492
+ const { request: d } = Ue("stConfig"), V = g, w = r, s = A(!1), o = De({}), _ = A([]), N = A([]), E = () => {
493
+ Object.assign(o, G());
494
+ }, O = async () => {
495
+ const f = JSON.stringify(o);
496
+ w.origin === "server" ? await d.post("/common/qt/updateUserConfig", { appId: 1, json: f }) : localStorage.setItem("userKlineConfig", f), V("callBack", f), s.value = !1;
490
497
  }, $ = async () => {
491
- const { body: g } = await d.post("/common/qt/getUserConfig", { appId: 1 });
492
- Object.assign(s, Y(), g ? JSON.parse(g) : {});
493
- }, 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
- }));
498
+ if (w.origin === "server") {
499
+ const { body: f } = await d.post("/common/qt/getUserConfig", { appId: 1 });
500
+ Object.assign(o, G(), f ? JSON.parse(f) : {});
501
+ } else {
502
+ const f = localStorage.getItem("userKlineConfig");
503
+ Object.assign(o, G(), f ? JSON.parse(f) : {});
504
+ }
505
+ }, P = async () => {
506
+ if (w.origin === "server") {
507
+ const { body: f } = await d.post("/common/qt/getDict", { dictIds: [1002] });
508
+ _.value = f[1002].map((n) => ({
509
+ label: n.dictName,
510
+ value: n.dictCode
511
+ }));
512
+ } else
513
+ _.value = w.cycleOptions;
499
514
  };
500
515
  return ce(() => {
501
- L(), T.value = F.indicatorStore.mainIndicatorList ?? [];
502
- }), B({
516
+ P(), N.value = w.indicatorStore.mainIndicatorList ?? [];
517
+ }), L({
503
518
  // 打开
504
519
  open: async () => {
505
- await $(), o.value = !0;
520
+ await $(), s.value = !0;
506
521
  },
507
522
  // 获取默认配置
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),
523
+ getDefaultUserKlineConfig: G
524
+ }), (f, n) => {
525
+ const B = Ie, c = ke, C = Ve, U = Ce, T = nl, t = Se, b = he, D = ll;
526
+ return a(), m("div", ul, [
527
+ u(D, {
528
+ modelValue: s.value,
529
+ "onUpdate:modelValue": n[10] || (n[10] = (l) => s.value = l),
515
530
  title: "K线自定义配置",
516
531
  size: 320
517
532
  }, {
518
533
  default: p(() => [
519
- c(a, { class: "setting-main" }, {
534
+ u(t, { class: "setting-main" }, {
520
535
  default: p(() => [
521
- c(P, { style: { "margin-top": "8px" } }, {
536
+ u(B, { style: { "margin-top": "8px" } }, {
522
537
  default: p(() => [
523
- H("偏好设置")
538
+ q("偏好设置")
524
539
  ]),
525
540
  _: 1
526
541
  }),
527
- n("div", cl, [
542
+ i("div", cl, [
528
543
  pl,
529
- c(C, {
530
- modelValue: s.mainIndicator,
531
- "onUpdate:modelValue": i[0] || (i[0] = (l) => s.mainIndicator = l),
544
+ u(C, {
545
+ modelValue: o.mainIndicator,
546
+ "onUpdate:modelValue": n[0] || (n[0] = (l) => o.mainIndicator = l),
532
547
  "popper-class": "element-dark"
533
548
  }, {
534
549
  default: p(() => [
535
- (t(!0), m(q, null, M(T.value, (l, k) => (t(), h(u, {
550
+ (a(!0), m(M, null, j(N.value, (l, k) => (a(), h(c, {
536
551
  key: k,
537
552
  label: l.label,
538
553
  value: l.value
@@ -541,15 +556,15 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
541
556
  _: 1
542
557
  }, 8, ["modelValue"])
543
558
  ]),
544
- n("div", ml, [
559
+ i("div", ml, [
545
560
  vl,
546
- c(C, {
547
- modelValue: s.sellBuy,
548
- "onUpdate:modelValue": i[1] || (i[1] = (l) => s.sellBuy = l),
561
+ u(C, {
562
+ modelValue: o.sellBuy,
563
+ "onUpdate:modelValue": n[1] || (n[1] = (l) => o.sellBuy = l),
549
564
  "popper-class": "element-dark"
550
565
  }, {
551
566
  default: p(() => [
552
- (t(!0), m(q, null, M(e(rl), (l, k) => (t(), h(u, {
567
+ (a(!0), m(M, null, j(e(rl), (l, k) => (a(), h(c, {
553
568
  key: k,
554
569
  label: l.label,
555
570
  value: l.value
@@ -558,15 +573,15 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
558
573
  _: 1
559
574
  }, 8, ["modelValue"])
560
575
  ]),
561
- n("div", fl, [
576
+ i("div", fl, [
562
577
  bl,
563
- c(C, {
564
- modelValue: s.singelCycle,
565
- "onUpdate:modelValue": i[2] || (i[2] = (l) => s.singelCycle = l),
578
+ u(C, {
579
+ modelValue: o.singelCycle,
580
+ "onUpdate:modelValue": n[2] || (n[2] = (l) => o.singelCycle = l),
566
581
  "popper-class": "element-dark"
567
582
  }, {
568
583
  default: p(() => [
569
- (t(!0), m(q, null, M(_.value, (l, k) => (t(), h(u, {
584
+ (a(!0), m(M, null, j(_.value, (l, k) => (a(), h(c, {
570
585
  key: k,
571
586
  label: l.label,
572
587
  value: l.value
@@ -575,12 +590,12 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
575
590
  _: 1
576
591
  }, 8, ["modelValue"])
577
592
  ]),
578
- n("div", yl, [
579
- hl,
580
- c(O, {
593
+ i("div", yl, [
594
+ gl,
595
+ u(U, {
581
596
  size: "small",
582
- modelValue: s.multiCycleNum,
583
- "onUpdate:modelValue": i[3] || (i[3] = (l) => s.multiCycleNum = l),
597
+ modelValue: o.multiCycleNum,
598
+ "onUpdate:modelValue": n[3] || (n[3] = (l) => o.multiCycleNum = l),
584
599
  options: [
585
600
  { label: "二图", value: 2 },
586
601
  { label: "四图", value: 4 },
@@ -589,36 +604,36 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
589
604
  style: { height: "26px" }
590
605
  }, null, 8, ["modelValue"])
591
606
  ]),
592
- n("div", {
593
- class: v(`setting-multi-box grid-${s.multiCycleNum}`)
607
+ i("div", {
608
+ class: v(`setting-multi-box grid-${o.multiCycleNum}`)
594
609
  }, [
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),
598
- c(C, {
599
- modelValue: s.multiCycleList[k],
600
- "onUpdate:modelValue": (j) => s.multiCycleList[k] = j,
610
+ (a(!0), m(M, null, j(o.multiCycleList.slice(0, o.multiCycleNum), (l, k) => (a(), m("div", hl, [
611
+ i("div", _l, [
612
+ i("span", null, z(e(dl)(o.multiCycleList[k], _.value)), 1),
613
+ u(C, {
614
+ modelValue: o.multiCycleList[k],
615
+ "onUpdate:modelValue": (H) => o.multiCycleList[k] = H,
601
616
  "popper-class": "element-dark"
602
617
  }, {
603
618
  default: p(() => [
604
- (t(!0), m(q, null, M(_.value, (j, pe) => (t(), h(u, {
619
+ (a(!0), m(M, null, j(_.value, (H, pe) => (a(), h(c, {
605
620
  key: pe,
606
- label: j.label,
607
- value: j.value
621
+ label: H.label,
622
+ value: H.value
608
623
  }, null, 8, ["label", "value"]))), 128))
609
624
  ]),
610
625
  _: 2
611
626
  }, 1032, ["modelValue", "onUpdate:modelValue"])
612
627
  ]),
613
- n("span", Cl, z(k + 1) + "号位K线", 1)
628
+ i("span", Cl, z(k + 1) + "号位K线", 1)
614
629
  ]))), 256))
615
630
  ], 2),
616
- n("div", kl, [
631
+ i("div", kl, [
617
632
  Vl,
618
- c(O, {
633
+ u(U, {
619
634
  size: "small",
620
- modelValue: s.pageType,
621
- "onUpdate:modelValue": i[4] || (i[4] = (l) => s.pageType = l),
635
+ modelValue: o.pageType,
636
+ "onUpdate:modelValue": n[4] || (n[4] = (l) => o.pageType = l),
622
637
  options: [
623
638
  { label: "单周期", value: 1 },
624
639
  { label: "多周期", value: 2 }
@@ -626,63 +641,69 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
626
641
  style: { height: "26px" }
627
642
  }, null, 8, ["modelValue"])
628
643
  ]),
629
- c(P, { style: { "margin-top": "44px" } }, {
644
+ u(B, { style: { "margin-top": "44px" } }, {
630
645
  default: p(() => [
631
- H("功能配置")
646
+ q("功能配置")
632
647
  ]),
633
648
  _: 1
634
649
  }),
635
- n("div", wl, [
650
+ i("div", wl, [
636
651
  Sl,
637
- c(E, {
638
- modelValue: s.enable_subChart,
639
- "onUpdate:modelValue": i[5] || (i[5] = (l) => s.enable_subChart = l)
652
+ u(T, {
653
+ modelValue: o.enable_tradeLogBrush,
654
+ "onUpdate:modelValue": n[5] || (n[5] = (l) => o.enable_tradeLogBrush = l)
640
655
  }, null, 8, ["modelValue"])
641
656
  ]),
642
- n("div", Il, [
657
+ i("div", Il, [
643
658
  El,
644
- c(E, {
645
- modelValue: s.enable_sliderChart,
646
- "onUpdate:modelValue": i[6] || (i[6] = (l) => s.enable_sliderChart = l)
659
+ u(T, {
660
+ modelValue: o.enable_showScreenTimeRange,
661
+ "onUpdate:modelValue": n[6] || (n[6] = (l) => o.enable_showScreenTimeRange = l)
647
662
  }, null, 8, ["modelValue"])
648
663
  ]),
649
- n("div", Tl, [
664
+ i("div", Tl, [
650
665
  Nl,
651
- c(E, {
652
- modelValue: s.enable_tradeLogBrush,
653
- "onUpdate:modelValue": i[7] || (i[7] = (l) => s.enable_tradeLogBrush = l)
666
+ u(T, {
667
+ modelValue: o.enable_dbClickOpenSingel,
668
+ "onUpdate:modelValue": n[7] || (n[7] = (l) => o.enable_dbClickOpenSingel = l)
654
669
  }, null, 8, ["modelValue"])
655
670
  ]),
656
- n("div", Bl, [
671
+ u(B, { style: { "margin-top": "44px" } }, {
672
+ default: p(() => [
673
+ q("组件开关")
674
+ ]),
675
+ _: 1
676
+ }),
677
+ i("div", Bl, [
657
678
  Al,
658
- c(E, {
659
- modelValue: s.enable_dbClickOpenSingel,
660
- "onUpdate:modelValue": i[8] || (i[8] = (l) => s.enable_dbClickOpenSingel = l)
679
+ u(T, {
680
+ modelValue: o.enable_subChart,
681
+ "onUpdate:modelValue": n[8] || (n[8] = (l) => o.enable_subChart = l)
661
682
  }, null, 8, ["modelValue"])
662
683
  ]),
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)
684
+ i("div", Ll, [
685
+ Ol,
686
+ u(T, {
687
+ modelValue: o.enable_sliderChart,
688
+ "onUpdate:modelValue": n[9] || (n[9] = (l) => o.enable_sliderChart = l)
668
689
  }, null, 8, ["modelValue"])
669
690
  ])
670
691
  ]),
671
692
  _: 1
672
693
  }),
673
- n("div", Ol, [
674
- c(f, { onClick: I }, {
694
+ i("div", Pl, [
695
+ u(b, { onClick: E }, {
675
696
  default: p(() => [
676
- H(" 恢复默认 ")
697
+ q(" 恢复默认 ")
677
698
  ]),
678
699
  _: 1
679
700
  }),
680
- c(f, {
701
+ u(b, {
681
702
  type: "primary",
682
- onClick: A
703
+ onClick: O
683
704
  }, {
684
705
  default: p(() => [
685
- H(" 保存配置 ")
706
+ q(" 保存配置 ")
686
707
  ]),
687
708
  _: 1
688
709
  })
@@ -693,11 +714,11 @@ const S = (r) => (Fe("data-v-ca16523c"), r = r(), Re(), r), ul = { class: "kline
693
714
  ]);
694
715
  };
695
716
  }
696
- }, Dl = /* @__PURE__ */ ze(Ul, [["__scopeId", "data-v-ca16523c"]]), ia = {
717
+ }, Dl = /* @__PURE__ */ ze(Ul, [["__scopeId", "data-v-0cecb8f3"]]), nt = {
697
718
  install(r) {
698
719
  r.component("st-klineConfig", Dl);
699
720
  }
700
721
  };
701
722
  export {
702
- ia as default
723
+ nt as default
703
724
  };