|
|
|
@ -117,7 +117,8 @@ data() { |
|
|
|
ws: undefined, |
|
|
|
onLoadedCallback: undefined, |
|
|
|
onRealtimeCallback: undefined, |
|
|
|
timer: "15", |
|
|
|
// timer: "15", |
|
|
|
timer: "1", |
|
|
|
sub: "", |
|
|
|
isCreateSocket: false, |
|
|
|
page: {}, |
|
|
|
@ -205,6 +206,7 @@ methods: { |
|
|
|
onLoadedCallback, |
|
|
|
onErrorCallback |
|
|
|
) { |
|
|
|
// handleClick |
|
|
|
console.info(resolution) |
|
|
|
this.page[this.symbol] = this.page[this.symbol] || 1; |
|
|
|
let page = this.page[this.symbol] > 3 ? 3 : this.page[this.symbol]; |
|
|
|
@ -394,19 +396,19 @@ methods: { |
|
|
|
localStorage.setItem("tim", "1"); |
|
|
|
} |
|
|
|
btn = button.on("click", function (e) { |
|
|
|
$(this).parents(".left").children().find(".my-date").removeAttr("style"); |
|
|
|
handleClick(e, v.resolution); |
|
|
|
button.css({ |
|
|
|
color: "#5786d2", |
|
|
|
"border-bottom": "1px solid #5786d2", |
|
|
|
}); |
|
|
|
// _this.$store.commit("upType", v.type); |
|
|
|
widget.chart().setChartType(v.chartType); //改变K线类型 |
|
|
|
$(this).parents(".left").children().find(".my-date").removeAttr("style"); |
|
|
|
handleClick(e, v.resolution); |
|
|
|
button.css({ |
|
|
|
color: "#5786d2", |
|
|
|
"border-bottom": "1px solid #5786d2", |
|
|
|
}); |
|
|
|
// _this.$store.commit("upType", v.type); |
|
|
|
widget.chart().setChartType(v.chartType); //改变K线类型 |
|
|
|
}); |
|
|
|
}); |
|
|
|
let handleClick = (e, value) => { |
|
|
|
_this.setSymbol = function (symbol, value) { |
|
|
|
gh.chart().setSymbol(symbol, value); |
|
|
|
gh.chart().setSymbol(symbol, value); |
|
|
|
}; |
|
|
|
widget.chart().setResolution(value, function onReadyCallback() {}); //改变分辨率 |
|
|
|
$(e.target) |
|
|
|
|