|
|
|
@ -118,7 +118,7 @@ data() { |
|
|
|
onLoadedCallback: undefined, |
|
|
|
onRealtimeCallback: undefined, |
|
|
|
// timer: "15", |
|
|
|
timer: "1", |
|
|
|
timer: "5", |
|
|
|
sub: "", |
|
|
|
isCreateSocket: false, |
|
|
|
page: {}, |
|
|
|
@ -418,12 +418,12 @@ methods: { |
|
|
|
buttonArr.forEach((v, i) => { |
|
|
|
let button = widget.createButton(); |
|
|
|
button.attr("title", v.title).addClass("my-date").text(v.title); |
|
|
|
if (v.resolution === "1") { |
|
|
|
if (v.resolution === _this.timer) { |
|
|
|
button.css({ |
|
|
|
color: "#5786d2", |
|
|
|
"border-bottom": "1px solid #5786d2", |
|
|
|
}); |
|
|
|
localStorage.setItem("tim", "1"); |
|
|
|
// localStorage.setItem("tim", v.resolution); |
|
|
|
} |
|
|
|
btn = button.on("click", function (e) { |
|
|
|
$(this).parents(".left").children().find(".my-date").removeAttr("style"); |
|
|
|
@ -433,6 +433,7 @@ methods: { |
|
|
|
"border-bottom": "1px solid #5786d2", |
|
|
|
}); |
|
|
|
// _this.$store.commit("upType", v.type); |
|
|
|
localStorage.setItem("tim", v.resolution); |
|
|
|
widget.chart().setChartType(v.chartType); //改变K线类型 |
|
|
|
}); |
|
|
|
}); |
|
|
|
@ -482,6 +483,12 @@ methods: { |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
created(){ |
|
|
|
let tim=localStorage.getItem("tim"); |
|
|
|
if(tim){ |
|
|
|
this.timer=tim |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.initView(); |
|
|
|
}, |
|
|
|
|