问题:<live-player>上绑定touch事件有bug吧?
|
onTouchStart:function(e) { if (e.touches.length == 1) { console.log('单指 touch start'); } else { console.log('双指+ touch start'); console.log(e); } },onTouchMove:function(e){ if (e.touches.length === 1) { console.log('单指 touch move'); } else { console.log('双指+ touch move, 手指数量:', e.touches.length); if (e.touches.length != 2) { console.log(e); console.warn('手指数量怎么会这么多?!'); return; } if (e.touches[0].clientX == e.touches[1].clientX && e.touches[0].clientY == e.touches[1].clientY ) { console.error('两根手指的坐标完全一样!'); console.log(e); return; } }}, |
touch相关事件绑定在view上ok:
但在<live-player>上时,两个手指放上去,经常会出现"两个手指坐标相同"、"多个touches"!

非同层的原生组件组件不支持touchstart等触摸相关事件
请问后续会提供支持吗?
猜测是绑定touch事件的元素,其children不能是<live-player>、<cover-view>。
+ <view> // 在此绑定可以正确响应双指操作
+ <image>
--------------------------------------------------------------------------------------------------------------------------------
+<view> // 在此绑定,双指触发touchstart/touchmove时,touches数组中的identifier相同
+ <live-player>
尚待确认。