Skip to content

Commit

Permalink
Merge branch 'zcZhang' into zcZhang_test
Browse files Browse the repository at this point in the history
  • Loading branch information
zcZhang123 committed Nov 2, 2019
2 parents ac2ca3f + ecdb52b commit bcc048f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
19 changes: 14 additions & 5 deletions src/components/klineChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@
class="close-background-icon"
></div>
<div style="height: 0.05rem; background-color:#2b3944; margin-top:3px"></div>
<div
@click="showMA()"
:class="showIndicatorMA ? 'chart-indicator-div-active' : 'chart-indicator-div'"
>
<div class="indicator-line">{{message.MA}}</div>
</div>
<div
@click="showIndicatorChart('MACD')"
:class="this.showIndicator ==='MACD' ? 'chart-indicator-div-active' : 'chart-indicator-div'"
Expand Down Expand Up @@ -553,7 +559,7 @@ export default {
this.coinType = this.klineDataObj.coinType;
}
this.changeCycleLanguage(this.cycle);
this.changeChartDataObj(this.klineDataObj, this.outspreadMA);
this.changeChartDataObj(this.klineDataObj, this.showIndicatorMA);
},
fullscreen() {
if (this.fullscreen && getLanguage().language === "en") {
Expand All @@ -569,7 +575,11 @@ export default {
}
},
methods: {
showMA() {},
showMA() {
this.showIndicatorMA = !this.showIndicatorMA;
this.changeChartDataObj(this.klineDataObj, this.showIndicatorMA);
this.showIndicatorOpt = false;
},
clickMinCycle() {
this.showMinCycle = !this.showMinCycle;
if (this.showMinCycle) {
Expand Down Expand Up @@ -661,7 +671,7 @@ export default {
candleData
);
}
candleData.showIndicatorMA = this.outspreadMA;
candleData.showIndicatorMA = this.showIndicatorMA;
candleData.MAData = MAData;
candleData.precision = precision;
}
Expand Down Expand Up @@ -689,7 +699,6 @@ export default {
},
showMAData() {
this.outspreadMA = !this.outspreadMA;
this.changeChartDataObj(this.klineDataObj, this.outspreadMA);
},
showIndicatorChart(indicator) {
if (indicator === this.showIndicator) {
Expand All @@ -701,7 +710,7 @@ export default {
}
this.showIndicatorOpt = false;
this.resize();
this.changeChartDataObj(this.klineDataObj, this.outspreadMA);
this.changeChartDataObj(this.klineDataObj, this.showIndicatorMA);
},
// 获取当前鼠标所在点的数据
getTipDataIndex(index) {
Expand Down
2 changes: 1 addition & 1 deletion src/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@

.indicatorOpt {
color: #ffffff;
height: 195px;
height: 230px;
background-color: #1e262c;
font-size: 14px;
font-family: "Microsoft YaHei";
Expand Down

0 comments on commit bcc048f

Please sign in to comment.