st-comp 0.0.147 → 0.0.149

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 (142) hide show
  1. package/components.d.ts +3 -0
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +2 -2
  4. package/es/Dialog.cjs +1 -1
  5. package/es/Dialog.js +26 -22
  6. package/es/FactorWarning.cjs +1 -1
  7. package/es/FactorWarning.js +112 -103
  8. package/es/Kline.cjs +1 -0
  9. package/es/Kline.js +1901 -0
  10. package/es/KlineBasic.cjs +1 -1
  11. package/es/KlineBasic.js +675 -1422
  12. package/es/KlineNew.cjs +1 -3
  13. package/es/KlineNew.js +314 -2736
  14. package/es/Pagination.cjs +1 -1
  15. package/es/Pagination.js +102 -96
  16. package/es/Table.cjs +1 -1
  17. package/es/Table.js +66 -60
  18. package/es/User.cjs +1 -1
  19. package/es/User.js +102 -95
  20. package/es/VarietySearch.cjs +1 -1
  21. package/es/VarietySearch.js +41 -32
  22. package/es/VirtualTable.cjs +13 -1
  23. package/es/VirtualTable.js +2801 -1
  24. package/es/{_initCloneObject-a8dcd058.js → _initCloneObject-14b53c6f.js} +26 -26
  25. package/es/_initCloneObject-441db749.cjs +1 -0
  26. package/es/{base-674a354a.js → base-437d17f3.js} +64 -63
  27. package/es/{base-00ce90ec.cjs → base-ec05f348.cjs} +3 -3
  28. package/es/castArray-4251bbe4.js +10 -0
  29. package/es/castArray-a45823fe.cjs +1 -0
  30. package/es/config-provider-55482a43.js +47 -0
  31. package/es/config-provider-7cdfca4d.cjs +1 -0
  32. package/es/debounce-ac30be50.js +83 -0
  33. package/es/debounce-b2ff12bd.cjs +1 -0
  34. package/es/{dropdown-ce30ada6.js → dropdown-634b5e27.js} +31 -30
  35. package/es/dropdown-d7c59a21.cjs +1 -0
  36. package/es/el-button-196807af.cjs +1 -0
  37. package/es/el-button-e1665717.js +235 -0
  38. package/es/el-checkbox-group-492b95cc.cjs +1 -0
  39. package/es/{el-checkbox-group-0554b352.js → el-checkbox-group-e8fece80.js} +10 -10
  40. package/es/{el-empty-87154b6d.cjs → el-empty-19ea04f4.cjs} +1 -1
  41. package/es/{el-empty-39b3aed7.js → el-empty-bacc6613.js} +5 -5
  42. package/es/el-form-item-5bdffd07.cjs +12 -0
  43. package/es/{el-form-item-fc6f80ab.js → el-form-item-af1855f0.js} +79 -78
  44. package/es/el-input-23e2bac3.cjs +1 -0
  45. package/es/{el-input-d249ac86.js → el-input-4961b99f.js} +84 -82
  46. package/es/el-input-number-40a81eb5.cjs +1 -0
  47. package/es/{el-input-number-2066fbb7.js → el-input-number-610fc8ba.js} +36 -35
  48. package/es/el-menu-item-78b858f2.cjs +1 -0
  49. package/es/el-menu-item-7d04c11a.js +771 -0
  50. package/es/{el-message-9859835d.js → el-message-c3b3ac96.js} +81 -79
  51. package/es/el-message-d4df8136.cjs +1 -0
  52. package/es/el-overlay-12dd9b35.js +519 -0
  53. package/es/el-overlay-bc0790a2.cjs +1 -0
  54. package/es/{el-popover-b7b43c1f.js → el-popover-0aa071f2.js} +18 -18
  55. package/es/el-popover-8a77e015.cjs +1 -0
  56. package/es/el-popper-50100766.js +2262 -0
  57. package/es/el-popper-746070ba.cjs +1 -0
  58. package/es/el-scrollbar-562d0595.js +201 -0
  59. package/es/el-scrollbar-d1c3e7f7.cjs +1 -0
  60. package/es/{el-select-bcbb7e55.js → el-select-9381b156.js} +333 -329
  61. package/es/el-select-b162dffc.cjs +1 -0
  62. package/es/{el-table-column-c1e1a206.js → el-table-column-55bffba5.js} +350 -346
  63. package/es/el-table-column-6d761fce.cjs +14 -0
  64. package/es/el-tag-985d9aff.js +279 -0
  65. package/es/el-tag-c51a6490.cjs +1 -0
  66. package/es/index-09e01b1d.js +81 -0
  67. package/es/index-0cb48e01.js +306 -0
  68. package/es/{index-45de4a12.js → index-39ec9741.js} +7 -7
  69. package/es/index-3bf8d597.cjs +1 -0
  70. package/es/index-657047bb.js +513 -0
  71. package/es/index-8a0b1c53.cjs +3 -0
  72. package/es/index-a387515d.cjs +1 -0
  73. package/es/index-a902a0d9.js +59 -0
  74. package/es/index-deb8de52.cjs +1 -0
  75. package/es/index-eea0bcb3.cjs +1 -0
  76. package/es/index.esm-8d9a2abe.js +2432 -0
  77. package/es/index.esm-94a95a2a.cjs +3 -0
  78. package/es/raf-8fc301fd.cjs +1 -0
  79. package/es/raf-b128c7b7.js +6 -0
  80. package/es/{scroll-cb696ed2.js → scroll-387fcfdb.js} +1 -1
  81. package/es/{scroll-cca17da0.cjs → scroll-41224831.cjs} +1 -1
  82. package/es/style.css +1 -1
  83. package/es/typescript-7ae59c4c.js +4 -0
  84. package/es/typescript-b63f8e83.cjs +1 -0
  85. package/es/use-form-common-props-1b84d8f4.cjs +2 -0
  86. package/es/use-form-common-props-f377e500.js +587 -0
  87. package/es/vnode-7dfd4ed5.js +14 -0
  88. package/es/vnode-7fbc61e1.cjs +1 -0
  89. package/es/{zh-cn-37af467d.cjs → zh-cn-ab9a583d.cjs} +1 -1
  90. package/es/{zh-cn-ef7d7220.js → zh-cn-eb9c2820.js} +2 -2
  91. package/lib/bundle.js +1 -1
  92. package/lib/bundle.umd.cjs +206 -206
  93. package/lib/{index-24f8572c.js → index-d2de454d.js} +33249 -31372
  94. package/lib/{python-2143eee4.js → python-22975586.js} +1 -1
  95. package/lib/style.css +1 -1
  96. package/package.json +1 -1
  97. package/packages/Kline/components/Contextmenu/index.vue +110 -0
  98. package/packages/Kline/components/Tips/index.vue +40 -0
  99. package/packages/Kline/componentsNew/KlineSlide/index.vue +155 -0
  100. package/packages/Kline/componentsNew/KlineSub/index.vue +297 -0
  101. package/packages/Kline/componentsNew/KlineTips/index.vue +66 -0
  102. package/packages/Kline/componentsNew/KlineUtils/index.vue +84 -0
  103. package/packages/Kline/componentsNew/Tips/index.vue +33 -0
  104. package/packages/Kline/formatKlineData.ts +109 -0
  105. package/packages/Kline/images/buy.svg +1 -0
  106. package/packages/Kline/images/pen.png +0 -0
  107. package/packages/Kline/images/sell.svg +1 -0
  108. package/packages/Kline/images/t.svg +1 -0
  109. package/packages/Kline/index.ts +16 -0
  110. package/packages/Kline/index.vue +891 -0
  111. package/packages/Kline/option.ts +539 -0
  112. package/packages/Kline/type.d.ts +219 -0
  113. package/packages/Kline/utils.ts +682 -0
  114. package/packages/KlineBasic/utils.js +1 -1
  115. package/packages/index.ts +2 -0
  116. package/src/pages/Kline/index.vue +12 -0
  117. package/src/router/routes.ts +5 -0
  118. package/es/_initCloneObject-7493ecd5.cjs +0 -1
  119. package/es/config-provider-419ffbf2.js +0 -120
  120. package/es/config-provider-68414290.cjs +0 -3
  121. package/es/dropdown-127a8c0d.cjs +0 -1
  122. package/es/el-button-7b9f5933.js +0 -745
  123. package/es/el-button-c00975e1.cjs +0 -1
  124. package/es/el-checkbox-group-7a313d34.cjs +0 -1
  125. package/es/el-form-item-7867f64d.cjs +0 -12
  126. package/es/el-input-2ff1628c.cjs +0 -1
  127. package/es/el-input-number-d6801a5c.cjs +0 -1
  128. package/es/el-message-ffcf690c.cjs +0 -1
  129. package/es/el-overlay-91784be2.cjs +0 -1
  130. package/es/el-overlay-f0757cc4.js +0 -525
  131. package/es/el-popover-4db657e2.cjs +0 -1
  132. package/es/el-scrollbar-35bac6b3.js +0 -2452
  133. package/es/el-scrollbar-ec09bbd3.cjs +0 -1
  134. package/es/el-select-0785c35a.cjs +0 -1
  135. package/es/el-table-column-2478adf8.cjs +0 -14
  136. package/es/el-tag-13ee17b3.cjs +0 -1
  137. package/es/el-tag-73372c6c.js +0 -359
  138. package/es/index-07b61d12.cjs +0 -1
  139. package/es/index-65b719a4.cjs +0 -1
  140. package/es/index-8b5fbc11.js +0 -66
  141. package/es/index-8c85d7c5.js +0 -858
  142. package/es/index-a49f4743.cjs +0 -2
package/es/KlineBasic.js CHANGED
@@ -1,296 +1,305 @@
1
- import { u as de, _ as Le, w as et, F as Ye, D as Ne, K as ht, b as He, t as Te, n as ve, x as Ge, d as Ie, v as gt, l as Qe, J as tt, I as ze } from "./base-674a354a.js";
2
- import { f as yt, E as bt } from "./el-overlay-f0757cc4.js";
3
- import { m as Mt } from "./el-input-d249ac86.js";
4
- import { E as xt } from "./el-input-number-2066fbb7.js";
5
- import { T as _t, E as wt } from "./el-button-7b9f5933.js";
6
- import { E as St } from "./el-empty-39b3aed7.js";
1
+ import "./base-437d17f3.js";
2
+ import { E as Ae } from "./el-overlay-12dd9b35.js";
3
+ import "./el-input-4961b99f.js";
4
+ import { E as Re } from "./el-input-number-610fc8ba.js";
5
+ import { E as Ve } from "./el-button-e1665717.js";
6
+ import { E as Ee } from "./el-empty-bacc6613.js";
7
+ import { E as Be, a as Ie } from "./el-menu-item-7d04c11a.js";
7
8
  import "./el-tooltip-4ed993c7.js";
