st-comp 0.0.164 → 0.0.166

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.
Files changed (145) hide show
  1. package/components.d.ts +3 -0
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +3 -3
  4. package/es/Dialog.cjs +1 -1
  5. package/es/Dialog.js +16 -14
  6. package/es/FactorWarning.cjs +1 -1
  7. package/es/FactorWarning.js +492 -614
  8. package/es/Kline.cjs +1 -1
  9. package/es/Kline.js +16 -16
  10. package/es/KlineBasic.cjs +1 -1
  11. package/es/KlineBasic.js +477 -766
  12. package/es/KlineConfig.cjs +1 -0
  13. package/es/KlineConfig.js +703 -0
  14. package/es/KlineNew.cjs +1 -1
  15. package/es/KlineNew.js +14 -14
  16. package/es/KlinePlus.cjs +6 -0
  17. package/es/KlinePlus.js +1212 -0
  18. package/es/Pagination.cjs +1 -1
  19. package/es/Pagination.js +21 -20
  20. package/es/PasswordPrompt.cjs +1 -1
  21. package/es/PasswordPrompt.js +3 -3
  22. package/es/Table.cjs +1 -1
  23. package/es/Table.js +100 -279
  24. package/es/User.cjs +1 -1
  25. package/es/User.js +41 -39
  26. package/es/VarSelectDialog.cjs +1 -1
  27. package/es/VarSelectDialog.js +23 -22
  28. package/es/VarietySearch.cjs +1 -1
  29. package/es/VarietySearch.js +34 -32
  30. package/es/VirtualTable.cjs +5 -5
  31. package/es/VirtualTable.js +1018 -1056
  32. package/es/{_initCloneObject-47814efa.cjs → _initCloneObject-9ccbb113.cjs} +1 -1
  33. package/es/{_initCloneObject-c939f3af.js → _initCloneObject-a9305c1e.js} +3 -3
  34. package/es/base-4bcd2756.js +304 -0
  35. package/es/base-bdc10baa.cjs +5 -0
  36. package/es/{castArray-a78ae889.cjs → castArray-37eb9980.cjs} +1 -1
  37. package/es/{castArray-2440268f.js → castArray-681d750b.js} +1 -1
  38. package/es/{config-provider-722dca36.js → config-provider-93846ae3.js} +9 -9
  39. package/es/config-provider-ec6b09df.cjs +1 -0
  40. package/es/dayjs.min-19fb125f.cjs +1 -0
  41. package/es/dayjs.min-54a4e095.js +296 -0
  42. package/es/{debounce-82e23c4b.js → debounce-51046b06.js} +1 -1
  43. package/es/{debounce-cf26af24.cjs → debounce-9e323221.cjs} +1 -1
  44. package/es/{dropdown-6f8379f0.js → dropdown-65e74de8.js} +6 -6
  45. package/es/{dropdown-790d31ea.cjs → dropdown-b2dab5bb.cjs} +1 -1
  46. package/es/{el-autocomplete-75762ef9.js → el-autocomplete-5064d466.js} +9 -9
  47. package/es/{el-autocomplete-84de99ba.cjs → el-autocomplete-814993af.cjs} +1 -1
  48. package/es/el-button-960edd49.cjs +1 -0
  49. package/es/{el-button-2e878325.js → el-button-d39472d3.js} +37 -36
  50. package/es/{el-checkbox-group-45247bbf.cjs → el-checkbox-group-020b49f5.cjs} +1 -1
  51. package/es/{el-checkbox-group-5e4f32f0.js → el-checkbox-group-779f353a.js} +2 -2
  52. package/es/el-dialog-cd484c1f.cjs +1 -0
  53. package/es/el-dialog-f45ec2a1.js +267 -0
  54. package/es/el-divider-40c50ce7.cjs +1 -0
  55. package/es/el-divider-7cf13678.js +45 -0
  56. package/es/{el-empty-2ece1134.cjs → el-empty-627ec09e.cjs} +1 -1
  57. package/es/{el-empty-7f8acbdc.js → el-empty-64b2ea8a.js} +2 -2
  58. package/es/{el-form-item-45ba08ff.js → el-form-item-b31e7a98.js} +8 -8
  59. package/es/{el-form-item-47e255d4.cjs → el-form-item-e1c3104b.cjs} +2 -2
  60. package/es/{el-input-1323afd2.js → el-input-42315ac4.js} +48 -48
  61. package/es/{el-input-cb340042.cjs → el-input-5163bda3.cjs} +1 -1
  62. package/es/{el-input-number-0f194f3f.cjs → el-input-number-eb54cde4.cjs} +1 -1
  63. package/es/{el-input-number-991f8bfc.js → el-input-number-ebd64e22.js} +19 -19
  64. package/es/el-loading-15a5501c.cjs +1 -0
  65. package/es/el-loading-5d29f26d.js +187 -0
  66. package/es/{el-menu-item-4c9eb7ad.cjs → el-menu-item-ac89e804.cjs} +1 -1
  67. package/es/{el-menu-item-dbbcd01a.js → el-menu-item-d62e0a3f.js} +32 -32
  68. package/es/el-message-ad87b9dd.cjs +1 -0
  69. package/es/{el-message-03e6f342.js → el-message-bd1d2c82.js} +17 -17
  70. package/es/el-overlay-690b50aa.js +269 -0
  71. package/es/el-overlay-e5d318c3.cjs +1 -0
  72. package/es/{el-popconfirm-8372cd13.js → el-popconfirm-88bbd066.js} +13 -13
  73. package/es/{el-popconfirm-86503f8a.cjs → el-popconfirm-a497b279.cjs} +1 -1
  74. package/es/{el-popper-7adbf1c6.cjs → el-popper-14a9d493.cjs} +1 -1
  75. package/es/{el-popper-b5315f5b.js → el-popper-85365d5b.js} +63 -63
  76. package/es/{el-scrollbar-ac525239.cjs → el-scrollbar-8bf765f2.cjs} +1 -1
  77. package/es/{el-scrollbar-4dc1493a.js → el-scrollbar-bcf29780.js} +21 -21
  78. package/es/el-segmented-84707138.js +136 -0
  79. package/es/el-segmented-bccd9f2a.cjs +1 -0
  80. package/es/{el-select-31f8ac8a.cjs → el-select-1d2309a1.cjs} +1 -1
  81. package/es/{el-select-a4ad7c8b.js → el-select-d3bce4d1.js} +13 -13
  82. package/es/{el-table-column-2e7132b3.js → el-table-column-9691b26d.js} +19 -18
  83. package/es/el-table-column-be9a76bb.cjs +14 -0
  84. package/es/{el-tag-a79385c6.js → el-tag-6036f51c.js} +39 -39
  85. package/es/{el-tag-9732314f.cjs → el-tag-8d49d4d2.cjs} +1 -1
  86. package/es/{index-375e8de4.cjs → index-02ca0096.cjs} +1 -1
  87. package/es/{index-afc88a4b.cjs → index-19fa1fcf.cjs} +1 -1
  88. package/es/{index-733cd68a.js → index-21fb27eb.js} +17 -17
  89. package/es/{index-e5fe37a4.js → index-3425f2f0.js} +10 -10
  90. package/es/{index-1d85ba4b.cjs → index-5b81f4da.cjs} +1 -1
  91. package/es/index-8d3c5e96.cjs +3 -0
  92. package/es/{index-97d24ab7.js → index-8ee89b40.js} +16 -16
  93. package/es/{index-9e6e8d03.cjs → index-a99a5307.cjs} +1 -1
  94. package/es/{index-58521b9e.cjs → index-b90c746b.cjs} +1 -1
  95. package/es/index-c45ac024.js +14 -0
  96. package/es/{index-f5b9b211.js → index-cb8157f2.js} +2 -2
  97. package/es/{index-e6a36e09.js → index-d3c37134.js} +7 -7
  98. package/es/{index-65b4113e.cjs → index-d94bae37.cjs} +1 -1
  99. package/es/{index-2d9c78d4.cjs → index-e348d5e8.cjs} +1 -1
  100. package/es/{index-57a7323a.js → index-ef7c4392.js} +11 -11
  101. package/es/{index-e3353eeb.js → index-fbe85773.js} +13 -13
  102. package/es/{raf-f46caea0.cjs → raf-07cb6953.cjs} +1 -1
  103. package/es/{raf-c817c3f7.js → raf-36faa519.js} +1 -1
  104. package/es/{scroll-4fe7a76f.js → scroll-0277d145.js} +1 -1
  105. package/es/{scroll-339681d4.cjs → scroll-4769a65d.cjs} +1 -1
  106. package/es/style.css +1 -1
  107. package/es/{use-form-common-props-04fb0752.js → use-form-common-props-54c31983.js} +40 -40
  108. package/es/{use-form-common-props-74a96df2.cjs → use-form-common-props-592797e2.cjs} +1 -1
  109. package/es/use-global-config-584b62f1.cjs +1 -0
  110. package/es/use-global-config-946f61a4.js +73 -0
  111. package/es/{vnode-b15eb11b.cjs → vnode-1b827c99.cjs} +1 -1
  112. package/es/{vnode-0fd3003d.js → vnode-dfc92f20.js} +1 -1
  113. package/es/{zh-cn-cac8283b.js → zh-cn-5066f5e9.js} +2 -2
  114. package/es/{zh-cn-36f34912.cjs → zh-cn-b24a7dc9.cjs} +1 -1
  115. package/lib/bundle.js +1 -1
  116. package/lib/bundle.umd.cjs +217 -212
  117. package/lib/{index-5f63dc2e.js → index-80531492.js} +39042 -37182
  118. package/lib/{python-5918f7d5.js → python-20a1a5fc.js} +1 -1
  119. package/lib/style.css +1 -1
  120. package/package.json +1 -1
  121. package/packages/KlineConfig/config.js +39 -0
  122. package/packages/KlineConfig/index.ts +8 -0
  123. package/packages/KlineConfig/index.vue +315 -0
  124. package/packages/KlinePlus/components/SliderChart.vue +218 -0
  125. package/packages/KlinePlus/components/Tips.vue +36 -0
  126. package/packages/KlinePlus/images/buy.svg +1 -0
  127. package/packages/KlinePlus/images/sell.svg +1 -0
  128. package/packages/KlinePlus/images/t.svg +1 -0
  129. package/packages/KlinePlus/index.ts +8 -0
  130. package/packages/KlinePlus/index.vue +880 -0
  131. package/packages/KlinePlus/utils.js +705 -0
  132. package/packages/index.ts +4 -0
  133. package/src/pages/KlineConfig/index.vue +20 -0
  134. package/src/pages/KlinePlus/index.vue +180 -0
  135. package/src/router/routes.ts +10 -0
  136. package/es/base-0ca7c43a.cjs +0 -5
  137. package/es/base-b56cf478.js +0 -303
  138. package/es/config-provider-cfbb9cd8.cjs +0 -1
  139. package/es/el-button-62966947.cjs +0 -1
  140. package/es/el-message-d5ed7a4f.cjs +0 -1
  141. package/es/el-overlay-41994f67.cjs +0 -1
  142. package/es/el-overlay-47b665a0.js +0 -521
  143. package/es/el-table-column-bdc46568.cjs +0 -14
  144. package/es/index-0baeaec7.js +0 -82
  145. package/es/index-2f958e56.cjs +0 -3
