Functions written in mounted in vue will make an error when switching from the current page to another page. And the timer was cleared.

The function written in mounted in

vue will make an error when switching from the current page to another page.

paint () {
  var canvas = document.querySelector("canvas")
  var width = canvas.width
  var height = canvas.height
  var ctx = canvas.getContext("2d")
  var rotation = 0
  this.paintd3()
  // 
  this.intervalId = setInterval(() => {
    console.log("hahahahhah")
    this.paintd3()
    ctx.save()
    ctx.setTransform(1, 0, 0, 1, 0, 0)
    ctx.translate(0 + 0.5 * 960, 0 + 0.5 * 960)
    ctx.rotate(rotation * Math.PI / 180)
    console.log(rotation * Math.PI / 180)
    ctx.drawImage(canvas, -0.5 * width / 2, -0.5 * height / 2)
    // myChart.clear()
    ctx.restore()
    rotationPP
  }, 1500)
}

clipboard.png

I don"t know why

Mar.20,2021

Hello, how is this problem solved? I have encountered the same problem.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3810e-2b92e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3810e-2b92e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?