st-comp 0.0.248 → 0.0.249

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 (163) hide show
  1. package/components.d.ts +1 -0
  2. package/es/ChartLayout.js +4 -4
  3. package/es/CustomFunction.cjs +2 -2
  4. package/es/CustomFunction.js +82 -80
  5. package/es/FactorWarning.cjs +1 -1
  6. package/es/FactorWarning.js +36 -35
  7. package/es/Kline.cjs +1 -1
  8. package/es/Kline.js +20 -19
  9. package/es/KlineBasic.cjs +1 -1
  10. package/es/KlineBasic.js +30 -28
  11. package/es/KlineConfig.cjs +1 -1
  12. package/es/KlineConfig.js +83 -82
  13. package/es/KlineNew.cjs +1 -1
  14. package/es/KlineNew.js +19 -18
  15. package/es/KlinePlus.cjs +1 -1
  16. package/es/KlinePlus.js +22 -21
  17. package/es/LinearLegend.cjs +1 -1
  18. package/es/LinearLegend.js +63 -1
  19. package/es/MonacoEditor.cjs +1 -1
  20. package/es/MonacoEditor.js +28 -26
  21. package/es/Pagination.cjs +1 -1
  22. package/es/Pagination.js +121 -120
  23. package/es/PasswordPrompt.cjs +1 -1
  24. package/es/PasswordPrompt.js +3 -3
  25. package/es/Table.cjs +1 -1
  26. package/es/Table.js +31 -30
  27. package/es/User.cjs +1 -1
  28. package/es/User.js +157 -155
  29. package/es/VarSelectDialog.cjs +2 -2
  30. package/es/VarSelectDialog.js +29 -27
  31. package/es/VarietyAiHelper.cjs +4 -0
  32. package/es/VarietyAiHelper.js +270 -0
  33. package/es/VarietyAutoComplete.cjs +1 -1
  34. package/es/VarietyAutoComplete.js +13 -12
  35. package/es/VarietySearch.cjs +10 -10
  36. package/es/VarietySearch.js +70 -68
  37. package/es/{VarietySelect-2fd501da.cjs → VarietySelect-5c845562.cjs} +1 -1
  38. package/es/{VarietySelect-b9fe3000.js → VarietySelect-9f267958.js} +4 -4
  39. package/es/VarietyTextCopy.cjs +1 -1
  40. package/es/VarietyTextCopy.js +24 -22
  41. package/es/VirtualTable.cjs +1 -1
  42. package/es/VirtualTable.js +70 -70
  43. package/es/{_initCloneObject-3823a101.cjs → _initCloneObject-2b82e9f7.cjs} +1 -1
  44. package/es/{_initCloneObject-382335b2.js → _initCloneObject-69c8ae23.js} +7 -7
  45. package/es/aiTools.js +36 -0
  46. package/es/{base-ff0e366f.js → base-29f73b05.js} +40 -40
  47. package/es/{castArray-15070be9.js → castArray-609a313e.js} +1 -1
  48. package/es/{config-provider-2182708a.cjs → config-provider-2ae47cc8.cjs} +1 -1
  49. package/es/{config-provider-2e85eee8.js → config-provider-7860903c.js} +6 -6
  50. package/es/{debounce-e9e47f9a.js → debounce-a09ce9a3.js} +1 -1
  51. package/es/{dropdown-2b35a683.js → dropdown-497442b7.js} +30 -29
  52. package/es/dropdown-eba9eaf5.cjs +1 -0
  53. package/es/{el-autocomplete-18be2c5a.js → el-autocomplete-27c60cc8.js} +24 -23
  54. package/es/el-autocomplete-b59eb529.cjs +1 -0
  55. package/es/{el-button-68baab7b.cjs → el-button-974ff9e9.cjs} +1 -1
  56. package/es/{el-button-f08c0639.js → el-button-e2c63c08.js} +39 -39
  57. package/es/el-checkbox-08185353.cjs +1 -0
  58. package/es/{el-checkbox-058dba2d.js → el-checkbox-71ebd862.js} +31 -31
  59. package/es/el-dialog-1b185570.cjs +1 -0
  60. package/es/{el-dialog-d328e0d8.js → el-dialog-eedcfd3e.js} +15 -15
  61. package/es/{el-divider-4fe55ebe.js → el-divider-523e5874.js} +1 -1
  62. package/es/{el-empty-ceecb81c.js → el-empty-f5a1607a.js} +5 -5
  63. package/es/{el-form-item-cb328886.js → el-form-item-bdcfd297.js} +36 -36
  64. package/es/{el-form-item-4076e55f.cjs → el-form-item-c997b4fa.cjs} +1 -1
  65. package/es/{el-input-0f6ead19.js → el-input-d47281da.js} +91 -91
  66. package/es/el-input-fa18ef84.cjs +1 -0
  67. package/es/el-input-number-3d94fa58.cjs +1 -0
  68. package/es/{el-input-number-66e68609.js → el-input-number-c8018cb1.js} +28 -28
  69. package/es/{el-loading-412370c7.js → el-loading-0cd81d05.js} +5 -5
  70. package/es/{el-loading-05826e64.cjs → el-loading-969a79ca.cjs} +1 -1
  71. package/es/el-menu-item-26071fd6.cjs +1 -0
  72. package/es/{el-menu-item-0ee8ad18.js → el-menu-item-dac65bb3.js} +31 -30
  73. package/es/el-message-0ea8fbf8.cjs +1 -0
  74. package/es/el-message-4ed993c7.js +1 -0
  75. package/es/el-message-box-31e0aa98.cjs +1 -0
  76. package/es/{el-message-box-6db52b29.js → el-message-box-fea4fca8.js} +11 -11
  77. package/es/{el-overlay-981f8d49.js → el-overlay-1ee0338d.js} +63 -63
  78. package/es/el-overlay-ea65cb05.cjs +1 -0
  79. package/es/{el-popconfirm-005013fa.js → el-popconfirm-089b8bec.js} +17 -16
  80. package/es/el-popconfirm-9e232436.cjs +1 -0
  81. package/es/el-popper-2d3914e4.cjs +1 -0
  82. package/es/el-popper-c9b3d3cf.js +1662 -0
  83. package/es/el-segmented-140ac042.cjs +1 -0
  84. package/es/{el-segmented-050d0090.js → el-segmented-9d3a9e11.js} +8 -8
  85. package/es/el-select-a11f33e8.cjs +1 -0
  86. package/es/{el-select-23a1f302.js → el-select-e51e11c1.js} +92 -91
  87. package/es/{el-table-column-d0c374cf.js → el-table-column-05d292a8.js} +25 -24
  88. package/es/el-table-column-98570a4d.cjs +14 -0
  89. package/es/{el-tag-f13f463b.js → el-tag-17cd04a1.js} +14 -14
  90. package/es/el-tag-6d8e653e.cjs +1 -0
  91. package/es/{el-text-27cef2be.js → el-text-2710fff3.js} +2 -2
  92. package/es/{el-text-1470de46.cjs → el-text-a18106cb.cjs} +1 -1
  93. package/es/{index-09bd2621.js → index-0ee486ad.js} +43 -43
  94. package/es/index-0f79095c.js +440 -0
  95. package/es/{index-e0901394.js → index-1d9b50de.js} +34 -34
  96. package/es/index-28e03bad.cjs +1 -0
  97. package/es/{index-269b22da.cjs → index-299ee017.cjs} +1 -1
  98. package/es/{index-cebc7160.cjs → index-33f80550.cjs} +1 -1
  99. package/es/{index-4f48940d.cjs → index-37b8d3c6.cjs} +1 -1
  100. package/es/{index-2375023e.cjs → index-5befc414.cjs} +4 -4
  101. package/es/{index-696b6a94.cjs → index-6b99def3.cjs} +1 -1
  102. package/es/index-6ca95c8a.cjs +1 -0
  103. package/es/index-7dce9f59.cjs +1 -0
  104. package/es/{index-269b8a8c.js → index-8391a3df.js} +37 -37
  105. package/es/{index-c266c23a.js → index-8f9d0d17.js} +16 -15
  106. package/es/{index-15b9603e.js → index-95e5d454.js} +3 -3
  107. package/es/{index-b937ea22.js → index-b0117ba2.js} +2 -2
  108. package/es/{index-80a7ad32.js → index-bcd895a0.js} +17 -17
  109. package/es/{index-ec7ad93f.js → index-c2b9bbfd.js} +95 -65
  110. package/es/{index-4a3f30c5.js → index-c71e37dc.js} +11 -11
  111. package/es/{index-93a8960e.js → index-de24705f.js} +1 -1
  112. package/es/index-e8eeea22.cjs +1 -0
  113. package/es/{index-ee977f79.cjs → index-eb99b188.cjs} +1 -1
  114. package/es/{el-message-e6c755df.js → index-f30561d3.js} +33 -33
  115. package/es/{python-c67c8901.cjs → python-27ece6fa.cjs} +2 -2
  116. package/es/{python-823b276b.js → python-656db04f.js} +30 -28
  117. package/es/raf-744cf95a.js +6 -0
  118. package/es/{scroll-41b4f625.js → scroll-6799bafc.js} +5 -5
  119. package/es/style.css +1 -1
  120. package/es/{use-form-common-props-631cacae.js → use-form-common-props-cb0ca65c.js} +72 -72
  121. package/es/{use-form-common-props-344056f9.cjs → use-form-common-props-d3ed62c6.cjs} +1 -1
  122. package/es/{use-global-config-cf78ebac.cjs → use-global-config-c80f33a4.cjs} +1 -1
  123. package/es/{use-global-config-5d001623.js → use-global-config-cdaeca54.js} +14 -14
  124. package/es/{validator-3cad04b2.cjs → validator-07160325.cjs} +1 -1
  125. package/es/{validator-4160d9e7.js → validator-4ab9774f.js} +1 -1
  126. package/es/{vnode-06571d5b.js → vnode-a83e6de8.js} +1 -1
  127. package/es/{zh-cn-aabfaa94.cjs → zh-cn-6a0f844c.cjs} +1 -1
  128. package/es/{zh-cn-5df98ac2.js → zh-cn-8a6390a4.js} +2 -2
  129. package/lib/aiTools.js +36 -0
  130. package/lib/bundle.js +1 -1
  131. package/lib/bundle.umd.cjs +157 -154
  132. package/lib/{index-f00d1e1f.js → index-6ac0579e.js} +16077 -15806
  133. package/lib/{python-0f34e2e6.js → python-0432340a.js} +1 -1
  134. package/lib/style.css +1 -1
  135. package/package.json +1 -1
  136. package/packages/VarietyAiHelper/index.ts +8 -0
  137. package/packages/VarietyAiHelper/index.vue +430 -0
  138. package/packages/index.ts +2 -0
  139. package/public/aiTools.js +36 -0
  140. package/src/App.vue +24 -14
  141. package/src/pages/VarietyAiHelper/index.vue +20 -0
  142. package/src/pages/VarietySearch/index.vue +75 -51
  143. package/src/router/routes.ts +5 -0
  144. package/es/dropdown-89b74bc9.cjs +0 -1
  145. package/es/el-autocomplete-b9a3054a.cjs +0 -1
  146. package/es/el-checkbox-b982e2ef.cjs +0 -1
  147. package/es/el-dialog-ad7309e9.cjs +0 -1
  148. package/es/el-input-172c49f8.cjs +0 -1
  149. package/es/el-input-number-c2e71528.cjs +0 -1
  150. package/es/el-menu-item-7f986598.cjs +0 -1
  151. package/es/el-message-a86c0efa.cjs +0 -1
  152. package/es/el-message-box-40ff2af5.cjs +0 -1
  153. package/es/el-overlay-d7a6e4a9.cjs +0 -1
  154. package/es/el-popconfirm-737a015b.cjs +0 -1
  155. package/es/el-popper-7ba87e05.cjs +0 -1
  156. package/es/el-popper-fdc7c793.js +0 -2094
  157. package/es/el-segmented-3fd66a0e.cjs +0 -1
  158. package/es/el-select-12f6deb7.cjs +0 -1
  159. package/es/el-table-column-516a0ed9.cjs +0 -14
  160. package/es/el-tag-789f05d3.cjs +0 -1
  161. package/es/index-8de94a49.cjs +0 -1
  162. package/es/index-c04f444f.cjs +0 -1
  163. package/es/raf-8e05a7f4.js +0 -6
