st-comp 0.0.207 → 0.0.209

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/Kline.js CHANGED
@@ -2,7 +2,7 @@ import "./base-a5af3db3.js";
2
2
  import { E as he, a as Ce } from "./el-menu-item-7e881203.js";
3
3
  import "./el-tooltip-4ed993c7.js";
4
4
  import "./el-popper-b4f97157.js";
5
- import { defineComponent as Me, openBlock as C, createElementBlock as v, createElementVNode as K, Fragment as ae, renderList as le, normalizeStyle as ye, toDisplayString as q, ref as S, renderSlot as De, createCommentVNode as xe, nextTick as Ye, computed as W, watch as H, onMounted as de, onUnmounted as ge, createVNode as V, withCtx as X, createBlock as Ae, createTextVNode as Oe, normalizeClass as ke } from "vue";
5
+ import { defineComponent as Me, openBlock as h, createElementBlock as k, createElementVNode as K, Fragment as ae, renderList as le, normalizeStyle as ye, toDisplayString as q, ref as S, renderSlot as De, createCommentVNode as xe, nextTick as Ye, computed as W, watch as H, onMounted as de, onUnmounted as ge, createVNode as V, withCtx as X, createBlock as Ae, createTextVNode as Oe, normalizeClass as ke } from "vue";
6
6
  import * as oe from "echarts";
7
7
  import { _ as $ } from "./_plugin-vue_export-helper-dad06003.js";
8
8
  import { x as re } from "./index-7ed0999e.js";
@@ -34,9 +34,9 @@ const Fe = { class: "st-kline-tips" }, Qe = { class: "st-kline-tips-row" }, _e =
34
34
  }
35
35
  },
