From 42faef34194c466f03e29d75a63ae502e4213044 Mon Sep 17 00:00:00 2001
From: admin <344137771@qq.com>
Date: Tue, 06 Jan 2026 10:38:46 +0800
Subject: [PATCH] 上一版是10.10的, 这版才是原始源码
---
src/components/Transform/kline-charts/index.vue | 46 ++++++++++++++++------------------------------
1 files changed, 16 insertions(+), 30 deletions(-)
diff --git a/src/components/Transform/kline-charts/index.vue b/src/components/Transform/kline-charts/index.vue
index 22c8202..5ffdbcd 100644
--- a/src/components/Transform/kline-charts/index.vue
+++ b/src/components/Transform/kline-charts/index.vue
@@ -73,34 +73,19 @@
}
},
computed: {
- //时间列表
timeList() {
- // console.log("ddddddddd", this.timeListNew, this.$route.query.type);
- if (this.$route.query.type == 'US-stocks') {
- return [
- { id: '1', time: '1', text: '1s' + this.$t('分'), ts: 1 * 60 * 1000 },
- { id: '15', time: '15', text: '15' + this.$t('分'), ts: 15 * 60 * 1000 },
- { id: '30', time: '30', text: '30' + this.$t('分'), ts: 30 * 60 * 1000 },
- { id: '45', time: '45', text: '45' + this.$t('分'), ts: 45 * 60 * 1000 },
- { id: '60', time: '60', text: '60' + this.$t('分'), ts: 60 * 60 * 1000 },
- { id: 'D', time: 'D', text: '1' + this.$t('天'), ts: 1 * 24 * 60 * 60 * 1000 },
- { id: 'W', time: 'W', text: '1' + this.$t('周'), ts: 7 * 24 * 60 * 60 * 1000 },
- { id: 'M', time: 'M', text: '1' + this.$t('月'), ts: 30 * 24 * 60 * 60 * 1000 },
- ]
- } else {
- return [
- { id: '1min', time: '1min', text: this.$t('分时'), ts: 1 * 60 * 1000 },
- { id: '1mins', time: '1min', text: '1' + this.$t('分'), ts: 1 * 60 * 1000 },
- { id: '5min', time: '5min', text: '5' + this.$t('分'), ts: 5 * 60 * 1000 },
- { id: '15min', time: '15min', text: '15' + this.$t('分'), ts: 15 * 60 * 1000 },
- { id: '30min', time: '30min', text: '30' + this.$t('分'), ts: 30 * 60 * 1000 },
- { id: '60min', time: '60min', text: '1' + this.$t('小时'), ts: 60 * 60 * 1000 },
- { id: '4hour', time: '4hour', text: '4' + this.$t('小时'), ts: 4 * 60 * 60 * 1000 },
- { id: '1day', time: '1day', text: '1' + this.$t('天'), ts: 24 * 60 * 60 * 1000 },
- { id: '1week', time: '1week', text: '1' + this.$t('周'), ts: 7 * 24 * 60 * 60 * 1000 },
- { id: '1mon', time: '1mon', text: '1' + this.$t('月'), ts: 30 * 24 * 60 * 60 * 1000 }
- ]
- }
+ return [
+ { id: '1min', time: '1min', text: this.$t('分时'), ts: 1 * 60 * 1000 },
+ { id: '1mins', time: '1min', text: '1' + this.$t('分'), ts: 1 * 60 * 1000 },
+ { id: '5min', time: '5min', text: '5' + this.$t('分'), ts: 5 * 60 * 1000 },
+ { id: '15min', time: '15min', text: '15' + this.$t('分'), ts: 15 * 60 * 1000 },
+ { id: '30min', time: '30min', text: '30' + this.$t('分'), ts: 30 * 60 * 1000 },
+ { id: '60min', time: '60min', text: '1' + this.$t('小时'), ts: 60 * 60 * 1000 },
+ { id: '4hour', time: '4hour', text: '4' + this.$t('小时'), ts: 4 * 60 * 60 * 1000 },
+ { id: '1day', time: '1day', text: '1' + this.$t('天'), ts: 24 * 60 * 60 * 1000 },
+ { id: '1week', time: '1week', text: '1' + this.$t('周'), ts: 7 * 24 * 60 * 60 * 1000 },
+ { id: '1mon', time: '1mon', text: '1' + this.$t('月'), ts: 30 * 24 * 60 * 60 * 1000 }
+ ]//时间列表
}
},
components: {
@@ -190,7 +175,7 @@
},
fetchData(time) { // 获取数据
this.chartLoading = true
- _getKline(this.symbol, this.timeValue.time || '1').then(data => {
+ _getKline(this.symbol, this.timeValue.time || '1min').then(data => {
this.chartLoading = false
data.map(item => {
item.timestamp = item.ts
@@ -228,7 +213,7 @@
},
setChartType() {
let type = 'area'
- if (this.timeValue.id === '1') {
+ if (this.timeValue.id === '1min') {
type = 'area'
} else {
type = 'candle_solid'
@@ -262,4 +247,5 @@
// #kline {
// // min-height: 828px;
// height: 1200px;
-// }</style>
+// }
+</style>
--
Gitblit v1.9.3