jhzh
2025-04-21 2ff6ba5a36fcdd4249f3f775dff1397bd3160c9e
修改K线数据不实时
1 files modified
18 ■■■■■ changed files
src/page/kline/components/kLine.vue 18 ●●●●● patch | view | raw | blame | history
src/page/kline/components/kLine.vue
@@ -1046,16 +1046,18 @@
    this.$nextTick(() => {
      this.CreateMinuteChart();
        this.CreateKLineChart();
  //     this.timerss = setInterval(() => {
  //       this.CreateKLineChart();
  //       console.log(this.KLinePeriodMenu);
        // // this.KLineChart.ChangePeriod(this.KLinePeriodMenu[this.KLinePeriodIndex].ID);
        // //此处为了 让k线实时刷新
      this.timerss = setInterval(() => {
        this.KLineChart = null
        this.CreateMinuteChart();
        this.CreateKLineChart();
        console.log(this.KLinePeriodMenu);
        // this.KLineChart.ChangePeriod(this.KLinePeriodMenu[this.KLinePeriodIndex].ID);
        //此处为了 让k线实时刷新
        // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex, 0, 'kline')
        // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex, this.KLinePeriodMenu[this.KLinePeriodIndex], 'kline')
  //       // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex+1, this.KLinePeriodMenu[this.KLinePeriodIndex+1], 'kline')
  //       // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex-1, this.KLinePeriodMenu[this.KLinePeriodIndex-1], 'kline')
  //     }, 5000);
        // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex+1, this.KLinePeriodMenu[this.KLinePeriodIndex+1], 'kline')
        // this.OnClickKLinePeriodMenu(this.KLinePeriodIndex-1, this.KLinePeriodMenu[this.KLinePeriodIndex-1], 'kline')
      }, 5000);
    });
    let that = this;
    window.onresize = _.debounce(this.OnSize, 200);