uni-app中 v-for 直接循环一个数组会导致生成的标签无法使用stop事件修饰符

uni-app中 v-for 直接循环一个数组会导致生成的标签无法使用stop事件修饰符

产品分类 HbuilderX
PC开发环境操作系统 Mac
PC开发环境操作系统版本号 mac os 11.4
HBuilderX版本号 3.3.5

bug描述:

Windows和mac平台下, v-for 直接循环一个数组会导致生成的标签无法使用stop事件修饰符

示例代码:

<template>  
    <view class="wrap" @click="outerClick">  
        <view   
            v-for="(item,index) in [1,2,3]"   
            :key="index"   
            @click.stop="innerClick"   
            style="height: 60rpx;background-color: #eee;margin-bottom: 20rpx;"  
        >{{ item }}</view>  

        <view  
            @click.stop="innerClick"   
            style="height: 60rpx;background-color: #eee;margin-bottom: 20rpx;"  
        >循环外</view>  
    </view>  

</template>  

<script>  
  export default {  
    name: 'Demo',  
    methods: {  
      outerClick(){  
        console.log('外层元素点击了');  
      },  
      innerClick(){  
        console.log('内层元素点击了');  
      }  
    }  
  }  
</script>

更多关于uni-app中 v-for 直接循环一个数组会导致生成的标签无法使用stop事件修饰符的实战教程也可以访问 https://www.itying.com/category-93-b0.html

5 回复

小程序吗?

更多关于uni-app中 v-for 直接循环一个数组会导致生成的标签无法使用stop事件修饰符的实战教程也可以访问 https://www.itying.com/category-93-b0.html


是的 编译到微信小程序

问题确认,已加分,后续修复。

好的,收到

HBuilderX alpha 3.4.0+ 已修复该问题

回到顶部