视频监控

This commit is contained in:
yanran200730
2022-04-21 15:04:17 +08:00
parent 2fe01ec7cf
commit 49dabf912c
4 changed files with 72 additions and 32 deletions

View File

@@ -133,6 +133,12 @@
},
init () {
if (this.timer) {
clearInterval(this.timer)
this.timer = null
}
this.ratioW = this.x / this.canvasWidth
this.$nextTick(() => {
this.isInit = true
this.$nextTick(() => {
@@ -146,7 +152,7 @@
this.ctx.height = document.querySelector('.canvas').offsetHeight
if (this.x > 0) {
this.x = this.canvasWidth * this.ratioW
this.x = this.ratioW * this.canvasWidth
} else {
this.initNowTime()
}