uni-app 小程序端 v-for循环绑定事件@event="func(item)"传值触发时打印item为undefined
<swiper-item class="products_swiper_item" v-for="(item,index) in productSwiperImg" :key="index" @tap="toGoodDetail(item.product_id)">
<view class="product_swiper_img">
<image :src="item.image" mode="widthFix"></image>
</view>
<view class="product_swiper_text">
<view class="upper_text">
<text>{{item.title}}</text>
</view>
<view class="lower_text">
<text>[市场价]</text>
<text>¥{{item.price}}</text>
</view>
</view>
</swiper-item>
key无效,把key换成index即可解决