IOS真机调试,canvas组件事件不触发?
发布于 5 年前 作者 jieqiu 14972 次浏览 来自 问答

ios启动真机调试 canvas组件,组件内的事件 touchstart 等均不触发, 安卓端真机调试没问题

微信:7.0.11

基础库: 2.10.3

终端: iphone xs max

<canvas 
      id="canvas" type="2d" 
      disable-scroll
      bindtouchstart="cTouchStart"
      bindtouchmove="cTouchMove"
      bindtouchend="cTouchEnd"
      bindtouchcancel="cTouchCancel"
      bindlongtap="cTouchLong"
      binderror="cTouchErr"
      ></canvas>

  cTouchStart(e){ 
      console.log('触摸开始', e)
  
  
    },
    cTouchMove(e){  
    console.log('触摸移动', e)

  },
  cTouchEnd(e) {   
    console.log('触摸结束', e)

  },
  cTouchCancel(e) {   
    console.log('触摸取消', e)

  },
  cTouchLong(e) {  
    console.log('长按', e)

  },
  cTouchErr(e) {   
    console.log('错误',e)
  },
2 回复

你好,真机预览有问题么?

试试体验版

回到顶部