Commit 6c813a48 by Tianqing Liu

fix: 解决没有录像,不可拖动时间线

1 parent 5c4c175d
...@@ -235,6 +235,8 @@ export default { ...@@ -235,6 +235,8 @@ export default {
//移动端滑动 //移动端滑动
touchmove(e) { touchmove(e) {
if (this.markTime.length < 1) return
let touches = e.touches; let touches = e.touches;
e.offsetX = touches[0].pageX; e.offsetX = touches[0].pageX;
e.offsetY = touches[0].pageY; e.offsetY = touches[0].pageY;
...@@ -245,6 +247,8 @@ export default { ...@@ -245,6 +247,8 @@ export default {
}, },
//滑动结束 //滑动结束
touchend(e) { touchend(e) {
if (this.markTime.length < 1) return
let touches = e.changedTouches; let touches = e.changedTouches;
e.offsetX = touches[0].pageX; e.offsetX = touches[0].pageX;
e.offsetY = touches[0].pageY; //pc 与m的值是否相同 e.offsetY = touches[0].pageY; //pc 与m的值是否相同
...@@ -252,6 +256,8 @@ export default { ...@@ -252,6 +256,8 @@ export default {
}, },
//滑动开始 //滑动开始
touchstart(e) { touchstart(e) {
if (this.markTime.length < 1) return
let touches = e.touches; let touches = e.touches;
e.offsetX = touches[0].pageX; e.offsetX = touches[0].pageX;
e.offsetY = touches[0].pageY; e.offsetY = touches[0].pageY;
...@@ -261,7 +267,6 @@ export default { ...@@ -261,7 +267,6 @@ export default {
this.distance = this.getDistance({ x: e.offsetX, y: e.offsetY }, { x: touches[1].pageX, y: touches[1].pageX }); this.distance = this.getDistance({ x: e.offsetX, y: e.offsetY }, { x: touches[1].pageX, y: touches[1].pageX });
} }
this.mousedown(e); this.mousedown(e);
}, },
// 鼠标移动 // 鼠标移动
......
...@@ -106,7 +106,6 @@ export default { ...@@ -106,7 +106,6 @@ export default {
TimeLineCanvas, TimeLineCanvas,
}, },
mounted() { mounted() {
let that = this
this.showDay = moment().format(this.dateFormatType) this.showDay = moment().format(this.dateFormatType)
this.timeRange = [moment().format(this.dateFormatType + ' 00:00:00'), moment().format(this.dateFormatType + ' 23:59:59')] this.timeRange = [moment().format(this.dateFormatType + ' 00:00:00'), moment().format(this.dateFormatType + ' 23:59:59')]
this.startTime = moment().format('HH:mm:ss') this.startTime = moment().format('HH:mm:ss')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!