梅花三
梅花三
  • 发布:2022-09-27 09:35
  • 更新:2022-09-27 18:25
  • 阅读:307

【报Bug】ios 端 nvue 在list scroll-view组件上监听@touchstart @touchmove @touchend 事件后,全局list和scroll组件失效

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

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

HBuilderX类型: 正式

HBuilderX版本号: 3.6.4

手机系统: iOS

手机系统版本号: iOS 15

手机厂商: 苹果

手机机型: iphone8 iphone 12

页面类型: nvue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
<template>  
    <view class="page">  
        <!-- <scroll-view class="list" @touchstart="onTouch" @touchmove="onTouch" @touchend="onTouch">  
            <view v-for="(item, index) in list" :key="index">  
                <view class="item" hover-class="hover" hover-start-time="20" @click="onItem(item)">  
                    <text class="name">{{ item }}</text>  
                </view>  
            </view>  
        </scroll-view> -->  
        <list class="list" @touchstart="onTouch" @touchmove="onTouch" @touchend="onTouch">  
            <view v-for="(item, index) in list" :key="index">  
                <view class="item" hover-class="hover" hover-start-time="20" @click="onItem(item)">  
                    <text class="name">{{ item }}</text>  
                </view>  
            </view>  
        </list>  
    </view>  
</template>  

<script>  
    export default {  
        data() {  
            return {  
                list: [],  
            }  
        },  
        onLoad() {  
            for (var i = 0; i < 30; i++) {  
                this.list.push(i)  
            }  
        },  
        methods: {  
            onTouch(e) {  

            },  
            onItem(item) {  
                uni.navigateTo({  
                    url: '/pages/index/item?item=' + item  
                })  
            }  
        }  
    }  
</script>  

<style>  
    .page{  
        flex: 1;  
        flex-direction: column;  
        overflow: hidden;  
        background-color: #ffffff;  
    }  

    .list {  
        position: absolute;  
        top: 0;  
        left: 0;  
        right: 0;  
        bottom: 0;  
    }  

    .item {  
        width: 750rpx;  
        height: 200rpx;  
        display: flex;  
        justify-content: center;  
        align-items: center;  
        border-bottom: 1px solid #a9a9a9;  
    }  

    .name {  
        color: black;  
        font-size: 40rpx;  
        font-weight: bold;  
    }  
</style>  

操作步骤:

上下滑动后,点击进去,返回,反复2次,100%复现

预期结果:

正常

实际结果:

所有页面使用这2个组件的地方,都失效,不能滑动,不能点击,仅这2个组件失效,组件外的元素都正常点击

bug描述:

仅 ios 端(版本15.4 15.5 15.6 16.0) nvue 在list scroll-view组件上监听@touchstart @touchmove @touchend 事件后,整个list和scroll组件失效,是全局使用这2个组件的页面都失效,一个地方能影响全局

2022-09-27 09:35 负责人:DCloud_iOS_WZT 分享
已邀请:
梅花三

梅花三 (作者) - 梅花三

梅花三

梅花三 (作者) - 梅花三

顶顶顶顶顶顶顶顶顶顶

梅花三

梅花三 (作者) - 梅花三

顶顶顶顶顶顶顶顶

梅花三

梅花三 (作者) - 梅花三

顶顶顶顶顶顶顶顶

DCloud_iOS_WZT

DCloud_iOS_WZT

附件提供一个能复现问题的示例工程吧

要回复问题请先登录注册