收藏
回答

左滑触发了父级的左滑了,冲突了 怎么办?

<swiper><swiper-item class="swiper-item">

<scroll-view scroll-y="true" class="scrollY" bindscrolltolower="lower" lower-threshold="100">

<scroll-view scroll-x="true" class="scrollY"></scroll-view>

</scroll-view>

</swiper-item></swiper>

回答关注问题邀请回答
收藏

3 个回答

  • 睡前原谅一切
    睡前原谅一切
    2023-08-11

    给swiper的 swiper-item加个catchtouchmove

    <swiper>
    
      <swiper-item class="swiper-item" catchtouchmove="preventDefault">
      
        <scroll-view scroll-y="true" class="scrollY" bindscrolltolower="lower" lower-threshold="100">
      
          <scroll-view scroll-x="true" class="scrollY"></scroll-view>
      
        </scroll-view>
        
       </swiper-item>
      </swiper>
    
    preventDefault() {}
    
    2023-08-11
    有用
    回复
  • 那一抹笑😃 穿透阳光
    那一抹笑😃 穿透阳光
    2023-08-11

    这个兼容性不好,建议考虑其他实现方式

    2023-08-11
    有用
    回复
  • showms
    showms
    2023-08-10

    横向滑动的scroll-view加一个catch滑动事件试下,但是其实不建议这样嵌套,不同滑动事件可能会互相影响,体验也不太好,还不如考虑能不能换其他布局

    2023-08-10
    有用
    回复
登录 后发表内容