uni-app scroll-view 嵌套 swiper 小程序显示异常

简单例子DEMO

<scroll-view>
      <swiper class="swiper" indicator-dots autoplay disable-touch :touchable="false">
	      <swiper-item v-for="(item,i) in bannerList" :key='i'>
			<image class="swiper" :src="item.image_url" mode="scaleToFill"></image>
		</swiper-item>
	</swiper>
      <view class="other">
             其他等等
      </view>
</scroll-view>

当 swiper 组件进行切换轮播的时候,swiper 下面的元素会直接消失掉,却仍然可以点击,真就灵异事件了。

最后发现是因为 scroll-view 嵌套的原因,换成普通的 view 标签即可解决,这应该不是 uni-app 的问题,算是小程序本身的 bug。

posted @ 2020-06-29 17:38  啊草  阅读(817)  评论(0)    收藏  举报