@@ -0,0 +1,703 @@
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";
4
+ import "./el-scrollbar-bcf29780.js";
5
+ import { i as _e, E as Ce } from "./el-segmented-84707138.js";
6
+ import "./el-tag-6036f51c.js";
7
+ import { E as ke, a as Ve } from "./el-select-d3bce4d1.js";
8
+ import { u as we, a as Se } from "./el-popper-85365d5b.js";
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";
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";
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
+ import { b as Je, a as Ge, U as Z, C as x, I as ee } from "./index-21fb27eb.js";
15
+ import { u as We } from "./index-c45ac024.js";
16
+ import { a as Qe } from "./index-ef7c4392.js";
17
+ import "./vnode-dfc92f20.js";
18
+ import "./scroll-0277d145.js";
19
+ import "./use-global-config-946f61a4.js";
20
+ import "./index-657047bb.js";
21
+ import "./index-d3c37134.js";
22
+ import "./castArray-681d750b.js";
23
+ import "./index-fbe85773.js";
24
+ import "./debounce-51046b06.js";
25
+ const Xe = se({
26
+ ...fe,
27
+ direction: {
28
+ type: String,
29
+ default: "rtl",
30
+ values: ["ltr", "rtl", "ttb", "btt"]
31
+ },
32
+ size: {
33
+ type: [String, Number],
34
+ default: "30%"
35
+ },
36
+ withHeader: {
37
+ type: Boolean,
38
+ default: !0
39
+ },
40
+ modalFade: {
41
+ type: Boolean,
42
+ default: !0
43
+ },
44
+ headerAriaLevel: {
45
+ type: String,
46
+ default: "2"
47
+ }
48
+ }), Ye = be, Ze = W({
49
+ name: "ElDrawer",
50
+ inheritAttrs: !1
51
+ }), xe = /* @__PURE__ */ W({
52
+ ...Ze,
53
+ props: Xe,
54
+ emits: Ye,
55
+ setup(r, { expose: B }) {
56
+ const y = r, d = Ee();
57
+ We({
58
+ scope: "el-drawer",
59
+ from: "the title slot",
60
+ replacement: "the header slot",
61
+ version: "3.0.0",
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(), {
65
+ afterEnter: _,
66
+ afterLeave: T,
67
+ beforeLeave: I,
68
+ visible: A,
69
+ rendered: $,
70
+ titleId: L,
71
+ bodyId: g,
72
+ zIndex: i,
73
+ onModalClick: P,
74
+ onOpenAutoFocus: u,
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,
82
+ afterEnter: _,
83
+ afterLeave: T
84
+ }), (l, k) => (t(), h(e(Je), {
85
+ to: l.appendTo,
86
+ disabled: l.appendTo !== "body" ? !1 : !l.appendToBody
87
+ }, {
88
+ default: p(() => [
89
+ c(Te, {
90
+ name: e(o).b("fade"),
91
+ onAfterEnter: e(_),
92
+ onAfterLeave: e(T),
93
+ onBeforeLeave: e(I),
94
+ persisted: ""
95
+ }, {
96
+ default: p(() => [
97
+ Ne(c(e(he), {
98
+ mask: l.modal,
99
+ "overlay-class": l.modalClass,
100
+ "z-index": e(i),
101
+ onClick: e(P)
102
+ }, {
103
+ default: p(() => [
104
+ c(e(Ge), {
105
+ loop: "",
106
+ trapped: e(A),
107
+ "focus-trap-el": V.value,
108
+ "focus-start-el": F.value,
109
+ onFocusAfterTrapped: e(u),
110
+ onFocusAfterReleased: e(C),
111
+ onFocusoutPrevented: e(O),
112
+ onReleaseRequested: e(E)
113
+ }, {
114
+ default: p(() => [
115
+ n("div", Be({
116
+ ref_key: "drawerRef",
117
+ ref: V,
118
+ "aria-modal": "true",
119
+ "aria-label": l.title || void 0,
120
+ "aria-labelledby": l.title ? void 0 : e(L),
121
+ "aria-describedby": e(g)
122
+ }, l.$attrs, {
123
+ class: [e(o).b(), l.direction, e(A) && "open"],
124
+ style: e(f) ? "width: " + e(U) : "height: " + e(U),
125
+ role: "dialog",
126
+ onClick: ue(() => {
127
+ }, ["stop"])
128
+ }), [
129
+ n("span", {
130
+ ref_key: "focusStartRef",
131
+ ref: F,
132
+ class: v(e(o).e("sr-focus")),
133
+ tabindex: "-1"
134
+ }, null, 2),
135
+ l.withHeader ? (t(), m("header", {
136
+ key: 0,
137
+ class: v([e(o).e("header"), l.headerClass])
138
+ }, [
139
+ l.$slots.title ? R(l.$slots, "title", { key: 1 }, () => [
140
+ b(" DEPRECATED SLOT ")
141
+ ]) : R(l.$slots, "header", {
142
+ key: 0,
143
+ close: e(a),
144
+ titleId: e(L),
145
+ titleClass: e(o).e("title")
146
+ }, () => [
147
+ l.$slots.title ? b("v-if", !0) : (t(), m("span", {
148
+ key: 0,
149
+ id: e(L),
150
+ role: "heading",
151
+ "aria-level": l.headerAriaLevel,
152
+ class: v(e(o).e("title"))
153
+ }, z(l.title), 11, ["id", "aria-level"]))
154
+ ]),
155
+ l.showClose ? (t(), m("button", {
156
+ key: 2,
157
+ "aria-label": e(s)("el.drawer.close"),
158
+ class: v(e(o).e("close-btn")),
159
+ type: "button",
160
+ onClick: e(a)
161
+ }, [
162
+ c(e(D), {
163
+ class: v(e(o).e("close"))
164
+ }, {
165
+ default: p(() => [
166
+ c(e($e))
167
+ ]),
168
+ _: 1
169
+ }, 8, ["class"])
170
+ ], 10, ["aria-label", "onClick"])) : b("v-if", !0)
171
+ ], 2)) : b("v-if", !0),
172
+ e($) ? (t(), m("div", {
173
+ key: 1,
174
+ id: e(g),
175
+ class: v([e(o).e("body"), l.bodyClass])
176
+ }, [
177
+ R(l.$slots, "default")
178
+ ], 10, ["id"])) : b("v-if", !0),
179
+ l.$slots.footer ? (t(), m("div", {
180
+ key: 2,
181
+ class: v([e(o).e("footer"), l.footerClass])
182
+ }, [
183
+ R(l.$slots, "footer")
184
+ ], 2)) : b("v-if", !0)
185
+ ], 16, ["aria-label", "aria-labelledby", "aria-describedby", "onClick"])
186
+ ]),
187
+ _: 3
188
+ }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
189
+ ]),
190
+ _: 3
191
+ }, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
192
+ [Ae, e(A)]
193
+ ])
194
+ ]),
195
+ _: 3
196
+ }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
197
+ ]),
198
+ _: 3
199
+ }, 8, ["to", "disabled"]));
200
+ }
201
+ });
202
+ var el = /* @__PURE__ */ re(xe, [["__file", "drawer.vue"]]);
203
+ const ll = de(el), al = se({
204
+ modelValue: {
205
+ type: [Boolean, String, Number],
206
+ default: !1
207
+ },
208
+ disabled: Boolean,
209
+ loading: Boolean,
210
+ size: {
211
+ type: String,
212
+ validator: _e
213
+ },
214
+ width: {
215
+ type: [String, Number],
216
+ default: ""
217
+ },
218
+ inlinePrompt: Boolean,
219
+ inactiveActionIcon: {
220
+ type: J
221
+ },
222
+ activeActionIcon: {
223
+ type: J
224
+ },
225
+ activeIcon: {
226
+ type: J
227
+ },
228
+ inactiveIcon: {
229
+ type: J
230
+ },
231
+ activeText: {
232
+ type: String,
233
+ default: ""
234
+ },
235
+ inactiveText: {
236
+ type: String,
237
+ default: ""
238
+ },
239
+ activeValue: {
240
+ type: [Boolean, String, Number],
241
+ default: !0
242
+ },
243
+ inactiveValue: {
244
+ type: [Boolean, String, Number],
245
+ default: !1
246
+ },
247
+ name: {
248
+ type: String,
249
+ default: ""
250
+ },
251
+ validateEvent: {
252
+ type: Boolean,
253
+ default: !0
254
+ },
255
+ beforeChange: {
256
+ type: me(Function)
257
+ },
258
+ id: String,
259
+ tabindex: {
260
+ type: [String, Number]
261
+ },
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({
268
+ name: le
269
+ }), sl = /* @__PURE__ */ W({
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, {
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)
291
+ }));
292
+ oe(() => d.modelValue, () => {
293
+ T.value = !0;
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)));
299
+ });
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;
304
+ });
305
+ }, O = () => {
306
+ if (_.value)
307
+ return;
308
+ const { beforeChange: a } = d;
309
+ if (!a) {
310
+ C();
311
+ return;
312
+ }
313
+ const f = a();
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) => {
318
+ l && C();
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);
325
+ };
326
+ return ce(() => {
327
+ I.value.checked = u.value;
328
+ }), B({
329
+ focus: E,
330
+ checked: u
331
+ }), (a, f) => (t(), m("div", {
332
+ class: v(e($)),
333
+ onClick: ue(O, ["prevent"])
334
+ }, [
335
+ n("input", {
336
+ id: e(s),
337
+ ref_key: "input",
338
+ ref: I,
339
+ class: v(e(o).e("input")),
340
+ type: "checkbox",
341
+ role: "switch",
342
+ "aria-checked": e(u),
343
+ "aria-disabled": e(_),
344
+ "aria-label": a.ariaLabel,
345
+ name: a.name,
346
+ "true-value": a.activeValue,
347
+ "false-value": a.inactiveValue,
348
+ disabled: e(_),
349
+ tabindex: a.tabindex,
350
+ onChange: C,
351
+ onKeydown: Le(O, ["enter"])
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", {
354
+ key: 0,
355
+ class: v(e(L))
356
+ }, [
357
+ a.inactiveIcon ? (t(), h(e(D), { key: 0 }, {
358
+ default: p(() => [
359
+ (t(), h(K(a.inactiveIcon)))
360
+ ]),
361
+ _: 1
362
+ })) : b("v-if", !0),
363
+ !a.inactiveIcon && a.inactiveText ? (t(), m("span", {
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", {
369
+ ref_key: "core",
370
+ ref: A,
371
+ class: v(e(o).e("core")),
372
+ style: Pe(e(i))
373
+ }, [
374
+ a.inlinePrompt ? (t(), m("div", {
375
+ key: 0,
376
+ class: v(e(o).e("inner"))
377
+ }, [
378
+ a.activeIcon || a.inactiveIcon ? (t(), h(e(D), {
379
+ key: 0,
380
+ class: v(e(o).is("icon"))
381
+ }, {
382
+ default: p(() => [
383
+ (t(), h(K(e(u) ? a.activeIcon : a.inactiveIcon)))
384
+ ]),
385
+ _: 1
386
+ }, 8, ["class"])) : a.activeText || a.inactiveText ? (t(), m("span", {
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"))
394
+ }, [
395
+ a.loading ? (t(), h(e(D), {
396
+ key: 0,
397
+ class: v(e(o).is("loading"))
398
+ }, {
399
+ default: p(() => [
400
+ c(e(Ke))
401
+ ]),
402
+ _: 1
403
+ }, 8, ["class"])) : e(u) ? R(a.$slots, "active-action", { key: 1 }, () => [
404
+ a.activeActionIcon ? (t(), h(e(D), { key: 0 }, {
405
+ default: p(() => [
406
+ (t(), h(K(a.activeActionIcon)))
407
+ ]),
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 }, {
412
+ default: p(() => [
413
+ (t(), h(K(a.inactiveActionIcon)))
414
+ ]),
415
+ _: 1
416
+ })) : b("v-if", !0)
417
+ ])
418
+ ], 2)
419
+ ], 6),
420
+ !a.inlinePrompt && (a.activeIcon || a.activeText) ? (t(), m("span", {
421
+ key: 1,
422
+ class: v(e(g))
423
+ }, [
424
+ a.activeIcon ? (t(), h(e(D), { key: 0 }, {
425
+ default: p(() => [
426
+ (t(), h(K(a.activeIcon)))
427
+ ]),
428
+ _: 1
429
+ })) : b("v-if", !0),
430
+ !a.activeIcon && a.activeText ? (t(), m("span", {
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)
435
+ ], 10, ["onClick"]));
436
+ }
437
+ });
438
+ var nl = /* @__PURE__ */ re(sl, [["__file", "switch.vue"]]);
439
+ const il = de(nl);
440
+ const rl = [
441
+ { label: "买卖", value: 0 },
442
+ { label: "开平", value: 1 }
443
+ ], Y = () => ({
444
+ /**
445
+ * @description: 偏好设置
446
+ */
447
+ // 主图指标默认展示
448
+ mainIndicator: "MA",
449
+ // 成交点默认展示
450
+ sellBuy: 1,
451
+ // 单周期默认展示
452
+ singelCycle: "6",
453
+ // 多周期布局 2 4 6
454
+ multiCycleNum: 6,
455
+ // 多周期N宫格周期
456
+ multiCycleList: ["1", "2", "3", "4", "5", "6"],
457
+ // 默认展示模块
458
+ pageType: 1,
459
+ // 展示模块 1-单周期, 2-多周期
460
+ /**
461
+ * @description: 功能配置
462
+ */
463
+ enable_subChart: !0,
464
+ // 是否启用副图
465
+ enable_sliderChart: !0,
466
+ // 是否启用拖拽轴
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
+ };
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 = {
478
+ __name: "index",
479
+ props: {
480
+ indicatorStore: { type: Object, default: () => ({}) }
481
+ // 指标配置Store
482
+ },
483
+ 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) : {});
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
+ }));
499
+ };
500
+ return ce(() => {
501
+ L(), T.value = F.indicatorStore.mainIndicatorList ?? [];
502
+ }), B({
503
+ // 打开
504
+ open: async () => {
505
+ await $(), o.value = !0;
506
+ },
507
+ // 获取默认配置
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),
515
+ title: "K线自定义配置",
516
+ size: 320
517
+ }, {
518
+ default: p(() => [
519
+ c(a, { class: "setting-main" }, {
520
+ default: p(() => [
521
+ c(P, { style: { "margin-top": "8px" } }, {
522
+ default: p(() => [
523
+ H("偏好设置")
524
+ ]),
525
+ _: 1
526
+ }),
527
+ n("div", cl, [
528
+ pl,
529
+ c(C, {
530
+ modelValue: s.mainIndicator,
531
+ "onUpdate:modelValue": i[0] || (i[0] = (l) => s.mainIndicator = l),
532
+ "popper-class": "element-dark"
533
+ }, {
534
+ default: p(() => [
535
+ (t(!0), m(q, null, M(T.value, (l, k) => (t(), h(u, {
536
+ key: k,
537
+ label: l.label,
538
+ value: l.value
539
+ }, null, 8, ["label", "value"]))), 128))
540
+ ]),
541
+ _: 1
542
+ }, 8, ["modelValue"])
543
+ ]),
544
+ n("div", ml, [
545
+ vl,
546
+ c(C, {
547
+ modelValue: s.sellBuy,
548
+ "onUpdate:modelValue": i[1] || (i[1] = (l) => s.sellBuy = l),
549
+ "popper-class": "element-dark"
550
+ }, {
551
+ default: p(() => [
552
+ (t(!0), m(q, null, M(e(rl), (l, k) => (t(), h(u, {
553
+ key: k,
554
+ label: l.label,
555
+ value: l.value
556
+ }, null, 8, ["label", "value"]))), 128))
557
+ ]),
558
+ _: 1
559
+ }, 8, ["modelValue"])
560
+ ]),
561
+ n("div", fl, [
562
+ bl,
563
+ c(C, {
564
+ modelValue: s.singelCycle,
565
+ "onUpdate:modelValue": i[2] || (i[2] = (l) => s.singelCycle = l),
566
+ "popper-class": "element-dark"
567
+ }, {
568
+ default: p(() => [
569
+ (t(!0), m(q, null, M(_.value, (l, k) => (t(), h(u, {
570
+ key: k,
571
+ label: l.label,
572
+ value: l.value
573
+ }, null, 8, ["label", "value"]))), 128))
574
+ ]),
575
+ _: 1
576
+ }, 8, ["modelValue"])
577
+ ]),
578
+ n("div", yl, [
579
+ hl,
580
+ c(O, {
581
+ size: "small",
582
+ modelValue: s.multiCycleNum,
583
+ "onUpdate:modelValue": i[3] || (i[3] = (l) => s.multiCycleNum = l),
584
+ options: [
585
+ { label: "二图", value: 2 },
586
+ { label: "四图", value: 4 },
587
+ { label: "六图", value: 6 }
588
+ ],
589
+ style: { height: "26px" }
590
+ }, null, 8, ["modelValue"])
591
+ ]),
592
+ n("div", {
593
+ class: v(`setting-multi-box grid-${s.multiCycleNum}`)
594
+ }, [
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,
601
+ "popper-class": "element-dark"
602
+ }, {
603
+ default: p(() => [
604
+ (t(!0), m(q, null, M(_.value, (j, pe) => (t(), h(u, {
605
+ key: pe,
606
+ label: j.label,
607
+ value: j.value
608
+ }, null, 8, ["label", "value"]))), 128))
609
+ ]),
610
+ _: 2
611
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
612
+ ]),
613
+ n("span", Cl, z(k + 1) + "号位K线", 1)
614
+ ]))), 256))
615
+ ], 2),
616
+ n("div", kl, [
617
+ Vl,
618
+ c(O, {
619
+ size: "small",
620
+ modelValue: s.pageType,
621
+ "onUpdate:modelValue": i[4] || (i[4] = (l) => s.pageType = l),
622
+ options: [
623
+ { label: "单周期", value: 1 },
624
+ { label: "多周期", value: 2 }
625
+ ],
626
+ style: { height: "26px" }
627
+ }, null, 8, ["modelValue"])
628
+ ]),
629
+ c(P, { style: { "margin-top": "44px" } }, {
630
+ default: p(() => [
631
+ H("功能配置")
632
+ ]),
633
+ _: 1
634
+ }),
635
+ n("div", wl, [
636
+ Sl,
637
+ c(E, {
638
+ modelValue: s.enable_subChart,
639
+ "onUpdate:modelValue": i[5] || (i[5] = (l) => s.enable_subChart = l)
640
+ }, null, 8, ["modelValue"])
641
+ ]),
642
+ n("div", Il, [
643
+ El,
644
+ c(E, {
645
+ modelValue: s.enable_sliderChart,
646
+ "onUpdate:modelValue": i[6] || (i[6] = (l) => s.enable_sliderChart = l)
647
+ }, null, 8, ["modelValue"])
648
+ ]),
649
+ n("div", Tl, [
650
+ Nl,
651
+ c(E, {
652
+ modelValue: s.enable_tradeLogBrush,
653
+ "onUpdate:modelValue": i[7] || (i[7] = (l) => s.enable_tradeLogBrush = l)
654
+ }, null, 8, ["modelValue"])
655
+ ]),
656
+ n("div", Bl, [
657
+ Al,
658
+ c(E, {
659
+ modelValue: s.enable_dbClickOpenSingel,
660
+ "onUpdate:modelValue": i[8] || (i[8] = (l) => s.enable_dbClickOpenSingel = l)
661
+ }, null, 8, ["modelValue"])
662
+ ]),
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)
668
+ }, null, 8, ["modelValue"])
669
+ ])
670
+ ]),
671
+ _: 1
672
+ }),
673
+ n("div", Ol, [
674
+ c(f, { onClick: I }, {
675
+ default: p(() => [
676
+ H(" 恢复默认 ")
677
+ ]),
678
+ _: 1
679
+ }),
680
+ c(f, {
681
+ type: "primary",
682
+ onClick: A
683
+ }, {
684
+ default: p(() => [
685
+ H(" 保存配置 ")
686
+ ]),
687
+ _: 1
688
+ })
689
+ ])
690
+ ]),
691
+ _: 1
692
+ }, 8, ["modelValue"])
693
+ ]);
694
+ };
695
+ }
696
+ }, Dl = /* @__PURE__ */ ze(Ul, [["__scopeId", "data-v-ca16523c"]]), ia = {
697
+ install(r) {
698
+ r.component("st-klineConfig", Dl);
699
+ }
700
+ };
701
+ export {
702
+ ia as default
703
+ };