闪到腰的咸鱼
闪到腰的咸鱼
  • 发布:2020-11-30 11:52
  • 更新:2020-11-30 15:25
  • 阅读:1089

【报Bug】nvue 页面swiper-item里面嵌套scroll-view,滑到底部swiper不能切换

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win10

HBuilderX类型: 正式

HBuilderX版本号: 2.9.8

手机系统: Android

手机系统版本号: Android 11

手机厂商: 华为

手机机型: 荣耀 v30

页面类型: nvue

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
<swiper class="_goods_swiper" :vertical="true" :style="{height: scrollHeight}" :autoplay="false" :circular="false" :current="goodsPage" :duration="800" @change="goodsPageChange">    
    <swiper-item :style="{height: scrollHeight}">    
        <!-- 第一栏滚动 -->    
        <scroll-view scroll-y="true" :style="{height: scrollHeight}" :show-scrollbar="false" @scroll="scrollHandle">    
            ………    
        </scroll-view>    
    </swiper-item>    
    <swiper-item :style="{height: scrollHeight}">    
        <!-- 第二栏内容 -->    
    </swiper-item>    
</swiper>    

computed() {    
    scrollHeight() {    
        return uni.getSystemInfoSync().screenHeight - uni.getSystemInfoSync().statusBarHeight    
    }    
}

操作步骤:
<swiper class="_goods_swiper" :vertical="true" :style="{height: scrollHeight}" :autoplay="false" :circular="false" :current="goodsPage" :duration="800" @change="goodsPageChange">    
    <swiper-item :style="{height: scrollHeight}">    
        <!-- 第一栏滚动 -->    
        <scroll-view scroll-y="true" :style="{height: scrollHeight}" :show-scrollbar="false" @scroll="scrollHandle">    
            ………    
        </scroll-view>    
    </swiper-item>    
    <swiper-item :style="{height: scrollHeight}">    
        <!-- 第二栏内容 -->    
    </swiper-item>    
</swiper>    

computed() {    
    scrollHeight() {    
        return uni.getSystemInfoSync().screenHeight - uni.getSystemInfoSync().statusBarHeight    
    }    
}

预期结果:

嵌套了scroll-view的swiper-item可以滑动到下一个swiper-item

实际结果:

不能顺利的滑动到下一个swiper-item

bug描述:

nvue 页面swiper-item里面嵌套scroll-view,swiper-item标签和scroll-view标签的高度相等,scroll-view滑到底部之后swiper就不能切换到下一个了

2020-11-30 11:52 负责人:无 分享
已邀请:

最佳回复

DCloud_UNI_Anne

DCloud_UNI_Anne

不允许相同方向的 swiper 或者 scroll-view 互相嵌套,换句话说就是嵌套的必须是不同的方向。

DCloud_uniCloud_JSON

DCloud_uniCloud_JSON

该问题目前已经被锁定, 无法添加新回复