store/packageA/detail_v2/touch.wxs

26 lines
732 B
XML

var allTouchs = [], len = 0, instances = [], instanceLen, isMoveEnd = false
function touchmove(event, ownerInstance) {
//获取当前移动的手指
var bounds = event.changedTouches, boundsLen = bounds.length, bound = null, instance = null, allTouch = null
for (var i = 0; i < instanceLen; i++) {
instance = instances[i]
for (var j = 0; j < boundsLen; j++) {
bound = bounds[j]
if (instance.identifier === bound.identifier) {
//
instance.setStyle({
'transform': 'translateX(' + bound.pageX + 'px) translateY(' + bound.pageY + 'px)',
'display': 'block'
})
console.log(bound.pageY)
}
}
}
}
module.exports = {
touchmove: touchmove
};