8
- import { E as nt, d as $t } from "./el-scrollbar-35bac6b3.js";
9
- import { defineComponent as fe, openBlock as z, createBlock as xe, Transition as ot, mergeProps as at, unref as Yt, toHandlers as kt, withCtx as G, renderSlot as ce, computed as V, getCurrentInstance as je, inject as Oe, ref as N, reactive as qe, watch as ye, provide as Re, onMounted as _e, onBeforeUnmount as st, h as X, Fragment as pe, withDirectives as rt, vShow as Dt, watchEffect as Tt, nextTick as Ue, toRef as It, resolveComponent as Ot, createElementBlock as K, normalizeClass as Ce, createElementVNode as re, createTextVNode as he, toDisplayString as Ee, renderList as Ze, normalizeStyle as Ke, createVNode as J, onUnmounted as it, createCommentVNode as be, pushScopeId as Ct, popScopeId as Et } from "vue";
10
- import * as Ve from "echarts";
11
- import { y as Lt, v as Pt, U as Nt, K as At, V as we, x as Xe, D as Bt } from "./index-8542fe24.js";
12
- import { E as ke } from "./el-message-9859835d.js";
13
- import { _ as Se } from "./_plugin-vue_export-helper-dad06003.js";
14
- import { C as Ft } from "./el-tag-73372c6c.js";
15
- import { E as Rt, a as Vt } from "./el-select-bcbb7e55.js";
16
- import { b as le, $ as De, g as Wt, X as Ht, E as lt, i as ge, a0 as zt } from "./index-8c85d7c5.js";
17
- import "./scroll-cb696ed2.js";
18
- import "./config-provider-419ffbf2.js";
19
- import "./index-8b5fbc11.js";
20
- import "./index-45de4a12.js";
21
- var jt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
22
- function qt(e) {
23
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
9
+ import "./el-popper-50100766.js";
10
+ import { defineComponent as we, openBlock as j, createElementBlock as U, Fragment as ge, renderList as _e, normalizeStyle as Ye, toDisplayString as ve, computed as ce, createVNode as z, ref as H, onMounted as $e, onUnmounted as Se, nextTick as ke, createElementVNode as ne, withCtx as te, createBlock as Te, createCommentVNode as le, renderSlot as Me, watch as We, createTextVNode as me, pushScopeId as Ne, popScopeId as Pe } from "vue";
11
+ import * as be from "echarts";
12
+ import { y as Ce, v as He, U as je, K as qe, V as de, x as De, D as ze } from "./index-8542fe24.js";
13
+ import { E as ye } from "./el-message-c3b3ac96.js";
14
+ import { _ as fe } from "./_plugin-vue_export-helper-dad06003.js";
15
+ import "./el-tag-985d9aff.js";
16
+ import { E as Ue, a as Ze } from "./el-select-9381b156.js";
17
+ import "./el-scrollbar-562d0595.js";
18
+ import "./vnode-7dfd4ed5.js";
19
+ import "./index-0cb48e01.js";
20
+ import "./use-form-common-props-f377e500.js";
21
+ import "./scroll-387fcfdb.js";
22
+ import "./index-09e01b1d.js";
23
+ import "./typescript-7ae59c4c.js";
24
+ import "./index-a902a0d9.js";
25
+ import "./index-657047bb.js";
26
+ import "./config-provider-55482a43.js";
27
+ import "./index-39ec9741.js";
28
+ import "./castArray-4251bbe4.js";
29
+ import "./debounce-ac30be50.js";
30
+ var Ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
31
+ function Xe(i) {
32
+ return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
24
33
  }
25
- var ut = { exports: {} };
26
- (function(e, c) {
27
- (function(i, g) {
28
- e.exports = g();
29
- })(jt, function() {
30
- var i = 1e3, g = 6e4, n = 36e5, r = "millisecond", M = "second", S = "minute", d = "hour", y = "day", _ = "week", f = "month", v = "quarter", $ = "year", Y = "date", R = "Invalid Date", O = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, j = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, E = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(b) {
31
- var a = ["th", "st", "nd", "rd"], o = b % 100;
32
- return "[" + b + (a[(o - 20) % 10] || a[o] || a[0]) + "]";
33
- } }, Z = function(b, a, o) {
34
- var l = String(b);
35
- return !l || l.length >= a ? b : "" + Array(a + 1 - l.length).join(o) + b;
36
- }, k = { s: Z, z: function(b) {
37
- var a = -b.utcOffset(), o = Math.abs(a), l = Math.floor(o / 60), u = o % 60;
38
- return (a <= 0 ? "+" : "-") + Z(l, 2, "0") + ":" + Z(u, 2, "0");
39
- }, m: function b(a, o) {
40
- if (a.date() < o.date())
41
- return -b(o, a);
42
- var l = 12 * (o.year() - a.year()) + (o.month() - a.month()), u = a.clone().add(l, f), p = o - u < 0, t = a.clone().add(l + (p ? -1 : 1), f);
43
- return +(-(l + (o - u) / (p ? u - t : t - u)) || 0);
44
- }, a: function(b) {
45
- return b < 0 ? Math.ceil(b) || 0 : Math.floor(b);
46
- }, p: function(b) {
47
- return { M: f, y: $, w: _, d: y, D: Y, h: d, m: S, s: M, ms: r, Q: v }[b] || String(b || "").toLowerCase().replace(/s$/, "");
48
- }, u: function(b) {
49
- return b === void 0;
50
- } }, q = "en", L = {};
51
- L[q] = E;
52
- var Q = "$isDayjsObject", U = function(b) {
53
- return b instanceof te || !(!b || !b[Q]);
54
- }, ee = function b(a, o, l) {
55
- var u;
34
+ var Le = { exports: {} };
35
+ (function(i, B) {
36
+ (function(I, L) {
37
+ i.exports = L();
38
+ })(Ke, function() {
39
+ var I = 1e3, L = 6e4, S = 36e5, e = "millisecond", $ = "second", Y = "minute", g = "hour", x = "day", k = "week", s = "month", c = "quarter", D = "year", h = "date", W = "Invalid Date", A = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, q = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, E = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(u) {
40
+ var a = ["th", "st", "nd", "rd"], r = u % 100;
41
+ return "[" + u + (a[(r - 20) % 10] || a[r] || a[0]) + "]";
42
+ } }, Z = function(u, a, r) {
43
+ var l = String(u);
44
+ return !l || l.length >= a ? u : "" + Array(a + 1 - l.length).join(r) + u;
45
+ }, v = { s: Z, z: function(u) {
46
+ var a = -u.utcOffset(), r = Math.abs(a), l = Math.floor(r / 60), o = r % 60;
47
+ return (a <= 0 ? "+" : "-") + Z(l, 2, "0") + ":" + Z(o, 2, "0");
48
+ }, m: function u(a, r) {
49
+ if (a.date() < r.date())
50
+ return -u(r, a);
51
+ var l = 12 * (r.year() - a.year()) + (r.month() - a.month()), o = a.clone().add(l, s), m = r - o < 0, n = a.clone().add(l + (m ? -1 : 1), s);
52
+ return +(-(l + (r - o) / (m ? o - n : n - o)) || 0);
53
+ }, a: function(u) {
54
+ return u < 0 ? Math.ceil(u) || 0 : Math.floor(u);
55
+ }, p: function(u) {
56
+ return { M: s, y: D, w: k, d: x, D: h, h: g, m: Y, s: $, ms: e, Q: c }[u] || String(u || "").toLowerCase().replace(/s$/, "");
57
+ }, u: function(u) {
58
+ return u === void 0;
59
+ } }, C = "en", P = {};
60
+ P[C] = E;
61
+ var oe = "$isDayjsObject", K = function(u) {
62
+ return u instanceof ie || !(!u || !u[oe]);
63
+ }, ae = function u(a, r, l) {
64
+ var o;
56
65
  if (!a)
57
- return q;
66
+ return C;
58
67
  if (typeof a == "string") {
59
- var p = a.toLowerCase();
60
- L[p] && (u = p), o && (L[p] = o, u = p);
61
- var t = a.split("-");
62
- if (!u && t.length > 1)
63
- return b(t[0]);
68
+ var m = a.toLowerCase();
69
+ P[m] && (o = m), r && (P[m] = r, o = m);
70
+ var n = a.split("-");
71
+ if (!o && n.length > 1)
72
+ return u(n[0]);
64
73
  } else {
65
- var s = a.name;
66
- L[s] = a, u = s;
74
+ var t = a.name;
75
+ P[t] = a, o = t;
67
76
  }
68
- return !l && u && (q = u), u || !l && q;
69
- }, A = function(b, a) {
70
- if (U(b))
71
- return b.clone();
72
- var o = typeof a == "object" ? a : {};
73
- return o.date = b, o.args = arguments, new te(o);
74
- }, D = k;
75
- D.l = ee, D.i = U, D.w = function(b, a) {
76
- return A(b, { locale: a.$L, utc: a.$u, x: a.$x, $offset: a.$offset });
77
+ return !l && o && (C = o), o || !l && C;
78
+ }, N = function(u, a) {
79
+ if (K(u))
80
+ return u.clone();
81
+ var r = typeof a == "object" ? a : {};
82
+ return r.date = u, r.args = arguments, new ie(r);
83
+ }, _ = v;
84
+ _.l = ae, _.i = K, _.w = function(u, a) {
85
+ return N(u, { locale: a.$L, utc: a.$u, x: a.$x, $offset: a.$offset });
77
86
  };
78
- var te = function() {
79
- function b(o) {
80
- this.$L = ee(o.locale, null, !0), this.parse(o), this.$x = this.$x || o.x || {}, this[Q] = !0;
87
+ var ie = function() {
88
+ function u(r) {
89
+ this.$L = ae(r.locale, null, !0), this.parse(r), this.$x = this.$x || r.x || {}, this[oe] = !0;
81
90
  }
82
- var a = b.prototype;
83
- return a.parse = function(o) {
91
+ var a = u.prototype;
92
+ return a.parse = function(r) {
84
93
  this.$d = function(l) {
85
- var u = l.date, p = l.utc;
86
- if (u === null)
94
+ var o = l.date, m = l.utc;
95
+ if (o === null)
87
96
  return /* @__PURE__ */ new Date(NaN);
88
- if (D.u(u))
97
+ if (_.u(o))
89
98
  return /* @__PURE__ */ new Date();
90
- if (u instanceof Date)
91
- return new Date(u);
92
- if (typeof u == "string" && !/Z$/i.test(u)) {
93
- var t = u.match(O);
94
- if (t) {
95
- var s = t[2] - 1 || 0, m = (t[7] || "0").substring(0, 3);
96
- return p ? new Date(Date.UTC(t[1], s, t[3] || 1, t[4] || 0, t[5] || 0, t[6] || 0, m)) : new Date(t[1], s, t[3] || 1, t[4] || 0, t[5] || 0, t[6] || 0, m);
99
+ if (o instanceof Date)
100
+ return new Date(o);
101
+ if (typeof o == "string" && !/Z$/i.test(o)) {
102
+ var n = o.match(A);
103
+ if (n) {
104
+ var t = n[2] - 1 || 0, d = (n[7] || "0").substring(0, 3);
105
+ return m ? new Date(Date.UTC(n[1], t, n[3] || 1, n[4] || 0, n[5] || 0, n[6] || 0, d)) : new Date(n[1], t, n[3] || 1, n[4] || 0, n[5] || 0, n[6] || 0, d);
97
106
  }
98
107
  }
99
- return new Date(u);
100
- }(o), this.init();
108
+ return new Date(o);
109
+ }(r), this.init();
101
110
  }, a.init = function() {
102
- var o = this.$d;
103
- this.$y = o.getFullYear(), this.$M = o.getMonth(), this.$D = o.getDate(), this.$W = o.getDay(), this.$H = o.getHours(), this.$m = o.getMinutes(), this.$s = o.getSeconds(), this.$ms = o.getMilliseconds();
111
+ var r = this.$d;
112
+ this.$y = r.getFullYear(), this.$M = r.getMonth(), this.$D = r.getDate(), this.$W = r.getDay(), this.$H = r.getHours(), this.$m = r.getMinutes(), this.$s = r.getSeconds(), this.$ms = r.getMilliseconds();
104
113
  }, a.$utils = function() {
105
- return D;
114
+ return _;
106
115
  }, a.isValid = function() {
107
- return this.$d.toString() !== R;
108
- }, a.isSame = function(o, l) {
109
- var u = A(o);
110
- return this.startOf(l) <= u && u <= this.endOf(l);
111
- }, a.isAfter = function(o, l) {
112
- return A(o) < this.startOf(l);
113
- }, a.isBefore = function(o, l) {
114
- return this.endOf(l) < A(o);
115
- }, a.$g = function(o, l, u) {
116
- return D.u(o) ? this[l] : this.set(u, o);
116
+ return this.$d.toString() !== W;
117
+ }, a.isSame = function(r, l) {
118
+ var o = N(r);
119
+ return this.startOf(l) <= o && o <= this.endOf(l);
120
+ }, a.isAfter = function(r, l) {
121
+ return N(r) < this.startOf(l);
122
+ }, a.isBefore = function(r, l) {
123
+ return this.endOf(l) < N(r);
124
+ }, a.$g = function(r, l, o) {
125
+ return _.u(r) ? this[l] : this.set(o, r);
117
126
  }, a.unix = function() {
118
127
  return Math.floor(this.valueOf() / 1e3);
119
128
  }, a.valueOf = function() {
120
129
  return this.$d.getTime();
121
- }, a.startOf = function(o, l) {
122
- var u = this, p = !!D.u(l) || l, t = D.p(o), s = function(C, F) {
123
- var ne = D.w(u.$u ? Date.UTC(u.$y, F, C) : new Date(u.$y, F, C), u);
124
- return p ? ne : ne.endOf(y);
125
- }, m = function(C, F) {
126
- return D.w(u.toDate()[C].apply(u.toDate("s"), (p ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(F)), u);
127
- }, h = this.$W, w = this.$M, x = this.$D, T = "set" + (this.$u ? "UTC" : "");
128
- switch (t) {
129
- case $:
130
- return p ? s(1, 0) : s(31, 11);
131
- case f:
132
- return p ? s(1, w) : s(0, w + 1);
133
- case _:
134
- var B = this.$locale().weekStart || 0, W = (h < B ? h + 7 : h) - B;
135
- return s(p ? x - W : x + (6 - W), w);
136
- case y:
130
+ }, a.startOf = function(r, l) {
131
+ var o = this, m = !!_.u(l) || l, n = _.p(r), t = function(w, F) {
132
+ var X = _.w(o.$u ? Date.UTC(o.$y, F, w) : new Date(o.$y, F, w), o);
133
+ return m ? X : X.endOf(x);
134
+ }, d = function(w, F) {
135
+ return _.w(o.toDate()[w].apply(o.toDate("s"), (m ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(F)), o);
136
+ }, f = this.$W, y = this.$M, p = this.$D, M = "set" + (this.$u ? "UTC" : "");
137
+ switch (n) {
138
+ case D:
139
+ return m ? t(1, 0) : t(31, 11);
140
+ case s:
141
+ return m ? t(1, y) : t(0, y + 1);
142
+ case k:
143
+ var O = this.$locale().weekStart || 0, R = (f < O ? f + 7 : f) - O;
144
+ return t(m ? p - R : p + (6 - R), y);
145
+ case x:
146
+ case h:
147
+ return d(M + "Hours", 0);
148
+ case g:
149
+ return d(M + "Minutes", 1);
137
150
  case Y:
138
- return m(T + "Hours", 0);
139
- case d:
140
- return m(T + "Minutes", 1);
141
- case S:
142
- return m(T + "Seconds", 2);
143
- case M:
144
- return m(T + "Milliseconds", 3);
151
+ return d(M + "Seconds", 2);
152
+ case $:
153
+ return d(M + "Milliseconds", 3);
145
154
  default:
146
155
  return this.clone();
147
156
  }
148
- }, a.endOf = function(o) {
149
- return this.startOf(o, !1);
150
- }, a.$set = function(o, l) {
151
- var u, p = D.p(o), t = "set" + (this.$u ? "UTC" : ""), s = (u = {}, u[y] = t + "Date", u[Y] = t + "Date", u[f] = t + "Month", u[$] = t + "FullYear", u[d] = t + "Hours", u[S] = t + "Minutes", u[M] = t + "Seconds", u[r] = t + "Milliseconds", u)[p], m = p === y ? this.$D + (l - this.$W) : l;
152
- if (p === f || p === $) {
153
- var h = this.clone().set(Y, 1);
154
- h.$d[s](m), h.init(), this.$d = h.set(Y, Math.min(this.$D, h.daysInMonth())).$d;
157
+ }, a.endOf = function(r) {
158
+ return this.startOf(r, !1);
159
+ }, a.$set = function(r, l) {
160
+ var o, m = _.p(r), n = "set" + (this.$u ? "UTC" : ""), t = (o = {}, o[x] = n + "Date", o[h] = n + "Date", o[s] = n + "Month", o[D] = n + "FullYear", o[g] = n + "Hours", o[Y] = n + "Minutes", o[$] = n + "Seconds", o[e] = n + "Milliseconds", o)[m], d = m === x ? this.$D + (l - this.$W) : l;
161
+ if (m === s || m === D) {
162
+ var f = this.clone().set(h, 1);
163
+ f.$d[t](d), f.init(), this.$d = f.set(h, Math.min(this.$D, f.daysInMonth())).$d;
155
164
  } else
156
- s && this.$d[s](m);
165
+ t && this.$d[t](d);
157
166
  return this.init(), this;
158
- }, a.set = function(o, l) {
159
- return this.clone().$set(o, l);
160
- }, a.get = function(o) {
161
- return this[D.p(o)]();
162
- }, a.add = function(o, l) {
163
- var u, p = this;
164
- o = Number(o);
165
- var t = D.p(l), s = function(w) {
166
- var x = A(p);
167
- return D.w(x.date(x.date() + Math.round(w * o)), p);
167
+ }, a.set = function(r, l) {
168
+ return this.clone().$set(r, l);
169
+ }, a.get = function(r) {
170
+ return this[_.p(r)]();
171
+ }, a.add = function(r, l) {
172
+ var o, m = this;
173
+ r = Number(r);
174
+ var n = _.p(l), t = function(y) {
175
+ var p = N(m);
176
+ return _.w(p.date(p.date() + Math.round(y * r)), m);
168
177
  };
169
- if (t === f)
170
- return this.set(f, this.$M + o);
171
- if (t === $)
172
- return this.set($, this.$y + o);
173
- if (t === y)
174
- return s(1);
175
- if (t === _)
176
- return s(7);
177
- var m = (u = {}, u[S] = g, u[d] = n, u[M] = i, u)[t] || 1, h = this.$d.getTime() + o * m;
178
- return D.w(h, this);
179
- }, a.subtract = function(o, l) {
180
- return this.add(-1 * o, l);
181
- }, a.format = function(o) {
182
- var l = this, u = this.$locale();
178
+ if (n === s)
179
+ return this.set(s, this.$M + r);
180
+ if (n === D)
181
+ return this.set(D, this.$y + r);
182
+ if (n === x)
183
+ return t(1);
184
+ if (n === k)
185
+ return t(7);
186
+ var d = (o = {}, o[Y] = L, o[g] = S, o[$] = I, o)[n] || 1, f = this.$d.getTime() + r * d;
187
+ return _.w(f, this);
188
+ }, a.subtract = function(r, l) {
189
+ return this.add(-1 * r, l);
190
+ }, a.format = function(r) {
191
+ var l = this, o = this.$locale();
183
192
  if (!this.isValid())
184
- return u.invalidDate || R;
185
- var p = o || "YYYY-MM-DDTHH:mm:ssZ", t = D.z(this), s = this.$H, m = this.$m, h = this.$M, w = u.weekdays, x = u.months, T = u.meridiem, B = function(F, ne, oe, H) {
186
- return F && (F[ne] || F(l, p)) || oe[ne].slice(0, H);
187
- }, W = function(F) {
188
- return D.s(s % 12 || 12, F, "0");
189
- }, C = T || function(F, ne, oe) {
190
- var H = F < 12 ? "AM" : "PM";
191
- return oe ? H.toLowerCase() : H;
193
+ return o.invalidDate || W;
194
+ var m = r || "YYYY-MM-DDTHH:mm:ssZ", n = _.z(this), t = this.$H, d = this.$m, f = this.$M, y = o.weekdays, p = o.months, M = o.meridiem, O = function(F, X, J, V) {
195
+ return F && (F[X] || F(l, m)) || J[X].slice(0, V);
196
+ }, R = function(F) {
197
+ return _.s(t % 12 || 12, F, "0");
198
+ }, w = M || function(F, X, J) {
199
+ var V = F < 12 ? "AM" : "PM";
200
+ return J ? V.toLowerCase() : V;
192
201
  };
193
- return p.replace(j, function(F, ne) {
194
- return ne || function(oe) {
195
- switch (oe) {
202
+ return m.replace(q, function(F, X) {
203
+ return X || function(J) {
204
+ switch (J) {
196
205
  case "YY":
197
206
  return String(l.$y).slice(-2);
198
207
  case "YYYY":
199
- return D.s(l.$y, 4, "0");
208
+ return _.s(l.$y, 4, "0");
200
209
  case "M":
201
- return h + 1;
210
+ return f + 1;
202
211
  case "MM":
203
- return D.s(h + 1, 2, "0");
212
+ return _.s(f + 1, 2, "0");
204
213
  case "MMM":
205
- return B(u.monthsShort, h, x, 3);
214
+ return O(o.monthsShort, f, p, 3);
206
215
  case "MMMM":
207
- return B(x, h);
216
+ return O(p, f);
208
217
  case "D":
209
218
  return l.$D;
210
219
  case "DD":
211
- return D.s(l.$D, 2, "0");
220
+ return _.s(l.$D, 2, "0");
212
221
  case "d":
213
222
  return String(l.$W);
214
223
  case "dd":
215
- return B(u.weekdaysMin, l.$W, w, 2);
224
+ return O(o.weekdaysMin, l.$W, y, 2);
216
225
  case "ddd":
217
- return B(u.weekdaysShort, l.$W, w, 3);
226
+ return O(o.weekdaysShort, l.$W, y, 3);
218
227
  case "dddd":
219
- return w[l.$W];
228
+ return y[l.$W];
220
229
  case "H":
221
- return String(s);
230
+ return String(t);
222
231
  case "HH":
223
- return D.s(s, 2, "0");
232
+ return _.s(t, 2, "0");
224
233
  case "h":
225
- return W(1);
234
+ return R(1);
226
235
  case "hh":
227
- return W(2);
236
+ return R(2);
228
237
  case "a":
229
- return C(s, m, !0);
238
+ return w(t, d, !0);
230
239
  case "A":
231
- return C(s, m, !1);
240
+ return w(t, d, !1);
232
241
  case "m":
233
- return String(m);
242
+ return String(d);
234
243
  case "mm":
235
- return D.s(m, 2, "0");
244
+ return _.s(d, 2, "0");
236
245
  case "s":
237
246
  return String(l.$s);
238
247
  case "ss":
239
- return D.s(l.$s, 2, "0");
248
+ return _.s(l.$s, 2, "0");
240
249
  case "SSS":
241
- return D.s(l.$ms, 3, "0");
250
+ return _.s(l.$ms, 3, "0");
242
251
  case "Z":
243
- return t;
252
+ return n;
244
253
  }
245
254
  return null;
246
- }(F) || t.replace(":", "");
255
+ }(F) || n.replace(":", "");
247
256
  });
248
257
  }, a.utcOffset = function() {
249
258
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
250
- }, a.diff = function(o, l, u) {
251
- var p, t = this, s = D.p(l), m = A(o), h = (m.utcOffset() - this.utcOffset()) * g, w = this - m, x = function() {
252
- return D.m(t, m);
259
+ }, a.diff = function(r, l, o) {
260
+ var m, n = this, t = _.p(l), d = N(r), f = (d.utcOffset() - this.utcOffset()) * L, y = this - d, p = function() {
261
+ return _.m(n, d);
253
262
  };
254
- switch (s) {
255
- case $:
256
- p = x() / 12;
263
+ switch (t) {
264
+ case D:
265
+ m = p() / 12;
257
266
  break;
258
- case f:
259
- p = x();
267
+ case s:
268
+ m = p();
260
269
  break;
261
- case v:
262
- p = x() / 3;
270
+ case c:
271
+ m = p() / 3;
263
272
  break;
264
- case _:
265
- p = (w - h) / 6048e5;
273
+ case k:
274
+ m = (y - f) / 6048e5;
266
275
  break;
267
- case y:
268
- p = (w - h) / 864e5;
276
+ case x:
277
+ m = (y - f) / 864e5;
269
278
  break;
270
- case d:
271
- p = w / n;
279
+ case g:
280
+ m = y / S;
272
281
  break;
273
- case S:
274
- p = w / g;
282
+ case Y:
283
+ m = y / L;
275
284
  break;
276
- case M:
277
- p = w / i;
285
+ case $:
286
+ m = y / I;
278
287
  break;
279
288
  default:
280
- p = w;
289
+ m = y;
281
290
  }
282
- return u ? p : D.a(p);
291
+ return o ? m : _.a(m);
283
292
  }, a.daysInMonth = function() {
284
- return this.endOf(f).$D;
293
+ return this.endOf(s).$D;
285
294
  }, a.$locale = function() {
286
- return L[this.$L];
287
- }, a.locale = function(o, l) {
288
- if (!o)
295
+ return P[this.$L];
296
+ }, a.locale = function(r, l) {
297
+ if (!r)
289
298
  return this.$L;
290
- var u = this.clone(), p = ee(o, l, !0);
291
- return p && (u.$L = p), u;
299
+ var o = this.clone(), m = ae(r, l, !0);
300
+ return m && (o.$L = m), o;
292
301
  }, a.clone = function() {
293
- return D.w(this.$d, this);
302
+ return _.w(this.$d, this);
294
303
  }, a.toDate = function() {
295
304
  return new Date(this.valueOf());
296
305
  }, a.toJSON = function() {
@@ -299,806 +308,50 @@ var ut = { exports: {} };
299
308
  return this.$d.toISOString();
300
309
  }, a.toString = function() {
301
310
  return this.$d.toUTCString();
302
- }, b;
303
- }(), ue = te.prototype;
304
- return A.prototype = ue, [["$ms", r], ["$s", M], ["$m", S], ["$H", d], ["$W", y], ["$M", f], ["$y", $], ["$D", Y]].forEach(function(b) {
305
- ue[b[1]] = function(a) {
306
- return this.$g(a, b[0], b[1]);
311
+ }, u;
312
+ }(), se = ie.prototype;
313
+ return N.prototype = se, [["$ms", e], ["$s", $], ["$m", Y], ["$H", g], ["$W", x], ["$M", s], ["$y", D], ["$D", h]].forEach(function(u) {
314
+ se[u[1]] = function(a) {
315
+ return this.$g(a, u[0], u[1]);
307
316
  };
308
- }), A.extend = function(b, a) {
309
- return b.$i || (b(a, te, A), b.$i = !0), A;
310
- }, A.locale = ee, A.isDayjs = U, A.unix = function(b) {
311
- return A(1e3 * b);
312
- }, A.en = L[q], A.Ls = L, A.p = {}, A;
317
+ }), N.extend = function(u, a) {
318
+ return u.$i || (u(a, ie, N), u.$i = !0), N;
319
+ }, N.locale = ae, N.isDayjs = K, N.unix = function(u) {
320
+ return N(1e3 * u);
321
+ }, N.en = P[C], N.Ls = P, N.p = {}, N;
313
322
  });
314
- })(ut);
315
- var Ut = ut.exports;
316
- const I = /* @__PURE__ */ qt(Ut), Zt = fe({
317
- name: "ElCollapseTransition"
318
- }), Kt = /* @__PURE__ */ fe({
319
- ...Zt,
320
- setup(e) {
321
- const c = de("collapse-transition"), i = (n) => {
322
- n.style.maxHeight = "", n.style.overflow = n.dataset.oldOverflow, n.style.paddingTop = n.dataset.oldPaddingTop, n.style.paddingBottom = n.dataset.oldPaddingBottom;
323
- }, g = {
324
- beforeEnter(n) {
325
- n.dataset || (n.dataset = {}), n.dataset.oldPaddingTop = n.style.paddingTop, n.dataset.oldPaddingBottom = n.style.paddingBottom, n.style.height && (n.dataset.elExistsHeight = n.style.height), n.style.maxHeight = 0, n.style.paddingTop = 0, n.style.paddingBottom = 0;
326
- },
327
- enter(n) {
328
- requestAnimationFrame(() => {
329
- n.dataset.oldOverflow = n.style.overflow, n.dataset.elExistsHeight ? n.style.maxHeight = n.dataset.elExistsHeight : n.scrollHeight !== 0 ? n.style.maxHeight = `${n.scrollHeight}px` : n.style.maxHeight = 0, n.style.paddingTop = n.dataset.oldPaddingTop, n.style.paddingBottom = n.dataset.oldPaddingBottom, n.style.overflow = "hidden";
330
- });
331
- },
332
- afterEnter(n) {
333
- n.style.maxHeight = "", n.style.overflow = n.dataset.oldOverflow;
334
- },
335
- enterCancelled(n) {
336
- i(n);
337
- },
338
- beforeLeave(n) {
339
- n.dataset || (n.dataset = {}), n.dataset.oldPaddingTop = n.style.paddingTop, n.dataset.oldPaddingBottom = n.style.paddingBottom, n.dataset.oldOverflow = n.style.overflow, n.style.maxHeight = `${n.scrollHeight}px`, n.style.overflow = "hidden";
340
- },
341
- leave(n) {
342
- n.scrollHeight !== 0 && (n.style.maxHeight = 0, n.style.paddingTop = 0, n.style.paddingBottom = 0);
343
- },
344
- afterLeave(n) {
345
- i(n);
346
- },
347
- leaveCancelled(n) {
348
- i(n);
349
- }
350
- };
351
- return (n, r) => (z(), xe(ot, at({
352
- name: Yt(c).b()
353
- }, kt(g)), {
354
- default: G(() => [
355
- ce(n.$slots, "default")
356
- ]),
357
- _: 3
358
- }, 16, ["name"]));
359
- }
360
- });
361
- var Xt = /* @__PURE__ */ Le(Kt, [["__file", "collapse-transition.vue"]]);
362
- const Jt = et(Xt);
363
- let Gt = class {
364
- constructor(c, i) {
365
- this.parent = c, this.domNode = i, this.subIndex = 0, this.subIndex = 0, this.init();
366
- }
367
- init() {
368
- this.subMenuItems = this.domNode.querySelectorAll("li"), this.addListeners();
369
- }
370
- gotoSubIndex(c) {
371
- c === this.subMenuItems.length ? c = 0 : c < 0 && (c = this.subMenuItems.length - 1), this.subMenuItems[c].focus(), this.subIndex = c;
372
- }
373
- addListeners() {
374
- const c = this.parent.domNode;
375
- Array.prototype.forEach.call(this.subMenuItems, (i) => {
376
- i.addEventListener("keydown", (g) => {
377
- let n = !1;
378
- switch (g.code) {
379
- case le.down: {
380
- this.gotoSubIndex(this.subIndex + 1), n = !0;
381
- break;
382
- }
383
- case le.up: {
384
- this.gotoSubIndex(this.subIndex - 1), n = !0;
385
- break;
386
- }
387
- case le.tab: {
388
- De(c, "mouseleave");
389
- break;
390
- }
391
- case le.enter:
392
- case le.numpadEnter:
393
- case le.space: {
394
- n = !0, g.currentTarget.click();
395
- break;
396
- }
397
- }
398
- return n && (g.preventDefault(), g.stopPropagation()), !1;
399
- });
400
- });
401
- }
402
- }, Qt = class {
403
- constructor(c, i) {
404
- this.domNode = c, this.submenu = null, this.submenu = null, this.init(i);
405
- }
406
- init(c) {
407
- this.domNode.setAttribute("tabindex", "0");
408
- const i = this.domNode.querySelector(`.${c}-menu`);
409
- i && (this.submenu = new Gt(this, i)), this.addListeners();
410
- }
411
- addListeners() {
412
- this.domNode.addEventListener("keydown", (c) => {
413
- let i = !1;
414
- switch (c.code) {
415
- case le.down: {
416
- De(c.currentTarget, "mouseenter"), this.submenu && this.submenu.gotoSubIndex(0), i = !0;
417
- break;
418
- }
419
- case le.up: {
420
- De(c.currentTarget, "mouseenter"), this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1), i = !0;
421
- break;
422
- }
423
- case le.tab: {
424
- De(c.currentTarget, "mouseleave");
425
- break;
426
- }
427
- case le.enter:
428
- case le.numpadEnter:
429
- case le.space: {
430
- i = !0, c.currentTarget.click();
431
- break;
432
- }
433
- }
434
- i && c.preventDefault();
435
- });
436
- }
437
- }, en = class {
438
- constructor(c, i) {
439
- this.domNode = c, this.init(i);
440
- }
441
- init(c) {
442
- const i = this.domNode.childNodes;
443
- Array.from(i).forEach((g) => {
444
- g.nodeType === 1 && new Qt(g, c);
445
- });
446
- }
447
- };
448
- const tn = fe({
449
- name: "ElMenuCollapseTransition",
450
- setup() {
451
- const e = de("menu");
452
- return {
453
- listeners: {
454
- onBeforeEnter: (i) => i.style.opacity = "0.2",
455
- onEnter(i, g) {
456
- Ye(i, `${e.namespace.value}-opacity-transition`), i.style.opacity = "1", g();
457
- },
458
- onAfterEnter(i) {
459
- Ne(i, `${e.namespace.value}-opacity-transition`), i.style.opacity = "";
460
- },
461
- onBeforeLeave(i) {
462
- i.dataset || (i.dataset = {}), ht(i, e.m("collapse")) ? (Ne(i, e.m("collapse")), i.dataset.oldOverflow = i.style.overflow, i.dataset.scrollWidth = i.clientWidth.toString(), Ye(i, e.m("collapse"))) : (Ye(i, e.m("collapse")), i.dataset.oldOverflow = i.style.overflow, i.dataset.scrollWidth = i.clientWidth.toString(), Ne(i, e.m("collapse"))), i.style.width = `${i.scrollWidth}px`, i.style.overflow = "hidden";
463
- },
464
- onLeave(i) {
465
- Ye(i, "horizontal-collapse-transition"), i.style.width = `${i.dataset.scrollWidth}px`;
466
- }
467
- }
468
- };
469
- }
470
- });
471
- function nn(e, c, i, g, n, r) {
472
- return z(), xe(ot, at({ mode: "out-in" }, e.listeners), {
473
- default: G(() => [
474
- ce(e.$slots, "default")
475
- ]),
476
- _: 3
477
- }, 16);
478
- }
479
- var on = /* @__PURE__ */ Le(tn, [["render", nn], ["__file", "menu-collapse-transition.vue"]]);
480
- function ct(e, c) {
481
- const i = V(() => {
482
- let n = e.parent;
483
- const r = [c.value];
484
- for (; n.type.name !== "ElMenu"; )
485
- n.props.index && r.unshift(n.props.index), n = n.parent;
486
- return r;
487
- });
488
- return {
489
- parentMenu: V(() => {
490
- let n = e.parent;
491
- for (; n && !["ElMenu", "ElSubMenu"].includes(n.type.name); )
492
- n = n.parent;
493
- return n;
494
- }),
495
- indexPath: i
496
- };
497
- }
498
- function an(e) {
499
- return V(() => {
500
- const i = e.backgroundColor;
501
- return i ? new _t(i).shade(20).toString() : "";
502
- });
503
- }
504
- const dt = (e, c) => {
505
- const i = de("menu");
506
- return V(() => i.cssVarBlock({
507
- "text-color": e.textColor || "",
508
- "hover-text-color": e.textColor || "",
509
- "bg-color": e.backgroundColor || "",
510
- "hover-bg-color": an(e).value || "",
511
- "active-color": e.activeTextColor || "",
512
- level: `${c}`
513
- }));
514
- }, sn = He({
515
- index: {
516
- type: String,
517
- required: !0
518
- },
519
- showTimeout: Number,
520
- hideTimeout: Number,
521
- popperClass: String,
522
- disabled: Boolean,
523
- teleported: {
524
- type: Boolean,
525
- default: void 0
526
- },
527
- popperOffset: Number,
528
- expandCloseIcon: {
529
- type: ge
530
- },
531
- expandOpenIcon: {
532
- type: ge
533
- },
534
- collapseCloseIcon: {
535
- type: ge
536
- },
537
- collapseOpenIcon: {
538
- type: ge
539
- }
540
- }), Ae = "ElSubMenu";
541
- var Je = fe({
542
- name: Ae,
543
- props: sn,
544
- setup(e, { slots: c, expose: i }) {
545
- const g = je(), { indexPath: n, parentMenu: r } = ct(g, V(() => e.index)), M = de("menu"), S = de("sub-menu"), d = Oe("rootMenu");
546
- d || Te(Ae, "can not inject root menu");
547
- const y = Oe(`subMenu:${r.value.uid}`);
548
- y || Te(Ae, "can not inject sub menu");
549
- const _ = N({}), f = N({});
550
- let v;
551
- const $ = N(!1), Y = N(), R = N(null), O = V(() => U.value === "horizontal" && E.value ? "bottom-start" : "right-start"), j = V(() => U.value === "horizontal" && E.value || U.value === "vertical" && !d.props.collapse ? e.expandCloseIcon && e.expandOpenIcon ? L.value ? e.expandOpenIcon : e.expandCloseIcon : Wt : e.collapseCloseIcon && e.collapseOpenIcon ? L.value ? e.collapseOpenIcon : e.collapseCloseIcon : Ht), E = V(() => y.level === 0), Z = V(() => {
552
- const t = e.teleported;
553
- return t === void 0 ? E.value : t;
554
- }), k = V(() => d.props.collapse ? `${M.namespace.value}-zoom-in-left` : `${M.namespace.value}-zoom-in-top`), q = V(() => U.value === "horizontal" && E.value ? [
555
- "bottom-start",
556
- "bottom-end",
557
- "top-start",
558
- "top-end",
559
- "right-start",
560
- "left-start"
561
- ] : [
562
- "right-start",
563
- "right",
564
- "right-end",
565
- "left-start",
566
- "bottom-start",
567
- "bottom-end",
568
- "top-start",
569
- "top-end"
570
- ]), L = V(() => d.openedMenus.includes(e.index)), Q = V(() => {
571
- let t = !1;
572
- return Object.values(_.value).forEach((s) => {
573
- s.active && (t = !0);
574
- }), Object.values(f.value).forEach((s) => {
575
- s.active && (t = !0);
576
- }), t;
577
- }), U = V(() => d.props.mode), ee = qe({
578
- index: e.index,
579
- indexPath: n,
580
- active: Q
581
- }), A = dt(d.props, y.level + 1), D = V(() => {
582
- var t;
583
- return (t = e.popperOffset) != null ? t : d.props.popperOffset;
584
- }), te = V(() => {
585
- var t;
586
- return (t = e.popperClass) != null ? t : d.props.popperClass;
587
- }), ue = V(() => {
588
- var t;
589
- return (t = e.showTimeout) != null ? t : d.props.showTimeout;
590
- }), b = V(() => {
591
- var t;
592
- return (t = e.hideTimeout) != null ? t : d.props.hideTimeout;
593
- }), a = () => {
594
- var t, s, m;
595
- return (m = (s = (t = R.value) == null ? void 0 : t.popperRef) == null ? void 0 : s.popperInstanceRef) == null ? void 0 : m.destroy();
596
- }, o = (t) => {
597
- t || a();
598
- }, l = () => {
599
- d.props.menuTrigger === "hover" && d.props.mode === "horizontal" || d.props.collapse && d.props.mode === "vertical" || e.disabled || d.handleSubMenuClick({
600
- index: e.index,
601
- indexPath: n.value,
602
- active: Q.value
603
- });
604
- }, u = (t, s = ue.value) => {
605
- var m;
606
- if (t.type !== "focus") {
607
- if (d.props.menuTrigger === "click" && d.props.mode === "horizontal" || !d.props.collapse && d.props.mode === "vertical" || e.disabled) {
608
- y.mouseInChild.value = !0;
609
- return;
610
- }
611
- y.mouseInChild.value = !0, v == null || v(), { stop: v } = Ge(() => {
612
- d.openMenu(e.index, n.value);
613
- }, s), Z.value && ((m = r.value.vnode.el) == null || m.dispatchEvent(new MouseEvent("mouseenter")));
614
- }
615
- }, p = (t = !1) => {
616
- var s;
617
- if (d.props.menuTrigger === "click" && d.props.mode === "horizontal" || !d.props.collapse && d.props.mode === "vertical") {
618
- y.mouseInChild.value = !1;
619
- return;
620
- }
621
- v == null || v(), y.mouseInChild.value = !1, { stop: v } = Ge(() => !$.value && d.closeMenu(e.index, n.value), b.value), Z.value && t && ((s = y.handleMouseleave) == null || s.call(y, !0));
622
- };
623
- ye(() => d.props.collapse, (t) => o(!!t));
624
- {
625
- const t = (m) => {
626
- f.value[m.index] = m;
627
- }, s = (m) => {
628
- delete f.value[m.index];
629
- };
630
- Re(`subMenu:${g.uid}`, {
631
- addSubMenu: t,
632
- removeSubMenu: s,
633
- handleMouseleave: p,
634
- mouseInChild: $,
635
- level: y.level + 1
636
- });
637
- }
638
- return i({
639
- opened: L
640
- }), _e(() => {
641
- d.addSubMenu(ee), y.addSubMenu(ee);
642
- }), st(() => {
643
- y.removeSubMenu(ee), d.removeSubMenu(ee);
644
- }), () => {
645
- var t;
646
- const s = [
647
- (t = c.title) == null ? void 0 : t.call(c),
648
- X(lt, {
649
- class: S.e("icon-arrow"),
650
- style: {
651
- transform: L.value ? e.expandCloseIcon && e.expandOpenIcon || e.collapseCloseIcon && e.collapseOpenIcon && d.props.collapse ? "none" : "rotateZ(180deg)" : "none"
652
- }
653
- }, {
654
- default: () => ve(j.value) ? X(g.appContext.components[j.value]) : X(j.value)
655
- })
656
- ], m = d.isMenuPopup ? X(nt, {
657
- ref: R,
658
- visible: L.value,
659
- effect: "light",
660
- pure: !0,
661
- offset: D.value,
662
- showArrow: !1,
663
- persistent: !0,
664
- popperClass: te.value,
665
- placement: O.value,
666
- teleported: Z.value,
667
- fallbackPlacements: q.value,
668
- transition: k.value,
669
- gpuAcceleration: !1
670
- }, {
671
- content: () => {
672
- var h;
673
- return X("div", {
674
- class: [
675
- M.m(U.value),
676
- M.m("popup-container"),
677
- te.value
678
- ],
679
- onMouseenter: (w) => u(w, 100),
680
- onMouseleave: () => p(!0),
681
- onFocus: (w) => u(w, 100)
682
- }, [
683
- X("ul", {
684
- class: [
685
- M.b(),
686
- M.m("popup"),
687
- M.m(`popup-${O.value}`)
688
- ],
689
- style: A.value
690
- }, [(h = c.default) == null ? void 0 : h.call(c)])
691
- ]);
692
- },
693
- default: () => X("div", {
694
- class: S.e("title"),
695
- onClick: l
696
- }, s)
697
- }) : X(pe, {}, [
698
- X("div", {
699
- class: S.e("title"),
700
- ref: Y,
701
- onClick: l
702
- }, s),
703
- X(Jt, {}, {
704
- default: () => {
705
- var h;
706
- return rt(X("ul", {
707
- role: "menu",
708
- class: [M.b(), M.m("inline")],
709
- style: A.value
710
- }, [(h = c.default) == null ? void 0 : h.call(c)]), [[Dt, L.value]]);
711
- }
712
- })
713
- ]);
714
- return X("li", {
715
- class: [
716
- S.b(),
717
- S.is("active", Q.value),
718
- S.is("opened", L.value),
719
- S.is("disabled", e.disabled)
720
- ],
721
- role: "menuitem",
722
- ariaHaspopup: !0,
723
- ariaExpanded: L.value,
724
- onMouseenter: u,
725
- onMouseleave: () => p(),
726
- onFocus: u
727
- }, [m]);
728
- };
729
- }
730
- });
731
- const rn = He({
732
- mode: {
733
- type: String,
734
- values: ["horizontal", "vertical"],
735
- default: "vertical"
736
- },
737
- defaultActive: {
738
- type: String,
739
- default: ""
740
- },
741
- defaultOpeneds: {
742
- type: Ie(Array),
743
- default: () => Mt([])
744
- },
745
- uniqueOpened: Boolean,
746
- router: Boolean,
747
- menuTrigger: {
748
- type: String,
749
- values: ["hover", "click"],
750
- default: "hover"
751
- },
752
- collapse: Boolean,
753
- backgroundColor: String,
754
- textColor: String,
755
- activeTextColor: String,
756
- closeOnClickOutside: Boolean,
757
- collapseTransition: {
758
- type: Boolean,
759
- default: !0
760
- },
761
- ellipsis: {
762
- type: Boolean,
763
- default: !0
764
- },
765
- popperOffset: {
766
- type: Number,
767
- default: 6
768
- },
769
- ellipsisIcon: {
770
- type: ge,
771
- default: () => zt
772
- },
773
- popperEffect: {
774
- type: Ie(String),
775
- default: "dark"
776
- },
777
- popperClass: String,
778
- showTimeout: {
779
- type: Number,
780
- default: 300
781
- },
782
- hideTimeout: {
783
- type: Number,
784
- default: 300
785
- }
786
- }), Be = (e) => tt(e) && e.every((c) => ve(c)), ln = {
787
- close: (e, c) => ve(e) && Be(c),
788
- open: (e, c) => ve(e) && Be(c),
789
- select: (e, c, i, g) => ve(e) && Be(c) && gt(i) && (g === void 0 || g instanceof Promise)
790
- };
791
- var un = fe({
792
- name: "ElMenu",
793
- props: rn,
794
- emits: ln,
795
- setup(e, { emit: c, slots: i, expose: g }) {
796
- const n = je(), r = n.appContext.config.globalProperties.$router, M = N(), S = de("menu"), d = de("sub-menu"), y = N(-1), _ = N(e.defaultOpeneds && !e.collapse ? e.defaultOpeneds.slice(0) : []), f = N(e.defaultActive), v = N({}), $ = N({}), Y = V(() => e.mode === "horizontal" || e.mode === "vertical" && e.collapse), R = () => {
797
- const a = f.value && v.value[f.value];
798
- if (!a || e.mode === "horizontal" || e.collapse)
799
- return;
800
- a.indexPath.forEach((l) => {
801
- const u = $.value[l];
802
- u && O(l, u.indexPath);
803
- });
804
- }, O = (a, o) => {
805
- _.value.includes(a) || (e.uniqueOpened && (_.value = _.value.filter((l) => o.includes(l))), _.value.push(a), c("open", a, o));
806
- }, j = (a) => {
807
- const o = _.value.indexOf(a);
808
- o !== -1 && _.value.splice(o, 1);
809
- }, E = (a, o) => {
810
- j(a), c("close", a, o);
811
- }, Z = ({
812
- index: a,
813
- indexPath: o
814
- }) => {
815
- _.value.includes(a) ? E(a, o) : O(a, o);
816
- }, k = (a) => {
817
- (e.mode === "horizontal" || e.collapse) && (_.value = []);
818
- const { index: o, indexPath: l } = a;
819
- if (!(Qe(o) || Qe(l)))
820
- if (e.router && r) {
821
- const u = a.route || o, p = r.push(u).then((t) => (t || (f.value = o), t));
822
- c("select", o, l, { index: o, indexPath: l, route: u }, p);
823
- } else
824
- f.value = o, c("select", o, l, { index: o, indexPath: l });
825
- }, q = (a) => {
826
- const o = v.value, l = o[a] || f.value && o[f.value] || o[e.defaultActive];
827
- l ? f.value = l.index : f.value = a;
828
- }, L = (a) => {
829
- const o = getComputedStyle(a), l = Number.parseInt(o.marginLeft, 10), u = Number.parseInt(o.marginRight, 10);
830
- return a.offsetWidth + l + u || 0;
831
- }, Q = () => {
832
- var a, o;
833
- if (!M.value)
834
- return -1;
835
- const l = Array.from((o = (a = M.value) == null ? void 0 : a.childNodes) != null ? o : []).filter((x) => x.nodeName !== "#text" || x.nodeValue), u = 64, p = getComputedStyle(M.value), t = Number.parseInt(p.paddingLeft, 10), s = Number.parseInt(p.paddingRight, 10), m = M.value.clientWidth - t - s;
836
- let h = 0, w = 0;
837
- return l.forEach((x, T) => {
838
- x.nodeName !== "#comment" && (h += L(x), h <= m - u && (w = T + 1));
839
- }), w === l.length ? -1 : w;
840
- }, U = (a) => $.value[a].indexPath, ee = (a, o = 33.34) => {
841
- let l;
842
- return () => {
843
- l && clearTimeout(l), l = setTimeout(() => {
844
- a();
845
- }, o);
846
- };
847
- };
848
- let A = !0;
849
- const D = () => {
850
- if (y.value === Q())
851
- return;
852
- const a = () => {
853
- y.value = -1, Ue(() => {
854
- y.value = Q();
855
- });
856
- };
857
- A ? a() : ee(a)(), A = !1;
858
- };
859
- ye(() => e.defaultActive, (a) => {
860
- v.value[a] || (f.value = ""), q(a);
861
- }), ye(() => e.collapse, (a) => {
862
- a && (_.value = []);
863
- }), ye(v.value, R);
864
- let te;
865
- Tt(() => {
866
- e.mode === "horizontal" && e.ellipsis ? te = $t(M, D).stop : te == null || te();
867
- });
868
- const ue = N(!1);
869
- {
870
- const a = (p) => {
871
- $.value[p.index] = p;
872
- }, o = (p) => {
873
- delete $.value[p.index];
874
- };
875
- Re("rootMenu", qe({
876
- props: e,
877
- openedMenus: _,
878
- items: v,
879
- subMenus: $,
880
- activeIndex: f,
881
- isMenuPopup: Y,
882
- addMenuItem: (p) => {
883
- v.value[p.index] = p;
884
- },
885
- removeMenuItem: (p) => {
886
- delete v.value[p.index];
887
- },
888
- addSubMenu: a,
889
- removeSubMenu: o,
890
- openMenu: O,
891
- closeMenu: E,
892
- handleMenuItemClick: k,
893
- handleSubMenuClick: Z
894
- })), Re(`subMenu:${n.uid}`, {
895
- addSubMenu: a,
896
- removeSubMenu: o,
897
- mouseInChild: ue,
898
- level: 0
899
- });
900
- }
901
- _e(() => {
902
- e.mode === "horizontal" && new en(n.vnode.el, S.namespace.value);
903
- }), g({
904
- open: (o) => {
905
- const { indexPath: l } = $.value[o];
906
- l.forEach((u) => O(u, l));
907
- },
908
- close: j,
909
- handleResize: D
910
- });
911
- const b = dt(e, 0);
912
- return () => {
913
- var a, o;
914
- let l = (o = (a = i.default) == null ? void 0 : a.call(i)) != null ? o : [];
915
- const u = [];
916
- if (e.mode === "horizontal" && M.value) {
917
- const s = yt(l), m = y.value === -1 ? s : s.slice(0, y.value), h = y.value === -1 ? [] : s.slice(y.value);
918
- h != null && h.length && e.ellipsis && (l = m, u.push(X(Je, {
919
- index: "sub-menu-more",
920
- class: d.e("hide-arrow"),
921
- popperOffset: e.popperOffset
922
- }, {
923
- title: () => X(lt, {
924
- class: d.e("icon-more")
925
- }, {
926
- default: () => X(e.ellipsisIcon)
927
- }),
928
- default: () => h
929
- })));
930
- }
931
- const p = e.closeOnClickOutside ? [
932
- [
933
- Ft,
934
- () => {
935
- _.value.length && (ue.value || (_.value.forEach((s) => c("close", s, U(s))), _.value = []));
936
- }
937
- ]
938
- ] : [], t = rt(X("ul", {
939
- key: String(e.collapse),
940
- role: "menubar",
941
- ref: M,
942
- style: b.value,
943
- class: {
944
- [S.b()]: !0,
945
- [S.m(e.mode)]: !0,
946
- [S.m("collapse")]: e.collapse
947
- }
948
- }, [...l, ...u]), p);
949
- return e.collapseTransition && e.mode === "vertical" ? X(on, () => t) : t;
950
- };
951
- }
952
- });
953
- const cn = He({
954
- index: {
955
- type: Ie([String, null]),
956
- default: null
957
- },
958
- route: {
959
- type: Ie([String, Object])
960
- },
961
- disabled: Boolean
962
- }), dn = {
963
- click: (e) => ve(e.index) && tt(e.indexPath)
964
- }, Fe = "ElMenuItem", fn = fe({
965
- name: Fe,
966
- components: {
967
- ElTooltip: nt
968
- },
969
- props: cn,
970
- emits: dn,
971
- setup(e, { emit: c }) {
972
- const i = je(), g = Oe("rootMenu"), n = de("menu"), r = de("menu-item");
973
- g || Te(Fe, "can not inject root menu");
974
- const { parentMenu: M, indexPath: S } = ct(i, It(e, "index")), d = Oe(`subMenu:${M.value.uid}`);
975
- d || Te(Fe, "can not inject sub menu");
976
- const y = V(() => e.index === g.activeIndex), _ = qe({
977
- index: e.index,
978
- indexPath: S,
979
- active: y
980
- }), f = () => {
981
- e.disabled || (g.handleMenuItemClick({
982
- index: e.index,
983
- indexPath: S.value,
984
- route: e.route
985
- }), c("click", _));
986
- };
987
- return _e(() => {
988
- d.addSubMenu(_), g.addMenuItem(_);
989
- }), st(() => {
990
- d.removeSubMenu(_), g.removeMenuItem(_);
991
- }), {
992
- parentMenu: M,
993
- rootMenu: g,
994
- active: y,
995
- nsMenu: n,
996
- nsMenuItem: r,
997
- handleClick: f
998
- };
999
- }
1000
- });
1001
- function pn(e, c, i, g, n, r) {
1002
- const M = Ot("el-tooltip");
1003
- return z(), K("li", {
1004
- class: Ce([
1005
- e.nsMenuItem.b(),
1006
- e.nsMenuItem.is("active", e.active),
1007
- e.nsMenuItem.is("disabled", e.disabled)
1008
- ]),
1009
- role: "menuitem",
1010
- tabindex: "-1",
1011
- onClick: e.handleClick
1012
- }, [
1013
- e.parentMenu.type.name === "ElMenu" && e.rootMenu.props.collapse && e.$slots.title ? (z(), xe(M, {
1014
- key: 0,
1015
- effect: e.rootMenu.props.popperEffect,
1016
- placement: "right",
1017
- "fallback-placements": ["left"],
1018
- persistent: ""
1019
- }, {
1020
- content: G(() => [
1021
- ce(e.$slots, "title")
1022
- ]),
1023
- default: G(() => [
1024
- re("div", {
1025
- class: Ce(e.nsMenu.be("tooltip", "trigger"))
1026
- }, [
1027
- ce(e.$slots, "default")
1028
- ], 2)
1029
- ]),
1030
- _: 3
1031
- }, 8, ["effect"])) : (z(), K(pe, { key: 1 }, [
1032
- ce(e.$slots, "default"),
1033
- ce(e.$slots, "title")
1034
- ], 64))
1035
- ], 10, ["onClick"]);
1036
- }
1037
- var ft = /* @__PURE__ */ Le(fn, [["render", pn], ["__file", "menu-item.vue"]]);
1038
- const mn = {
1039
- title: String
1040
- }, vn = "ElMenuItemGroup", hn = fe({
1041
- name: vn,
1042
- props: mn,
1043
- setup() {
1044
- return {
1045
- ns: de("menu-item-group")
1046
- };
1047
- }
1048
- });
1049
- function gn(e, c, i, g, n, r) {
1050
- return z(), K("li", {
1051
- class: Ce(e.ns.b())
1052
- }, [
1053
- re("div", {
1054
- class: Ce(e.ns.e("title"))
1055
- }, [
1056
- e.$slots.title ? ce(e.$slots, "title", { key: 1 }) : (z(), K(pe, { key: 0 }, [
1057
- he(Ee(e.title), 1)
1058
- ], 64))
1059
- ], 2),
1060
- re("ul", null, [
1061
- ce(e.$slots, "default")
1062
- ])
1063
- ], 2);
1064
- }
1065
- var pt = /* @__PURE__ */ Le(hn, [["render", gn], ["__file", "menu-item-group.vue"]]);
1066
- const yn = et(un, {
1067
- MenuItem: ft,
1068
- MenuItemGroup: pt,
1069
- SubMenu: Je
1070
- }), bn = ze(ft);
1071
- ze(pt);
1072
- ze(Je);
1073
- let me = null;
1074
- const Mn = (e) => {
1075
- const c = Lt(e, {
1076
- handleReq: (i) => {
1077
- Pt() && (i.headers.token = Nt());
323
+ })(Le);
324
+ var Je = Le.exports;
325
+ const b = /* @__PURE__ */ Xe(Je);
326
+ let re = null;
327
+ const Ge = (i) => {
328
+ const B = Ce(i, {
329
+ handleReq: (I) => {
330
+ He() && (I.headers.token = je());
1078
331
  },
1079
- handleRes: (i) => {
1080
- const { data: g } = i;
1081
- if (g.code === 401)
1082
- return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` : At(), !0;
332
+ handleRes: (I) => {
333
+ const { data: L } = I;
334
+ if (L.code === 401)
335
+ return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` : qe(), !0;
1083
336
  }
1084
337
  });
1085
- c.get, me = c.post;
1086
- }, xn = (e) => me("/middleLayer/kline/getKlineBasic", { ...e, userId: we("id") }), _n = (e) => me("/middleLayer/kline/getKline", e), wn = async (e) => me("/alarm/deliversign/addAlarmPrice", { ...e, userId: we("id") }), Sn = async (e) => me("/alarm/deliversign/findAlarmPriceByUserId", { ...e, userId: we("id") }), mt = async (e) => me("/alarm/deliversign/updateAlarmPrice", { ...e, userId: we("id") }), $n = async (e) => me("/alarm/deliversign/deleteAlarmPrice", { ...e, userId: we("id") }), { round: Me } = Xe, Yn = (e, c, i, g, n) => {
1087
- const { data: r, time: M } = e, { gridTop: S, gridRight: d, gridLeft: y, maxShowCounts: _, showSubChart: f } = c;
338
+ B.get, re = B.post;
339
+ }, Qe = (i) => re("/middleLayer/kline/getKlineBasic", { ...i, userId: de("id") }), et = (i) => re("/middleLayer/kline/getKline", i), tt = async (i) => re("/alarm/deliversign/addAlarmPrice", { ...i, userId: de("id") }), nt = async (i) => re("/alarm/deliversign/findAlarmPriceByUserId", { ...i, userId: de("id") }), Oe = async (i) => re("/alarm/deliversign/updateAlarmPrice", { ...i, userId: de("id") }), rt = async (i) => re("/alarm/deliversign/deleteAlarmPrice", { ...i, userId: de("id") }), { round: ue } = De, ot = (i, B, I, L, S) => {
340
+ const { data: e, time: $ } = i, { gridTop: Y, gridRight: g, gridLeft: x, maxShowCounts: k, showSubChart: s } = B;
1088
341
  return {
1089
342
  animation: !1,
1090
343
  grid: {
1091
- top: `${S}px`,
1092
- right: `${d}px`,
1093
- bottom: f ? "6px" : "24px",
1094
- left: `${y}px`
344
+ top: `${Y}px`,
345
+ right: `${g}px`,
346
+ bottom: s ? "6px" : "24px",
347
+ left: `${x}px`
1095
348
  },
1096
349
  dataZoom: [
1097
350
  {
1098
351
  type: "inside",
1099
- startValue: i,
1100
- endValue: g,
1101
- maxValueSpan: _
352
+ startValue: I,
353
+ endValue: L,
354
+ maxValueSpan: k
1102
355
  }
1103
356
  ],
1104
357
  tooltip: {
@@ -1109,23 +362,23 @@ const Mn = (e) => {
1109
362
  type: "cross",
1110
363
  label: {
1111
364
  rich: {},
1112
- formatter: (v) => {
1113
- const { axisDimension: $, value: Y } = v;
1114
- return $ === "x" ? f ? "" : ["6", "7", "8"].includes(n) ? I(Y).format("YYYY-MM-DD") : Y : String(Me(Y));
365
+ formatter: (c) => {
366
+ const { axisDimension: D, value: h } = c;
367
+ return D === "x" ? s ? "" : ["6", "7", "8"].includes(S) ? b(h).format("YYYY-MM-DD") : h : String(ue(h));
1115
368
  }
1116
369
  }
1117
370
  },
1118
371
  formatter: () => ""
1119
372
  },
1120
373
  xAxis: {
1121
- show: !f,
374
+ show: !s,
1122
375
  type: "category",
1123
- data: M,
376
+ data: $,
1124
377
  splitLine: {
1125
378
  show: !1
1126
379
  },
1127
380
  axisLabel: {
1128
- formatter: (v) => ["6", "7", "8"].includes(props.cycle) ? I(v).format("YYYY-MM-DD") : v
381
+ formatter: (c) => ["6", "7", "8"].includes(S) ? b(c).format("YYYY-MM-DD") : c
1129
382
  }
1130
383
  },
1131
384
  yAxis: {
@@ -1140,13 +393,13 @@ const Mn = (e) => {
1140
393
  color: "#333"
1141
394
  }
1142
395
  },
1143
- min: (v) => Me(v.min),
1144
- max: (v) => Me(v.max)
396
+ min: (c) => ue(c.min),
397
+ max: (c) => ue(c.max)
1145
398
  },
1146
399
  series: [
1147
400
  {
1148
401
  type: "candlestick",
1149
- data: r,
402
+ data: e,
1150
403
  itemStyle: {
1151
404
  color: "transparent",
1152
405
  color0: "#00FFFF",
@@ -1155,17 +408,17 @@ const Mn = (e) => {
1155
408
  borderWidth: 1
1156
409
  }
1157
410
  },
1158
- ...e.mainIndicator.map((v) => ({
1159
- name: v.key,
411
+ ...i.mainIndicator.map((c) => ({
412
+ name: c.key,
1160
413
  type: "line",
1161
414
  silent: !0,
1162
415
  symbol: "none",
1163
- data: v.data,
416
+ data: c.data,
1164
417
  lineStyle: {
1165
- width: v.width || 1
418
+ width: c.width || 1
1166
419
  },
1167
420
  itemStyle: {
1168
- color: v.color
421
+ color: c.color
1169
422
  }
1170
423
  }))
1171
424
  ],
@@ -1185,32 +438,32 @@ const Mn = (e) => {
1185
438
  }
1186
439
  }
1187
440
  };
1188
- }, kn = (e, c, i, g, n) => {
1189
- const { variety: r, featureId: M, featureType: S } = i, { gridTop: d, gridLeft: y, gridRight: _ } = g;
1190
- return c.reduce((f, v) => {
1191
- const { warnPrice: $ } = v, Y = e == null ? void 0 : e.convertToPixel({ yAxisIndex: 0 }, $);
1192
- if (Y <= d || Y >= (e == null ? void 0 : e.getHeight()))
1193
- return f;
1194
- let R = 0;
441
+ }, at = (i, B, I, L, S) => {
442
+ const { variety: e, featureId: $, featureType: Y } = I, { gridTop: g, gridLeft: x, gridRight: k } = L;
443
+ return B.reduce((s, c) => {
444
+ const { warnPrice: D } = c, h = i == null ? void 0 : i.convertToPixel({ yAxisIndex: 0 }, D);
445
+ if (h <= g || h >= (i == null ? void 0 : i.getHeight()))
446
+ return s;
447
+ let W = 0;
1195
448
  return [
1196
- ...f,
449
+ ...s,
1197
450
  {
1198
451
  type: "group",
1199
452
  name: "warningLine",
1200
- info: v,
453
+ info: c,
1201
454
  draggable: "vertical",
1202
455
  children: [
1203
456
  {
1204
457
  type: "line",
1205
- info: v,
458
+ info: c,
1206
459
  shape: {
1207
- x1: y,
460
+ x1: x,
1208
461
  // 开始X坐标
1209
- y1: Y,
462
+ y1: h,
1210
463
  // 开始Y坐标
1211
- x2: (e == null ? void 0 : e.getWidth()) - _,
464
+ x2: (i == null ? void 0 : i.getWidth()) - k,
1212
465
  // 结束X坐标
1213
- y2: Y
466
+ y2: h
1214
467
  // 结束Y坐标
1215
468
  },
1216
469
  style: {
@@ -1222,12 +475,12 @@ const Mn = (e) => {
1222
475
  },
1223
476
  {
1224
477
  type: "text",
1225
- info: v,
1226
- x: (e == null ? void 0 : e.getWidth()) - _,
1227
- y: Y - 5,
478
+ info: c,
479
+ x: (i == null ? void 0 : i.getWidth()) - k,
480
+ y: h - 5,
1228
481
  style: {
1229
482
  fill: "#FFF",
1230
- text: $,
483
+ text: D,
1231
484
  stroke: "#000",
1232
485
  lineWidth: 1,
1233
486
  opacity: 1
@@ -1236,37 +489,37 @@ const Mn = (e) => {
1236
489
  }
1237
490
  ],
1238
491
  // 事件:开始拖拽
1239
- ondragstart: (O) => {
1240
- R = O.offsetY;
492
+ ondragstart: (A) => {
493
+ W = A.offsetY;
1241
494
  },
1242
- ondrag: (O) => {
1243
- var j;
1244
- if (O.target && O.target.childAt(1)) {
1245
- const E = e.convertFromPixel({ yAxisIndex: 0 }, Y + (O.offsetY - R));
1246
- (j = O.target.childAt(1)) == null || j.animate("style", !1).when(1, { text: Me(E, 3) }).start();
495
+ ondrag: (A) => {
496
+ var q;
497
+ if (A.target && A.target.childAt(1)) {
498
+ const E = i.convertFromPixel({ yAxisIndex: 0 }, h + (A.offsetY - W));
499
+ (q = A.target.childAt(1)) == null || q.animate("style", !1).when(1, { text: ue(E, 3) }).start();
1247
500
  }
1248
501
  },
1249
502
  // 事件:结束拖拽
1250
- ondragend: async (O) => {
1251
- const E = O.offsetY - R;
503
+ ondragend: async (A) => {
504
+ const E = A.offsetY - W;
1252
505
  if (E !== 0) {
1253
- const Z = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 }, E + Y), k = {
1254
- id: v.id,
1255
- warnPrice: Me(Z, 3),
1256
- featureId: M,
506
+ const Z = i == null ? void 0 : i.convertFromPixel({ yAxisIndex: 0 }, E + h), v = {
507
+ id: c.id,
508
+ warnPrice: ue(Z, 3),
509
+ featureId: $,
1257
510
  //品种id
1258
- featureCode: r,
511
+ featureCode: e,
1259
512
  //品种代码
1260
- featureType: S
513
+ featureType: Y
1261
514
  //品种类型
1262
515
  };
1263
- await mt(k), ke.success("画线预警修改成功"), n && n();
516
+ await Oe(v), ye.success("画线预警修改成功"), S && S();
1264
517
  }
1265
518
  }
1266
519
  }
1267
520
  ];
1268
521
  }, []);
1269
- }, Dn = { class: "kline-tips" }, Tn = /* @__PURE__ */ fe({
522
+ }, it = { class: "kline-tips" }, st = /* @__PURE__ */ we({
1270
523
  __name: "index",
1271
524
  props: {
1272
525
  // 提示数据
@@ -1275,18 +528,18 @@ const Mn = (e) => {
1275
528
  require: !0
1276
529
  }
1277
530
  },
1278
- setup(e) {
1279
- return (c, i) => (z(), K("div", Dn, [
1280
- (z(!0), K(pe, null, Ze(e.data, (g, n) => (z(), K("div", {
1281
- key: n,
531
+ setup(i) {
532
+ return (B, I) => (j(), U("div", it, [
533
+ (j(!0), U(ge, null, _e(i.data, (L, S) => (j(), U("div", {
534
+ key: S,
1282
535
  class: "kline-tips-item",
1283
- style: Ke({ color: g.color })
1284
- }, Ee(g.label) + " " + Ee(g.value), 5))), 128))
536
+ style: Ye({ color: L.color })
537
+ }, ve(L.label) + " " + ve(L.value), 5))), 128))
1285
538
  ]));
1286
539
  }
1287
540
  });
1288
- const We = /* @__PURE__ */ Se(Tn, [["__scopeId", "data-v-f83b6b36"]]);
1289
- const In = { class: "kline-tips" }, On = {
541
+ const xe = /* @__PURE__ */ fe(st, [["__scopeId", "data-v-f83b6b36"]]);
542
+ const lt = { class: "kline-tips" }, ut = {
1290
543
  __name: "index",
1291
544
  props: {
1292
545
  // 提示数据
@@ -1299,36 +552,36 @@ const In = { class: "kline-tips" }, On = {
1299
552
  require: !0
1300
553
  }
1301
554
  },
1302
- setup(e) {
1303
- const { round: c, formatValue: i } = Xe, g = e, n = V(() => {
1304
- const { data: M, activeIndex: S } = g;
1305
- if (M.data && M.data[S]) {
1306
- const d = M.data[S], y = [
1307
- { label: "开", value: c(d[0]) },
1308
- { label: "高", value: c(d[3]) },
1309
- { label: "低", value: c(d[2]) },
1310
- { label: "收", value: c(d[1]) }
555
+ setup(i) {
556
+ const { round: B, formatValue: I } = De, L = i, S = ce(() => {
557
+ const { data: $, activeIndex: Y } = L;
558
+ if ($.data && $.data[Y]) {
559
+ const g = $.data[Y], x = [
560
+ { label: "开", value: B(g[0]) },
561
+ { label: "高", value: B(g[3]) },
562
+ { label: "低", value: B(g[2]) },
563
+ { label: "收", value: B(g[1]) }
1311
564
  ];
1312
- d[4] !== null && y.push({ label: "额", value: i(d[4]) });
1313
- let _;
1314
- return d[6] > 0 ? _ = "red" : d[6] < 0 && (_ = "green"), y.push({ label: "涨跌", value: `${c(d[6])}%`, color: _ }), y;
565
+ g[4] !== null && x.push({ label: "额", value: I(g[4]) });
566
+ let k;
567
+ return g[6] > 0 ? k = "red" : g[6] < 0 && (k = "green"), x.push({ label: "涨跌", value: `${B(g[6])}%`, color: k }), x;
1315
568
  }
1316
569
  return [];
1317
- }), r = V(() => {
1318
- var d;
1319
- const { data: M, activeIndex: S } = g;
1320
- return ((d = M == null ? void 0 : M.mainIndicator) == null ? void 0 : d.map((y) => ({ label: y.key, value: c(y.data[S]), color: y.color }))) || [];
570
+ }), e = ce(() => {
571
+ var g;
572
+ const { data: $, activeIndex: Y } = L;
573
+ return ((g = $ == null ? void 0 : $.mainIndicator) == null ? void 0 : g.map((x) => ({ label: x.key, value: B(x.data[Y]), color: x.color }))) || [];
1321
574
  });
1322
- return (M, S) => (z(), K("div", In, [
1323
- J(We, { data: n.value }, null, 8, ["data"]),
1324
- J(We, { data: r.value }, null, 8, ["data"])
575
+ return ($, Y) => (j(), U("div", lt, [
576
+ z(xe, { data: S.value }, null, 8, ["data"]),
577
+ z(xe, { data: e.value }, null, 8, ["data"])
1325
578
  ]));
1326
579
  }
1327
- }, Cn = /* @__PURE__ */ Se(On, [["__scopeId", "data-v-64b5c2a3"]]);
1328
- const En = { class: "klineSub" }, Ln = { class: "klineSub-tips" }, Pn = {
580
+ }, ct = /* @__PURE__ */ fe(ut, [["__scopeId", "data-v-64b5c2a3"]]);
581
+ const dt = { class: "klineSub" }, ft = { class: "klineSub-tips" }, pt = {
1329
582
  key: 0,
1330
583
  class: "klineSub-tips-select"
1331
- }, Nn = {
584
+ }, mt = {
1332
585
  __name: "index",
1333
586
  props: {
1334
587
  cycle: {
@@ -1344,57 +597,57 @@ const En = { class: "klineSub" }, Ln = { class: "klineSub-tips" }, Pn = {
1344
597
  // 副图指标列表
1345
598
  },
1346
599
  emits: ["update:modelValue"],
1347
- setup(e, { expose: c, emit: i }) {
1348
- const { round: g } = Xe;
1349
- let n, r;
1350
- const M = i, S = e, d = N(), y = V({
600
+ setup(i, { expose: B, emit: I }) {
601
+ const { round: L } = De;
602
+ let S, e;
603
+ const $ = I, Y = i, g = H(), x = ce({
1351
604
  get() {
1352
- return S.modelValue;
605
+ return Y.modelValue;
1353
606
  },
1354
- set(v) {
1355
- M("update:modelValue", v);
607
+ set(c) {
608
+ $("update:modelValue", c);
1356
609
  }
1357
- }), _ = V(() => {
1358
- var Y;
1359
- const { data: v, activeIndex: $ } = S;
1360
- return ((Y = v == null ? void 0 : v.subIndicator) == null ? void 0 : Y.map((R) => ({ label: R.key, color: R.color, value: R.data[$] || "-" }))) || [];
610
+ }), k = ce(() => {
611
+ var h;
612
+ const { data: c, activeIndex: D } = Y;
613
+ return ((h = c == null ? void 0 : c.subIndicator) == null ? void 0 : h.map((W) => ({ label: W.key, color: W.color, value: W.data[D] || "-" }))) || [];
1361
614
  });
1362
- _e(() => {
1363
- n = Ve.init(d.value);
1364
- let v = !0;
1365
- r = new ResizeObserver(() => {
1366
- if (v) {
1367
- v = null;
615
+ $e(() => {
616
+ S = be.init(g.value);
617
+ let c = !0;
618
+ e = new ResizeObserver(() => {
619
+ if (c) {
620
+ c = null;
1368
621
  return;
1369
622
  }
1370
- n.resize();
1371
- }), r.observe(d.value);
1372
- }), it(() => {
1373
- n.dispose(), r.disconnect(), r = null;
623
+ S.resize();
624
+ }), e.observe(g.value);
625
+ }), Se(() => {
626
+ S.dispose(), e.disconnect(), e = null;
1374
627
  });
1375
- const f = (v, $) => {
1376
- const Y = v[$], R = $ === 0 ? v[$] : v[$ - 1];
1377
- return Y[0] === Y[1] ? Y[0] >= R[1] ? {
628
+ const s = (c, D) => {
629
+ const h = c[D], W = D === 0 ? c[D] : c[D - 1];
630
+ return h[0] === h[1] ? h[0] >= W[1] ? {
1378
631
  color: "transparent",
1379
632
  borderColor: "#FF0000"
1380
633
  } : {
1381
634
  color: "#00FFFF"
1382
- } : Y[1] > Y[0] ? {
635
+ } : h[1] > h[0] ? {
1383
636
  color: "transparent",
1384
637
  borderColor: "#FF0000"
1385
638
  } : {
1386
639
  color: "#00FFFF"
1387
640
  };
1388
641
  };
1389
- return c({
1390
- connect: (v) => {
1391
- Ve.connect([v, n]);
642
+ return B({
643
+ connect: (c) => {
644
+ be.connect([c, S]);
1392
645
  },
1393
646
  // 联动
1394
- draw: (v, $) => {
1395
- Ue(() => {
1396
- const { startValue: Y, endValue: R, maxValueSpan: O } = v, { leftYAxisRange: j, rightYAxisRange: E } = S.data.subIndicator[0], Z = S.data.subIndicator.map((k) => {
1397
- if (k.series === "bar")
647
+ draw: (c, D) => {
648
+ ke(() => {
649
+ const { startValue: h, endValue: W, maxValueSpan: A } = c, { leftYAxisRange: q, rightYAxisRange: E } = Y.data.subIndicator[0], Z = Y.data.subIndicator.map((v) => {
650
+ if (v.series === "bar")
1398
651
  return {
1399
652
  name: "subMain",
1400
653
  xAxisIndex: 0,
@@ -1402,53 +655,53 @@ const En = { class: "klineSub" }, Ln = { class: "klineSub-tips" }, Pn = {
1402
655
  type: "bar",
1403
656
  silent: !0,
1404
657
  symbol: "none",
1405
- data: k.data.map((q, L) => k.seriesColor === "kline" ? {
1406
- value: q,
1407
- itemStyle: f(S.data.data, L)
1408
- } : k.seriesColor === "value" ? {
1409
- value: q,
658
+ data: v.data.map((C, P) => v.seriesColor === "kline" ? {
659
+ value: C,
660
+ itemStyle: s(Y.data.data, P)
661
+ } : v.seriesColor === "value" ? {
662
+ value: C,
1410
663
  itemStyle: {
1411
- color: q >= 0 ? "#FF0000" : "#00FFFF"
664
+ color: C >= 0 ? "#FF0000" : "#00FFFF"
1412
665
  }
1413
666
  } : {
1414
- value: q,
667
+ value: C,
1415
668
  itemStyle: {
1416
- color: k.seriesColor
669
+ color: v.seriesColor
1417
670
  }
1418
671
  })
1419
672
  };
1420
- if (k.series === "line")
673
+ if (v.series === "line")
1421
674
  return {
1422
675
  xAxisIndex: 0,
1423
- yAxisIndex: k.yAxis === "right" ? 2 : 1,
1424
- name: k.key,
676
+ yAxisIndex: v.yAxis === "right" ? 2 : 1,
677
+ name: v.key,
1425
678
  type: "line",
1426
679
  silent: !0,
1427
680
  symbol: "none",
1428
- data: k.data,
681
+ data: v.data,
1429
682
  lineStyle: {
1430
683
  width: 1
1431
684
  },
1432
685
  itemStyle: {
1433
- color: k.color
686
+ color: v.color
1434
687
  }
1435
688
  };
1436
689
  });
1437
- n.setOption(
690
+ S.setOption(
1438
691
  {
1439
692
  animation: !1,
1440
693
  grid: {
1441
- left: `${$.gridLeft}px`,
694
+ left: `${D.gridLeft}px`,
1442
695
  top: "10px",
1443
- right: `${$.gridRight}px`,
696
+ right: `${D.gridRight}px`,
1444
697
  bottom: "20px"
1445
698
  },
1446
699
  dataZoom: [
1447
700
  {
1448
701
  type: "inside",
1449
- startValue: Y,
1450
- endValue: R,
1451
- maxValueSpan: O
702
+ startValue: h,
703
+ endValue: W,
704
+ maxValueSpan: A
1452
705
  }
1453
706
  ],
1454
707
  tooltip: {
@@ -1459,12 +712,12 @@ const En = { class: "klineSub" }, Ln = { class: "klineSub-tips" }, Pn = {
1459
712
  type: "cross",
1460
713
  label: {
1461
714
  rich: {},
1462
- formatter: (k) => {
1463
- const { axisDimension: q, value: L } = k;
1464
- if (q === "x")
1465
- return ["6", "7", "8"].includes(S.cycle) ? I(L).format("YYYY-MM-DD") : L;
1466
- if (k.axisIndex === 1)
1467
- return String(g(L));
715
+ formatter: (v) => {
716
+ const { axisDimension: C, value: P } = v;
717
+ if (C === "x")
718
+ return ["6", "7", "8"].includes(Y.cycle) ? b(P).format("YYYY-MM-DD") : P;
719
+ if (v.axisIndex === 1)
720
+ return String(L(P));
1468
721
  }
1469
722
  }
1470
723
  },
@@ -1472,7 +725,7 @@ const En = { class: "klineSub" }, Ln = { class: "klineSub-tips" }, Pn = {
1472
725
  },
1473
726
  xAxis: {
1474
727
  type: "category",
1475
- data: S.data.time,
728
+ data: Y.data.time,
1476
729
  axisLine: {
1477
730
  show: !0
1478
731
  },
@@ -1480,7 +733,7 @@ const En = { class: "klineSub" }, Ln = { class: "klineSub-tips" }, Pn = {
1480
733
  show: !1
1481
734
  },
1482
735
  axisLabel: {
1483
- formatter: (k) => ["6", "7", "8"].includes(S.cycle) ? I(k).format("YYYY-MM-DD") : k
736
+ formatter: (v) => ["6", "7", "8"].includes(Y.cycle) ? b(v).format("YYYY-MM-DD") : v
1484
737
  }
1485
738
  },
1486
739
  yAxis: [
@@ -1489,8 +742,8 @@ const En = { class: "klineSub" }, Ln = { class: "klineSub-tips" }, Pn = {
1489
742
  },
1490
743
  {
1491
744
  position: "left",
1492
- min: j === "cover" ? (k) => k.min : null,
1493
- max: j === "cover" ? (k) => k.max : null,
745
+ min: q === "cover" ? (v) => v.min : null,
746
+ max: q === "cover" ? (v) => v.max : null,
1494
747
  splitNumber: 1,
1495
748
  axisLine: {
1496
749
  show: !0
@@ -1505,8 +758,8 @@ const En = { class: "klineSub" }, Ln = { class: "klineSub-tips" }, Pn = {
1505
758
  },
1506
759
  {
1507
760
  position: "right",
1508
- min: E === "cover" ? (k) => k.min : null,
1509
- max: E === "cover" ? (k) => k.max : null,
761
+ min: E === "cover" ? (v) => v.min : null,
762
+ max: E === "cover" ? (v) => v.max : null,
1510
763
  splitNumber: 1,
1511
764
  axisLine: {
1512
765
  show: !1
@@ -1526,94 +779,94 @@ const En = { class: "klineSub" }, Ln = { class: "klineSub-tips" }, Pn = {
1526
779
  });
1527
780
  }
1528
781
  // 重置
1529
- }), (v, $) => {
1530
- const Y = Rt, R = Vt;
1531
- return z(), K("div", En, [
1532
- re("div", Ln, [
1533
- _.value.length ? (z(), K("div", Pn, [
1534
- J(R, {
1535
- modelValue: y.value,
1536
- "onUpdate:modelValue": $[0] || ($[0] = (O) => y.value = O),
782
+ }), (c, D) => {
783
+ const h = Ue, W = Ze;
784
+ return j(), U("div", dt, [
785
+ ne("div", ft, [
786
+ k.value.length ? (j(), U("div", pt, [
787
+ z(W, {
788
+ modelValue: x.value,
789
+ "onUpdate:modelValue": D[0] || (D[0] = (A) => x.value = A),
1537
790
  size: "small",
1538
791
  "popper-class": "element-dark",
1539
792
  class: "element-dark subIndicator"
1540
793
  }, {
1541
- default: G(() => [
1542
- (z(!0), K(pe, null, Ze(e.subIndicatorList, (O) => (z(), xe(Y, {
1543
- key: O.value,
1544
- label: O.label,
1545
- value: O.value
794
+ default: te(() => [
795
+ (j(!0), U(ge, null, _e(i.subIndicatorList, (A) => (j(), Te(h, {
796
+ key: A.value,
797
+ label: A.label,
798
+ value: A.value
1546
799
  }, null, 8, ["label", "value"]))), 128))
1547
800
  ]),
1548
801
  _: 1
1549
802
  }, 8, ["modelValue"])
1550
- ])) : be("", !0),
1551
- J(We, { data: _.value }, null, 8, ["data"])
803
+ ])) : le("", !0),
804
+ z(xe, { data: k.value }, null, 8, ["data"])
1552
805
  ]),
1553
- re("div", {
806
+ ne("div", {
1554
807
  class: "klineSub-chart",
1555
808
  ref_key: "subChartRef",
1556
- ref: d
809
+ ref: g
1557
810
  }, null, 512)
1558
811
  ]);
1559
812
  };
1560
813
  }
1561
- }, An = /* @__PURE__ */ Se(Nn, [["__scopeId", "data-v-ab519de5"]]), Bn = /* @__PURE__ */ fe({
814
+ }, yt = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-ab519de5"]]), gt = /* @__PURE__ */ we({
1562
815
  __name: "index",
1563
816
  emits: ["closeContextMenuCallBack"],
1564
- setup(e, { emit: c }) {
1565
- const i = c, g = N(), n = N(), r = N({
817
+ setup(i, { emit: B }) {
818
+ const I = B, L = H(), S = H(), e = H({
1566
819
  display: "none",
1567
820
  top: "0px",
1568
821
  left: "0px"
1569
- }), M = () => {
1570
- r.value.display = "none", i("closeContextMenuCallBack"), document.removeEventListener("click", M);
1571
- }, S = (d) => {
1572
- if (d.preventDefault(), r.value.display === "block") {
1573
- const { offsetX: y, offsetY: _ } = d, { offsetWidth: f, offsetHeight: v } = n.value;
1574
- if (y <= f && _ <= v)
822
+ }), $ = () => {
823
+ e.value.display = "none", I("closeContextMenuCallBack"), document.removeEventListener("click", $);
824
+ }, Y = (g) => {
825
+ if (g.preventDefault(), e.value.display === "block") {
826
+ const { offsetX: x, offsetY: k } = g, { offsetWidth: s, offsetHeight: c } = S.value;
827
+ if (x <= s && k <= c)
1575
828
  return;
1576
829
  }
1577
- g.value.click(), r.value = {
830
+ L.value.click(), e.value = {
1578
831
  display: "block",
1579
- top: `${d.offsetY}px`,
1580
- left: `${d.offsetX}px`
1581
- }, Ue(() => {
1582
- const y = g.value.getBoundingClientRect(), _ = n.value.getBoundingClientRect();
1583
- _.left + _.width >= y.right && (r.value.left = `${d.offsetX - _.width}px`), _.top + _.height >= y.bottom && (console.log("高度超出"), r.value.top = `${d.offsetY - _.height}px`);
1584
- }), document.addEventListener("click", M);
832
+ top: `${g.offsetY}px`,
833
+ left: `${g.offsetX}px`
834
+ }, ke(() => {
835
+ const x = L.value.getBoundingClientRect(), k = S.value.getBoundingClientRect();
836
+ k.left + k.width >= x.right && (e.value.left = `${g.offsetX - k.width}px`), k.top + k.height >= x.bottom && (console.log("高度超出"), e.value.top = `${g.offsetY - k.height}px`);
837
+ }), document.addEventListener("click", $);
1585
838
  };
1586
- return (d, y) => (z(), K("div", {
839
+ return (g, x) => (j(), U("div", {
1587
840
  ref_key: "contextmenuRef",
1588
- ref: g,
841
+ ref: L,
1589
842
  class: "contextmenu",
1590
- onContextmenu: S,
1591
- onMouseleave: M
843
+ onContextmenu: Y,
844
+ onMouseleave: $
1592
845
  }, [
1593
- ce(d.$slots, "default", {}, void 0, !0),
1594
- r.value.display !== "none" ? (z(), K("div", {
846
+ Me(g.$slots, "default", {}, void 0, !0),
847
+ e.value.display !== "none" ? (j(), U("div", {
1595
848
  key: 0,
1596
849
  ref_key: "contextmenuContentRef",
1597
- ref: n,
850
+ ref: S,
1598
851
  class: "contextmenu-popover",
1599
- style: Ke(r.value)
852
+ style: Ye(e.value)
1600
853
  }, [
1601
- ce(d.$slots, "popover", {}, void 0, !0)
1602
- ], 4)) : be("", !0)
854
+ Me(g.$slots, "popover", {}, void 0, !0)
855
+ ], 4)) : le("", !0)
1603
856
  ], 544));
1604
857
  }
1605
858
  });
1606
- const Fn = /* @__PURE__ */ Se(Bn, [["__scopeId", "data-v-811db6b4"]]);
1607
- const vt = (e) => (Ct("data-v-95b8303f"), e = e(), Et(), e), Rn = { class: "klineBasic" }, Vn = { class: "klineBasic-tips" }, Wn = {
859
+ const ht = /* @__PURE__ */ fe(gt, [["__scopeId", "data-v-811db6b4"]]);
860
+ const Fe = (i) => (Ne("data-v-95b8303f"), i = i(), Pe(), i), vt = { class: "klineBasic" }, bt = { class: "klineBasic-tips" }, xt = {
1608
861
  key: 0,
1609
862
  class: "klineBasic-sub"
1610
- }, Hn = {
863
+ }, _t = {
1611
864
  key: 1,
1612
865
  class: "klineBasic-empty"
1613
- }, zn = {
866
+ }, Yt = {
1614
867
  key: 2,
1615
868
  class: "klineBasic-error"
1616
- }, jn = /* @__PURE__ */ vt(() => /* @__PURE__ */ re("div", { class: "klineBasic-error-content" }, "加载失败,请刷新重试", -1)), qn = { style: { "text-align": "center" } }, Un = /* @__PURE__ */ vt(() => /* @__PURE__ */ re("span", { style: { "margin-right": "10px" } }, "预警价格:", -1)), Zn = { class: "dialog-footer" }, Kn = {
869
+ }, Dt = /* @__PURE__ */ Fe(() => /* @__PURE__ */ ne("div", { class: "klineBasic-error-content" }, "加载失败,请刷新重试", -1)), Mt = { style: { "text-align": "center" } }, wt = /* @__PURE__ */ Fe(() => /* @__PURE__ */ ne("span", { style: { "margin-right": "10px" } }, "预警价格:", -1)), $t = { class: "dialog-footer" }, St = {
1617
870
  __name: "index",
1618
871
  props: {
1619
872
  variety: {
@@ -1681,10 +934,10 @@ const vt = (e) => (Ct("data-v-95b8303f"), e = e(), Et(), e), Rn = { class: "klin
1681
934
  // 时段框选
1682
935
  },
1683
936
  emits: ["change", "getFactorData"],
1684
- setup(e, { expose: c, emit: i }) {
1685
- const g = [{ label: "画线预警", key: "drawWarningLine" }];
1686
- let n = null, r = null, M, S, d = !1, y = !1;
1687
- const _ = i, f = e, v = N(!1), $ = N(!1), Y = N(null), R = N(null), O = N("VOL"), j = N(0), E = N({}), Z = N([]), k = N({}), q = N(!1), L = N(""), Q = N([...g]), U = V(() => ({
937
+ setup(i, { expose: B, emit: I }) {
938
+ const L = [{ label: "画线预警", key: "drawWarningLine" }];
939
+ let S = null, e = null, $, Y, g = !1, x = !1;
940
+ const k = I, s = i, c = H(!1), D = H(!1), h = H(null), W = H(null), A = H("VOL"), q = H(0), E = H({}), Z = H([]), v = H({}), C = H(!1), P = H(""), oe = H([...L]), K = ce(() => ({
1688
941
  defaultShowCounts: 500,
1689
942
  // 默认展示条数
1690
943
  addCounts: 2e3,
@@ -1705,219 +958,219 @@ const vt = (e) => (Ct("data-v-95b8303f"), e = e(), Et(), e), Rn = { class: "klin
1705
958
  // 是否展示预警线
1706
959
  getFactorData: !0,
1707
960
  // 是否获取因子数据
1708
- ...f.config
961
+ ...s.config
1709
962
  }));
1710
- ye(
963
+ We(
1711
964
  () => {
1712
- var t, s;
1713
- return [f.variety, f.cycle, f.mainIndicator, O.value, (t = f.indicatorStore) == null ? void 0 : t.filterIndicator, (s = f.indicatorStore) == null ? void 0 : s.customIndicator];
965
+ var n, t;
966
+ return [s.variety, s.cycle, s.mainIndicator, A.value, (n = s.indicatorStore) == null ? void 0 : n.filterIndicator, (t = s.indicatorStore) == null ? void 0 : t.customIndicator];
1714
967
  },
1715
968
  () => {
1716
- D();
969
+ _();
1717
970
  },
1718
971
  { deep: !0 }
1719
- ), _e(() => {
1720
- Mn(f.env), D();
1721
- }), it(() => {
1722
- r == null || r.off("datazoom"), r == null || r.off("highlight"), r == null || r.off("globalout"), r == null || r.dispose(), n == null || n.dispose();
972
+ ), $e(() => {
973
+ Ge(s.env), _();
974
+ }), Se(() => {
975
+ e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(), S == null || S.dispose();
1723
976
  });
1724
- const ee = () => {
1725
- r || (r = Ve.init(Y.value), A(), U.value.showSubChart && R.value.connect(r), n = Bt(Y.value), n.listen(() => {
977
+ const ae = () => {
978
+ e || (e = be.init(h.value), N(), K.value.showSubChart && W.value.connect(e), S = ze(h.value), S.listen(() => {
1726
979
  requestAnimationFrame(() => {
1727
- r.resize();
980
+ e.resize();
1728
981
  });
1729
982
  }));
1730
- }, A = () => {
1731
- r == null || r.on("datazoom", (s) => {
1732
- clearTimeout(S), S = setTimeout(() => {
1733
- var h, w, x, T;
1734
- const { loadCheckCounts: m } = U.value;
1735
- if ((w = (h = r == null ? void 0 : r.getOption()) == null ? void 0 : h.dataZoom) != null && w[0]) {
1736
- const { startValue: B } = (T = (x = r == null ? void 0 : r.getOption()) == null ? void 0 : x.dataZoom) == null ? void 0 : T[0];
1737
- B < m && d === !1 && y === !1 && (d = !0, te("history")), b();
983
+ }, N = () => {
984
+ e == null || e.on("datazoom", (t) => {
985
+ clearTimeout(Y), Y = setTimeout(() => {
986
+ var f, y, p, M;
987
+ const { loadCheckCounts: d } = K.value;
988
+ if ((y = (f = e == null ? void 0 : e.getOption()) == null ? void 0 : f.dataZoom) != null && y[0]) {
989
+ const { startValue: O } = (M = (p = e == null ? void 0 : e.getOption()) == null ? void 0 : p.dataZoom) == null ? void 0 : M[0];
990
+ O < d && g === !1 && x === !1 && (g = !0, ie("history")), u();
1738
991
  }
1739
- clearTimeout(S);
992
+ clearTimeout(Y);
1740
993
  }, 100);
1741
- }), r == null || r.on("highlight", (s) => {
1742
- var h, w;
1743
- let m = s.dataIndex || -1;
1744
- s.batch && (m = typeof ((h = s == null ? void 0 : s.batch[0]) == null ? void 0 : h.dataIndex) == "number" ? (w = s == null ? void 0 : s.batch[0]) == null ? void 0 : w.dataIndex : -1), clearTimeout(M), M = setTimeout(() => {
1745
- j.value = m, clearTimeout(M);
994
+ }), e == null || e.on("highlight", (t) => {
995
+ var f, y;
996
+ let d = t.dataIndex || -1;
997
+ t.batch && (d = typeof ((f = t == null ? void 0 : t.batch[0]) == null ? void 0 : f.dataIndex) == "number" ? (y = t == null ? void 0 : t.batch[0]) == null ? void 0 : y.dataIndex : -1), clearTimeout($), $ = setTimeout(() => {
998
+ q.value = d, clearTimeout($);
1746
999
  }, 20);
1747
- }), r == null || r.on("globalout", () => {
1748
- var m, h, w;
1749
- const s = (w = (h = (m = r == null ? void 0 : r.getOption()) == null ? void 0 : m.dataZoom) == null ? void 0 : h[0]) == null ? void 0 : w.endValue;
1750
- j.value = s;
1000
+ }), e == null || e.on("globalout", () => {
1001
+ var d, f, y;
1002
+ const t = (y = (f = (d = e == null ? void 0 : e.getOption()) == null ? void 0 : d.dataZoom) == null ? void 0 : f[0]) == null ? void 0 : y.endValue;
1003
+ q.value = t;
1751
1004
  });
1752
- let t = null;
1753
- r == null || r.on("contextmenu", (s) => {
1754
- t = setTimeout(() => {
1755
- s.componentType === "graphic" && (k.value = s.info, Q.value = [
1005
+ let n = null;
1006
+ e == null || e.on("contextmenu", (t) => {
1007
+ n = setTimeout(() => {
1008
+ t.componentType === "graphic" && (v.value = t.info, oe.value = [
1756
1009
  { label: "删除画线", key: "deleteWarningLine" },
1757
1010
  { label: "修改画线", key: "changeWarningLine" }
1758
- ]), clearTimeout(t), t = null;
1011
+ ]), clearTimeout(n), n = null;
1759
1012
  });
1760
1013
  });
1761
- }, D = async () => {
1762
- var t, s, m, h, w, x;
1014
+ }, _ = async () => {
1015
+ var n, t, d, f, y, p;
1763
1016
  try {
1764
- if (!f.variety || !f.cycle)
1017
+ if (!s.variety || !s.cycle)
1765
1018
  return;
1766
- const { variety: T, featureId: B, cycle: W, indicatorStore: C, mainIndicator: F, right: ne, startTime: oe, endTime: H } = f, { defaultShowCounts: ae, addCounts: P, showWarningLine: Pe, getFactorData: $e } = U.value, se = {
1767
- variety: T,
1768
- featureId: B,
1769
- cycle: W,
1770
- mainIndicatorList: C.getIndicatorParams(F),
1771
- subIndicator: O.value,
1772
- right: ne,
1773
- showWarningLine: Pe,
1774
- getFactorData: $e
1019
+ const { variety: M, featureId: O, cycle: R, indicatorStore: w, mainIndicator: F, right: X, startTime: J, endTime: V } = s, { defaultShowCounts: G, addCounts: T, showWarningLine: he, getFactorData: pe } = K.value, Q = {
1020
+ variety: M,
1021
+ featureId: O,
1022
+ cycle: R,
1023
+ mainIndicatorList: w.getIndicatorParams(F),
1024
+ subIndicator: A.value,
1025
+ right: X,
1026
+ showWarningLine: he,
1027
+ getFactorData: pe
1775
1028
  };
1776
- oe && H ? (se.startTime = oe, se.endTime = H) : oe ? (se.startTime = oe, se.limit = ae + P) : H ? (se.endTime = H, se.limit = ae + P) : (se.endTime = I().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), se.limit = ae + P);
1777
- const ie = await xn(se);
1778
- if ((m = (s = (t = ie == null ? void 0 : ie.body) == null ? void 0 : t.kline) == null ? void 0 : s.time) != null && m.length)
1779
- v.value = !1, $.value = !1;
1029
+ J && V ? (Q.startTime = J, Q.endTime = V) : J ? (Q.startTime = J, Q.limit = G + T) : V ? (Q.endTime = V, Q.limit = G + T) : (Q.endTime = b().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), Q.limit = G + T);
1030
+ const ee = await Qe(Q);
1031
+ if ((d = (t = (n = ee == null ? void 0 : ee.body) == null ? void 0 : n.kline) == null ? void 0 : t.time) != null && d.length)
1032
+ c.value = !1, D.value = !1;
1780
1033
  else {
1781
- v.value = !0, $.value = !1;
1034
+ c.value = !0, D.value = !1;
1782
1035
  return;
1783
1036
  }
1784
- E.value = (h = ie == null ? void 0 : ie.body) == null ? void 0 : h.kline, Z.value = ((w = ie == null ? void 0 : ie.body) == null ? void 0 : w.warningLine) || [], ue(), b(), $e && _("getFactorData", (x = ie == null ? void 0 : ie.body) == null ? void 0 : x.factor);
1785
- } catch (T) {
1786
- throw $.value = !0, v.value = !1, new Error(T);
1037
+ E.value = (f = ee == null ? void 0 : ee.body) == null ? void 0 : f.kline, Z.value = ((y = ee == null ? void 0 : ee.body) == null ? void 0 : y.warningLine) || [], se(), u(), pe && k("getFactorData", (p = ee == null ? void 0 : ee.body) == null ? void 0 : p.factor);
1038
+ } catch (M) {
1039
+ throw D.value = !0, c.value = !1, new Error(M);
1787
1040
  }
1788
- }, te = async (t) => {
1789
- const { variety: s, cycle: m, indicatorStore: h, mainIndicator: w, right: x } = f, { addCounts: T } = U.value, { time: B } = E.value;
1790
- if (t === "history") {
1791
- const W = await _n({
1792
- variety: s,
1793
- cycle: m,
1794
- endTime: B[0],
1795
- limit: T,
1796
- mainIndicatorList: h.getIndicatorParams(w),
1797
- subIndicator: O.value,
1798
- right: x
1041
+ }, ie = async (n) => {
1042
+ const { variety: t, cycle: d, indicatorStore: f, mainIndicator: y, right: p } = s, { addCounts: M } = K.value, { time: O } = E.value;
1043
+ if (n === "history") {
1044
+ const R = await et({
1045
+ variety: t,
1046
+ cycle: d,
1047
+ endTime: O[0],
1048
+ limit: M,
1049
+ mainIndicatorList: f.getIndicatorParams(y),
1050
+ subIndicator: A.value,
1051
+ right: p
1799
1052
  });
1800
1053
  E.value = {
1801
- time: [...W.body.time, ...E.value.time.slice(1)],
1802
- data: [...W.body.data, ...E.value.data.slice(1)],
1803
- mainIndicator: E.value.mainIndicator.map((C, F) => ({
1804
- ...C,
1805
- data: [...W.body.mainIndicator[F].data, ...C.data.slice(1)]
1054
+ time: [...R.body.time, ...E.value.time.slice(1)],
1055
+ data: [...R.body.data, ...E.value.data.slice(1)],
1056
+ mainIndicator: E.value.mainIndicator.map((w, F) => ({
1057
+ ...w,
1058
+ data: [...R.body.mainIndicator[F].data, ...w.data.slice(1)]
1806
1059
  })),
1807
- subIndicator: E.value.subIndicator.map((C, F) => ({
1808
- ...C,
1809
- data: [...W.body.subIndicator[F].data, ...C.data.slice(1)]
1060
+ subIndicator: E.value.subIndicator.map((w, F) => ({
1061
+ ...w,
1062
+ data: [...R.body.subIndicator[F].data, ...w.data.slice(1)]
1810
1063
  }))
1811
- }, ue(!0), W.body.data.length < T && (y = !0), d = !1;
1064
+ }, se(!0), R.body.data.length < M && (x = !0), g = !1;
1812
1065
  }
1813
- }, ue = (t = !1) => {
1814
- var F, ne, oe;
1815
- ee();
1816
- const { time: s } = E.value, { gridRight: m, gridLeft: h, defaultShowCounts: w, maxShowCounts: x, showSubChart: T } = U.value;
1817
- let B = s.length - 1 - w, W = s.length - 1;
1818
- if (t) {
1819
- const H = r.getOption(), ae = (ne = (F = H == null ? void 0 : H.xAxis) == null ? void 0 : F[0]) == null ? void 0 : ne.data, P = (oe = H == null ? void 0 : H.dataZoom) == null ? void 0 : oe[0], Pe = ae[P == null ? void 0 : P.startValue], $e = ae[P == null ? void 0 : P.endValue];
1820
- B = s.findIndex((se) => se === Pe), W = s.findIndex((se) => se === $e);
1066
+ }, se = (n = !1) => {
1067
+ var F, X, J;
1068
+ ae();
1069
+ const { time: t } = E.value, { gridRight: d, gridLeft: f, defaultShowCounts: y, maxShowCounts: p, showSubChart: M } = K.value;
1070
+ let O = t.length - 1 - y, R = t.length - 1;
1071
+ if (n) {
1072
+ const V = e.getOption(), G = (X = (F = V == null ? void 0 : V.xAxis) == null ? void 0 : F[0]) == null ? void 0 : X.data, T = (J = V == null ? void 0 : V.dataZoom) == null ? void 0 : J[0], he = G[T == null ? void 0 : T.startValue], pe = G[T == null ? void 0 : T.endValue];
1073
+ O = t.findIndex((Q) => Q === he), R = t.findIndex((Q) => Q === pe);
1821
1074
  }
1822
- const C = Yn(E.value, U.value, B, W, f.cycle);
1823
- if (r.setOption(C, !0), j.value = W, f.brushRange) {
1824
- let H = null, ae = null;
1825
- switch (f.cycle) {
1075
+ const w = ot(E.value, K.value, O, R, s.cycle);
1076
+ if (e.setOption(w, !0), q.value = R, s.brushRange) {
1077
+ let V = null, G = null;
1078
+ switch (s.cycle) {
1826
1079
  case "6": {
1827
- H = s.find((P) => new Date(P).getTime() >= new Date(f.brushRange[0]).getTime() || I(P).format("YYYY-MM-DD") === I(f.brushRange[0]).format("YYYY-MM-DD")), ae = s.findLast((P) => new Date(P).getTime() <= new Date(f.brushRange[1]).getTime() || I(P).format("YYYY-MM-DD") === I(f.brushRange[1]).format("YYYY-MM-DD"));
1080
+ V = t.find((T) => new Date(T).getTime() >= new Date(s.brushRange[0]).getTime() || b(T).format("YYYY-MM-DD") === b(s.brushRange[0]).format("YYYY-MM-DD")), G = t.findLast((T) => new Date(T).getTime() <= new Date(s.brushRange[1]).getTime() || b(T).format("YYYY-MM-DD") === b(s.brushRange[1]).format("YYYY-MM-DD"));
1828
1081
  break;
1829
1082
  }
1830
1083
  case "7": {
1831
- H = s.find((P) => I(P).day(5).format("YYYY-MM-DD") === I(f.brushRange[0]).day(5).format("YYYY-MM-DD")), ae = s.findLast((P) => I(P).day(5).format("YYYY-MM-DD") === I(f.brushRange[1]).day(5).format("YYYY-MM-DD"));
1084
+ V = t.find((T) => b(T).day(5).format("YYYY-MM-DD") === b(s.brushRange[0]).day(5).format("YYYY-MM-DD")), G = t.findLast((T) => b(T).day(5).format("YYYY-MM-DD") === b(s.brushRange[1]).day(5).format("YYYY-MM-DD"));
1832
1085
  break;
1833
1086
  }
1834
1087
  case "8": {
1835
- H = s.find((P) => I(P).endOf("month").format("YYYY-MM-DD") === I(f.brushRange[0]).endOf("month").format("YYYY-MM-DD")), ae = s.findLast((P) => I(P).endOf("month").format("YYYY-MM-DD") === I(f.brushRange[1]).endOf("month").format("YYYY-MM-DD"));
1088
+ V = t.find((T) => b(T).endOf("month").format("YYYY-MM-DD") === b(s.brushRange[0]).endOf("month").format("YYYY-MM-DD")), G = t.findLast((T) => b(T).endOf("month").format("YYYY-MM-DD") === b(s.brushRange[1]).endOf("month").format("YYYY-MM-DD"));
1836
1089
  break;
1837
1090
  }
1838
1091
  default:
1839
- H = s.find((P) => new Date(P).getTime() >= new Date(f.brushRange[0]).getTime()), ae = s.findLast((P) => new Date(P).getTime() <= new Date(f.brushRange[1]).getTime());
1092
+ V = t.find((T) => new Date(T).getTime() >= new Date(s.brushRange[0]).getTime()), G = t.findLast((T) => new Date(T).getTime() <= new Date(s.brushRange[1]).getTime());
1840
1093
  }
1841
- console.log(H, ae), r.dispatchAction({
1094
+ console.log(V, G), e.dispatchAction({
1842
1095
  type: "brush",
1843
1096
  areas: [
1844
1097
  {
1845
1098
  brushType: "lineX",
1846
- coordRange: [H, ae],
1099
+ coordRange: [V, G],
1847
1100
  xAxisIndex: 0
1848
1101
  }
1849
1102
  ]
1850
1103
  });
1851
1104
  }
1852
- T && R.value.draw({ startValue: B, endValue: W, maxValueSpan: x }, { gridLeft: h, gridRight: m }), a();
1853
- }, b = () => {
1854
- if (!r)
1105
+ M && W.value.draw({ startValue: O, endValue: R, maxValueSpan: p }, { gridLeft: f, gridRight: d }), a();
1106
+ }, u = () => {
1107
+ if (!e)
1855
1108
  return;
1856
- const t = r == null ? void 0 : r.getOption();
1857
- t && (r == null || r.setOption(
1109
+ const n = e == null ? void 0 : e.getOption();
1110
+ n && (e == null || e.setOption(
1858
1111
  {
1859
- ...t,
1112
+ ...n,
1860
1113
  graphic: [
1861
- ...kn(r, Z.value, f, U.value, () => {
1862
- o();
1114
+ ...at(e, Z.value, s, K.value, () => {
1115
+ r();
1863
1116
  })
1864
1117
  ]
1865
1118
  },
1866
1119
  !0
1867
1120
  ), a());
1868
1121
  }, a = () => {
1869
- const { time: t } = E.value;
1870
- if (f.brushRange && (t != null && t.length)) {
1871
- let s = I(f.brushRange[0]).format("YYYY-MM-DD 00:00:00"), m = I(f.brushRange[1]).format("YYYY-MM-DD 23:59:59"), h = null, w = null;
1872
- switch (f.cycle) {
1122
+ const { time: n } = E.value;
1123
+ if (s.brushRange && (n != null && n.length)) {
1124
+ let t = b(s.brushRange[0]).format("YYYY-MM-DD 00:00:00"), d = b(s.brushRange[1]).format("YYYY-MM-DD 23:59:59"), f = null, y = null;
1125
+ switch (s.cycle) {
1873
1126
  case "6": {
1874
- h = t.find((x) => I(x).format("YYYY-MM-DD") === I(s).format("YYYY-MM-DD")), w = h;
1127
+ f = n.find((p) => b(p).format("YYYY-MM-DD") === b(t).format("YYYY-MM-DD")), y = f;
1875
1128
  break;
1876
1129
  }
1877
1130
  case "7": {
1878
- h = t.find((x) => I(x).day(5).format("YYYY-MM-DD") === I(s).day(5).format("YYYY-MM-DD")), w = t.findLast((x) => I(x).day(5).format("YYYY-MM-DD") === I(m).day(5).format("YYYY-MM-DD"));
1131
+ f = n.find((p) => b(p).day(5).format("YYYY-MM-DD") === b(t).day(5).format("YYYY-MM-DD")), y = n.findLast((p) => b(p).day(5).format("YYYY-MM-DD") === b(d).day(5).format("YYYY-MM-DD"));
1879
1132
  break;
1880
1133
  }
1881
1134
  case "8": {
1882
- h = t.find((x) => I(x).endOf("month").format("YYYY-MM-DD") === I(s).endOf("month").format("YYYY-MM-DD")), w = t.findLast((x) => I(x).endOf("month").format("YYYY-MM-DD") === I(m).endOf("month").format("YYYY-MM-DD"));
1135
+ f = n.find((p) => b(p).endOf("month").format("YYYY-MM-DD") === b(t).endOf("month").format("YYYY-MM-DD")), y = n.findLast((p) => b(p).endOf("month").format("YYYY-MM-DD") === b(d).endOf("month").format("YYYY-MM-DD"));
1883
1136
  break;
1884
1137
  }
1885
1138
  default:
1886
- h = t.find((x) => {
1887
- const T = I(x).format("YYYY-MM-DD") === I(s).format("YYYY-MM-DD"), B = new Date(x).getTime() >= new Date(s).getTime();
1888
- return T && B;
1889
- }), w = t.findLast((x) => {
1890
- const T = I(x).format("YYYY-MM-DD") === I(m).format("YYYY-MM-DD"), B = new Date(x).getTime() <= new Date(m).getTime();
1891
- return T && B;
1139
+ f = n.find((p) => {
1140
+ const M = b(p).format("YYYY-MM-DD") === b(t).format("YYYY-MM-DD"), O = new Date(p).getTime() >= new Date(t).getTime();
1141
+ return M && O;
1142
+ }), y = n.findLast((p) => {
1143
+ const M = b(p).format("YYYY-MM-DD") === b(d).format("YYYY-MM-DD"), O = new Date(p).getTime() <= new Date(d).getTime();
1144
+ return M && O;
1892
1145
  });
1893
1146
  }
1894
- r.dispatchAction({
1147
+ e.dispatchAction({
1895
1148
  type: "brush",
1896
1149
  areas: [
1897
1150
  {
1898
1151
  brushType: "lineX",
1899
- coordRange: [h, w],
1152
+ coordRange: [f, y],
1900
1153
  xAxisIndex: 0
1901
1154
  }
1902
1155
  ]
1903
1156
  });
1904
1157
  }
1905
- }, o = async () => {
1906
- const t = await Sn({ featureId: f.featureId });
1907
- Z.value = (t == null ? void 0 : t.body) || [], b(), _("change", "warningLine", Z.value);
1908
- }, l = async (t) => {
1909
- const { variety: s, varietyName: m, featureId: h, featureType: w } = f;
1910
- if (t.key === "drawWarningLine") {
1911
- const x = r == null ? void 0 : r.getOption(), T = x.tooltip[0];
1912
- r == null || r.setOption({
1913
- ...x,
1158
+ }, r = async () => {
1159
+ const n = await nt({ featureId: s.featureId });
1160
+ Z.value = (n == null ? void 0 : n.body) || [], u(), k("change", "warningLine", Z.value);
1161
+ }, l = async (n) => {
1162
+ const { variety: t, varietyName: d, featureId: f, featureType: y } = s;
1163
+ if (n.key === "drawWarningLine") {
1164
+ const p = e == null ? void 0 : e.getOption(), M = p.tooltip[0];
1165
+ e == null || e.setOption({
1166
+ ...p,
1914
1167
  // 指示器样式
1915
1168
  tooltip: {
1916
- ...T,
1169
+ ...M,
1917
1170
  // 坐标轴指示器
1918
1171
  axisPointer: {
1919
1172
  // 保留原有部分配置
1920
- ...T.axisPointer,
1173
+ ...M.axisPointer,
1921
1174
  // X轴指示线的宽度
1922
1175
  lineStyle: {
1923
1176
  width: 0
@@ -1929,25 +1182,25 @@ const vt = (e) => (Ct("data-v-95b8303f"), e = e(), Et(), e), Rn = { class: "klin
1929
1182
  // 文本标签
1930
1183
  label: {
1931
1184
  // 保留原有部分配置
1932
- ...T.axisPointer.label,
1185
+ ...M.axisPointer.label,
1933
1186
  // 颜色改为透明
1934
1187
  backgroundColor: "transparent",
1935
1188
  // 仅显示Y轴值
1936
- formatter: (W) => ""
1189
+ formatter: (R) => ""
1937
1190
  }
1938
1191
  }
1939
1192
  }
1940
1193
  });
1941
- const B = async (W) => {
1942
- r == null || r.getZr().off("mousedown", B);
1943
- const C = r == null ? void 0 : r.convertFromPixel({ yAxisIndex: 0 }, W.offsetY), F = Math.round(C * 1e3) / 1e3;
1944
- r == null || r.setOption({
1945
- ...x,
1194
+ const O = async (R) => {
1195
+ e == null || e.getZr().off("mousedown", O);
1196
+ const w = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 }, R.offsetY), F = Math.round(w * 1e3) / 1e3;
1197
+ e == null || e.setOption({
1198
+ ...p,
1946
1199
  // 指示器样式
1947
1200
  tooltip: {
1948
- ...T,
1201
+ ...M,
1949
1202
  axisPointer: {
1950
- ...T.axisPointer,
1203
+ ...M.axisPointer,
1951
1204
  lineStyle: {
1952
1205
  width: 1
1953
1206
  },
@@ -1955,79 +1208,79 @@ const vt = (e) => (Ct("data-v-95b8303f"), e = e(), Et(), e), Rn = { class: "klin
1955
1208
  width: 1
1956
1209
  },
1957
1210
  label: {
1958
- ...T.axisPointer.label,
1211
+ ...M.axisPointer.label,
1959
1212
  backgroundColor: null
1960
1213
  }
1961
1214
  }
1962
1215
  }
1963
- }), await wn({
1964
- featureCode: s,
1216
+ }), await tt({
1217
+ featureCode: t,
1965
1218
  //品种代码
1966
- featureName: m,
1219
+ featureName: d,
1967
1220
  //品种名称
1968
- featureId: h,
1221
+ featureId: f,
1969
1222
  //品种id
1970
- featureType: w,
1223
+ featureType: y,
1971
1224
  //品种类型
1972
1225
  warnPrice: F
1973
- }), ke.success("画线预警成功!"), o();
1226
+ }), ye.success("画线预警成功!"), r();
1974
1227
  };
1975
- r == null || r.getZr().on("mousedown", B);
1228
+ e == null || e.getZr().on("mousedown", O);
1976
1229
  } else
1977
- t.key === "deleteWarningLine" ? (await $n({ id: k.value.id }), ke.success("画线预警删除成功"), o()) : t.key === "changeWarningLine" && (q.value = !0, L.value = k.value.warnPrice);
1978
- }, u = async () => {
1979
- const { variety: t, varietyName: s, featureId: m, featureType: h } = f;
1980
- await mt({
1981
- id: k.value.id,
1982
- featureCode: t,
1230
+ n.key === "deleteWarningLine" ? (await rt({ id: v.value.id }), ye.success("画线预警删除成功"), r()) : n.key === "changeWarningLine" && (C.value = !0, P.value = v.value.warnPrice);
1231
+ }, o = async () => {
1232
+ const { variety: n, varietyName: t, featureId: d, featureType: f } = s;
1233
+ await Oe({
1234
+ id: v.value.id,
1235
+ featureCode: n,
1983
1236
  //品种代码
1984
- featureName: s,
1237
+ featureName: t,
1985
1238
  //品种名称
1986
- featureId: m,
1239
+ featureId: d,
1987
1240
  //品种id
1988
- featureType: h,
1241
+ featureType: f,
1989
1242
  //品种类型
1990
- warnPrice: L.value
1991
- }), ke.success("画线预警修改成功"), o();
1992
- }, p = () => {
1993
- Q.value = [...g];
1243
+ warnPrice: P.value
1244
+ }), ye.success("画线预警修改成功"), r();
1245
+ }, m = () => {
1246
+ oe.value = [...L];
1994
1247
  };
1995
- return c({
1996
- draw: (t, s) => {
1997
- t === "warningLine" && (Z.value = s, b());
1248
+ return B({
1249
+ draw: (n, t) => {
1250
+ n === "warningLine" && (Z.value = t, u());
1998
1251
  }
1999
- }), (t, s) => {
2000
- var W;
2001
- const m = bn, h = yn, w = St, x = wt, T = xt, B = bt;
2002
- return z(), K(pe, null, [
2003
- re("div", Rn, [
2004
- re("div", Vn, [
2005
- J(Cn, {
1252
+ }), (n, t) => {
1253
+ var R;
1254
+ const d = Be, f = Ie, y = Ee, p = Ve, M = Re, O = Ae;
1255
+ return j(), U(ge, null, [
1256
+ ne("div", vt, [
1257
+ ne("div", bt, [
1258
+ z(ct, {
2006
1259
  data: E.value,
2007
- activeIndex: j.value
1260
+ activeIndex: q.value
2008
1261
  }, null, 8, ["data", "activeIndex"])
2009
1262
  ]),
2010
- re("div", {
1263
+ ne("div", {
2011
1264
  class: "klineBasic-main",
2012
- style: Ke({ height: U.value.showSubChart ? "70%" : "100%" })
1265
+ style: Ye({ height: K.value.showSubChart ? "70%" : "100%" })
2013
1266
  }, [
2014
- J(Fn, { onCloseContextMenuCallBack: p }, {
2015
- popover: G(() => [
2016
- J(h, { style: {
1267
+ z(ht, { onCloseContextMenuCallBack: m }, {
1268
+ popover: te(() => [
1269
+ z(f, { style: {
2017
1270
  borderRadius: "4px",
2018
1271
  overflow: "hidden",
2019
1272
  background: "#fff",
2020
1273
  borderRight: 0
2021
1274
  } }, {
2022
- default: G(() => [
2023
- (z(!0), K(pe, null, Ze(Q.value, (C) => (z(), xe(m, {
1275
+ default: te(() => [
1276
+ (j(!0), U(ge, null, _e(oe.value, (w) => (j(), Te(d, {
2024
1277
  style: { height: "36px" },
2025
- key: C.key,
2026
- index: C.key,
2027
- onClick: (F) => l(C)
1278
+ key: w.key,
1279
+ index: w.key,
1280
+ onClick: (F) => l(w)
2028
1281
  }, {
2029
- default: G(() => [
2030
- he(Ee(C.label), 1)
1282
+ default: te(() => [
1283
+ me(ve(w.label), 1)
2031
1284
  ]),
2032
1285
  _: 2
2033
1286
  }, 1032, ["index", "onClick"]))), 128))
@@ -2035,79 +1288,79 @@ const vt = (e) => (Ct("data-v-95b8303f"), e = e(), Et(), e), Rn = { class: "klin
2035
1288
  _: 1
2036
1289
  })
2037
1290
  ]),
2038
- default: G(() => [
2039
- re("div", {
1291
+ default: te(() => [
1292
+ ne("div", {
2040
1293
  ref_key: "klineBasicMainRef",
2041
- ref: Y,
1294
+ ref: h,
2042
1295
  style: { height: "100%" }
2043
1296
  }, null, 512)
2044
1297
  ]),
2045
1298
  _: 1
2046
1299
  })
2047
1300
  ], 4),
2048
- U.value.showSubChart ? (z(), K("div", Wn, [
2049
- J(An, {
1301
+ K.value.showSubChart ? (j(), U("div", xt, [
1302
+ z(yt, {
2050
1303
  ref_key: "klineSubRef",
2051
- ref: R,
2052
- modelValue: O.value,
2053
- "onUpdate:modelValue": s[0] || (s[0] = (C) => O.value = C),
1304
+ ref: W,
1305
+ modelValue: A.value,
1306
+ "onUpdate:modelValue": t[0] || (t[0] = (w) => A.value = w),
2054
1307
  data: E.value,
2055
- cycle: e.cycle,
2056
- activeIndex: j.value,
2057
- subIndicatorList: (W = e.indicatorStore) == null ? void 0 : W.subIndicatorList
1308
+ cycle: i.cycle,
1309
+ activeIndex: q.value,
1310
+ subIndicatorList: (R = i.indicatorStore) == null ? void 0 : R.subIndicatorList
2058
1311
  }, null, 8, ["modelValue", "data", "cycle", "activeIndex", "subIndicatorList"])
2059
- ])) : be("", !0),
2060
- v.value ? (z(), K("div", Hn, [
2061
- J(w, {
1312
+ ])) : le("", !0),
1313
+ c.value ? (j(), U("div", _t, [
1314
+ z(y, {
2062
1315
  class: "klineBasic-empty-content",
2063
1316
  description: "暂无数据"
2064
1317
  })
2065
- ])) : be("", !0),
2066
- $.value ? (z(), K("div", zn, [
2067
- jn,
2068
- re("div", qn, [
2069
- J(x, { onClick: D }, {
2070
- default: G(() => [
2071
- he("刷新")
1318
+ ])) : le("", !0),
1319
+ D.value ? (j(), U("div", Yt, [
1320
+ Dt,
1321
+ ne("div", Mt, [
1322
+ z(p, { onClick: _ }, {
1323
+ default: te(() => [
1324
+ me("刷新")
2072
1325
  ]),
2073
1326
  _: 1
2074
1327
  })
2075
1328
  ])
2076
- ])) : be("", !0)
1329
+ ])) : le("", !0)
2077
1330
  ]),
2078
- J(B, {
2079
- modelValue: q.value,
2080
- "onUpdate:modelValue": s[3] || (s[3] = (C) => q.value = C),
1331
+ z(O, {
1332
+ modelValue: C.value,
1333
+ "onUpdate:modelValue": t[3] || (t[3] = (w) => C.value = w),
2081
1334
  title: "画线预警-修改价格",
2082
1335
  width: "30%",
2083
1336
  "align-center": ""
2084
1337
  }, {
2085
- footer: G(() => [
2086
- re("span", Zn, [
2087
- J(x, {
2088
- onClick: s[2] || (s[2] = (C) => q.value = !1)
1338
+ footer: te(() => [
1339
+ ne("span", $t, [
1340
+ z(p, {
1341
+ onClick: t[2] || (t[2] = (w) => C.value = !1)
2089
1342
  }, {
2090
- default: G(() => [
2091
- he("取消")
1343
+ default: te(() => [
1344
+ me("取消")
2092
1345
  ]),
2093
1346
  _: 1
2094
1347
  }),
2095
- J(x, {
1348
+ z(p, {
2096
1349
  type: "primary",
2097
- onClick: u
1350
+ onClick: o
2098
1351
  }, {
2099
- default: G(() => [
2100
- he("确定")
1352
+ default: te(() => [
1353
+ me("确定")
2101
1354
  ]),
2102
1355
  _: 1
2103
1356
  })
2104
1357
  ])
2105
1358
  ]),
2106
- default: G(() => [
2107
- Un,
2108
- J(T, {
2109
- modelValue: L.value,
2110
- "onUpdate:modelValue": s[1] || (s[1] = (C) => L.value = C),
1359
+ default: te(() => [
1360
+ wt,
1361
+ z(M, {
1362
+ modelValue: P.value,
1363
+ "onUpdate:modelValue": t[1] || (t[1] = (w) => P.value = w),
2111
1364
  placeholder: "输入预警价格"
2112
1365
  }, null, 8, ["modelValue"])
2113
1366
  ]),
@@ -2116,11 +1369,11 @@ const vt = (e) => (Ct("data-v-95b8303f"), e = e(), Et(), e), Rn = { class: "klin
2116
1369
  ], 64);
2117
1370
  };
2118
1371
  }
2119
- }, Xn = /* @__PURE__ */ Se(Kn, [["__scopeId", "data-v-95b8303f"]]), Mo = {
2120
- install(e) {
2121
- e.component("st-klineBasic", Xn);
1372
+ }, kt = /* @__PURE__ */ fe(St, [["__scopeId", "data-v-95b8303f"]]), rn = {
1373
+ install(i) {
1374
+ i.component("st-klineBasic", kt);
2122
1375
  }
2123
1376
  };
2124
1377
  export {
2125
- Mo as default
1378
+ rn as default
2126
1379
  };