z-swiper-wxs.wxs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. function onTouchStartWxs(event, ins) {
  2. ins.callMethod("onTouchStartSwiperWxs", {
  3. changedTouches: event.changedTouches,
  4. currentTarget: event.currentTarget,
  5. touches: event.touches,
  6. type: event.type
  7. })
  8. }
  9. function onTouchMoveWxs(event, ins) {
  10. ins.callMethod("onTouchMoveSwiperWxs", {
  11. changedTouches: event.changedTouches,
  12. currentTarget: event.currentTarget,
  13. touches: event.touches,
  14. type: event.type
  15. })
  16. }
  17. function onTouchEndWxs(event, ins) {
  18. ins.callMethod("onTouchEndSwiperWxs", {
  19. changedTouches: event.changedTouches,
  20. currentTarget: event.currentTarget,
  21. touches: event.touches,
  22. type: event.type
  23. })
  24. }
  25. function wxsTransformObserver(newValue, oldValue, ownerInstance, instance) {
  26. instance.setStyle({
  27. transform: newValue
  28. })
  29. }
  30. function wxsItemTransformObserver(newValue, oldValue, ownerInstance, instance) {
  31. instance.setStyle({
  32. transform: newValue
  33. })
  34. }
  35. module.exports = {
  36. onTouchStartWxs: onTouchStartWxs,
  37. onTouchMoveWxs: onTouchMoveWxs,
  38. onTouchEndWxs: onTouchEndWxs,
  39. wxsTransformObserver: wxsTransformObserver,
  40. wxsItemTransformObserver: wxsItemTransformObserver
  41. }