diff --git a/src/components/klineChart.vue b/src/components/klineChart.vue index 35fe8d4..1db95c6 100644 --- a/src/components/klineChart.vue +++ b/src/components/klineChart.vue @@ -50,11 +50,20 @@ --> -
- - + class="icon-indicator-div" + > + + {{message.indicator}} @@ -69,26 +78,40 @@ style="margin-left: 10px;margin-right: 20px;" >{{message.depth}}
-
+
{{message.indicator}}
-
-
+
-
-
{{message.MACD}}
+
+
{{message.MACD}}
-
-
{{message.KDJ}}
+
+
{{message.KDJ}}
-
-
{{message.RSI}}
+
+
{{message.RSI}}
-
@@ -123,7 +146,11 @@ @mouseleave="leave()" >
-
+
@@ -135,7 +162,11 @@
-
+
@@ -168,7 +199,7 @@ :cycle="cycle" > - - - + >--> +
@@ -240,14 +273,19 @@ import KLine from "./kline.vue"; import Depth from "./marketDepth.vue"; import Volume from "./volumeChart.vue"; import MACD from "./MACDChart.vue"; -import KDJ from "./KDJChart.vue"; -import RSI from "./RSIChart.vue" +import KDJ from "./KDJChart.vue"; +import RSI from "./RSIChart.vue"; // import BRAR from "./BRARChart.vue"; // import PSY from "./PSYChart.vue"; // import ROC from "./ROCChart.vue"; // import VR from "./VRChart.vue"; import { getLanguage, getDefaultChartSize, formatDecimal } from "../js/utils"; -import { splitData, getDepthData, handleDivisionData, calculateMA } from "../js/processData"; +import { + splitData, + getDepthData, + handleDivisionData, + calculateMA +} from "../js/processData"; export default { name: "klineChart", components: { @@ -292,7 +330,9 @@ export default { isClose: true, showIndicatorOpt: false, showIndicator: "", - isClose: true + isClose: true, + interval: null, + changeDataZoomType: "" }; }, props: { @@ -534,13 +574,24 @@ export default { } this.showChart = type; }, + changeDataZoomByMouseDown(type) { + this.changeDataZoomType = type; + this.changeDataZoom(type); + this.interval = setInterval(this.changeDataZoom, 600); + }, + removeChangeDataZoom() { + clearInterval(this.interval); + }, changeDataZoom(type) { + if (type) { + this.changeDataZoomType = type; + } if (this.showChart !== "depth") { - this.$refs.candle.changeDataZoom(type); - this.$refs.volume.changeDataZoom(type); - this.$refs.macd.changeDataZoom(type); - this.$refs.stochastic.changeDataZoom(type); - this.$refs.rsi.changeDataZoom(type); + this.$refs.candle.changeDataZoom(this.changeDataZoomType); + this.$refs.volume.changeDataZoom(this.changeDataZoomType); + this.$refs.macd.changeDataZoom(this.changeDataZoomType); + this.$refs.stochastic.changeDataZoom(this.changeDataZoomType); + this.$refs.rsi.changeDataZoom(this.changeDataZoomType); } }, fullScreenToggle() {