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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "st-comp",
3
3
  "public": true,
4
- "version": "0.0.207",
4
+ "version": "0.0.209",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -28,10 +28,10 @@ const mainTips = computed(() => {
28
28
  if (data.data && data.data[activeIndex]) {
29
29
  const itemData = data.data[activeIndex];
30
30
  const result = [
31
- { label: "开", value: round(itemData[0]) },
32
- { label: "高", value: round(itemData[3]) },
33
- { label: "低", value: round(itemData[2]) },
34
- { label: "收", value: round(itemData[1]) },
31
+ { label: "开", value: itemData[0] },
32
+ { label: "高", value: itemData[3] },
33
+ { label: "低", value: itemData[2] },
34
+ { label: "收", value: itemData[1] },
35
35
  ];
36
36
  // 特殊: 交易总额
37
37
  itemData[4] !== null && result.push({ label: "额", value: formatValue(itemData[4]) });
@@ -156,10 +156,10 @@ const kLineTips = computed(() => {
156
156
  // 处理结果
157
157
  const result = [];
158
158
  const { open, heigh, low, close, business, riseAndFall } = config.value.tipsConfig;
159
- open && result.push({ label: "开", value: formatValue(klineItem[0]), color: "rgb(153, 153, 153)" });
160
- heigh && result.push({ label: "高", value: formatValue(klineItem[3]), color: "rgb(153, 153, 153)" });
161
- low && result.push({ label: "低", value: formatValue(klineItem[2]), color: "rgb(153, 153, 153)" });
162
- close && result.push({ label: "收", value: formatValue(klineItem[1]), color: "rgb(153, 153, 153)" });
159
+ open && result.push({ label: "开", value: klineItem[0], color: "rgb(153, 153, 153)" });
160
+ heigh && result.push({ label: "高", value: klineItem[3], color: "rgb(153, 153, 153)" });
161
+ low && result.push({ label: "低", value: klineItem[2], color: "rgb(153, 153, 153)" });
162
+ close && result.push({ label: "收", value: klineItem[1], color: "rgb(153, 153, 153)" });
163
163
  business && result.push({ label: "额", value: formatPrice(klineItem[4]), color: "rgb(153, 153, 153)" });
164
164
  if (riseAndFall) {
165
165
  let ratio = (((klineItem[1] - klineItem[5]) / klineItem[1]) * 100).toFixed(2);
@@ -42,7 +42,7 @@ const mainTips = computed(() => {
42
42
  } else if (itemData[6] < 0) {
43
43
  diffColor = "green";
44
44
  }
45
- result.push({ label: "涨跌", value: `${itemData[6]}%`, color: diffColor });
45
+ result.push({ label: "涨跌", value: `${round(itemData[6])}%`, color: diffColor });
46
46
  return result;
47
47
  }
48
48
  return [];
@@ -46,10 +46,10 @@ const mainTips = computed(() => {
46
46
  diffColor = "green";
47
47
  }
48
48
  return [
49
- { label: "开", value: round(candlestickData[activeIndex][0]) },
50
- { label: "高", value: round(candlestickData[activeIndex][3]) },
51
- { label: "低", value: round(candlestickData[activeIndex][2]) },
52
- { label: "收", value: round(candlestickData[activeIndex][1]) },
49
+ { label: "开", value: candlestickData[activeIndex][0] },
50
+ { label: "高", value: candlestickData[activeIndex][3] },
51
+ { label: "低", value: candlestickData[activeIndex][2] },
52
+ { label: "收", value: candlestickData[activeIndex][1] },
53
53
  { label: "额", value: formatValue(candlestickData[activeIndex][4]) },
54
54
  { label: "涨跌", value: `${round(candlestickData[activeIndex][6])}%`, color: diffColor }
55
55
  ]
@@ -57,10 +57,10 @@ const mainTips = computed(() => {
57
57
  // candlestickData: [开, 收, 低, 高, 昨收, 交易总额]
58
58
  const itemData = drawData.candlestickData[activeIndex];
59
59
  const result = [
60
- { label: "开", value: round(itemData[0]) },
61
- { label: "高", value: round(itemData[3]) },
62
- { label: "低", value: round(itemData[2]) },
63
- { label: "收", value: round(itemData[1]) },
60
+ { label: "开", value: itemData[0] },
61
+ { label: "高", value: itemData[3] },
62
+ { label: "低", value: itemData[2] },
63
+ { label: "收", value: itemData[1] },
64
64
  ];
65
65
  // 特殊: 交易总额
66
66
  itemData[5] !== undefined && result.push({ label: "额", value: formatValue(itemData[5]) });
@@ -82,10 +82,10 @@ const mainTips = computed(() => {
82
82
  ];
83
83
  }
84
84
  const result = [
85
- { label: "开", value: round(itemData[0]) },
86
- { label: "高", value: round(itemData[3]) },
87
- { label: "低", value: round(itemData[2]) },
88
- { label: "收", value: round(itemData[1]) },
85
+ { label: "开", value: itemData[0] },
86
+ { label: "高", value: itemData[3] },
87
+ { label: "低", value: itemData[2] },
88
+ { label: "收", value: itemData[1] },
89
89
  ];
90
90
  // 特殊: 交易总额
91
91
  itemData[4] !== null && result.push({ label: "额", value: formatValue(itemData[4]) });
@@ -1,6 +1,6 @@
1
1
  import axios from "axios";
2
2
 
3
- const token = "ded0476c5608c82dd3e4afb944abef17";
3
+ const token = "d06d8c9c2ea6c489dc94820c084f7d28";
4
4
  const host = "http://192.168.12.38:5173";
5
5
 
6
6
  // 获取指标线配置