Vant: SwipeCell与Swipe组件一起使用时,会同时滑动

Created on 17 Jul 2019  ·  6Comments  ·  Source: youzan/vant

有没有办法可以阻止一起滑动呀?左滑SwipeCell的时候,Swipe组件不应该一起滑动

💡 feature

Most helpful comment

阻止 touchmove 事件冒泡后导致了一些其他问题,如 https://github.com/youzan/vant/issues/3950

所以下个版本会加个开关来控制是否冒泡,对于需要阻止冒泡的情况,请加上stop-propagation属性。

<van-swipe-cell stop-propagation>
  ...
</van-swipe-cell>

建议提前把这个属性加上,免得之后升级版本的时候出现问题

All 6 comments

下个版本会处理下,SwipeCell 加个阻止事件冒泡

已在 2.0.9 版本优化

就喜欢你们的做事风格,神一般的执行力!

😊

阻止 touchmove 事件冒泡后导致了一些其他问题,如 https://github.com/youzan/vant/issues/3950

所以下个版本会加个开关来控制是否冒泡,对于需要阻止冒泡的情况,请加上stop-propagation属性。

<van-swipe-cell stop-propagation>
  ...
</van-swipe-cell>

建议提前把这个属性加上,免得之后升级版本的时候出现问题

thanks

Was this page helpful?
0 / 5 - 0 ratings