package/es/KlineConfig.js CHANGED
@@ -1,33 +1,34 @@
1
- import { b as ne, C as fe, j as ie, u as re, _ as ue, w as de, d as be, g as G, e as x, f as ee, D as oe } from "./base-ff0e366f.js";
2
- import { e as ge, f as ye, g as he, E as _e } from "./el-overlay-981f8d49.js";
3
- import { E as Ce } from "./el-button-f08c0639.js";
1
+ import { b as ne, m as fe, n as ie, u as re, _ as ue, w as de, e as be, o as G, c as x, p as ee, q as oe } from "./base-29f73b05.js";
2
+ import { d as ye, a as ge, u as he, E as _e } from "./el-overlay-1ee0338d.js";
3
+ import { E as Ce } from "./el-button-e2c63c08.js";
4
4
  import "./el-scrollbar-323542e7.js";
5
- import { E as ke } from "./el-segmented-050d0090.js";
6
- import { E as we } from "./el-checkbox-058dba2d.js";
7
- import "./el-tag-f13f463b.js";
8
- import { E as Ve, a as Se } from "./el-select-23a1f302.js";
9
- import { f as Ie, b as Ee, u as Te, U as te, C as ae, I as se, d as Be, t as ze } from "./el-popper-fdc7c793.js";
10
- import { E as Ne } from "./el-divider-4fe55ebe.js";
11
- import { computed as T, ref as B, watch as Q, onBeforeUnmount as Pe, defineComponent as Z, useSlots as Le, openBlock as o, createBlock as k, unref as e, withCtx as p, createVNode as m, Transition as Ae, withDirectives as Oe, createElementVNode as n, mergeProps as Ue, withModifiers as ce, normalizeClass as b, createElementBlock as g, renderSlot as $, toDisplayString as M, createCommentVNode as _, normalizeStyle as me, vShow as Re, onMounted as pe, withKeys as De, resolveDynamicComponent as q, nextTick as Fe, inject as $e, reactive as Me, createTextVNode as j, Fragment as H, renderList as J, pushScopeId as Ke, popScopeId as qe } from "vue";
12
- import { _ as je } from "./_plugin-vue_export-helper-dad06003.js";
13
- import { E as D, a as He, l as Je } from "./index-ec7ad93f.js";
14
- import { i as We } from "./validator-4160d9e7.js";
15
- import { q as Xe, b as le, i as X, e as Ye, a as Ge, f as Qe, d as Ze } from "./use-form-common-props-631cacae.js";
16
- import { E as xe } from "./index-e0901394.js";
5
+ import { E as ke } from "./el-segmented-9d3a9e11.js";
6
+ import { E as we } from "./el-checkbox-71ebd862.js";
7
+ import "./el-tag-17cd04a1.js";
8
+ import { E as Ve, a as Se } from "./el-select-e51e11c1.js";
9
+ import "./el-popper-c9b3d3cf.js";
10
+ import { E as Ie } from "./el-divider-523e5874.js";
11
+ import { computed as T, ref as B, watch as Q, onBeforeUnmount as Ee, defineComponent as Z, useSlots as Te, openBlock as o, createBlock as k, unref as e, withCtx as p, createVNode as m, Transition as Be, withDirectives as ze, createElementVNode as n, mergeProps as Ne, withModifiers as ce, normalizeClass as b, createElementBlock as y, renderSlot as $, toDisplayString as M, createCommentVNode as _, normalizeStyle as me, vShow as Pe, onMounted as pe, withKeys as Le, resolveDynamicComponent as q, nextTick as Ae, inject as Oe, reactive as Ue, createTextVNode as j, Fragment as H, renderList as J, pushScopeId as Re, popScopeId as De } from "vue";
12
+ import { _ as Fe } from "./_plugin-vue_export-helper-dad06003.js";
13
+ import { E as D, c as $e, l as Me } from "./index-c2b9bbfd.js";
14
+ import { i as Ke } from "./validator-4ab9774f.js";
15
+ import { b as qe, c as le, i as X, d as je, e as He, f as Je, g as We } from "./use-form-common-props-cb0ca65c.js";
16
+ import { b as Xe, c as Ye, u as Ge, U as te, C as ae, I as se, d as Qe, a as Ze } from "./index-0f79095c.js";
17
+ import { E as xe } from "./index-1d9b50de.js";
17
18
  import { u as el } from "./index-2e331d74.js";
18
- import { u as ll } from "./index-93a8960e.js";
19
- import "./vnode-06571d5b.js";
20
- import "./scroll-41b4f625.js";
21
- import "./index-269b8a8c.js";
22
- import "./use-global-config-5d001623.js";
23
- import "./index-09bd2621.js";
19
+ import { u as ll } from "./index-de24705f.js";
20
+ import "./vnode-a83e6de8.js";
21
+ import "./scroll-6799bafc.js";
22
+ import "./index-8391a3df.js";
23
+ import "./use-global-config-cdaeca54.js";
24
+ import "./index-0ee486ad.js";
24
25
  import "./index-657047bb.js";
