How does Vue write floating ads?

clipboard.png
vue

clipboard.png
htmltemplate

clipboard.png
jsvardatavue$refs

clipboard.png

start it in the updated hook, because other hooks will not catch it (it"s useless to put it in mounted)
but the advertisement doesn"t move. How should I write it?
PS: doesn"t need the code here. It just wants to write a floating ad

.

should be setInterval (this.float (), 10) this is wrong. There is no need for parentheses. Adding parentheses will only be executed once. And your code doesn't have to be written like this, the adFloat method is not necessary, just write it in mounted (). Timers can be defined in data.

data () {
  return {
    timer: null
  }
}
mounted () {
  this.$nextTick(function () {
    const self = this
    this.timer = setInterval(this.float, 10)
    this.$refs[].onmouseover = function () {
        clearInterval(self.timer)
    }
    this.$refs[].onmouseout = function () {
        self.timer = setInterval(self.float, 10)
    }
  })
}

try calling this.adFloat () in the mounted method. https://www.qqwenda.com

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-1ea0160-1aac.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-1ea0160-1aac.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?