The scroll event of the weex scroller control conflicts with the touch event of the child control

454 Views Asked by At

This is a question about Weex development with Vue.

Under a scroller component, there are a number of nested div child components. In the div, the gestures touchstart, touchend, and touchcancel are added.

The events handle the press and release effects, but they make the scroller drag event non-functional. How can I solve this?

1

There are 1 best solutions below

0
On

If you just want to add touch effects to view, you can use pseudo class:

<style scoped>
  .logo {
    width: 360px;
    height: 82px;
    background-color: red;
  }
  .logo:active {
    width: 180px;
    height: 82px;
    background-color: green;
  }
</style>

ref: http://weex.apache.org/references/common-style.html#Pseudo-class-v0-9-5