Dodu
Dodu
  • 发布:2021-05-26 01:05
  • 更新:2021-05-26 01:05
  • 阅读:433

【报Bug】nvue模式下, cover-view 事件修饰符无效

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 3.1.16

手机系统: Android

手机系统版本号: Android 11

手机厂商: 华为

手机机型: p30 pro

页面类型: nvue

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
<view class="viewo-warp">  
                    <video class="video" object-fit="cover" :id="item.id" :ref="item.id" :src="item.src"  
                        :controls="false" :loop="true" :show-center-play-btn="false" @timeupdate="timeupdateHandle"  
                        @click="videoClickHandle">  
                        <cover-view class="video-content">  
                            <text class="text-white margin-bottom">info</text>  
                            <text class="text-white text-df">info</text>  
                            <text class="text-white text-df">info</text>  
                        </cover-view>  
                        <cover-view class="video-features" @click.stop.prevent>  
                            <uni-icons type="contact" color="white" size="45" class="margin-bottom"></uni-icons>  
                            <uni-icons type="heart" color="white" size="45" class="margin-bottom"></uni-icons>  
                            <uni-icons type="chatboxes" color="white" size="38" class="margin-bottom"></uni-icons>  
                            <uni-icons type="redo-filled" color="white" size="40" @click.stop.prevent="toShared"></uni-icons>  
                        </cover-view>  
                        <cover-view class="video-play-ctrl" v-if="!playing">  
                            <uni-icons type="forward" color="white" size="75"></uni-icons>  
                        </cover-view>  
                    </video>  
                    <view class="progress-bar-warp">  
                        <text class="progress-bar" :style="{ 'width': videoProgress }"></text>  
                    </view>  
                </view>

事件 toShared 仍然会冒泡到 video 标签上, videoClickHandle 已经被执行

操作步骤:

使用以上示例及可进行复现, 或 按以下步骤

  • 新建nvue页面
  • 加入 video 标签
  • 加入 cover-view 元素
  • 测试事件修饰符

预期结果:

不应该冒泡到video吧

实际结果:

video 上的 videoClickHandle 事件依旧被触发

bug描述:

video 内的 cover-view 不支持事件修饰符 .stop.prevent, 单独和同事用都无效, 事件还会冒泡到 video 上. 其他修饰符暂没测试.

2021-05-26 01:05 负责人:无 分享
已邀请:

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