苹果真机调试swiper里嵌套scroll-view,在scroll-view图层上添加一个绝对定位元素,当swiper滑动时,绝对定位元素别scroll-view覆盖了
<view>
<swiper>
<swiper-item class="swiper">
<view class="swiper-item-wrapper">
<view class="swiper-item-pos"></view>
<scroll-view scroll-y style="height: 500rpx;" >
<view class="scroll-view-item">1</view>
<view class="scroll-view-item">2</view>
<view class="scroll-view-item">3</view>
<view class="scroll-view-item">4</view>
<view class="scroll-view-item">6</view>
<view class="scroll-view-item">7</view>
</scroll-view>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item-wrapper">
<view class="swiper-item-pos"></view>
<scroll-view scroll-y style="height: 500rpx;" >
<view class="scroll-view-item">one</view>
<view class="scroll-view-item">two</view>
<view class="scroll-view-item">three</view>
<view class="scroll-view-item">four</view>
<view class="scroll-view-item">five</view>
<view class="scroll-view-item">six</view>
<view class="scroll-view-item">seven</view>
</scroll-view>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item-wrapper">
<view class="swiper-item-pos"></view>
<scroll-view scroll-y style="height: 500rpx;" >
<view class="scroll-view-item">一</view>
<view class="scroll-view-item">二</view>
<view class="scroll-view-item">三</view>
<view class="scroll-view-item">四</view>
<view class="scroll-view-item">五</view>
<view class="scroll-view-item">六</view>
<view class="scroll-view-item">七</view>
</scroll-view>
</view>
</swiper-item>
</swiper>
</view>
.swiper-item-wrapper {
position: relative;
background: yellow;
border-radius: 30rpx;
}
.swiper-item-pos {
position: absolute;
left: 0;
top: 0;
height: 150rpx;
width: 100rpx;
background-color: red;
z-index: 999;
}
.scroll-view-item {
width: 100%;
height: 100rpx;
margin-bottom: 10rpx;
background-color: aquamarine;
}
确认了下,应该是在灰度的 2.21.1 引入的一个问题,现已回退,可以看看 2.21.0 版本是否正常?
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。