视频回放

This commit is contained in:
yanran200730
2022-04-15 16:01:15 +08:00
parent 669b56c5f9
commit 6ee61ae682
4 changed files with 522 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="canvas" @mousemove.stop="onMousemove" @mouseup="onMouseUp" @mouseleave="isHide = true" v-if="isInit">
<div :class="wrapper" class="canvas" @mousemove.stop="onMousemove" @mouseup="onMouseUp" @mouseleave="isHide = true" v-if="isInit">
<canvas
:id="id"
:style="{height: '52px'}"
@@ -32,9 +32,11 @@
time: '',
left: 0,
x: 0,
ratioW: '',
isHide: true,
isInit: false,
isChoose: false,
wrapper: `canvas-${new Date().getTime()}`,
id: `timeline-${new Date().getTime()}`,
timer: null
}
@@ -112,8 +114,8 @@
this.$nextTick(() => {
this.isInit = true
this.$nextTick(() => {
this.canvasWidth = document.querySelector('.canvas').offsetWidth
this.canvasHeight = document.querySelector('.canvas').offsetHeight
this.canvasWidth = document.querySelector(`.${this.wrapper}`).offsetWidth
this.canvasHeight = document.querySelector(`.${this.wrapper}`).offsetHeight
this.$nextTick(() => {
const el = document.querySelector(`#${this.id}`)