uni-app nvue下touchend事件失效

uni-app nvue下touchend事件失效

信息类别 详情
产品分类 uniapp/App
PC开发环境 Windows
PC版本号 11
HBuilderX 正式
HBuilderX版本号 4.15
手机系统 Android
手机系统版本号 Android 10
手机厂商 模拟器
手机机型 模拟器
页面类型 nvue
Vue版本 vue3
打包方式 云端
项目创建方式 HBuilderX

操作步骤:

  • 点击列表并滑动

预期结果:

  • 滑动后仍然触发touchend

实际结果:

  • touchend没有被触发

bug描述:

这是一个列表

<cell v-for="(item, index) in table.list" :key="item.id">  
    <view class="column" @click="itemClick(index)" @touchstart="changeEvent(true,item)"  
        @touchend="changeEvent(false,item)"  
        :style="item.isClieck?'background-color: aquamarine;':'background-color: #bbb;'" >  
        <uv-text lineHeight=24 size=18 margin='4 10' color="#000" :bold='true'  
            :text="item.eventTitle"></uv-text>  
        <uv-text lineHeight=18 size=16 margin='1 10' color="#777" :text="item.source"></uv-text>  
        <uv-text lineHeight=18 size=16 margin='1 10' color="#777" :text="item.time"></uv-text>  
        <uv-text lineHeight=18 size=16 margin='1 10' color="#777" :text="item.content"></uv-text>  
        <view class="spacing line" ></view>  
    </view>  
</cell>

在列表的view标签中使用了touchstart与touchend事件,当我点击立即松开item时touchstart与touchend正常触发。 但是当我滑动列表后松开touchend事件没有被触发

changeEvent(bool, item) {  
    item.isClieck = bool;  
    if (bool) {  
        console.log("行选中事件");  
    } else {  
        console.log("行失去选中事件");  
    }  
}  

更多关于uni-app nvue下touchend事件失效的实战教程也可以访问 https://www.itying.com/category-93-b0.html

1 回复

更多关于uni-app nvue下touchend事件失效的实战教程也可以访问 https://www.itying.com/category-93-b0.html


在安卓上没有触发,但是在IOS上触发了

回到顶部