36
36
  setup(a) {
37
- return (t, i) => (C(), v("div", Fe, [
37
+ return (t, i) => (h(), k("div", Fe, [
38
38
  K("div", Qe, [
39
- (C(!0), v(ae, null, le(a.data, (e) => (C(), v("div", {
39
+ (h(!0), k(ae, null, le(a.data, (e) => (h(), k("div", {
40
40
  class: "st-kline-tips-row-item",
41
41
  style: ye({ color: e.color })
42
42
  }, q(e.label) + " " + q(e.value), 5))), 256))
@@ -77,7 +77,7 @@ const se = /* @__PURE__ */ $(_e, [["__scopeId", "data-v-78aed210"]]), Ue = /* @_
77
77
  });
78
78
  }), document.addEventListener("click", z);
79
79
  };
80
- return (l, r) => (C(), v("div", {
80
+ return (l, r) => (h(), k("div", {
81
81
  ref_key: "contextmenuRef",
82
82
  ref: e,
83
83
  class: "contextmenu",
@@ -85,7 +85,7 @@ const se = /* @__PURE__ */ $(_e, [["__scopeId", "data-v-78aed210"]]), Ue = /* @_
85
85
  onMouseleave: z
86
86
  }, [
87
87
  De(l.$slots, "default", {}, void 0, !0),
88
- o.value.display !== "none" ? (C(), v("div", {
88
+ o.value.display !== "none" ? (h(), k("div", {
89
89
  key: 0,
90
90
  ref_key: "contextmenuContentRef",
91
91
  ref: n,
@@ -129,7 +129,7 @@ const fe = (a) => {
129
129
  }, ce = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjM4NzI1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI2MjUiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2Nj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Q2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==", J = (a, t) => {
130
130
  const { type: i = "log", color: e = "black" } = t ?? {};
131
131
  localStorage.getItem("st-kline-console-show") === "true" && console[i](`%c${a}`, `color:${e}`);
132
- }, h = (a) => a || a === 0 ? Math.round(a * 1e3) / 1e3 : null, We = (a) => a >= 1e12 ? `${(a / 1e12).toFixed(2)}万亿` : a >= 1e8 ? `${(a / 1e8).toFixed(2)}亿` : a >= 1e4 ? `${(a / 1e4).toFixed(2)}万` : a.toFixed(2), Ze = (a) => {
132
+ }, b = (a) => a || a === 0 ? Math.round(a * 1e3) / 1e3 : null, We = (a) => a >= 1e12 ? `${(a / 1e12).toFixed(2)}万亿` : a >= 1e8 ? `${(a / 1e8).toFixed(2)}亿` : a >= 1e4 ? `${(a / 1e4).toFixed(2)}万` : a.toFixed(2), Ze = (a) => {
133
133
  const { y: t, text: i, info: e, gridLeft: n, gridRight: o, echartsWidth: z, echartsInstance: s } = a, { config: l, event: r } = e;
134
134
  let j = 0;
135
135
  return {
@@ -275,8 +275,8 @@ const fe = (a) => {
275
275
  const { y: t, text: i, profitY: e, profitText: n, lossY: o, lossText: z, info: s, gridLeft: l, gridRight: r, echartsWidth: j, echartsInstance: D } = a, { config: c, event: u } = s;
276
276
  let I = 0, M = null, p = null;
277
277
  const m = (N, d) => {
278
- var T, x, A, k;
279
- (T = N.children()[2]) == null || T.animate("style", !1).when(200, { opacity: ~~d }).start(), (x = N.children()[3].children()[0]) == null || x.animate("style", !1).when(200, { opacity: ~~d }).start(), (A = N.children()[4]) == null || A.animate("style", !1).when(200, { opacity: ~~d }).start(), (k = N.children()[5].children()[0]) == null || k.animate("style", !1).when(200, { opacity: ~~d }).start();
278
+ var T, x, A, O;
279
+ (T = N.children()[2]) == null || T.animate("style", !1).when(200, { opacity: ~~d }).start(), (x = N.children()[3].children()[0]) == null || x.animate("style", !1).when(200, { opacity: ~~d }).start(), (A = N.children()[4]) == null || A.animate("style", !1).when(200, { opacity: ~~d }).start(), (O = N.children()[5].children()[0]) == null || O.animate("style", !1).when(200, { opacity: ~~d }).start();
280
280
  }, w = (N) => {
281
281
  let d = null;
282
282
  N.target.type === "line" ? d = N.target.parent : N.target.type === "tspan" && (d = N.target.parent.parent.parent), M = (T) => {
@@ -284,7 +284,7 @@ const fe = (a) => {
284
284
  }, p = (T) => {
285
285
  (T.code === "AltLeft" || T.code === "AltRight") && m(d, !1);
286
286
  }, window.addEventListener("keydown", M), window.addEventListener("keyup", p);
287
- }, b = (N) => {
287
+ }, v = (N) => {
288
288
  let d = null;
289
289
  N.target.type === "line" ? d = N.target.parent : N.target.type === "tspan" && (d = N.target.parent.parent.parent), m(d, !1), window.removeEventListener("keydown", M), window.removeEventListener("keyup", p);
290
290
  };
@@ -418,7 +418,7 @@ const fe = (a) => {
418
418
  },
419
419
  // 事件:鼠标滑出
420
420
  onmouseout: (N) => {
421
- u.onmouseout instanceof Function ? u.onmouseout(N, s) : b(N);
421
+ u.onmouseout instanceof Function ? u.onmouseout(N, s) : v(N);
422
422
  },
423
423
  // 事件:开始拖拽
424
424
  ondragstart: (N) => {
@@ -560,9 +560,9 @@ const fe = (a) => {
560
560
  color: A
561
561
  }
562
562
  };
563
- }), b = Xe(t, p);
563
+ }), v = Xe(t, p);
564
564
  let N = [];
565
- return b.forEach((d) => {
565
+ return v.forEach((d) => {
566
566
  d.markLineTarget && (N = [...N, ...d.markLineTarget]);
567
567
  }), {
568
568
  animation: !1,
@@ -586,15 +586,15 @@ const fe = (a) => {
586
586
  label: {
587
587
  formatter: (d) => {
588
588
  const { axisDimension: T, value: x } = d;
589
- return T === "x" ? x : String(h(x));
589
+ return T === "x" ? x : String(b(x));
590
590
  }
591
591
  }
592
592
  },
593
593
  formatter: (d) => {
594
594
  let T = null, x = "";
595
595
  return d.forEach((A) => {
596
- A.seriesName === "资产持仓净值" && A.data !== null && (x += `<div>资产持仓净值: ${A.data}</div>`), A.componentSubType === "candlestick" && t.forEach((k) => {
597
- const { key: E, data: U } = k;
596
+ A.seriesName === "资产持仓净值" && A.data !== null && (x += `<div>资产持仓净值: ${A.data}</div>`), A.componentSubType === "candlestick" && t.forEach((O) => {
597
+ const { key: E, data: U } = O;
598
598
  if (E === "sellBuy") {
599
599
  const F = U.filter((f) => f.time === A.axisValue);
600
600
  let B = 0, g = 0;
@@ -649,7 +649,7 @@ const fe = (a) => {
649
649
  show: !0
650
650
  },
651
651
  axisLabel: {
652
- formatter: (d) => h(d),
652
+ formatter: (d) => b(d),
653
653
  showMaxLabel: !1
654
654
  }
655
655
  },
@@ -676,7 +676,7 @@ const fe = (a) => {
676
676
  type: "candlestick",
677
677
  data: M,
678
678
  markPoint: {
679
- data: b
679
+ data: v
680
680
  },
681
681
  markLine: {
682
682
  position: "middle",
@@ -761,17 +761,17 @@ const fe = (a) => {
761
761
  let j = [];
762
762
  if ((D = i == null ? void 0 : i.getModel()) != null && D.getComponent) {
763
763
  const [c, u] = i.getModel().getComponent("yAxis").axis.scale._extent;
764
- let I = [], M = {}, p = [], m = {}, w = [], b = {};
764
+ let I = [], M = {}, p = [], m = {}, w = [], v = {};
765
765
  if (a.forEach(({ key: N, data: d, ...T }) => {
766
- N === "warning" ? (I = d, M = T) : N === "position" ? (p = d, m = T) : N === "condition" && (w = d, b = T);
766
+ N === "warning" ? (I = d, M = T) : N === "position" ? (p = d, m = T) : N === "condition" && (w = d, v = T);
767
767
  }), I.length > 0 && (j = I.reduce((N, d) => {
768
- const { value: T, text: x, info: A, config: k } = d;
768
+ const { value: T, text: x, info: A, config: O } = d;
769
769
  if (T > u || T < c)
770
770
  return N;
771
771
  const E = {
772
772
  y: i.convertToPixel({ yAxisIndex: 0 }, T),
773
773
  text: x,
774
- info: { info: A, config: { ...z, ...k }, event: { ...M } },
774
+ info: { info: A, config: { ...z, ...O }, event: { ...M } },
775
775
  gridLeft: e,
776
776
  gridRight: n,
777
777
  echartsWidth: i.getWidth(),
@@ -779,13 +779,13 @@ const fe = (a) => {
779
779
  };
780
780
  return [...N, Ze(E)];
781
781
  }, j)), p.length > 0 && (j = p.reduce((N, d) => {
782
- const { value: T, text: x, info: A, config: k } = d;
782
+ const { value: T, text: x, info: A, config: O } = d;
783
783
  if (T > u || T < c)
784
784
  return N;
785
785
  const E = {
786
786
  y: i.convertToPixel({ yAxisIndex: 0 }, T),
787
787
  text: x,
788
- info: { info: A, config: { ...s, ...k }, event: { ...m } },
788
+ info: { info: A, config: { ...s, ...O }, event: { ...m } },
789
789
  gridLeft: e,
790
790
  gridRight: n,
791
791
  echartsWidth: i.getWidth(),
@@ -793,17 +793,17 @@ const fe = (a) => {
793
793
  };
794
794
  return [...N, Ge(E)];
795
795
  }, j)), w.length > 0 && (j = w.reduce((N, d) => {
796
- const { value: T, text: x, profitValue: A, profitText: k, lossValue: E, lossText: U, info: F, config: B } = d;
796
+ const { value: T, text: x, profitValue: A, profitText: O, lossValue: E, lossText: U, info: F, config: B } = d;
797
797
  if (T > u || T < c)
798
798
  return N;
799
799
  const g = {
800
800
  y: i.convertToPixel({ yAxisIndex: 0 }, T),
801
801
  text: x,
802
802
  profitY: i.convertToPixel({ yAxisIndex: 0 }, A),
803
- profitText: k,
803
+ profitText: O,
804
804
  lossY: i.convertToPixel({ yAxisIndex: 0 }, E),
805
805
  lossText: U,
806
- info: { info: F, config: { ...l, ...B }, event: { ...b } },
806
+ info: { info: F, config: { ...l, ...B }, event: { ...v } },
807
807
  gridLeft: e,
808
808
  gridRight: n,
809
809
  echartsWidth: i.getWidth(),
@@ -818,7 +818,7 @@ const fe = (a) => {
818
818
  d.forEach((g) => {
819
819
  T[g[1]] ? T[g[1]] += 1 : T[g[1]] = 1;
820
820
  });
821
- const x = d[d.length - 1][1], A = d.reduce((g, f) => g + f[1], 0) / d.length, k = x - A, E = et(d, 1, 50), U = tt(d), F = U ? k / U : 0, B = qe(d, 1, x);
821
+ const x = d[d.length - 1][1], A = d.reduce((g, f) => g + f[1], 0) / d.length, O = x - A, E = et(d, 1, 50), U = tt(d), F = U ? O / U : 0, B = qe(d, 1, x);
822
822
  j = [
823
823
  ...j,
824
824
  {
@@ -845,11 +845,11 @@ const fe = (a) => {
845
845
  y: i.getHeight() - o - 20,
846
846
  style: {
847
847
  fill: "#FFF",
848
- text: `均值: ${h(A)}    距均值: ${h(
849
- k
850
- )}    中值: ${h(E)}    标准差: ${h(
848
+ text: `均值: ${b(A)}    距均值: ${b(
849
+ O
850
+ )}    中值: ${b(E)}    标准差: ${b(
851
851
  U
852
- )}    距均值/标准差: ${h(F)}    百分位: ${h(
852
+ )}    距均值/标准差: ${b(F)}    百分位: ${b(
853
853
  B
854
854
  )}%`,
855
855
  lineWidth: 1,
@@ -1005,8 +1005,8 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1005
1005
  }, e = W(() => ({ ...i, ...t.config })), n = S(null), o = S(-1), z = W(() => {
1006
1006
  var g, f;
1007
1007
  if (n.value && ((f = (g = n.value.dataset[0]) == null ? void 0 : g.source) != null && f.klineData[o.value])) {
1008
- const L = n.value.dataset[0].source.klineData[o.value], y = [], { open: Y, heigh: O, low: Q, close: R, business: Z, riseAndFall: G } = e.value.tipsConfig;
1009
- if (Y && y.push({ label: "开", value: h(L[0]), color: "rgb(153, 153, 153)" }), O && y.push({ label: "高", value: h(L[3]), color: "rgb(153, 153, 153)" }), Q && y.push({ label: "低", value: h(L[2]), color: "rgb(153, 153, 153)" }), R && y.push({ label: "收", value: h(L[1]), color: "rgb(153, 153, 153)" }), Z && y.push({ label: "额", value: We(L[4]), color: "rgb(153, 153, 153)" }), G) {
1008
+ const L = n.value.dataset[0].source.klineData[o.value], y = [], { open: Y, heigh: C, low: Q, close: R, business: Z, riseAndFall: G } = e.value.tipsConfig;
1009
+ if (Y && y.push({ label: "开", value: L[0], color: "rgb(153, 153, 153)" }), C && y.push({ label: "高", value: L[3], color: "rgb(153, 153, 153)" }), Q && y.push({ label: "低", value: L[2], color: "rgb(153, 153, 153)" }), R && y.push({ label: "收", value: L[1], color: "rgb(153, 153, 153)" }), Z && y.push({ label: "额", value: We(L[4]), color: "rgb(153, 153, 153)" }), G) {
1010
1010
  let P = ((L[1] - L[5]) / L[1] * 100).toFixed(2), _ = +P == 0 ? "white" : +P > 0 ? "red" : "#00ff00";
1011
1011
  y.push({ label: "涨跌", value: `${P}%`, color: _ });
1012
1012
  }
@@ -1017,7 +1017,7 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1017
1017
  var g, f;
1018
1018
  return n.value && ((f = (g = n.value.dataset[0]) == null ? void 0 : g.source) != null && f.indicatorData) ? n.value.dataset[0].source.indicatorData.reduce((L, y) => (y.data[o.value] && L.push({
1019
1019
  label: y.key,
1020
- value: h(y.data[o.value]),
1020
+ value: b(y.data[o.value]),
1021
1021
  color: y.color
1022
1022
  }), L), []) : [];
1023
1023
  }), l = W(() => {
@@ -1036,10 +1036,10 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1036
1036
  if (t.priceTrendData.length > 0) {
1037
1037
  const f = [];
1038
1038
  return t.priceTrendData.forEach((L, y) => {
1039
- var O;
1040
- (L.data[o.value] ? h(L.data[o.value][1]) : null) !== null && f.push({
1039
+ var C;
1040
+ (L.data[o.value] ? b(L.data[o.value][1]) : null) !== null && f.push({
1041
1041
  label: L.name,
1042
- value: h((O = L.data[o.value]) == null ? void 0 : O[1]),
1042
+ value: b((C = L.data[o.value]) == null ? void 0 : C[1]),
1043
1043
  color: g[y]
1044
1044
  });
1045
1045
  }), f;
@@ -1048,9 +1048,9 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1048
1048
  const f = [];
1049
1049
  return M.getOption().series.filter((y) => y.name.includes("二腿价格走势百分比图")).forEach((y, Y) => {
1050
1050
  var Q;
1051
- (y.data[o.value] ? h(y.data[o.value][1]) : null) !== null && f.push({
1051
+ (y.data[o.value] ? b(y.data[o.value][1]) : null) !== null && f.push({
1052
1052
  label: y.name.split("-")[1],
1053
- value: `${h((Q = y.data[o.value]) == null ? void 0 : Q[1])}%`,
1053
+ value: `${b((Q = y.data[o.value]) == null ? void 0 : Q[1])}%`,
1054
1054
  color: g[Y]
1055
1055
  });
1056
1056
  }), f;
@@ -1164,7 +1164,7 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1164
1164
  e.value,
1165
1165
  t.netPositionData,
1166
1166
  t.relevanceData
1167
- ), O = Y.dataset.source.klineData.length - y.dataset[0].source.klineData.length;
1167
+ ), C = Y.dataset.source.klineData.length - y.dataset[0].source.klineData.length;
1168
1168
  M.setOption(
1169
1169
  {
1170
1170
  ...Y,
@@ -1174,8 +1174,8 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1174
1174
  xAxisIndex: [0, 0],
1175
1175
  zoomLock: e.value.zoomLock,
1176
1176
  maxValueSpan: e.value.maxValueSpan,
1177
- startValue: y.dataZoom[0].startValue + O,
1178
- endValue: y.dataZoom[0].endValue + O
1177
+ startValue: y.dataZoom[0].startValue + C,
1178
+ endValue: y.dataZoom[0].endValue + C
1179
1179
  }
1180
1180
  ]
1181
1181
  },
@@ -1215,7 +1215,7 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1215
1215
  "#FF0000",
1216
1216
  "#FB9A0E",
1217
1217
  "#00B7FF"
1218
- ], O = t.priceTrendData.reduce((Q, R, Z) => {
1218
+ ], C = t.priceTrendData.reduce((Q, R, Z) => {
1219
1219
  const { name: G, data: P } = R, _ = {
1220
1220
  name: `二腿价格走势图-${G}`,
1221
1221
  type: "line",
@@ -1234,7 +1234,7 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1234
1234
  };
1235
1235
  return Q.push(_), Q;
1236
1236
  }, []);
1237
- n.value = { ...y, series: [...y.series, ...O] }, M.setOption(n.value, {
1237
+ n.value = { ...y, series: [...y.series, ...C] }, M.setOption(n.value, {
1238
1238
  replaceMerge: ["series"]
1239
1239
  });
1240
1240
  }
@@ -1256,8 +1256,8 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1256
1256
  "#FF0000",
1257
1257
  "#FB9A0E",
1258
1258
  "#00B7FF"
1259
- ], O = y.dataZoom[0].startValue, Q = t.priceTrendPercentData.reduce((R, Z, G) => {
1260
- const { name: P, data: _ } = Z, ee = _.length > e.value.totalBarCount ? _.slice(_.length - e.value.totalBarCount) : _, te = ee[O][1], me = ee.map((Te) => [Te[0], (Te[1] - te) / te * 100]), we = {
1259
+ ], C = y.dataZoom[0].startValue, Q = t.priceTrendPercentData.reduce((R, Z, G) => {
1260
+ const { name: P, data: _ } = Z, ee = _.length > e.value.totalBarCount ? _.slice(_.length - e.value.totalBarCount) : _, te = ee[C][1], me = ee.map((Te) => [Te[0], (Te[1] - te) / te * 100]), we = {
1261
1261
  name: `二腿价格走势百分比图-${P}`,
1262
1262
  type: "line",
1263
1263
  data: me,
@@ -1296,17 +1296,17 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1296
1296
  Y.dataZoom instanceof Array && (o.value = Y.dataZoom[0].endValue);
1297
1297
  }
1298
1298
  };
1299
- let w = null, b = !1, N = S(!1), d = !1, T = S(!1);
1299
+ let w = null, v = !1, N = S(!1), d = !1, T = S(!1);
1300
1300
  const x = async (g) => {
1301
1301
  const f = g.batch ? g.batch[0].start * e.value.totalBarCount : g.startValue;
1302
- e.value.dynamicLoadConfig.historyVisible && f <= 100 && !b && !N.value && (b = !0, await e.value.dynamicLoadConfig.historyLoadCallBack(N), await r("history"), b = !1);
1302
+ e.value.dynamicLoadConfig.historyVisible && f <= 100 && !v && !N.value && (v = !0, await e.value.dynamicLoadConfig.historyLoadCallBack(N), await r("history"), v = !1);
1303
1303
  const L = g.batch ? g.batch[0].end === 100 : g.endValue >= t.klineData.length - e.value.preBarCount - 1, y = g.actionIsWheel;
1304
1304
  e.value.dynamicLoadConfig.futureVisible && L && !d && !T.value && !y && (d = !0, await e.value.dynamicLoadConfig.futureLoadCallBack(T), await r("future"), d = !1), clearTimeout(w), w = setTimeout(() => {
1305
1305
  r("line"), r("priceTrendPercent"), clearTimeout(w), w = null;
1306
1306
  }, it);
1307
1307
  };
1308
1308
  let A = null;
1309
- const k = (g) => {
1309
+ const O = (g) => {
1310
1310
  A = setTimeout(() => {
1311
1311
  var f;
1312
1312
  if (g.componentType === "graphic") {
@@ -1321,7 +1321,7 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1321
1321
  }), M.on("globalout", () => {
1322
1322
  m(null, M);
1323
1323
  }), M.on("contextmenu", (g) => {
1324
- k(g);
1324
+ O(g);
1325
1325
  }), M.on("datazoom", (g) => {
1326
1326
  x(g);
1327
1327
  });
@@ -1331,7 +1331,7 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1331
1331
  if (!M || !(g.ctrlKey || t.isSelect))
1332
1332
  return;
1333
1333
  const f = M.getOption();
1334
- let { startValue: L, endValue: y, start: Y, end: O } = f.dataZoom[0];
1334
+ let { startValue: L, endValue: y, start: Y, end: C } = f.dataZoom[0];
1335
1335
  const Q = () => {
1336
1336
  L !== 0 && (L = L - 1, y = y - 1, M.dispatchAction({
1337
1337
  type: "dataZoom",
@@ -1370,10 +1370,10 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1370
1370
  maxValueSpan: e.value.maxValueSpan
1371
1371
  });
1372
1372
  }, G = () => {
1373
- Y = Y - (O - Y) / 4, M.dispatchAction({
1373
+ Y = Y - (C - Y) / 4, M.dispatchAction({
1374
1374
  type: "dataZoom",
1375
1375
  start: Y,
1376
- end: O,
1376
+ end: C,
1377
1377
  actionIsWheel: !0,
1378
1378
  // 标记为缩放
1379
1379
  maxValueSpan: e.value.maxValueSpan
@@ -1401,7 +1401,7 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1401
1401
  U(), window.removeEventListener("keydown", F), M.dispose(), p.disconnect(), p = null;
1402
1402
  }), (g, f) => {
1403
1403
  const L = he, y = Ce;
1404
- return C(), v("div", nt, [
1404
+ return h(), k("div", nt, [
1405
1405
  K("div", ot, [
1406
1406
  V(se, { data: z.value }, null, 8, ["data"]),
1407
1407
  V(se, { data: s.value }, null, 8, ["data"]),
@@ -1414,11 +1414,11 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1414
1414
  popover: X(() => [
1415
1415
  V(y, { class: "menu" }, {
1416
1416
  default: X(() => [
1417
- (C(!0), v(ae, null, le(D.value, (Y) => (C(), Ae(L, {
1417
+ (h(!0), k(ae, null, le(D.value, (Y) => (h(), Ae(L, {
1418
1418
  key: Y.label,
1419
1419
  index: Y.label,
1420
1420
  class: "menuItem",
1421
- onClick: (O) => c(Y)
1421
+ onClick: (C) => c(Y)
1422
1422
  }, {
1423
1423
  default: X(() => [
1424
1424
  Oe(q(Y.label), 1)
@@ -1442,7 +1442,7 @@ const nt = { class: "st-kline" }, ot = { class: "st-kline-header" }, it = 300, M
1442
1442
  };
1443
1443
  }
1444
1444
  });
1445
- const at = /* @__PURE__ */ $(Mt, [["__scopeId", "data-v-7f014d0e"]]), lt = { class: "kline-tips" }, rt = /* @__PURE__ */ Me({
1445
+ const at = /* @__PURE__ */ $(Mt, [["__scopeId", "data-v-57c04894"]]), lt = { class: "kline-tips" }, rt = /* @__PURE__ */ Me({
1446
1446
  __name: "index",
1447
1447
  props: {
1448
1448
  // 提示数据
@@ -1452,8 +1452,8 @@ const at = /* @__PURE__ */ $(Mt, [["__scopeId", "data-v-7f014d0e"]]), lt = { cla
1452
1452
  }
1453
1453
  },
1454
1454
  setup(a) {
1455
- return (t, i) => (C(), v("div", lt, [
1456
- (C(!0), v(ae, null, le(a.data, (e, n) => (C(), v("div", {
1455
+ return (t, i) => (h(), k("div", lt, [
1456
+ (h(!0), k(ae, null, le(a.data, (e, n) => (h(), k("div", {
1457
1457
  key: n,
1458
1458
  class: "kline-tips-item",
1459
1459
  style: ye({ color: e.color })
@@ -1525,7 +1525,7 @@ const st = { class: "klineSub" }, ct = { class: "klineSub-tips" }, ut = {
1525
1525
  // 联动
1526
1526
  draw: (c, u) => {
1527
1527
  Ye(() => {
1528
- const { startValue: I, endValue: M, maxValueSpan: p } = c, { leftYAxisRange: m, rightYAxisRange: w } = s.data.subIndicator[0], b = s.data.subIndicator.map((N) => {
1528
+ const { startValue: I, endValue: M, maxValueSpan: p } = c, { leftYAxisRange: m, rightYAxisRange: w } = s.data.subIndicator[0], v = s.data.subIndicator.map((N) => {
1529
1529
  if (N.series === "bar")
1530
1530
  return {
1531
1531
  name: "subMain",
@@ -1652,7 +1652,7 @@ const st = { class: "klineSub" }, ct = { class: "klineSub-tips" }, ut = {
1652
1652
  }
1653
1653
  }
1654
1654
  ],
1655
- series: b
1655
+ series: v
1656
1656
  },
1657
1657
  !0
1658
1658
  );
@@ -1661,9 +1661,9 @@ const st = { class: "klineSub" }, ct = { class: "klineSub-tips" }, ut = {
1661
1661
  // 重置
1662
1662
  }), (c, u) => {
1663
1663
  const I = Ee, M = Se;
1664
- return C(), v("div", st, [
1664
+ return h(), k("div", st, [
1665
1665
  K("div", ct, [
1666
- j.value.length ? (C(), v("div", ut, [
1666
+ j.value.length ? (h(), k("div", ut, [
1667
1667
  V(M, {
1668
1668
  modelValue: r.value,
1669
1669
  "onUpdate:modelValue": u[0] || (u[0] = (p) => r.value = p),
@@ -1672,7 +1672,7 @@ const st = { class: "klineSub" }, ct = { class: "klineSub-tips" }, ut = {
1672
1672
  class: "element-dark subIndicator"
1673
1673
  }, {
1674
1674
  default: X(() => [
1675
- (C(!0), v(ae, null, le(a.subIndicatorList, (p) => (C(), Ae(I, {
1675
+ (h(!0), k(ae, null, le(a.subIndicatorList, (p) => (h(), Ae(I, {
1676
1676
  key: p.value,
1677
1677
  label: p.label,
1678
1678
  value: p.value
@@ -1710,10 +1710,10 @@ const jt = { class: "kline-tips" }, yt = {
1710
1710
  const { data: z, activeIndex: s } = e;
1711
1711
  if (z.data && z.data[s]) {
1712
1712
  const l = z.data[s], r = [
1713
- { label: "开", value: t(l[0]) },
1714
- { label: "高", value: t(l[3]) },
1715
- { label: "低", value: t(l[2]) },
1716
- { label: "收", value: t(l[1]) }
1713
+ { label: "开", value: l[0] },
1714
+ { label: "高", value: l[3] },
1715
+ { label: "低", value: l[2] },
1716
+ { label: "收", value: l[1] }
1717
1717
  ];
1718
1718
  l[4] !== null && r.push({ label: "额", value: i(l[4]) });
1719
1719
  let j;
@@ -1725,12 +1725,12 @@ const jt = { class: "kline-tips" }, yt = {
1725
1725
  const { data: z, activeIndex: s } = e;
1726
1726
  return ((l = z == null ? void 0 : z.mainIndicator) == null ? void 0 : l.map((r) => ({ label: r.key, value: t(r.data[s]), color: r.color }))) || [];
1727
1727
  });
1728
- return (z, s) => (C(), v("div", jt, [
1728
+ return (z, s) => (h(), k("div", jt, [
1729
1729
  V(je, { data: n.value }, null, 8, ["data"]),
1730
1730
  V(je, { data: o.value }, null, 8, ["data"])
1731
1731
  ]));
1732
1732
  }
1733
- }, dt = /* @__PURE__ */ $(yt, [["__scopeId", "data-v-a12855fe"]]), gt = {
1733
+ }, dt = /* @__PURE__ */ $(yt, [["__scopeId", "data-v-09ec31e8"]]), gt = {
1734
1734
  __name: "index",
1735
1735
  setup(a, { expose: t }) {
1736
1736
  return t({
@@ -1889,7 +1889,7 @@ const Tt = {
1889
1889
  resize: () => {
1890
1890
  e == null || e.resize();
1891
1891
  }
1892
- }), (c, u) => (C(), v("div", {
1892
+ }), (c, u) => (h(), k("div", {
1893
1893
  class: "klineSlide",
1894
1894
  ref_key: "slideChartRef",
1895
1895
  ref: l
package/es/KlineBasic.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";require("./base-ef747d02.cjs");const ve=require("./el-dialog-ae86edb8.cjs");require("./el-overlay-9e34965f.cjs");require("./el-input-7fd293af.cjs");const xe=require("./el-input-number-22e21d16.cjs"),be=require("./el-button-eec58cff.cjs"),he=require("./el-empty-1697ded8.cjs"),ie=require("./el-menu-item-17dc717e.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-b6c99b28.cjs");const e=require("vue"),_e=require("echarts"),c=require("./dayjs.min-2c20abe6.cjs"),j=require("./index-8901a38c.cjs"),J=require("./el-message-5e6a6be9.cjs"),U=require("./_plugin-vue_export-helper-f246444f.cjs");require("./el-tag-a33c4b22.cjs");const se=require("./el-select-d8d91db1.cjs");require("./el-scrollbar-bc3f790d.cjs");require("./index-098c2447.cjs");require("./use-form-common-props-fd9b61a0.cjs");require("./index-9780a537.cjs");require("./index-bb833443.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-30d7d8ce.cjs");require("./index-c108567d.cjs");require("./typescript-b63f8e83.cjs");require("./index-11547a0c.cjs");require("./index-eea0bcb3.cjs");require("./config-provider-a584d81e.cjs");require("./index-298075cf.cjs");require("./index-f3562b52.cjs");require("./castArray-35947698.cjs");require("./debounce-62f5b6e8.cjs");function Ye(o){const V=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const M in o)if(M!=="default"){const b=Object.getOwnPropertyDescriptor(o,M);Object.defineProperty(V,M,b.get?b:{enumerable:!0,get:()=>o[M]})}}return V.default=o,Object.freeze(V)}const ne=Ye(_e);let z=null;const ke=o=>{const V=j.y(o,{handleReq:M=>{j.v()&&(M.headers.token=j.U())},handleRes:M=>{const{data:b}=M;if(b.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:j.K(),!0}});V.get,z=V.post},we=o=>z("/middleLayer/kline/getKlineBasic",{...o,userId:j.V("id")}),De=o=>z("/middleLayer/kline/getKline",o),Me=async o=>z("/alarm/deliversign/addAlarmPrice",{...o,userId:j.V("id")}),Se=async o=>z("/alarm/deliversign/findAlarmPriceByUserId",{...o,userId:j.V("id")}),ue=async o=>z("/alarm/deliversign/updateAlarmPrice",{...o,userId:j.V("id")}),Ve=async o=>z("/alarm/deliversign/deleteAlarmPrice",{...o,userId:j.V("id")}),{round:K}=j.x,Le=(o,V,M,b,v)=>{const{data:t,time:k}=o,{gridTop:h,gridRight:u,gridLeft:_,maxShowCounts:Y,showSubChart:l}=V;return{animation:!1,grid:{top:`${h}px`,right:`${u}px`,bottom:l?"6px":"24px",left:`${_}px`},dataZoom:[{type:"inside",startValue:M,endValue:b,maxValueSpan:Y}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:r=>{const{axisDimension:w,value:y}=r;return w==="x"?l?"":["6","7","8"].includes(v)?c.dayjs(y).format("YYYY-MM-DD"):y:String(K(y))}}},formatter:()=>""},xAxis:{show:!l,type:"category",data:k,splitLine:{show:!1},axisLabel:{formatter:r=>["6","7","8"].includes(v)?c.dayjs(r).format("YYYY-MM-DD"):r}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:r=>K(r.min),max:r=>K(r.max)},series:[{type:"candlestick",data:t,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...o.mainIndicator.map(r=>({name:r.key,type:"line",silent:!0,symbol:"none",data:r.data,lineStyle:{width:r.width||1},itemStyle:{color:r.color}}))],toolbox:{show:!1},brush:{xAxisIndex:"all",brushLink:"all",transformable:!1,outOfBrush:{colorAlpha:2},brushStyle:{color:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.4)"}}}},Te=(o,V,M,b,v)=>{const{variety:t,featureId:k,featureType:h}=M,{gridTop:u,gridLeft:_,gridRight:Y}=b;return V.reduce((l,r)=>{const{warnPrice:w}=r,y=o==null?void 0:o.convertToPixel({yAxisIndex:0},w);if(y<=u||y>=(o==null?void 0:o.getHeight()))return l;let E=0;return[...l,{type:"group",name:"warningLine",info:r,draggable:"vertical",children:[{type:"line",info:r,shape:{x1:_,y1:y,x2:(o==null?void 0:o.getWidth())-Y,y2:y},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:r,x:(o==null?void 0:o.getWidth())-Y,y:y-5,style:{fill:"#FFF",text:w,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:S=>{E=S.offsetY},ondrag:S=>{var R;if(S.target&&S.target.childAt(1)){const L=o.convertFromPixel({yAxisIndex:0},y+(S.offsetY-E));(R=S.target.childAt(1))==null||R.animate("style",!1).when(1,{text:K(L,3)}).start()}},ondragend:async S=>{const L=S.offsetY-E;if(L!==0){const N=o==null?void 0:o.convertFromPixel({yAxisIndex:0},L+y),d={id:r.id,warnPrice:K(N,3),featureId:k,featureCode:t,featureType:h};await ue(d),J.ElMessage.success("画线预警修改成功"),v&&v()}}}]},[])},Be={class:"kline-tips"},Ee=e.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(o){return(V,M)=>(e.openBlock(),e.createElementBlock("div",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data,(b,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"kline-tips-item",style:e.normalizeStyle({color:b.color})},e.toDisplayString(b.label)+" "+e.toDisplayString(b.value),5))),128))]))}});const oe=U._export_sfc(Ee,[["__scopeId","data-v-f83b6b36"]]);const Ne={class:"kline-tips"},Fe={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(o){const{round:V,formatValue:M}=j.x,b=o,v=e.computed(()=>{const{data:k,activeIndex:h}=b;if(k.data&&k.data[h]){const u=k.data[h],_=[{label:"开",value:u[0]},{label:"高",value:u[3]},{label:"低",value:u[2]},{label:"收",value:u[1]}];u[4]!==null&&_.push({label:"额",value:M(u[4])});let Y;return u[6]>0?Y="red":u[6]<0&&(Y="green"),_.push({label:"涨跌",value:`${u[6]}%`,color:Y}),_}return[]}),t=e.computed(()=>{var u;const{data:k,activeIndex:h}=b;return((u=k==null?void 0:k.mainIndicator)==null?void 0:u.map(_=>({label:_.key,value:V(_.data[h]),color:_.color})))||[]});return(k,h)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(oe,{data:v.value},null,8,["data"]),e.createVNode(oe,{data:t.value},null,8,["data"])]))}},qe=U._export_sfc(Fe,[["__scopeId","data-v-b1a144a9"]]);const je={class:"klineSub"},Re={class:"klineSub-tips"},Ae={key:0,class:"klineSub-tips-select"},Oe={__name:"index",props:{cycle:{type:[String,Number],default:()=>null},data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(o,{expose:V,emit:M}){const{round:b}=j.x;let v,t;const k=M,h=o,u=e.ref(),_=e.computed({get(){return h.modelValue},set(r){k("update:modelValue",r)}}),Y=e.computed(()=>{var y;const{data:r,activeIndex:w}=h;return((y=r==null?void 0:r.subIndicator)==null?void 0:y.map(E=>({label:E.key,color:E.color,value:E.data[w]||"-"})))||[]});e.onMounted(()=>{v=ne.init(u.value);let r=!0;t=new ResizeObserver(()=>{if(r){r=null;return}v.resize()}),t.observe(u.value)}),e.onUnmounted(()=>{v.dispose(),t.disconnect(),t=null});const l=(r,w)=>{const y=r[w],E=w===0?r[w]:r[w-1];return y[0]===y[1]?y[0]>=E[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:y[1]>y[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return V({connect:r=>{ne.connect([r,v])},draw:(r,w)=>{e.nextTick(()=>{const{startValue:y,endValue:E,maxValueSpan:S}=r,{leftYAxisRange:R,rightYAxisRange:L}=h.data.subIndicator[0],N=h.data.subIndicator.map(d=>{if(d.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:d.data.map((O,P)=>d.seriesColor==="kline"?{value:O,itemStyle:l(h.data.data,P)}:d.seriesColor==="value"?{value:O,itemStyle:{color:O>=0?"#FF0000":"#00FFFF"}}:{value:O,itemStyle:{color:d.seriesColor}})};if(d.series==="line")return{xAxisIndex:0,yAxisIndex:d.yAxis==="right"?2:1,name:d.key,type:"line",silent:!0,symbol:"none",data:d.data,lineStyle:{width:1},itemStyle:{color:d.color}}});v.setOption({animation:!1,grid:{left:`${w.gridLeft}px`,top:"10px",right:`${w.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:y,endValue:E,maxValueSpan:S}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:d=>{const{axisDimension:O,value:P}=d;if(O==="x")return["6","7","8"].includes(h.cycle)?c.dayjs(P).format("YYYY-MM-DD"):P;if(d.axisIndex===1)return String(b(P))}}},formatter:()=>""},xAxis:{type:"category",data:h.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{formatter:d=>["6","7","8"].includes(h.cycle)?c.dayjs(d).format("YYYY-MM-DD"):d}},yAxis:[{position:"right"},{position:"left",min:R==="cover"?d=>d.min:null,max:R==="cover"?d=>d.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:L==="cover"?d=>d.min:null,max:L==="cover"?d=>d.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:N},!0)})}}),(r,w)=>{const y=se.ElOption,E=se.ElSelect;return e.openBlock(),e.createElementBlock("div",je,[e.createElementVNode("div",Re,[Y.value.length?(e.openBlock(),e.createElementBlock("div",Ae,[e.createVNode(E,{modelValue:_.value,"onUpdate:modelValue":w[0]||(w[0]=S=>_.value=S),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.subIndicatorList,S=>(e.openBlock(),e.createBlock(y,{key:S.value,label:S.label,value:S.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(oe,{data:Y.value},null,8,["data"])]),e.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:u},null,512)])}}},Ie=U._export_sfc(Oe,[["__scopeId","data-v-ab519de5"]]),Pe=e.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(o,{emit:V}){const M=V,b=e.ref(),v=e.ref(),t=e.ref({display:"none",top:"0px",left:"0px"}),k=()=>{t.value.display="none",M("closeContextMenuCallBack"),document.removeEventListener("click",k)},h=u=>{if(u.preventDefault(),t.value.display==="block"){const{offsetX:_,offsetY:Y}=u,{offsetWidth:l,offsetHeight:r}=v.value;if(_<=l&&Y<=r)return}b.value.click(),t.value={display:"block",top:`${u.offsetY}px`,left:`${u.offsetX}px`},e.nextTick(()=>{const _=b.value.getBoundingClientRect(),Y=v.value.getBoundingClientRect();Y.left+Y.width>=_.right&&(t.value.left=`${u.offsetX-Y.width}px`),Y.top+Y.height>=_.bottom&&(console.log("高度超出"),t.value.top=`${u.offsetY-Y.height}px`)}),document.addEventListener("click",k)};return(u,_)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"contextmenuRef",ref:b,class:"contextmenu",onContextmenu:h,onMouseleave:k},[e.renderSlot(u.$slots,"default",{},void 0,!0),t.value.display!=="none"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:v,class:"contextmenu-popover",style:e.normalizeStyle(t.value)},[e.renderSlot(u.$slots,"popover",{},void 0,!0)],4)):e.createCommentVNode("",!0)],544))}});const $e=U._export_sfc(Pe,[["__scopeId","data-v-811db6b4"]]);const ce=o=>(e.pushScopeId("data-v-9e6456be"),o=o(),e.popScopeId(),o),Ce={class:"klineBasic-tips"},We={key:0,class:"klineBasic-sub"},ze={key:1,class:"klineBasic-empty"},Ke={key:2,class:"klineBasic-error"},Ue=ce(()=>e.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),He={style:{"text-align":"center"}},Ze=ce(()=>e.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Xe={class:"dialog-footer"},Ge={__name:"index",props:{variety:{type:[String,Number],default:()=>null},varietyName:{type:[String,Number],default:()=>null},featureId:{type:[String,Number],default:()=>null},featureType:{type:[String,Number],default:()=>null},cycle:{type:[String,Number],default:()=>null},mainIndicator:{type:String,default:()=>""},indicatorStore:{type:Object,default:()=>null},startTime:{type:String,default:()=>null},endTime:{type:String,default:()=>null},right:{type:[String,Number],default:1},config:{type:Object,default:()=>({})},env:{type:Object,default:()=>({})},brushRange:{type:[Array,null],default:()=>null}},emits:["change","getFactorData"],setup(o,{expose:V,emit:M}){const b=[{label:"画线预警",key:"drawWarningLine"}];let v=null,t=null,k,h,u=!1,_=!1;const Y=M,l=o,r=e.ref(!1),w=e.ref(!1),y=e.ref(!1),E=e.ref(null),S=e.ref(null),R=e.ref("VOL"),L=e.ref(0),N=e.ref({}),d=e.ref([]),O=e.ref({}),P=e.ref(!1),H=e.ref(""),Q=e.ref([...b]),C=e.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridTop:48,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...l.config}));e.watch(()=>{var i,n;return[l.variety,l.cycle,l.mainIndicator,R.value,(i=l.indicatorStore)==null?void 0:i.filterIndicator,(n=l.indicatorStore)==null?void 0:n.customIndicator]},()=>{ee()},{deep:!0}),e.onMounted(()=>{ke(l.env),ee(),window.addEventListener("keydown",ae)}),e.onUnmounted(()=>{t==null||t.off("datazoom"),t==null||t.off("highlight"),t==null||t.off("globalout"),t==null||t.dispose(),v==null||v.dispose(),window.removeEventListener("keydown",ae)});const de=()=>{t||(t=ne.init(E.value),fe(),C.value.showSubChart&&S.value.connect(t),v=j.D(E.value),v.listen(()=>{requestAnimationFrame(()=>{t.resize()})}))},ae=({code:i,ctrlKey:n})=>{if(!(n||r.value))return;const{xAxis:m,dataZoom:f}=t.getOption(),{data:p}=(m==null?void 0:m[0])??{data:[]};let{startValue:a,endValue:s}=(f==null?void 0:f[0])??{};if(p!=null&&p.length){switch(i){case"ArrowUp":{if(s-a<5)return;const D=Math.floor((s-a)/2)+1;a=a+D,s-a<5&&(a=s-4);break}case"ArrowDown":{const D=Math.min(500,s-a);a=a-D-1;break}case"ArrowLeft":{a>0&&(a-=1,s-=1),L.value>0&&(L.value-=1);break}case"ArrowRight":{s<p.length-1&&(a+=1,s+=1),r.value&&L.value<p.length-1&&(L.value+=1);break}}t.dispatchAction({type:"dataZoom",startValue:a,endValue:s}),t.dispatchAction({type:"updateAxisPointer",seriesIndex:0,dataIndex:r.value?L.value:null}),t.dispatchAction({type:"highlight",dataIndex:r.value?L.value:s})}},fe=()=>{t==null||t.on("datazoom",n=>{clearTimeout(h),h=setTimeout(()=>{var f,p,a,s;const{loadCheckCounts:m}=C.value;if((p=(f=t==null?void 0:t.getOption())==null?void 0:f.dataZoom)!=null&&p[0]){const{startValue:D}=(s=(a=t==null?void 0:t.getOption())==null?void 0:a.dataZoom)==null?void 0:s[0];D<m&&u===!1&&_===!1&&(u=!0,pe("history")),Z()}clearTimeout(h)},100)}),t==null||t.on("highlight",n=>{var f,p;let m=n.dataIndex||-1;n.batch&&(m=typeof((f=n==null?void 0:n.batch[0])==null?void 0:f.dataIndex)=="number"?(p=n==null?void 0:n.batch[0])==null?void 0:p.dataIndex:-1),clearTimeout(k),k=setTimeout(()=>{L.value=m,clearTimeout(k)},20)}),t==null||t.on("globalout",()=>{var m,f,p;const n=(p=(f=(m=t==null?void 0:t.getOption())==null?void 0:m.dataZoom)==null?void 0:f[0])==null?void 0:p.endValue;L.value=n});let i=null;t==null||t.on("contextmenu",n=>{i=setTimeout(()=>{n.componentType==="graphic"&&(O.value=n.info,Q.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(i),i=null})})},ee=async()=>{var i,n,m,f,p,a;try{if(!l.variety||!l.cycle)return;const{variety:s,featureId:D,cycle:T,indicatorStore:x,mainIndicator:I,right:$,startTime:W,endTime:B}=l,{defaultShowCounts:F,addCounts:g,showWarningLine:te,getFactorData:G}=C.value,q={variety:s,featureId:D,cycle:T,mainIndicatorList:x.getIndicatorParams(I),subIndicator:R.value,right:$,showWarningLine:te,getFactorData:G};W&&B?(q.startTime=W,q.endTime=B):W?(q.startTime=W,q.limit=F+g):B?(q.endTime=B,q.limit=F+g):(q.endTime=c.dayjs().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),q.limit=F+g);const A=await we(q);if((m=(n=(i=A==null?void 0:A.body)==null?void 0:i.kline)==null?void 0:n.time)!=null&&m.length)w.value=!1,y.value=!1;else{w.value=!0,y.value=!1;return}N.value=(f=A==null?void 0:A.body)==null?void 0:f.kline,d.value=((p=A==null?void 0:A.body)==null?void 0:p.warningLine)||[],re(),Z(),G&&Y("getFactorData",(a=A==null?void 0:A.body)==null?void 0:a.factor)}catch(s){throw y.value=!0,w.value=!1,new Error(s)}},pe=async i=>{const{variety:n,cycle:m,indicatorStore:f,mainIndicator:p,right:a}=l,{addCounts:s}=C.value,{time:D}=N.value;if(i==="history"){const T=await De({variety:n,cycle:m,endTime:D[0],limit:s,mainIndicatorList:f.getIndicatorParams(p),subIndicator:R.value,right:a});N.value={time:[...T.body.time,...N.value.time.slice(1)],data:[...T.body.data,...N.value.data.slice(1)],mainIndicator:N.value.mainIndicator.map((x,I)=>{var $;return{...x,data:[...(($=T.body.mainIndicator[I])==null?void 0:$.data)??[],...x.data.slice(1)]}}),subIndicator:N.value.subIndicator.map((x,I)=>{var $;return{...x,data:[...(($=T.body.subIndicator[I])==null?void 0:$.data)??[],...x.data.slice(1)]}})},re(!0),T.body.data.length<s&&(_=!0),u=!1}},re=(i=!1)=>{var I,$,W;de();const{time:n}=N.value,{gridRight:m,gridLeft:f,defaultShowCounts:p,maxShowCounts:a,showSubChart:s}=C.value;let D=n.length-1-p,T=n.length-1;if(i){const B=t.getOption(),F=($=(I=B==null?void 0:B.xAxis)==null?void 0:I[0])==null?void 0:$.data,g=(W=B==null?void 0:B.dataZoom)==null?void 0:W[0],te=F[g==null?void 0:g.startValue],G=F[g==null?void 0:g.endValue];D=n.findIndex(q=>q===te),T=n.findIndex(q=>q===G)}const x=Le(N.value,C.value,D,T,l.cycle);if(t.setOption(x,!0),L.value=T,l.brushRange){let B=null,F=null;switch(l.cycle){case"6":{B=n.find(g=>new Date(g).getTime()>=new Date(l.brushRange[0]).getTime()||c.dayjs(g).format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).format("YYYY-MM-DD")),F=n.findLast(g=>new Date(g).getTime()<=new Date(l.brushRange[1]).getTime()||c.dayjs(g).format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).format("YYYY-MM-DD"));break}case"7":{B=n.find(g=>c.dayjs(g).day(5).format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).day(5).format("YYYY-MM-DD")),F=n.findLast(g=>c.dayjs(g).day(5).format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{B=n.find(g=>c.dayjs(g).endOf("month").format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).endOf("month").format("YYYY-MM-DD")),F=n.findLast(g=>c.dayjs(g).endOf("month").format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:B=n.find(g=>new Date(g).getTime()>=new Date(l.brushRange[0]).getTime()),F=n.findLast(g=>new Date(g).getTime()<=new Date(l.brushRange[1]).getTime())}console.log(B,F),t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[B,F],xAxisIndex:0}]})}s&&S.value.draw({startValue:D,endValue:T,maxValueSpan:a},{gridLeft:f,gridRight:m}),le()},Z=()=>{if(!t)return;const i=t==null?void 0:t.getOption();i&&(t==null||t.setOption({...i,graphic:[...Te(t,d.value,l,C.value,()=>{X()})]},!0),le())},le=()=>{const{time:i}=N.value;if(l.brushRange&&(i!=null&&i.length)){let n=c.dayjs(l.brushRange[0]).format("YYYY-MM-DD 00:00:00"),m=c.dayjs(l.brushRange[1]).format("YYYY-MM-DD 23:59:59"),f=null,p=null;switch(l.cycle){case"6":{f=i.find(a=>c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(n).format("YYYY-MM-DD")),p=f;break}case"7":{f=i.find(a=>c.dayjs(a).day(5).format("YYYY-MM-DD")===c.dayjs(n).day(5).format("YYYY-MM-DD")),p=i.findLast(a=>c.dayjs(a).day(5).format("YYYY-MM-DD")===c.dayjs(m).day(5).format("YYYY-MM-DD"));break}case"8":{f=i.find(a=>c.dayjs(a).endOf("month").format("YYYY-MM-DD")===c.dayjs(n).endOf("month").format("YYYY-MM-DD")),p=i.findLast(a=>c.dayjs(a).endOf("month").format("YYYY-MM-DD")===c.dayjs(m).endOf("month").format("YYYY-MM-DD"));break}default:f=i.find(a=>{const s=c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(n).format("YYYY-MM-DD"),D=new Date(a).getTime()>=new Date(n).getTime();return s&&D}),p=i.findLast(a=>{const s=c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(m).format("YYYY-MM-DD"),D=new Date(a).getTime()<=new Date(m).getTime();return s&&D})}t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[f,p],xAxisIndex:0}]})}},X=async()=>{const i=await Se({featureId:l.featureId});d.value=(i==null?void 0:i.body)||[],Z(),Y("change","warningLine",d.value)},ye=async i=>{const{variety:n,varietyName:m,featureId:f,featureType:p}=l;if(i.key==="drawWarningLine"){const a=t==null?void 0:t.getOption(),s=a.tooltip[0];t==null||t.setOption({...a,tooltip:{...s,axisPointer:{...s.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...s.axisPointer.label,backgroundColor:"transparent",formatter:T=>""}}}});const D=async T=>{t==null||t.getZr().off("mousedown",D);const x=t==null?void 0:t.convertFromPixel({yAxisIndex:0},T.offsetY),I=Math.round(x*1e3)/1e3;t==null||t.setOption({...a,tooltip:{...s,axisPointer:{...s.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...s.axisPointer.label,backgroundColor:null}}}}),await Me({featureCode:n,featureName:m,featureId:f,featureType:p,warnPrice:I}),J.ElMessage.success("画线预警成功!"),X()};t==null||t.getZr().on("mousedown",D)}else i.key==="deleteWarningLine"?(await Ve({id:O.value.id}),J.ElMessage.success("画线预警删除成功"),X()):i.key==="changeWarningLine"&&(P.value=!0,H.value=O.value.warnPrice)},me=async()=>{const{variety:i,varietyName:n,featureId:m,featureType:f}=l;await ue({id:O.value.id,featureCode:i,featureName:n,featureId:m,featureType:f,warnPrice:H.value}),J.ElMessage.success("画线预警修改成功"),X()},ge=()=>{Q.value=[...b]};return V({draw:(i,n)=>{i==="warningLine"&&(d.value=n,Z())}}),(i,n)=>{var T;const m=ie.ElMenuItem,f=ie.ElMenu,p=he.ElEmpty,a=be.ElButton,s=xe.ElInputNumber,D=ve.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"klineBasic",onMousemove:n[1]||(n[1]=x=>r.value=!0),onMouseout:n[2]||(n[2]=x=>r.value=!1)},[e.createElementVNode("div",Ce,[e.createVNode(qe,{data:N.value,activeIndex:L.value},null,8,["data","activeIndex"])]),e.createElementVNode("div",{class:"klineBasic-main",style:e.normalizeStyle({height:C.value.showSubChart?"70%":"100%"})},[e.createVNode($e,{onCloseContextMenuCallBack:ge},{popover:e.withCtx(()=>[e.createVNode(f,{style:{borderRadius:"4px",overflow:"hidden",background:"#fff",borderRight:0}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,x=>(e.openBlock(),e.createBlock(m,{style:{height:"36px"},key:x.key,index:x.key,onClick:I=>ye(x)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:E,style:{height:"100%"}},null,512)]),_:1})],4),C.value.showSubChart?(e.openBlock(),e.createElementBlock("div",We,[e.createVNode(Ie,{ref_key:"klineSubRef",ref:S,modelValue:R.value,"onUpdate:modelValue":n[0]||(n[0]=x=>R.value=x),data:N.value,cycle:o.cycle,activeIndex:L.value,subIndicatorList:(T=o.indicatorStore)==null?void 0:T.subIndicatorList},null,8,["modelValue","data","cycle","activeIndex","subIndicatorList"])])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(p,{class:"klineBasic-empty-content",description:"暂无数据"})])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("div",Ke,[Ue,e.createElementVNode("div",He,[e.createVNode(a,{onClick:ee},{default:e.withCtx(()=>[e.createTextVNode("刷新")]),_:1})])])):e.createCommentVNode("",!0)],32),e.createVNode(D,{modelValue:P.value,"onUpdate:modelValue":n[5]||(n[5]=x=>P.value=x),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:e.withCtx(()=>[e.createElementVNode("span",Xe,[e.createVNode(a,{onClick:n[4]||(n[4]=x=>P.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(a,{type:"primary",onClick:me},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})])]),default:e.withCtx(()=>[Ze,e.createVNode(s,{modelValue:H.value,"onUpdate:modelValue":n[3]||(n[3]=x=>H.value=x),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},Je=U._export_sfc(Ge,[["__scopeId","data-v-9e6456be"]]),Qe={install(o){o.component("st-klineBasic",Je)}};module.exports=Qe;
1
+ "use strict";require("./base-ef747d02.cjs");const ve=require("./el-dialog-ae86edb8.cjs");require("./el-overlay-9e34965f.cjs");require("./el-input-7fd293af.cjs");const xe=require("./el-input-number-22e21d16.cjs"),be=require("./el-button-eec58cff.cjs"),he=require("./el-empty-1697ded8.cjs"),ie=require("./el-menu-item-17dc717e.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-b6c99b28.cjs");const e=require("vue"),_e=require("echarts"),c=require("./dayjs.min-2c20abe6.cjs"),j=require("./index-8901a38c.cjs"),J=require("./el-message-5e6a6be9.cjs"),U=require("./_plugin-vue_export-helper-f246444f.cjs");require("./el-tag-a33c4b22.cjs");const se=require("./el-select-d8d91db1.cjs");require("./el-scrollbar-bc3f790d.cjs");require("./index-098c2447.cjs");require("./use-form-common-props-fd9b61a0.cjs");require("./index-9780a537.cjs");require("./index-bb833443.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-30d7d8ce.cjs");require("./index-c108567d.cjs");require("./typescript-b63f8e83.cjs");require("./index-11547a0c.cjs");require("./index-eea0bcb3.cjs");require("./config-provider-a584d81e.cjs");require("./index-298075cf.cjs");require("./index-f3562b52.cjs");require("./castArray-35947698.cjs");require("./debounce-62f5b6e8.cjs");function Ye(o){const S=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const M in o)if(M!=="default"){const b=Object.getOwnPropertyDescriptor(o,M);Object.defineProperty(S,M,b.get?b:{enumerable:!0,get:()=>o[M]})}}return S.default=o,Object.freeze(S)}const ne=Ye(_e);let z=null;const ke=o=>{const S=j.y(o,{handleReq:M=>{j.v()&&(M.headers.token=j.U())},handleRes:M=>{const{data:b}=M;if(b.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:j.K(),!0}});S.get,z=S.post},we=o=>z("/middleLayer/kline/getKlineBasic",{...o,userId:j.V("id")}),De=o=>z("/middleLayer/kline/getKline",o),Me=async o=>z("/alarm/deliversign/addAlarmPrice",{...o,userId:j.V("id")}),Se=async o=>z("/alarm/deliversign/findAlarmPriceByUserId",{...o,userId:j.V("id")}),ue=async o=>z("/alarm/deliversign/updateAlarmPrice",{...o,userId:j.V("id")}),Ve=async o=>z("/alarm/deliversign/deleteAlarmPrice",{...o,userId:j.V("id")}),{round:K}=j.x,Le=(o,S,M,b,v)=>{const{data:t,time:k}=o,{gridTop:h,gridRight:u,gridLeft:_,maxShowCounts:Y,showSubChart:l}=S;return{animation:!1,grid:{top:`${h}px`,right:`${u}px`,bottom:l?"6px":"24px",left:`${_}px`},dataZoom:[{type:"inside",startValue:M,endValue:b,maxValueSpan:Y}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:r=>{const{axisDimension:w,value:y}=r;return w==="x"?l?"":["6","7","8"].includes(v)?c.dayjs(y).format("YYYY-MM-DD"):y:String(K(y))}}},formatter:()=>""},xAxis:{show:!l,type:"category",data:k,splitLine:{show:!1},axisLabel:{formatter:r=>["6","7","8"].includes(v)?c.dayjs(r).format("YYYY-MM-DD"):r}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:r=>K(r.min),max:r=>K(r.max)},series:[{type:"candlestick",data:t,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...o.mainIndicator.map(r=>({name:r.key,type:"line",silent:!0,symbol:"none",data:r.data,lineStyle:{width:r.width||1},itemStyle:{color:r.color}}))],toolbox:{show:!1},brush:{xAxisIndex:"all",brushLink:"all",transformable:!1,outOfBrush:{colorAlpha:2},brushStyle:{color:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.4)"}}}},Te=(o,S,M,b,v)=>{const{variety:t,featureId:k,featureType:h}=M,{gridTop:u,gridLeft:_,gridRight:Y}=b;return S.reduce((l,r)=>{const{warnPrice:w}=r,y=o==null?void 0:o.convertToPixel({yAxisIndex:0},w);if(y<=u||y>=(o==null?void 0:o.getHeight()))return l;let E=0;return[...l,{type:"group",name:"warningLine",info:r,draggable:"vertical",children:[{type:"line",info:r,shape:{x1:_,y1:y,x2:(o==null?void 0:o.getWidth())-Y,y2:y},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:r,x:(o==null?void 0:o.getWidth())-Y,y:y-5,style:{fill:"#FFF",text:w,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:V=>{E=V.offsetY},ondrag:V=>{var R;if(V.target&&V.target.childAt(1)){const L=o.convertFromPixel({yAxisIndex:0},y+(V.offsetY-E));(R=V.target.childAt(1))==null||R.animate("style",!1).when(1,{text:K(L,3)}).start()}},ondragend:async V=>{const L=V.offsetY-E;if(L!==0){const N=o==null?void 0:o.convertFromPixel({yAxisIndex:0},L+y),d={id:r.id,warnPrice:K(N,3),featureId:k,featureCode:t,featureType:h};await ue(d),J.ElMessage.success("画线预警修改成功"),v&&v()}}}]},[])},Be={class:"kline-tips"},Ee=e.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(o){return(S,M)=>(e.openBlock(),e.createElementBlock("div",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data,(b,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"kline-tips-item",style:e.normalizeStyle({color:b.color})},e.toDisplayString(b.label)+" "+e.toDisplayString(b.value),5))),128))]))}});const oe=U._export_sfc(Ee,[["__scopeId","data-v-f83b6b36"]]);const Ne={class:"kline-tips"},Fe={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(o){const{round:S,formatValue:M}=j.x,b=o,v=e.computed(()=>{const{data:k,activeIndex:h}=b;if(k.data&&k.data[h]){const u=k.data[h],_=[{label:"开",value:u[0]},{label:"高",value:u[3]},{label:"低",value:u[2]},{label:"收",value:u[1]}];u[4]!==null&&_.push({label:"额",value:M(u[4])});let Y;return u[6]>0?Y="red":u[6]<0&&(Y="green"),_.push({label:"涨跌",value:`${S(u[6])}%`,color:Y}),_}return[]}),t=e.computed(()=>{var u;const{data:k,activeIndex:h}=b;return((u=k==null?void 0:k.mainIndicator)==null?void 0:u.map(_=>({label:_.key,value:S(_.data[h]),color:_.color})))||[]});return(k,h)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(oe,{data:v.value},null,8,["data"]),e.createVNode(oe,{data:t.value},null,8,["data"])]))}},qe=U._export_sfc(Fe,[["__scopeId","data-v-ffa125ec"]]);const je={class:"klineSub"},Re={class:"klineSub-tips"},Ae={key:0,class:"klineSub-tips-select"},Oe={__name:"index",props:{cycle:{type:[String,Number],default:()=>null},data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(o,{expose:S,emit:M}){const{round:b}=j.x;let v,t;const k=M,h=o,u=e.ref(),_=e.computed({get(){return h.modelValue},set(r){k("update:modelValue",r)}}),Y=e.computed(()=>{var y;const{data:r,activeIndex:w}=h;return((y=r==null?void 0:r.subIndicator)==null?void 0:y.map(E=>({label:E.key,color:E.color,value:E.data[w]||"-"})))||[]});e.onMounted(()=>{v=ne.init(u.value);let r=!0;t=new ResizeObserver(()=>{if(r){r=null;return}v.resize()}),t.observe(u.value)}),e.onUnmounted(()=>{v.dispose(),t.disconnect(),t=null});const l=(r,w)=>{const y=r[w],E=w===0?r[w]:r[w-1];return y[0]===y[1]?y[0]>=E[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:y[1]>y[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return S({connect:r=>{ne.connect([r,v])},draw:(r,w)=>{e.nextTick(()=>{const{startValue:y,endValue:E,maxValueSpan:V}=r,{leftYAxisRange:R,rightYAxisRange:L}=h.data.subIndicator[0],N=h.data.subIndicator.map(d=>{if(d.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:d.data.map((O,P)=>d.seriesColor==="kline"?{value:O,itemStyle:l(h.data.data,P)}:d.seriesColor==="value"?{value:O,itemStyle:{color:O>=0?"#FF0000":"#00FFFF"}}:{value:O,itemStyle:{color:d.seriesColor}})};if(d.series==="line")return{xAxisIndex:0,yAxisIndex:d.yAxis==="right"?2:1,name:d.key,type:"line",silent:!0,symbol:"none",data:d.data,lineStyle:{width:1},itemStyle:{color:d.color}}});v.setOption({animation:!1,grid:{left:`${w.gridLeft}px`,top:"10px",right:`${w.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:y,endValue:E,maxValueSpan:V}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:d=>{const{axisDimension:O,value:P}=d;if(O==="x")return["6","7","8"].includes(h.cycle)?c.dayjs(P).format("YYYY-MM-DD"):P;if(d.axisIndex===1)return String(b(P))}}},formatter:()=>""},xAxis:{type:"category",data:h.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{formatter:d=>["6","7","8"].includes(h.cycle)?c.dayjs(d).format("YYYY-MM-DD"):d}},yAxis:[{position:"right"},{position:"left",min:R==="cover"?d=>d.min:null,max:R==="cover"?d=>d.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:L==="cover"?d=>d.min:null,max:L==="cover"?d=>d.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:N},!0)})}}),(r,w)=>{const y=se.ElOption,E=se.ElSelect;return e.openBlock(),e.createElementBlock("div",je,[e.createElementVNode("div",Re,[Y.value.length?(e.openBlock(),e.createElementBlock("div",Ae,[e.createVNode(E,{modelValue:_.value,"onUpdate:modelValue":w[0]||(w[0]=V=>_.value=V),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.subIndicatorList,V=>(e.openBlock(),e.createBlock(y,{key:V.value,label:V.label,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(oe,{data:Y.value},null,8,["data"])]),e.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:u},null,512)])}}},Ie=U._export_sfc(Oe,[["__scopeId","data-v-ab519de5"]]),Pe=e.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(o,{emit:S}){const M=S,b=e.ref(),v=e.ref(),t=e.ref({display:"none",top:"0px",left:"0px"}),k=()=>{t.value.display="none",M("closeContextMenuCallBack"),document.removeEventListener("click",k)},h=u=>{if(u.preventDefault(),t.value.display==="block"){const{offsetX:_,offsetY:Y}=u,{offsetWidth:l,offsetHeight:r}=v.value;if(_<=l&&Y<=r)return}b.value.click(),t.value={display:"block",top:`${u.offsetY}px`,left:`${u.offsetX}px`},e.nextTick(()=>{const _=b.value.getBoundingClientRect(),Y=v.value.getBoundingClientRect();Y.left+Y.width>=_.right&&(t.value.left=`${u.offsetX-Y.width}px`),Y.top+Y.height>=_.bottom&&(console.log("高度超出"),t.value.top=`${u.offsetY-Y.height}px`)}),document.addEventListener("click",k)};return(u,_)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"contextmenuRef",ref:b,class:"contextmenu",onContextmenu:h,onMouseleave:k},[e.renderSlot(u.$slots,"default",{},void 0,!0),t.value.display!=="none"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:v,class:"contextmenu-popover",style:e.normalizeStyle(t.value)},[e.renderSlot(u.$slots,"popover",{},void 0,!0)],4)):e.createCommentVNode("",!0)],544))}});const $e=U._export_sfc(Pe,[["__scopeId","data-v-811db6b4"]]);const ce=o=>(e.pushScopeId("data-v-9e6456be"),o=o(),e.popScopeId(),o),Ce={class:"klineBasic-tips"},We={key:0,class:"klineBasic-sub"},ze={key:1,class:"klineBasic-empty"},Ke={key:2,class:"klineBasic-error"},Ue=ce(()=>e.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),He={style:{"text-align":"center"}},Ze=ce(()=>e.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Xe={class:"dialog-footer"},Ge={__name:"index",props:{variety:{type:[String,Number],default:()=>null},varietyName:{type:[String,Number],default:()=>null},featureId:{type:[String,Number],default:()=>null},featureType:{type:[String,Number],default:()=>null},cycle:{type:[String,Number],default:()=>null},mainIndicator:{type:String,default:()=>""},indicatorStore:{type:Object,default:()=>null},startTime:{type:String,default:()=>null},endTime:{type:String,default:()=>null},right:{type:[String,Number],default:1},config:{type:Object,default:()=>({})},env:{type:Object,default:()=>({})},brushRange:{type:[Array,null],default:()=>null}},emits:["change","getFactorData"],setup(o,{expose:S,emit:M}){const b=[{label:"画线预警",key:"drawWarningLine"}];let v=null,t=null,k,h,u=!1,_=!1;const Y=M,l=o,r=e.ref(!1),w=e.ref(!1),y=e.ref(!1),E=e.ref(null),V=e.ref(null),R=e.ref("VOL"),L=e.ref(0),N=e.ref({}),d=e.ref([]),O=e.ref({}),P=e.ref(!1),H=e.ref(""),Q=e.ref([...b]),C=e.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridTop:48,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...l.config}));e.watch(()=>{var i,n;return[l.variety,l.cycle,l.mainIndicator,R.value,(i=l.indicatorStore)==null?void 0:i.filterIndicator,(n=l.indicatorStore)==null?void 0:n.customIndicator]},()=>{ee()},{deep:!0}),e.onMounted(()=>{ke(l.env),ee(),window.addEventListener("keydown",ae)}),e.onUnmounted(()=>{t==null||t.off("datazoom"),t==null||t.off("highlight"),t==null||t.off("globalout"),t==null||t.dispose(),v==null||v.dispose(),window.removeEventListener("keydown",ae)});const de=()=>{t||(t=ne.init(E.value),fe(),C.value.showSubChart&&V.value.connect(t),v=j.D(E.value),v.listen(()=>{requestAnimationFrame(()=>{t.resize()})}))},ae=({code:i,ctrlKey:n})=>{if(!(n||r.value))return;const{xAxis:m,dataZoom:f}=t.getOption(),{data:p}=(m==null?void 0:m[0])??{data:[]};let{startValue:a,endValue:s}=(f==null?void 0:f[0])??{};if(p!=null&&p.length){switch(i){case"ArrowUp":{if(s-a<5)return;const D=Math.floor((s-a)/2)+1;a=a+D,s-a<5&&(a=s-4);break}case"ArrowDown":{const D=Math.min(500,s-a);a=a-D-1;break}case"ArrowLeft":{a>0&&(a-=1,s-=1),L.value>0&&(L.value-=1);break}case"ArrowRight":{s<p.length-1&&(a+=1,s+=1),r.value&&L.value<p.length-1&&(L.value+=1);break}}t.dispatchAction({type:"dataZoom",startValue:a,endValue:s}),t.dispatchAction({type:"updateAxisPointer",seriesIndex:0,dataIndex:r.value?L.value:null}),t.dispatchAction({type:"highlight",dataIndex:r.value?L.value:s})}},fe=()=>{t==null||t.on("datazoom",n=>{clearTimeout(h),h=setTimeout(()=>{var f,p,a,s;const{loadCheckCounts:m}=C.value;if((p=(f=t==null?void 0:t.getOption())==null?void 0:f.dataZoom)!=null&&p[0]){const{startValue:D}=(s=(a=t==null?void 0:t.getOption())==null?void 0:a.dataZoom)==null?void 0:s[0];D<m&&u===!1&&_===!1&&(u=!0,pe("history")),Z()}clearTimeout(h)},100)}),t==null||t.on("highlight",n=>{var f,p;let m=n.dataIndex||-1;n.batch&&(m=typeof((f=n==null?void 0:n.batch[0])==null?void 0:f.dataIndex)=="number"?(p=n==null?void 0:n.batch[0])==null?void 0:p.dataIndex:-1),clearTimeout(k),k=setTimeout(()=>{L.value=m,clearTimeout(k)},20)}),t==null||t.on("globalout",()=>{var m,f,p;const n=(p=(f=(m=t==null?void 0:t.getOption())==null?void 0:m.dataZoom)==null?void 0:f[0])==null?void 0:p.endValue;L.value=n});let i=null;t==null||t.on("contextmenu",n=>{i=setTimeout(()=>{n.componentType==="graphic"&&(O.value=n.info,Q.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(i),i=null})})},ee=async()=>{var i,n,m,f,p,a;try{if(!l.variety||!l.cycle)return;const{variety:s,featureId:D,cycle:T,indicatorStore:x,mainIndicator:I,right:$,startTime:W,endTime:B}=l,{defaultShowCounts:F,addCounts:g,showWarningLine:te,getFactorData:G}=C.value,q={variety:s,featureId:D,cycle:T,mainIndicatorList:x.getIndicatorParams(I),subIndicator:R.value,right:$,showWarningLine:te,getFactorData:G};W&&B?(q.startTime=W,q.endTime=B):W?(q.startTime=W,q.limit=F+g):B?(q.endTime=B,q.limit=F+g):(q.endTime=c.dayjs().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),q.limit=F+g);const A=await we(q);if((m=(n=(i=A==null?void 0:A.body)==null?void 0:i.kline)==null?void 0:n.time)!=null&&m.length)w.value=!1,y.value=!1;else{w.value=!0,y.value=!1;return}N.value=(f=A==null?void 0:A.body)==null?void 0:f.kline,d.value=((p=A==null?void 0:A.body)==null?void 0:p.warningLine)||[],re(),Z(),G&&Y("getFactorData",(a=A==null?void 0:A.body)==null?void 0:a.factor)}catch(s){throw y.value=!0,w.value=!1,new Error(s)}},pe=async i=>{const{variety:n,cycle:m,indicatorStore:f,mainIndicator:p,right:a}=l,{addCounts:s}=C.value,{time:D}=N.value;if(i==="history"){const T=await De({variety:n,cycle:m,endTime:D[0],limit:s,mainIndicatorList:f.getIndicatorParams(p),subIndicator:R.value,right:a});N.value={time:[...T.body.time,...N.value.time.slice(1)],data:[...T.body.data,...N.value.data.slice(1)],mainIndicator:N.value.mainIndicator.map((x,I)=>{var $;return{...x,data:[...(($=T.body.mainIndicator[I])==null?void 0:$.data)??[],...x.data.slice(1)]}}),subIndicator:N.value.subIndicator.map((x,I)=>{var $;return{...x,data:[...(($=T.body.subIndicator[I])==null?void 0:$.data)??[],...x.data.slice(1)]}})},re(!0),T.body.data.length<s&&(_=!0),u=!1}},re=(i=!1)=>{var I,$,W;de();const{time:n}=N.value,{gridRight:m,gridLeft:f,defaultShowCounts:p,maxShowCounts:a,showSubChart:s}=C.value;let D=n.length-1-p,T=n.length-1;if(i){const B=t.getOption(),F=($=(I=B==null?void 0:B.xAxis)==null?void 0:I[0])==null?void 0:$.data,g=(W=B==null?void 0:B.dataZoom)==null?void 0:W[0],te=F[g==null?void 0:g.startValue],G=F[g==null?void 0:g.endValue];D=n.findIndex(q=>q===te),T=n.findIndex(q=>q===G)}const x=Le(N.value,C.value,D,T,l.cycle);if(t.setOption(x,!0),L.value=T,l.brushRange){let B=null,F=null;switch(l.cycle){case"6":{B=n.find(g=>new Date(g).getTime()>=new Date(l.brushRange[0]).getTime()||c.dayjs(g).format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).format("YYYY-MM-DD")),F=n.findLast(g=>new Date(g).getTime()<=new Date(l.brushRange[1]).getTime()||c.dayjs(g).format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).format("YYYY-MM-DD"));break}case"7":{B=n.find(g=>c.dayjs(g).day(5).format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).day(5).format("YYYY-MM-DD")),F=n.findLast(g=>c.dayjs(g).day(5).format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{B=n.find(g=>c.dayjs(g).endOf("month").format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).endOf("month").format("YYYY-MM-DD")),F=n.findLast(g=>c.dayjs(g).endOf("month").format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:B=n.find(g=>new Date(g).getTime()>=new Date(l.brushRange[0]).getTime()),F=n.findLast(g=>new Date(g).getTime()<=new Date(l.brushRange[1]).getTime())}console.log(B,F),t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[B,F],xAxisIndex:0}]})}s&&V.value.draw({startValue:D,endValue:T,maxValueSpan:a},{gridLeft:f,gridRight:m}),le()},Z=()=>{if(!t)return;const i=t==null?void 0:t.getOption();i&&(t==null||t.setOption({...i,graphic:[...Te(t,d.value,l,C.value,()=>{X()})]},!0),le())},le=()=>{const{time:i}=N.value;if(l.brushRange&&(i!=null&&i.length)){let n=c.dayjs(l.brushRange[0]).format("YYYY-MM-DD 00:00:00"),m=c.dayjs(l.brushRange[1]).format("YYYY-MM-DD 23:59:59"),f=null,p=null;switch(l.cycle){case"6":{f=i.find(a=>c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(n).format("YYYY-MM-DD")),p=f;break}case"7":{f=i.find(a=>c.dayjs(a).day(5).format("YYYY-MM-DD")===c.dayjs(n).day(5).format("YYYY-MM-DD")),p=i.findLast(a=>c.dayjs(a).day(5).format("YYYY-MM-DD")===c.dayjs(m).day(5).format("YYYY-MM-DD"));break}case"8":{f=i.find(a=>c.dayjs(a).endOf("month").format("YYYY-MM-DD")===c.dayjs(n).endOf("month").format("YYYY-MM-DD")),p=i.findLast(a=>c.dayjs(a).endOf("month").format("YYYY-MM-DD")===c.dayjs(m).endOf("month").format("YYYY-MM-DD"));break}default:f=i.find(a=>{const s=c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(n).format("YYYY-MM-DD"),D=new Date(a).getTime()>=new Date(n).getTime();return s&&D}),p=i.findLast(a=>{const s=c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(m).format("YYYY-MM-DD"),D=new Date(a).getTime()<=new Date(m).getTime();return s&&D})}t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[f,p],xAxisIndex:0}]})}},X=async()=>{const i=await Se({featureId:l.featureId});d.value=(i==null?void 0:i.body)||[],Z(),Y("change","warningLine",d.value)},ye=async i=>{const{variety:n,varietyName:m,featureId:f,featureType:p}=l;if(i.key==="drawWarningLine"){const a=t==null?void 0:t.getOption(),s=a.tooltip[0];t==null||t.setOption({...a,tooltip:{...s,axisPointer:{...s.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...s.axisPointer.label,backgroundColor:"transparent",formatter:T=>""}}}});const D=async T=>{t==null||t.getZr().off("mousedown",D);const x=t==null?void 0:t.convertFromPixel({yAxisIndex:0},T.offsetY),I=Math.round(x*1e3)/1e3;t==null||t.setOption({...a,tooltip:{...s,axisPointer:{...s.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...s.axisPointer.label,backgroundColor:null}}}}),await Me({featureCode:n,featureName:m,featureId:f,featureType:p,warnPrice:I}),J.ElMessage.success("画线预警成功!"),X()};t==null||t.getZr().on("mousedown",D)}else i.key==="deleteWarningLine"?(await Ve({id:O.value.id}),J.ElMessage.success("画线预警删除成功"),X()):i.key==="changeWarningLine"&&(P.value=!0,H.value=O.value.warnPrice)},me=async()=>{const{variety:i,varietyName:n,featureId:m,featureType:f}=l;await ue({id:O.value.id,featureCode:i,featureName:n,featureId:m,featureType:f,warnPrice:H.value}),J.ElMessage.success("画线预警修改成功"),X()},ge=()=>{Q.value=[...b]};return S({draw:(i,n)=>{i==="warningLine"&&(d.value=n,Z())}}),(i,n)=>{var T;const m=ie.ElMenuItem,f=ie.ElMenu,p=he.ElEmpty,a=be.ElButton,s=xe.ElInputNumber,D=ve.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"klineBasic",onMousemove:n[1]||(n[1]=x=>r.value=!0),onMouseout:n[2]||(n[2]=x=>r.value=!1)},[e.createElementVNode("div",Ce,[e.createVNode(qe,{data:N.value,activeIndex:L.value},null,8,["data","activeIndex"])]),e.createElementVNode("div",{class:"klineBasic-main",style:e.normalizeStyle({height:C.value.showSubChart?"70%":"100%"})},[e.createVNode($e,{onCloseContextMenuCallBack:ge},{popover:e.withCtx(()=>[e.createVNode(f,{style:{borderRadius:"4px",overflow:"hidden",background:"#fff",borderRight:0}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,x=>(e.openBlock(),e.createBlock(m,{style:{height:"36px"},key:x.key,index:x.key,onClick:I=>ye(x)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:E,style:{height:"100%"}},null,512)]),_:1})],4),C.value.showSubChart?(e.openBlock(),e.createElementBlock("div",We,[e.createVNode(Ie,{ref_key:"klineSubRef",ref:V,modelValue:R.value,"onUpdate:modelValue":n[0]||(n[0]=x=>R.value=x),data:N.value,cycle:o.cycle,activeIndex:L.value,subIndicatorList:(T=o.indicatorStore)==null?void 0:T.subIndicatorList},null,8,["modelValue","data","cycle","activeIndex","subIndicatorList"])])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(p,{class:"klineBasic-empty-content",description:"暂无数据"})])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("div",Ke,[Ue,e.createElementVNode("div",He,[e.createVNode(a,{onClick:ee},{default:e.withCtx(()=>[e.createTextVNode("刷新")]),_:1})])])):e.createCommentVNode("",!0)],32),e.createVNode(D,{modelValue:P.value,"onUpdate:modelValue":n[5]||(n[5]=x=>P.value=x),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:e.withCtx(()=>[e.createElementVNode("span",Xe,[e.createVNode(a,{onClick:n[4]||(n[4]=x=>P.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(a,{type:"primary",onClick:me},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})])]),default:e.withCtx(()=>[Ze,e.createVNode(s,{modelValue:H.value,"onUpdate:modelValue":n[3]||(n[3]=x=>H.value=x),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},Je=U._export_sfc(Ge,[["__scopeId","data-v-9e6456be"]]),Qe={install(o){o.component("st-klineBasic",Je)}};module.exports=Qe;