25
- import "./index-15b9603e.js";
26
- import "./castArray-15070be9.js";
27
- import "./index-4a3f30c5.js";
28
- import "./debounce-e9e47f9a.js";
26
+ import "./index-95e5d454.js";
27
+ import "./castArray-609a313e.js";
28
+ import "./index-c71e37dc.js";
29
+ import "./debounce-a09ce9a3.js";
29
30
  const tl = ne({
30
- ...ge,
31
+ ...ye,
31
32
  direction: {
32
33
  type: String,
33
34
  default: "rtl",
@@ -50,9 +51,9 @@ const tl = ne({
50
51
  type: String,
51
52
  default: "2"
52
53
  }
53
- }), al = ye;
54
+ }), al = ge;
54
55
  function sl(r, A) {
55
- const { width: C, height: c } = Xe(), w = T(() => ["ltr", "rtl"].includes(r.direction)), V = T(() => ["ltr", "ttb"].includes(r.direction) ? 1 : -1), u = T(() => w.value ? C.value : c.value), t = T(() => fe(y.value + V.value * S.value, 4, u.value)), y = B(0), S = B(0), I = B(!1), O = B(!1);
56
+ const { width: C, height: c } = qe(), w = T(() => ["ltr", "rtl"].includes(r.direction)), V = T(() => ["ltr", "ttb"].includes(r.direction) ? 1 : -1), u = T(() => w.value ? C.value : c.value), t = T(() => fe(g.value + V.value * S.value, 4, u.value)), g = B(0), S = B(0), I = B(!1), O = B(!1);
56
57
  let z = [], U = [];
57
58
  const v = () => {
58
59
  var h;
@@ -60,17 +61,17 @@ function sl(r, A) {
60
61
  return N ? w.value ? N.offsetWidth : N.offsetHeight : 100;
61
62
  };
62
63
  Q(() => [r.size, r.resizable], () => {
63
- O.value = !1, y.value = 0, S.value = 0, d();
64
+ O.value = !1, g.value = 0, S.value = 0, d();
64
65
  });
65
66
  const s = (h) => {
66
- r.resizable && (O.value || (y.value = v(), O.value = !0), z = [h.pageX, h.pageY], I.value = !0, U.push(le(window, "mouseup", d), le(window, "mousemove", L)));
67
+ r.resizable && (O.value || (g.value = v(), O.value = !0), z = [h.pageX, h.pageY], I.value = !0, U.push(le(window, "mouseup", d), le(window, "mousemove", L)));
67
68
  }, L = (h) => {
68
69
  const { pageX: N, pageY: l } = h, f = N - z[0], R = l - z[1];
69
70
  S.value = w.value ? f : R;
70
71
  }, d = () => {
71
- z = [], y.value = t.value, S.value = 0, I.value = !1, U.forEach((h) => h == null ? void 0 : h()), U = [];
72
+ z = [], g.value = t.value, S.value = 0, I.value = !1, U.forEach((h) => h == null ? void 0 : h()), U = [];
72
73
  }, E = le(A, "mousedown", s);
73
- return Pe(() => {
74
+ return Ee(() => {
74
75
  E(), d();
75
76
  }), {
76
77
  size: T(() => O.value ? `${t.value}px` : ie(r.size)),
@@ -86,7 +87,7 @@ const ol = Z({
86
87
  props: tl,
87
88
  emits: al,
88
89
  setup(r, { expose: A }) {
89
- const C = r, c = Le();
90
+ const C = r, c = Te();
90
91
  el({
91
92
  scope: "el-drawer",
92
93
  from: "the title slot",
@@ -94,7 +95,7 @@ const ol = Z({
94
95
  version: "3.0.0",
95
96
  ref: "https://element-plus.org/en-US/component/drawer.html#slots"
96
97
  }, T(() => !!c.title));
97
- const w = B(), V = B(), u = B(), t = re("drawer"), { t: y } = ll(), {
98
+ const w = B(), V = B(), u = B(), t = re("drawer"), { t: g } = ll(), {
98
99
  afterEnter: S,
99
100
  afterLeave: I,
100
101
  beforeLeave: O,
@@ -114,12 +115,12 @@ const ol = Z({
114
115
  handleClose: f,
115
116
  afterEnter: S,
116
117
  afterLeave: I
117
- }), (i, K) => (o(), k(e(Ie), {
118
+ }), (i, K) => (o(), k(e(Xe), {
118
119
  to: i.appendTo,
119
120
  disabled: i.appendTo !== "body" ? !1 : !i.appendToBody
120
121
  }, {
121
122
  default: p(() => [
122
- m(Ae, {
123
+ m(Be, {
123
124
  name: e(t).b("fade"),
124
125
  onAfterEnter: e(S),
125
126
  onAfterLeave: e(I),
@@ -129,14 +130,14 @@ const ol = Z({
129
130
  default: p(() => {
130
131
  var W;
131
132
  return [
132
- Oe(m(e(_e), {
133
+ ze(m(e(_e), {
133
134
  mask: i.modal,
134
135
  "overlay-class": [e(t).is("drawer"), (W = i.modalClass) != null ? W : ""],
135
136
  "z-index": e(L),
136
137
  onClick: e(d)
137
138
  }, {
138
139
  default: p(() => [
139
- m(e(Ee), {
140
+ m(e(Ye), {
140
141
  loop: "",
141
142
  trapped: e(z),
142
143
  "focus-trap-el": w.value,
@@ -147,7 +148,7 @@ const ol = Z({
147
148
  onReleaseRequested: e(l)
148
149
  }, {
149
150
  default: p(() => [
150
- n("div", Ue({
151
+ n("div", Ne({
151
152
  ref_key: "drawerRef",
152
153
  ref: w,
153
154
  "aria-modal": "true",
@@ -172,7 +173,7 @@ const ol = Z({
172
173
  class: b(e(t).e("sr-focus")),
173
174
  tabindex: "-1"
174
175
  }, null, 2),
175
- i.withHeader ? (o(), g("header", {
176
+ i.withHeader ? (o(), y("header", {
176
177
  key: 0,
177
178
  class: b([e(t).e("header"), i.headerClass])
178
179
  }, [
@@ -191,9 +192,9 @@ const ol = Z({
191
192
  class: b(e(t).e("title"))
192
193
  }, M(i.title), 11, ["id", "aria-level"])
193
194
  ]),
194
- i.showClose ? (o(), g("button", {
195
+ i.showClose ? (o(), y("button", {
195
196
  key: 2,
196
- "aria-label": e(y)("el.drawer.close"),
197
+ "aria-label": e(g)("el.drawer.close"),
197
198
  class: b(e(t).e("close-btn")),
198
199
  type: "button",
199
200
  onClick: e(f)
@@ -202,26 +203,26 @@ const ol = Z({
202
203
  class: b(e(t).e("close"))
203
204
  }, {
204
205
  default: p(() => [
205
- m(e(He))
206
+ m(e($e))
206
207
  ]),
207
208
  _: 1
208
209
  }, 8, ["class"])
209
210
  ], 10, ["aria-label", "onClick"])) : _("v-if", !0)
210
211
  ], 2)) : _("v-if", !0),
211
- e(U) ? (o(), g("div", {
212
+ e(U) ? (o(), y("div", {
212
213
  key: 1,
213
214
  id: e(s),
214
215
  class: b([e(t).e("body"), i.bodyClass])
215
216
  }, [
216
217
  $(i.$slots, "default")
217
218
  ], 10, ["id"])) : _("v-if", !0),
218
- i.$slots.footer ? (o(), g("div", {
219
+ i.$slots.footer ? (o(), y("div", {
219
220
  key: 2,
220
221
  class: b([e(t).e("footer"), i.footerClass])
221
222
  }, [
222
223
  $(i.$slots, "footer")
223
224
  ], 2)) : _("v-if", !0),
224
- i.resizable ? (o(), g("div", {
225
+ i.resizable ? (o(), y("div", {
225
226
  key: 3,
226
227
  ref_key: "draggerRef",
227
228
  ref: u,
@@ -235,7 +236,7 @@ const ol = Z({
235
236
  ]),
236
237
  _: 3
237
238
  }, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
238
- [Re, e(z)]
239
+ [Pe, e(z)]
239
240
  ])
240
241
  ];
241
242
  }),
@@ -256,7 +257,7 @@ const rl = de(il), ul = ne({
256
257
  loading: Boolean,
257
258
  size: {
258
259
  type: String,
259
- validator: We
260
+ validator: Ke
260
261
  },
261
262
  width: {
262
263
  type: [String, Number],
@@ -306,7 +307,7 @@ const rl = de(il), ul = ne({
306
307
  tabindex: {
307
308
  type: [String, Number]
308
309
  },
309
- ...Te(["ariaLabel"])
310
+ ...Ge(["ariaLabel"])
310
311
  }), dl = {
311
312
  [te]: (r) => G(r) || x(r) || ee(r),
312
313
  [ae]: (r) => G(r) || x(r) || ee(r),
@@ -318,12 +319,12 @@ const rl = de(il), ul = ne({
318
319
  props: ul,
319
320
  emits: dl,
320
321
  setup(r, { expose: A, emit: C }) {
321
- const c = r, { formItem: w } = Ye(), V = Ge(), u = re("switch"), { inputId: t } = Qe(c, {
322
+ const c = r, { formItem: w } = je(), V = He(), u = re("switch"), { inputId: t } = Je(c, {
322
323
  formItemContext: w
323
- }), y = Ze(T(() => c.loading)), S = B(c.modelValue !== !1), I = B(), O = B(), z = T(() => [
324
+ }), g = We(T(() => c.loading)), S = B(c.modelValue !== !1), I = B(), O = B(), z = T(() => [
324
325
  u.b(),
325
326
  u.m(V.value),
326
- u.is("disabled", y.value),
327
+ u.is("disabled", g.value),
327
328
  u.is("checked", d.value)
328
329
  ]), U = T(() => [
329
330
  u.e("label"),
@@ -342,15 +343,15 @@ const rl = de(il), ul = ne({
342
343
  const L = T(() => S.value ? c.modelValue : !1), d = T(() => L.value === c.activeValue);
343
344
  [c.activeValue, c.inactiveValue].includes(L.value) || (C(te, c.inactiveValue), C(ae, c.inactiveValue), C(se, c.inactiveValue)), Q(d, (l) => {
344
345
  var f;
345
- I.value.checked = l, c.validateEvent && ((f = w == null ? void 0 : w.validate) == null || f.call(w, "change").catch((R) => Be()));
346
+ I.value.checked = l, c.validateEvent && ((f = w == null ? void 0 : w.validate) == null || f.call(w, "change").catch((R) => Qe()));
346
347
  });
347
348
  const E = () => {
348
349
  const l = d.value ? c.inactiveValue : c.activeValue;
349
- C(te, l), C(ae, l), C(se, l), Fe(() => {
350
+ C(te, l), C(ae, l), C(se, l), Ae(() => {
350
351
  I.value.checked = d.value;
351
352
  });
352
353
  }, h = () => {
353
- if (y.value)
354
+ if (g.value)
354
355
  return;
355
356
  const { beforeChange: l } = c;
356
357
  if (!l) {
@@ -361,7 +362,7 @@ const rl = de(il), ul = ne({
361
362
  [
362
363
  oe(f),
363
364
  G(f)
364
- ].includes(!0) || ze(ve, "beforeChange must return type `Promise<boolean>` or `boolean`"), oe(f) ? f.then((F) => {
365
+ ].includes(!0) || Ze(ve, "beforeChange must return type `Promise<boolean>` or `boolean`"), oe(f) ? f.then((F) => {
365
366
  F && E();
366
367
  }).catch((F) => {
367
368
  }) : f && E();
@@ -374,7 +375,7 @@ const rl = de(il), ul = ne({
374
375
  }), A({
375
376
  focus: N,
376
377
  checked: d
377
- }), (l, f) => (o(), g("div", {
378
+ }), (l, f) => (o(), y("div", {
378
379
  class: b(e(z)),
379
380
  onClick: ce(h, ["prevent"])
380
381
  }, [
@@ -386,17 +387,17 @@ const rl = de(il), ul = ne({
386
387
  type: "checkbox",
387
388
  role: "switch",
388
389
  "aria-checked": e(d),
389
- "aria-disabled": e(y),
390
+ "aria-disabled": e(g),
390
391
  "aria-label": l.ariaLabel,
391
392
  name: l.name,
392
393
  "true-value": l.activeValue,
393
394
  "false-value": l.inactiveValue,
394
- disabled: e(y),
395
+ disabled: e(g),
395
396
  tabindex: l.tabindex,
396
397
  onChange: E,
397
- onKeydown: De(h, ["enter"])
398
+ onKeydown: Le(h, ["enter"])
398
399
  }, null, 42, ["id", "aria-checked", "aria-disabled", "aria-label", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"]),
399
- !l.inlinePrompt && (l.inactiveIcon || l.inactiveText) ? (o(), g("span", {
400
+ !l.inlinePrompt && (l.inactiveIcon || l.inactiveText) ? (o(), y("span", {
400
401
  key: 0,
401
402
  class: b(e(U))
402
403
  }, [
@@ -406,7 +407,7 @@ const rl = de(il), ul = ne({
406
407
  ]),
407
408
  _: 1
408
409
  })) : _("v-if", !0),
409
- !l.inactiveIcon && l.inactiveText ? (o(), g("span", {
410
+ !l.inactiveIcon && l.inactiveText ? (o(), y("span", {
410
411
  key: 1,
411
412
  "aria-hidden": e(d)
412
413
  }, M(l.inactiveText), 9, ["aria-hidden"])) : _("v-if", !0)
@@ -417,7 +418,7 @@ const rl = de(il), ul = ne({
417
418
  class: b(e(u).e("core")),
418
419
  style: me(e(s))
419
420
  }, [
420
- l.inlinePrompt ? (o(), g("div", {
421
+ l.inlinePrompt ? (o(), y("div", {
421
422
  key: 0,
422
423
  class: b(e(u).e("inner"))
423
424
  }, [
@@ -429,7 +430,7 @@ const rl = de(il), ul = ne({
429
430
  (o(), k(q(e(d) ? l.activeIcon : l.inactiveIcon)))
430
431
  ]),
431
432
  _: 1
432
- }, 8, ["class"])) : l.activeText || l.inactiveText ? (o(), g("span", {
433
+ }, 8, ["class"])) : l.activeText || l.inactiveText ? (o(), y("span", {
433
434
  key: 1,
434
435
  class: b(e(u).is("text")),
435
436
  "aria-hidden": !e(d)
@@ -443,7 +444,7 @@ const rl = de(il), ul = ne({
443
444
  class: b(e(u).is("loading"))
444
445
  }, {
445
446
  default: p(() => [
446
- m(e(Je))
447
+ m(e(Me))
447
448
  ]),
448
449
  _: 1
449
450
  }, 8, ["class"])) : e(d) ? $(l.$slots, "active-action", { key: 1 }, () => [
@@ -463,7 +464,7 @@ const rl = de(il), ul = ne({
463
464
  ])
464
465
  ], 2)
465
466
  ], 6),
466
- !l.inlinePrompt && (l.activeIcon || l.activeText) ? (o(), g("span", {
467
+ !l.inlinePrompt && (l.activeIcon || l.activeText) ? (o(), y("span", {
467
468
  key: 1,
468
469
  class: b(e(v))
469
470
  }, [
@@ -473,7 +474,7 @@ const rl = de(il), ul = ne({
473
474
  ]),
474
475
  _: 1
475
476
  })) : _("v-if", !0),
476
- !l.activeIcon && l.activeText ? (o(), g("span", {
477
+ !l.activeIcon && l.activeText ? (o(), y("span", {
477
478
  key: 1,
478
479
  "aria-hidden": !e(d)
479
480
  }, M(l.activeText), 9, ["aria-hidden"])) : _("v-if", !0)
@@ -527,7 +528,7 @@ const fl = [
527
528
  var C;
528
529
  return ((C = A.find((c) => c.value === r)) == null ? void 0 : C.label) ?? "-";
529
530
  };
530
- const P = (r) => (Ke("data-v-6e5050a9"), r = r(), qe(), r), gl = { class: "kline-config element-dark" }, yl = { class: "setting-item" }, hl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "主图指标: ", -1)), _l = { class: "setting-item" }, Cl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "交易点位: ", -1)), kl = { class: "setting-item" }, wl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "开平点按价格标: ", -1)), Vl = { class: "setting-item" }, Sl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "单周期: ", -1)), Il = { class: "setting-item" }, El = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "多周期: ", -1)), Tl = { class: "mode" }, Bl = { class: "cycleName" }, zl = { class: "content" }, Nl = { class: "setting-item" }, Pl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "默认展示: ", -1)), Ll = { class: "setting-item" }, Al = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "高亮交易范围: ", -1)), Ol = { class: "setting-item" }, Ul = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "展示当屏时间: ", -1)), Rl = { class: "setting-item" }, Dl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "展示当屏最高价: ", -1)), Fl = { class: "setting-item" }, $l = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "多周期双击图表切换至单周期: ", -1)), Ml = { class: "setting-item" }, Kl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "开启副图: ", -1)), ql = { class: "setting-item" }, jl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "开启拖拽轴: ", -1)), Hl = { class: "setting-footer" }, Jl = {
531
+ const P = (r) => (Re("data-v-6e5050a9"), r = r(), De(), r), yl = { class: "kline-config element-dark" }, gl = { class: "setting-item" }, hl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "主图指标: ", -1)), _l = { class: "setting-item" }, Cl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "交易点位: ", -1)), kl = { class: "setting-item" }, wl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "开平点按价格标: ", -1)), Vl = { class: "setting-item" }, Sl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "单周期: ", -1)), Il = { class: "setting-item" }, El = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "多周期: ", -1)), Tl = { class: "mode" }, Bl = { class: "cycleName" }, zl = { class: "content" }, Nl = { class: "setting-item" }, Pl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "默认展示: ", -1)), Ll = { class: "setting-item" }, Al = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "高亮交易范围: ", -1)), Ol = { class: "setting-item" }, Ul = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "展示当屏时间: ", -1)), Rl = { class: "setting-item" }, Dl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "展示当屏最高价: ", -1)), Fl = { class: "setting-item" }, $l = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "多周期双击图表切换至单周期: ", -1)), Ml = { class: "setting-item" }, Kl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "开启副图: ", -1)), ql = { class: "setting-item" }, jl = /* @__PURE__ */ P(() => /* @__PURE__ */ n("span", { class: "label" }, "开启拖拽轴: ", -1)), Hl = { class: "setting-footer" }, Jl = {
531
532
  __name: "index",
532
533
  props: {
533
534
  indicatorStore: { type: Object, default: () => ({}) },
@@ -539,7 +540,7 @@ const P = (r) => (Ke("data-v-6e5050a9"), r = r(), qe(), r), gl = { class: "kline
539
540
  },
540
541
  emits: "callBack",
541
542
  setup(r, { expose: A, emit: C }) {
542
- const { request: c } = $e("stConfig"), w = C, V = r, u = B(!1), t = Me({}), y = B([]), S = B([]), I = () => {
543
+ const { request: c } = Oe("stConfig"), w = C, V = r, u = B(!1), t = Ue({}), g = B([]), S = B([]), I = () => {
543
544
  Object.assign(t, Y());
544
545
  }, O = async () => {
545
546
  const v = JSON.stringify(t);
@@ -555,12 +556,12 @@ const P = (r) => (Ke("data-v-6e5050a9"), r = r(), qe(), r), gl = { class: "kline
555
556
  }, U = async () => {
556
557
  if (V.origin === "server") {
557
558
  const { body: v } = await c.post("/common/qt/getDict", { dictIds: [1002] });
558
- y.value = v[1002].map((s) => ({
559
+ g.value = v[1002].map((s) => ({
559
560
  label: s.dictName,
560
561
  value: s.dictCode
561
562
  }));
562
563
  } else
563
- y.value = V.cycleOptions;
564
+ g.value = V.cycleOptions;
564
565
  };
565
566
  return pe(() => {
566
567
  U(), S.value = V.indicatorStore.mainIndicatorList ?? [];
@@ -577,8 +578,8 @@ const P = (r) => (Ke("data-v-6e5050a9"), r = r(), qe(), r), gl = { class: "kline
577
578
  // 获取默认配置
578
579
  getDefaultUserKlineConfig: Y
579
580
  }), (v, s) => {
580
- const L = Ne, d = Ve, E = Se, h = we, N = ke, l = vl, f = xe, R = Ce, F = rl;
581
- return o(), g("div", gl, [
581
+ const L = Ie, d = Ve, E = Se, h = we, N = ke, l = vl, f = xe, R = Ce, F = rl;
582
+ return o(), y("div", yl, [
582
583
  m(F, {
583
584
  modelValue: u.value,
584
585
  "onUpdate:modelValue": s[12] || (s[12] = (a) => u.value = a),
@@ -594,7 +595,7 @@ const P = (r) => (Ke("data-v-6e5050a9"), r = r(), qe(), r), gl = { class: "kline
594
595
  ]),
595
596
  _: 1
596
597
  }),
597
- n("div", yl, [
598
+ n("div", gl, [
598
599
  hl,
599
600
  m(E, {
600
601
  modelValue: t.mainIndicator,
@@ -602,7 +603,7 @@ const P = (r) => (Ke("data-v-6e5050a9"), r = r(), qe(), r), gl = { class: "kline
602
603
  "popper-class": "element-dark"
603
604
  }, {
604
605
  default: p(() => [
605
- (o(!0), g(H, null, J(S.value, (a, i) => (o(), k(d, {
606
+ (o(!0), y(H, null, J(S.value, (a, i) => (o(), k(d, {
606
607
  key: i,
607
608
  label: a.label,
608
609
  value: a.value
@@ -619,7 +620,7 @@ const P = (r) => (Ke("data-v-6e5050a9"), r = r(), qe(), r), gl = { class: "kline
619
620
  "popper-class": "element-dark"
620
621
  }, {
621
622
  default: p(() => [
622
- (o(!0), g(H, null, J(e(fl), (a, i) => (o(), k(d, {
623
+ (o(!0), y(H, null, J(e(fl), (a, i) => (o(), k(d, {
623
624
  key: i,
624
625
  label: a.label,
625
626
  value: a.value
@@ -645,7 +646,7 @@ const P = (r) => (Ke("data-v-6e5050a9"), r = r(), qe(), r), gl = { class: "kline
645
646
  "popper-class": "element-dark"
646
647
  }, {
647
648
  default: p(() => [
648
- (o(!0), g(H, null, J(y.value, (a, i) => (o(), k(d, {
649
+ (o(!0), y(H, null, J(g.value, (a, i) => (o(), k(d, {
649
650
  key: i,
650
651
  label: a.label,
651
652
  value: a.value
@@ -671,16 +672,16 @@ const P = (r) => (Ke("data-v-6e5050a9"), r = r(), qe(), r), gl = { class: "kline
671
672
  n("div", {
672
673
  class: b(`setting-multi-box grid-${t.multiCycleNum}`)
673
674
  }, [
674
- (o(!0), g(H, null, J(t.multiCycleList.slice(0, t.multiCycleNum), (a, i) => (o(), g("div", Tl, [
675
+ (o(!0), y(H, null, J(t.multiCycleList.slice(0, t.multiCycleNum), (a, i) => (o(), y("div", Tl, [
675
676
  n("div", Bl, [
676
- n("span", null, M(e(bl)(t.multiCycleList[i], y.value)), 1),
677
+ n("span", null, M(e(bl)(t.multiCycleList[i], g.value)), 1),
677
678
  m(E, {
678
679
  modelValue: t.multiCycleList[i],
679
680
  "onUpdate:modelValue": (K) => t.multiCycleList[i] = K,
680
681
  "popper-class": "element-dark"
681
682
  }, {
682
683
  default: p(() => [
683
- (o(!0), g(H, null, J(y.value, (K, W) => (o(), k(d, {
684
+ (o(!0), y(H, null, J(g.value, (K, W) => (o(), k(d, {
684
685
  key: W,
685
686
  label: K.label,
686
687
  value: K.value
@@ -785,11 +786,11 @@ const P = (r) => (Ke("data-v-6e5050a9"), r = r(), qe(), r), gl = { class: "kline
785
786
  ]);
786
787
  };
787
788
  }
788
- }, Wl = /* @__PURE__ */ je(Jl, [["__scopeId", "data-v-6e5050a9"]]), kt = {
789
+ }, Wl = /* @__PURE__ */ Fe(Jl, [["__scopeId", "data-v-6e5050a9"]]), wt = {
789
790
  install(r) {
790
791
  r.component("st-klineConfig", Wl);
791
792
  }
792
793
  };
793
794
  export {
794
- kt as default
795
+ wt as default
795
796
  };
package/es/KlineNew.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const t=require("vue"),C=require("./index.esm-94a95a2a.cjs"),L=require("./_plugin-vue_export-helper-f246444f.cjs"),z=require("./index-8901a38c.cjs");require("./base-ef747d02.cjs");require("./el-tag-789f05d3.cjs");const R=require("./el-select-12f6deb7.cjs");require("./el-scrollbar-bc3f790d.cjs");require("./el-popper-7ba87e05.cjs");const $=require("echarts");require("./index-4f48940d.cjs");require("./index-9780a537.cjs");require("./use-form-common-props-344056f9.cjs");require("./index-cebc7160.cjs");require("./index-bb833443.cjs");require("./index-8de94a49.cjs");require("./index-696b6a94.cjs");require("./castArray-35947698.cjs");require("./index-c04f444f.cjs");require("./scroll-b108dabd.cjs");require("./debounce-62f5b6e8.cjs");require("./vnode-b906ae6d.cjs");function N(m){const A=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const S in m)if(S!=="default"){const g=Object.getOwnPropertyDescriptor(m,S);Object.defineProperty(A,S,g.get?g:{enumerable:!0,get:()=>m[S]})}}return A.default=m,Object.freeze(A)}const E=N($),M=t.defineComponent({__name:"index",setup(m,{expose:A}){let S=!1,g=!0,v=[];const I=(h,u)=>h.length>u?h.slice(h.length-u):h;return A({initTalib:async()=>{if(!S)S=!0,await C.init("./talib.wasm"),g=!1,v.forEach(h=>{h()});else if(g)return new Promise(h=>{v.push(h)})},handleKeyDown:(h,u)=>{let{startValue:o,endValue:d,maxIndex:f}=u;if(h.code==="ArrowLeft"){if(o===0)return;o=o-1,d=d-1}else if(h.code==="ArrowRight"){if(d===f)return;o=o+1,d=d+1}else if(h.code==="ArrowUp"){if(d-o<5)return;const p=Math.floor((d-o)/2)+1;o=o+p,d-o<5&&(o=d-4)}else if(h.code==="ArrowDown"){const p=Math.min(500,d-o);o=o-p-1}return{startValue:o,endValue:d}},getDataZoomInfoByTime:h=>{const{showStartTime:u,showEndTime:o,xAxisData:d,maxShowDays:f}=h;let p=-1,e=-1,i={};return d.forEach((a,n)=>{const l=a.split(" ")[0];i[l]=i[l]||0,i[l]+=1,new Date(a)>=new Date(u)&&p===-1&&(p=n),new Date(a)<=new Date(o)&&(e=n)}),{startValue:p,endValue:e,maxValueSpan:Math.max(...Object.values(i))*f}},formatDataBySlide:h=>{const{originDrawData:u,addData:o,startTime:d,endTime:f}=h,{mainIndicator:p,mainIndicatorList:e,subIndicator:i,subIndicatorList:a,config:n,timeRange:l}=h,{loadAddCount:D,preLoadCount:q}=n;let _=[],b=[],F=[],w=[];d&&f?(_=o.filter(s=>new Date(s[0])>=new Date(d)&&new Date(s[0])<=new Date(f)),w=[...o]):f?(_=[...o.filter((s,r)=>r>=o.length-D&&new Date(l[0])<=new Date(s[0])&&new Date(s[0])<=new Date(l[1])),...u.originData],w=[...o,...u.originData]):d&&(_=[...u.originData,...o.filter((s,r)=>r>=q&&new Date(l[0])<=new Date(s[0])&&new Date(s[0])<=new Date(l[1]))],w=_),_.forEach((s,r)=>{b.push([s[1],s[4],s[3],s[2],r===0?0:_[r-1][4],s[6]]),F.push(s[0])});let c=[],x=[];const y={time:[],open:[],close:[],high:[],low:[],originData:w};let B=null,T=null;return w.forEach((s,r)=>{y.time.push(s[0]),y.open.push(s[1]),y.close.push(s[4]),y.high.push(s[2]),y.low.push(s[3]),s[0]===_[0][0]&&(B=r),s[0]===_[_.length-1][0]&&(T=r+1)}),c=e.find(({value:s})=>s===p).config.map(s=>{const{calculationFn:r}=s,k={time:[],open:[],close:[],high:[],low:[],originData:[]};return{...s,data:r?r(C.talib,y,k).slice(B,T):[]}}),x=a.find(({value:s})=>s===i).config.reduce((s,r)=>{const{source:k,calculationFn:V}=r;return k==="calculation"?[...s,{...r,data:V?V(C.talib,y).slice(B,T):[]}]:s},[]),{originData:_,candlestickData:b,mainIndicatorData:c,subIndicatorData:x,xAxisData:F,startTime:_[0][0],endTime:_[_.length-1][0],length:_.length}},formatDataByCount:h=>{const{originDrawData:u,addData:o,mainIndicator:d,mainIndicatorList:f,subIndicator:p,subIndicatorList:e,config:i}=h;let a={};const{addCount:n,preLoadCount:l}=i,D=[],q=[],_=[],b=[],F=[];let w=[],c=[];const x=o.filter((r,k)=>(D.push(r[0]),q.push(r[1]),_.push(r[4]),b.push(r[2]),F.push(r[3]),w.push(r[0]),c.push([r[1],r[4],r[3],r[2],k===0?0:o[k-1][4],r[6]]),o.length>=n+l-1?k>=l:!0));w=I(w,x.length),c=I(c,x.length);const y={time:D,open:q,close:_,high:b,low:F,originData:o},T=f.find(r=>r.value===d).config.map(r=>({...r,data:I(r.calculationFn?r.calculationFn(C.talib,y,{time:[],open:[],close:[],high:[],low:[],originData:[]}):[],w.length)}));let s=[];return p&&e&&(s=e.find(k=>k.value===p).config.reduce((k,V)=>V.source==="calculation"?[...k,{...V,data:I(V.calculationFn?V.calculationFn(C.talib,y):[],w.length)}]:k,[])),u.length?a={originData:[...x,...u.originData],xAxisData:[...w,...u.xAxisData],candlestickData:[...c,...u.candlestickData],mainIndicatorData:u.mainIndicatorData.map((r,k)=>({...r,data:[...T[k].data,...r.data]})),subIndicatorData:u.subIndicatorData.map((r,k)=>({...r,data:[...s[k].data,...r.data]}))}:a={originData:x,xAxisData:w,candlestickData:c,mainIndicatorData:T,subIndicatorData:s},a.length=a.xAxisData.length,a.startTime=a.xAxisData[0],a.endTime=a.xAxisData[a.length-1],a},fn:()=>{}}),(h,u)=>null}}),j={class:"kline-tips"},P=t.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(m){return(A,S)=>(t.openBlock(),t.createElementBlock("div",j,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.data,(g,v)=>(t.openBlock(),t.createElementBlock("div",{key:v,class:"kline-tips-item",style:t.normalizeStyle({color:g.color})},t.toDisplayString(g.label)+" "+t.toDisplayString(g.value),5))),128))]))}});const O=L._export_sfc(P,[["__scopeId","data-v-2a02e841"]]),K={class:"kline-tips"},U=t.defineComponent({__name:"index",props:{drawData:{type:Object,require:!0},candlestickData:{type:Array,default:()=>null},mainIndicatorData:{type:Array,default:()=>null},activeIndex:{type:Number,require:!0}},setup(m){const{round:A,multiply:S,divide:g,subtract:v,formatValue:I}=z.x,h=m,u=t.computed(()=>{const{drawData:d,activeIndex:f,candlestickData:p}=h;if(p!=null&&p.length&&p[f]){let e;return p[f][6]>0?e="red":p[f][6]<0&&(e="green"),[{label:"开",value:p[f][0]},{label:"高",value:p[f][3]},{label:"低",value:p[f][2]},{label:"收",value:p[f][1]},{label:"额",value:I(p[f][4])},{label:"涨跌",value:`${A(p[f][6])}%`,color:e}]}else if(d.candlestickData&&d.candlestickData[f]){const e=d.candlestickData[f],i=[{label:"开",value:e[0]},{label:"高",value:e[3]},{label:"低",value:e[2]},{label:"收",value:e[1]}];e[5]!==void 0&&i.push({label:"额",value:I(e[5])});const a=A(S(g(v(e[1],e[4]),Math.abs(e[4])),100));let n;return a>0?n="red":a<0&&(n="green"),i.push({label:"涨跌",value:`${a}%`,color:n}),i}return[]}),o=t.computed(()=>{var p;const{drawData:d,activeIndex:f}=h;return((p=d==null?void 0:d.mainIndicatorData)==null?void 0:p.map(e=>({label:e.key,value:A(e.data[f]),color:e.color})))||[]});return(d,f)=>(t.openBlock(),t.createElementBlock("div",K,[t.createVNode(O,{data:u.value},null,8,["data"]),t.createVNode(O,{data:o.value},null,8,["data"])]))}});const Z=L._export_sfc(U,[["__scopeId","data-v-e75a1234"]]),Y={class:"klineSub"},H={class:"klineSub-tips"},G={key:0,class:"klineSub-tips-select"},J=t.defineComponent({__name:"index",props:{drawData:{type:Object,require:!0},activeIndex:{type:Number,require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0},config:{type:Object,require:!0}},emits:["update:modelValue"],setup(m,{expose:A,emit:S}){const{round:g}=z.x;let v,I;const h=S,u=m,o=t.ref(),d=t.computed({get(){return u.modelValue},set(e){h("update:modelValue",e)}}),f=t.computed(()=>{const{drawData:e,activeIndex:i}=u,a=u.subIndicatorList.find(n=>n.value===d.value);return e.originData&&e.originData[i]?a.config.map(n=>{var D,q;let l="-";return n.source==="origin"?l=e.originData[i][n.dataIndex]||"-":n.source==="calculation"&&(l=(((q=(D=e.subIndicatorData)==null?void 0:D.find(b=>b.key===n.key))==null?void 0:q.data)||[])[i]),{label:n.key,color:n.color,value:l==="-"?l:g(l)}}):[]});t.onMounted(()=>{v=E.init(o.value);let e=!0;I=new ResizeObserver(()=>{if(e){e=null;return}v.resize()}),I.observe(o.value)}),t.onUnmounted(()=>{v.dispose(),I.disconnect(),I=null});const p=(e,i)=>{const a=e[i],n=i===0?e[i]:e[i-1];return a[0]===a[1]?a[0]>=n[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:a[1]>a[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return A({connect:e=>{E.connect([e,v])},draw:e=>{t.nextTick(()=>{var w;const{startValue:i,endValue:a,maxValueSpan:n}=e,{xAxisData:l,subIndicatorData:D,candlestickData:q,originData:_}=u.drawData,b=u.subIndicatorList.find(c=>c.value===d.value),F=[];if(b.series==="bar"){let c=[];b.source==="origin"?c=_.map(x=>x[b.dataIndex]):c=((w=D==null?void 0:D.find(x=>x.key===b.dataIndex))==null?void 0:w.data)||[],F.push({name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:c.map((x,y)=>b.color==="kline"?{value:x,itemStyle:p(q,y)}:b.color==="value"?{value:x,itemStyle:{color:x>=0?"#FF0000":"#00FFFF"}}:{value:x,itemStyle:{color:b.color}})})}D.forEach(c=>{if(c.series==="line"){let x=[];c.source==="origin"?x=_.map(y=>y[c.dataIndex]):c.source==="calculation"&&(x=c.data),F.push({xAxisIndex:0,yAxisIndex:c.yAxis==="right"?2:1,name:c.key,type:"line",silent:!0,symbol:"none",data:x,lineStyle:{width:1},itemStyle:{color:c.color}})}}),v.setOption({animation:!1,grid:{left:`${u.config.gridLeft}px`,top:"10px",right:`${u.config.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:i,endValue:a,maxValueSpan:n}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:c=>{const{axisDimension:x,value:y}=c;if(x==="x")return y;if(c.axisIndex===1)return String(g(y))}}},formatter:()=>""},xAxis:{type:"category",data:l,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:c=>c}},yAxis:[{position:"right"},{position:"left",min:b.leftYAxisRange==="cover"?c=>c.min:null,max:b.leftYAxisRange==="cover"?c=>c.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:b.rightYAxisRange==="cover"?c=>c.min:null,max:b.rightYAxisRange==="cover"?c=>c.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:F},!0)})}}),(e,i)=>{const a=R.ElOption,n=R.ElSelect;return t.openBlock(),t.createElementBlock("div",Y,[t.createElementVNode("div",H,[f.value.length?(t.openBlock(),t.createElementBlock("div",G,[t.createVNode(n,{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=l=>d.value=l),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.subIndicatorList,l=>(t.openBlock(),t.createBlock(a,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.createVNode(O,{data:f.value},null,8,["data"])]),t.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:o},null,512)])}}});const Q=L._export_sfc(J,[["__scopeId","data-v-0a2f256e"]]),W=t.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["change"],setup(m,{expose:A,emit:S}){let g,v,I=null;const h=S,u=m,o=t.ref();t.watch(()=>u.data,()=>{p()},{deep:!0}),t.onMounted(()=>{g=E.init(o.value),d(),p();let e=!0;v=new ResizeObserver(()=>{if(e){e=null;return}g.resize()}),v.observe(o.value)}),t.onUnmounted(()=>{g.off("datazoom"),g.dispose(),v.disconnect(),v=null});const d=()=>{g.on("datazoom",e=>{e.dataZoomId&&(clearTimeout(I),I=setTimeout(()=>{const{data:i}=u,{start:a,end:n}=e,l=Math.floor(a*i.length/100),D=n===100?i.length-1:Math.floor(n*i.length/100);f(l,D),clearTimeout(I)},100))})},f=(e,i)=>{const a=u.data;if(a.length===0)return;const n=a[e][0].split(" ")[0],l=a[i][0].split(" ")[0];h("change",{startTime:`${n} 00:00:00`,endTime:`${l} 24:00:00`})},p=()=>{const{data:e}=u;if(e.length===0)return;const i=e.map(n=>n[0].split(" ")[0]),a=e.map(n=>n[1]);g.setOption({grid:{height:0,left:"80px",right:"80px"},xAxis:{type:"category",data:i,show:!1},yAxis:{type:"value"},series:[{data:a,type:"line"}]},!0)};return A({resetSlide:(e,i,a)=>{let n=-1,l=-1;u.data.forEach((D,q)=>{n===-1&&D[0]===e?n=q:n===-1&&new Date(D[0])>new Date(e)&&(n=q-1),(l===-1&&D[0]===i||l===-1&&new Date(D[0])>new Date(i))&&(l=q)}),l=l===-1?u.data.length-1:l,g.setOption({dataZoom:[{show:!0,startValue:n,endValue:l,maxValueSpan:a,textStyle:{color:"#ccc"}},{type:"inside",startValue:n,endValue:l,maxValueSpan:a}]})},resize:()=>{g==null||g.resize()}}),(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"klineSlide",ref_key:"slideChartRef",ref:o},null,512))}});const X=L._export_sfc(W,[["__scopeId","data-v-5008746a"]]),ee={install(m){m.component("st-klineUtils",M),m.component("st-klineSub",Q),m.component("st-klineTips",Z),m.component("st-klineSlide",X)}};module.exports=ee;
1
+ "use strict";const t=require("vue"),C=require("./index.esm-94a95a2a.cjs"),L=require("./_plugin-vue_export-helper-f246444f.cjs"),z=require("./index-8901a38c.cjs");require("./base-ef747d02.cjs");require("./el-tag-6d8e653e.cjs");const R=require("./el-select-a11f33e8.cjs");require("./el-scrollbar-bc3f790d.cjs");require("./el-popper-2d3914e4.cjs");const $=require("echarts");require("./index-37b8d3c6.cjs");require("./index-9780a537.cjs");require("./use-form-common-props-d3ed62c6.cjs");require("./index-33f80550.cjs");require("./index-bb833443.cjs");require("./index-28e03bad.cjs");require("./index-e8eeea22.cjs");require("./index-6b99def3.cjs");require("./castArray-35947698.cjs");require("./index-7dce9f59.cjs");require("./scroll-b108dabd.cjs");require("./debounce-62f5b6e8.cjs");require("./vnode-b906ae6d.cjs");function N(m){const A=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const S in m)if(S!=="default"){const g=Object.getOwnPropertyDescriptor(m,S);Object.defineProperty(A,S,g.get?g:{enumerable:!0,get:()=>m[S]})}}return A.default=m,Object.freeze(A)}const E=N($),M=t.defineComponent({__name:"index",setup(m,{expose:A}){let S=!1,g=!0,v=[];const I=(h,u)=>h.length>u?h.slice(h.length-u):h;return A({initTalib:async()=>{if(!S)S=!0,await C.init("./talib.wasm"),g=!1,v.forEach(h=>{h()});else if(g)return new Promise(h=>{v.push(h)})},handleKeyDown:(h,u)=>{let{startValue:o,endValue:d,maxIndex:f}=u;if(h.code==="ArrowLeft"){if(o===0)return;o=o-1,d=d-1}else if(h.code==="ArrowRight"){if(d===f)return;o=o+1,d=d+1}else if(h.code==="ArrowUp"){if(d-o<5)return;const p=Math.floor((d-o)/2)+1;o=o+p,d-o<5&&(o=d-4)}else if(h.code==="ArrowDown"){const p=Math.min(500,d-o);o=o-p-1}return{startValue:o,endValue:d}},getDataZoomInfoByTime:h=>{const{showStartTime:u,showEndTime:o,xAxisData:d,maxShowDays:f}=h;let p=-1,e=-1,i={};return d.forEach((a,n)=>{const l=a.split(" ")[0];i[l]=i[l]||0,i[l]+=1,new Date(a)>=new Date(u)&&p===-1&&(p=n),new Date(a)<=new Date(o)&&(e=n)}),{startValue:p,endValue:e,maxValueSpan:Math.max(...Object.values(i))*f}},formatDataBySlide:h=>{const{originDrawData:u,addData:o,startTime:d,endTime:f}=h,{mainIndicator:p,mainIndicatorList:e,subIndicator:i,subIndicatorList:a,config:n,timeRange:l}=h,{loadAddCount:D,preLoadCount:q}=n;let _=[],b=[],F=[],w=[];d&&f?(_=o.filter(s=>new Date(s[0])>=new Date(d)&&new Date(s[0])<=new Date(f)),w=[...o]):f?(_=[...o.filter((s,r)=>r>=o.length-D&&new Date(l[0])<=new Date(s[0])&&new Date(s[0])<=new Date(l[1])),...u.originData],w=[...o,...u.originData]):d&&(_=[...u.originData,...o.filter((s,r)=>r>=q&&new Date(l[0])<=new Date(s[0])&&new Date(s[0])<=new Date(l[1]))],w=_),_.forEach((s,r)=>{b.push([s[1],s[4],s[3],s[2],r===0?0:_[r-1][4],s[6]]),F.push(s[0])});let c=[],x=[];const y={time:[],open:[],close:[],high:[],low:[],originData:w};let B=null,T=null;return w.forEach((s,r)=>{y.time.push(s[0]),y.open.push(s[1]),y.close.push(s[4]),y.high.push(s[2]),y.low.push(s[3]),s[0]===_[0][0]&&(B=r),s[0]===_[_.length-1][0]&&(T=r+1)}),c=e.find(({value:s})=>s===p).config.map(s=>{const{calculationFn:r}=s,k={time:[],open:[],close:[],high:[],low:[],originData:[]};return{...s,data:r?r(C.talib,y,k).slice(B,T):[]}}),x=a.find(({value:s})=>s===i).config.reduce((s,r)=>{const{source:k,calculationFn:V}=r;return k==="calculation"?[...s,{...r,data:V?V(C.talib,y).slice(B,T):[]}]:s},[]),{originData:_,candlestickData:b,mainIndicatorData:c,subIndicatorData:x,xAxisData:F,startTime:_[0][0],endTime:_[_.length-1][0],length:_.length}},formatDataByCount:h=>{const{originDrawData:u,addData:o,mainIndicator:d,mainIndicatorList:f,subIndicator:p,subIndicatorList:e,config:i}=h;let a={};const{addCount:n,preLoadCount:l}=i,D=[],q=[],_=[],b=[],F=[];let w=[],c=[];const x=o.filter((r,k)=>(D.push(r[0]),q.push(r[1]),_.push(r[4]),b.push(r[2]),F.push(r[3]),w.push(r[0]),c.push([r[1],r[4],r[3],r[2],k===0?0:o[k-1][4],r[6]]),o.length>=n+l-1?k>=l:!0));w=I(w,x.length),c=I(c,x.length);const y={time:D,open:q,close:_,high:b,low:F,originData:o},T=f.find(r=>r.value===d).config.map(r=>({...r,data:I(r.calculationFn?r.calculationFn(C.talib,y,{time:[],open:[],close:[],high:[],low:[],originData:[]}):[],w.length)}));let s=[];return p&&e&&(s=e.find(k=>k.value===p).config.reduce((k,V)=>V.source==="calculation"?[...k,{...V,data:I(V.calculationFn?V.calculationFn(C.talib,y):[],w.length)}]:k,[])),u.length?a={originData:[...x,...u.originData],xAxisData:[...w,...u.xAxisData],candlestickData:[...c,...u.candlestickData],mainIndicatorData:u.mainIndicatorData.map((r,k)=>({...r,data:[...T[k].data,...r.data]})),subIndicatorData:u.subIndicatorData.map((r,k)=>({...r,data:[...s[k].data,...r.data]}))}:a={originData:x,xAxisData:w,candlestickData:c,mainIndicatorData:T,subIndicatorData:s},a.length=a.xAxisData.length,a.startTime=a.xAxisData[0],a.endTime=a.xAxisData[a.length-1],a},fn:()=>{}}),(h,u)=>null}}),j={class:"kline-tips"},P=t.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(m){return(A,S)=>(t.openBlock(),t.createElementBlock("div",j,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.data,(g,v)=>(t.openBlock(),t.createElementBlock("div",{key:v,class:"kline-tips-item",style:t.normalizeStyle({color:g.color})},t.toDisplayString(g.label)+" "+t.toDisplayString(g.value),5))),128))]))}});const O=L._export_sfc(P,[["__scopeId","data-v-2a02e841"]]),K={class:"kline-tips"},U=t.defineComponent({__name:"index",props:{drawData:{type:Object,require:!0},candlestickData:{type:Array,default:()=>null},mainIndicatorData:{type:Array,default:()=>null},activeIndex:{type:Number,require:!0}},setup(m){const{round:A,multiply:S,divide:g,subtract:v,formatValue:I}=z.x,h=m,u=t.computed(()=>{const{drawData:d,activeIndex:f,candlestickData:p}=h;if(p!=null&&p.length&&p[f]){let e;return p[f][6]>0?e="red":p[f][6]<0&&(e="green"),[{label:"开",value:p[f][0]},{label:"高",value:p[f][3]},{label:"低",value:p[f][2]},{label:"收",value:p[f][1]},{label:"额",value:I(p[f][4])},{label:"涨跌",value:`${A(p[f][6])}%`,color:e}]}else if(d.candlestickData&&d.candlestickData[f]){const e=d.candlestickData[f],i=[{label:"开",value:e[0]},{label:"高",value:e[3]},{label:"低",value:e[2]},{label:"收",value:e[1]}];e[5]!==void 0&&i.push({label:"额",value:I(e[5])});const a=A(S(g(v(e[1],e[4]),Math.abs(e[4])),100));let n;return a>0?n="red":a<0&&(n="green"),i.push({label:"涨跌",value:`${a}%`,color:n}),i}return[]}),o=t.computed(()=>{var p;const{drawData:d,activeIndex:f}=h;return((p=d==null?void 0:d.mainIndicatorData)==null?void 0:p.map(e=>({label:e.key,value:A(e.data[f]),color:e.color})))||[]});return(d,f)=>(t.openBlock(),t.createElementBlock("div",K,[t.createVNode(O,{data:u.value},null,8,["data"]),t.createVNode(O,{data:o.value},null,8,["data"])]))}});const Z=L._export_sfc(U,[["__scopeId","data-v-e75a1234"]]),Y={class:"klineSub"},H={class:"klineSub-tips"},G={key:0,class:"klineSub-tips-select"},J=t.defineComponent({__name:"index",props:{drawData:{type:Object,require:!0},activeIndex:{type:Number,require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0},config:{type:Object,require:!0}},emits:["update:modelValue"],setup(m,{expose:A,emit:S}){const{round:g}=z.x;let v,I;const h=S,u=m,o=t.ref(),d=t.computed({get(){return u.modelValue},set(e){h("update:modelValue",e)}}),f=t.computed(()=>{const{drawData:e,activeIndex:i}=u,a=u.subIndicatorList.find(n=>n.value===d.value);return e.originData&&e.originData[i]?a.config.map(n=>{var D,q;let l="-";return n.source==="origin"?l=e.originData[i][n.dataIndex]||"-":n.source==="calculation"&&(l=(((q=(D=e.subIndicatorData)==null?void 0:D.find(b=>b.key===n.key))==null?void 0:q.data)||[])[i]),{label:n.key,color:n.color,value:l==="-"?l:g(l)}}):[]});t.onMounted(()=>{v=E.init(o.value);let e=!0;I=new ResizeObserver(()=>{if(e){e=null;return}v.resize()}),I.observe(o.value)}),t.onUnmounted(()=>{v.dispose(),I.disconnect(),I=null});const p=(e,i)=>{const a=e[i],n=i===0?e[i]:e[i-1];return a[0]===a[1]?a[0]>=n[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:a[1]>a[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return A({connect:e=>{E.connect([e,v])},draw:e=>{t.nextTick(()=>{var w;const{startValue:i,endValue:a,maxValueSpan:n}=e,{xAxisData:l,subIndicatorData:D,candlestickData:q,originData:_}=u.drawData,b=u.subIndicatorList.find(c=>c.value===d.value),F=[];if(b.series==="bar"){let c=[];b.source==="origin"?c=_.map(x=>x[b.dataIndex]):c=((w=D==null?void 0:D.find(x=>x.key===b.dataIndex))==null?void 0:w.data)||[],F.push({name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:c.map((x,y)=>b.color==="kline"?{value:x,itemStyle:p(q,y)}:b.color==="value"?{value:x,itemStyle:{color:x>=0?"#FF0000":"#00FFFF"}}:{value:x,itemStyle:{color:b.color}})})}D.forEach(c=>{if(c.series==="line"){let x=[];c.source==="origin"?x=_.map(y=>y[c.dataIndex]):c.source==="calculation"&&(x=c.data),F.push({xAxisIndex:0,yAxisIndex:c.yAxis==="right"?2:1,name:c.key,type:"line",silent:!0,symbol:"none",data:x,lineStyle:{width:1},itemStyle:{color:c.color}})}}),v.setOption({animation:!1,grid:{left:`${u.config.gridLeft}px`,top:"10px",right:`${u.config.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:i,endValue:a,maxValueSpan:n}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:c=>{const{axisDimension:x,value:y}=c;if(x==="x")return y;if(c.axisIndex===1)return String(g(y))}}},formatter:()=>""},xAxis:{type:"category",data:l,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:c=>c}},yAxis:[{position:"right"},{position:"left",min:b.leftYAxisRange==="cover"?c=>c.min:null,max:b.leftYAxisRange==="cover"?c=>c.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:b.rightYAxisRange==="cover"?c=>c.min:null,max:b.rightYAxisRange==="cover"?c=>c.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:F},!0)})}}),(e,i)=>{const a=R.ElOption,n=R.ElSelect;return t.openBlock(),t.createElementBlock("div",Y,[t.createElementVNode("div",H,[f.value.length?(t.openBlock(),t.createElementBlock("div",G,[t.createVNode(n,{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=l=>d.value=l),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.subIndicatorList,l=>(t.openBlock(),t.createBlock(a,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.createVNode(O,{data:f.value},null,8,["data"])]),t.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:o},null,512)])}}});const Q=L._export_sfc(J,[["__scopeId","data-v-0a2f256e"]]),W=t.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["change"],setup(m,{expose:A,emit:S}){let g,v,I=null;const h=S,u=m,o=t.ref();t.watch(()=>u.data,()=>{p()},{deep:!0}),t.onMounted(()=>{g=E.init(o.value),d(),p();let e=!0;v=new ResizeObserver(()=>{if(e){e=null;return}g.resize()}),v.observe(o.value)}),t.onUnmounted(()=>{g.off("datazoom"),g.dispose(),v.disconnect(),v=null});const d=()=>{g.on("datazoom",e=>{e.dataZoomId&&(clearTimeout(I),I=setTimeout(()=>{const{data:i}=u,{start:a,end:n}=e,l=Math.floor(a*i.length/100),D=n===100?i.length-1:Math.floor(n*i.length/100);f(l,D),clearTimeout(I)},100))})},f=(e,i)=>{const a=u.data;if(a.length===0)return;const n=a[e][0].split(" ")[0],l=a[i][0].split(" ")[0];h("change",{startTime:`${n} 00:00:00`,endTime:`${l} 24:00:00`})},p=()=>{const{data:e}=u;if(e.length===0)return;const i=e.map(n=>n[0].split(" ")[0]),a=e.map(n=>n[1]);g.setOption({grid:{height:0,left:"80px",right:"80px"},xAxis:{type:"category",data:i,show:!1},yAxis:{type:"value"},series:[{data:a,type:"line"}]},!0)};return A({resetSlide:(e,i,a)=>{let n=-1,l=-1;u.data.forEach((D,q)=>{n===-1&&D[0]===e?n=q:n===-1&&new Date(D[0])>new Date(e)&&(n=q-1),(l===-1&&D[0]===i||l===-1&&new Date(D[0])>new Date(i))&&(l=q)}),l=l===-1?u.data.length-1:l,g.setOption({dataZoom:[{show:!0,startValue:n,endValue:l,maxValueSpan:a,textStyle:{color:"#ccc"}},{type:"inside",startValue:n,endValue:l,maxValueSpan:a}]})},resize:()=>{g==null||g.resize()}}),(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"klineSlide",ref_key:"slideChartRef",ref:o},null,512))}});const X=L._export_sfc(W,[["__scopeId","data-v-5008746a"]]),ee={install(m){m.component("st-klineUtils",M),m.component("st-klineSub",Q),m.component("st-klineTips",Z),m.component("st-klineSlide",X)}};module.exports=ee;
package/es/KlineNew.js CHANGED
@@ -2,24 +2,25 @@ import { defineComponent as R, openBlock as T, createElementBlock as L, Fragment
2
2
  import { i as te, t as z } from "./index.esm-8d9a2abe.js";
3
3
  import { _ as q } from "./_plugin-vue_export-helper-dad06003.js";
4
4
  import { x as G } from "./index-7ed0999e.js";
5
- import "./base-ff0e366f.js";
6
- import "./el-tag-f13f463b.js";
7
- import { E as ae, a as ne } from "./el-select-23a1f302.js";
5
+ import "./base-29f73b05.js";
6
+ import "./el-tag-17cd04a1.js";
7
+ import { E as ae, a as ne } from "./el-select-e51e11c1.js";
8
8
  import "./el-scrollbar-323542e7.js";
9
- import "./el-popper-fdc7c793.js";
9
+ import "./el-popper-c9b3d3cf.js";
10
10
  import * as B from "echarts";
11
- import "./index-09bd2621.js";
12
- import "./index-269b8a8c.js";
13
- import "./use-form-common-props-631cacae.js";
14
- import "./index-ec7ad93f.js";
15
- import "./index-93a8960e.js";
16
- import "./index-e0901394.js";
17
- import "./index-15b9603e.js";
18
- import "./castArray-15070be9.js";
19
- import "./index-4a3f30c5.js";
20
- import "./scroll-41b4f625.js";
21
- import "./debounce-e9e47f9a.js";
22
- import "./vnode-06571d5b.js";
11
+ import "./index-0ee486ad.js";
12
+ import "./index-8391a3df.js";
13
+ import "./use-form-common-props-cb0ca65c.js";
14
+ import "./index-c2b9bbfd.js";
15
+ import "./index-de24705f.js";
16
+ import "./index-0f79095c.js";
17
+ import "./index-1d9b50de.js";
18
+ import "./index-95e5d454.js";
19
+ import "./castArray-609a313e.js";
20
+ import "./index-c71e37dc.js";
21
+ import "./scroll-6799bafc.js";
22
+ import "./debounce-a09ce9a3.js";
23
+ import "./vnode-a83e6de8.js";
23
24
  const oe = /* @__PURE__ */ R({
24
25
  __name: "index",
25
26
  setup(w, { expose: A }) {
@@ -637,11 +638,11 @@ const he = /* @__PURE__ */ q(fe, [["__scopeId", "data-v-0a2f256e"]]), me = /* @_
637
638
  }, null, 512));
638
639
  }
639
640
  });
640
- const ge = /* @__PURE__ */ q(me, [["__scopeId", "data-v-5008746a"]]), qe = {
641
+ const ge = /* @__PURE__ */ q(me, [["__scopeId", "data-v-5008746a"]]), Be = {
641
642
  install(w) {
642
643
  w.component("st-klineUtils", oe), w.component("st-klineSub", he), w.component("st-klineTips", ce), w.component("st-klineSlide", ge);
643
644
  }
644
645
  };
645
646
  export {
646
- qe as default
647
+ Be as default
647
648
  };