video catchtouchmove 不起作用
发布于 5 年前 作者 minshao 2696 次浏览 来自 问答

<video class="video" src="{{resource.video_url}}" hover-class="none" catchtouchstart="stopScroll" catchtouchmove="stopScroll" catchtouchend="stopScroll" autoplay="{{false}}" controls="{{false}}" loop="true" objectFit="cover" id="video">

看一下video的catchtouchmove 不起作用,不知道如何禁止catchtouch的滑动,主要是我不想让背景滑动

<view catchtouchmove="stopScroll"><video class="video" src="{{resource.video_url}}" hover-class="none" catchtouchstart="stopScroll" catchtouchmove="stopScroll" catchtouchend="stopScroll" autoplay="{{false}}" controls="{{false}}" loop="true" objectFit="cover" id="video">


不知道如何捕获 video的touch事件,还有就是如果在上面加一个cover-image或者cover-view,是否能够禁止滑动

stopScroll: function(){
// return false;
 console.log('stopScroll...............')
},
stopCatch: function(){ console.log('stopCatch...............') },
1 回复

你的问题解决了,遇到同样的问题

回到顶部