Browse Source

优化

master
ltlzx 4 years ago
parent
commit
44e751f7e5
  1. 22
      src/views/option/kline.vue

22
src/views/option/kline.vue

@ -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)

Loading…
Cancel
Save