https://www.cnblogs.com/woshidouzia/p/10784437.htmlhtml
要實現微信小程序 在canvas畫布上划動,頁面禁止滑動,不只要設置disable-scroll="true",還要要給canvas綁定一個觸摸事件才能生效。canvas
<canvas canvas-id="myCanvas" class="myCanvas" disable-scroll="false" bindtouchstart="touchStart" bindtouchmove="touchMove" bindtouchend="touchEnd"> </canvas> 事件: disable-scroll="true" bindtouchstart="touchStart" bindtouchmove="touchMove" bindtouchend="touchEnd"
關於canvas觸摸事件,在canvas上必定要綁定三個觸摸事件,真機才能響應到畫布觸摸的event。bindtouchstart/bindtouchmove/bindtouchend,只綁定兩個或一個會致使真機獲取不到canvas上的觸摸事件。小程序