dukai
dukai
  • 发布:2022-09-19 15:12
  • 更新:2022-10-17 16:23
  • 阅读:147

【报Bug】uniapp vue3.0 华为快应用attribute name: 'key', please change it.

分类:uni-app

产品分类: uniapp/快应用/华为

渲染模式: webview

示例代码:

<template v-for="(item, index) in selectedData">
<view v-if="item.status" :key="index" class="select-item">
<view class="select-item-main">
<text class="select-item-type">{{ item.type }}: </text>
<text class="select-item-name"> {{ item.name }}</text>
</view>
<view class="select-item-action" :class="{ 'select-item-action-reselect': item.status === 2 }" @click="reSelect(index, item)">
{{ item.status === 2 ? '重选中' : '重选' }}
</view>
</view>
</template>

操作步骤:

v-for 中 使用key

预期结果:

v-for 中可以使用key

实际结果:

ERROR: Unexpected JavaScript keyword as attribute name: 'key', please change it.

bug描述:

ERROR: Unexpected JavaScript keyword as attribute name: 'key', please change it.
@ /Users/tc_mm_002/Documents/COPYCODE/zmn-sass-brand-stand/dist/dev/quickapp-webview-huawei/components/valuation/selected-warp.qxmlundefined

2022-09-19 15:12 负责人:无 分享
已邀请:
l***@aliyun.com

l***@aliyun.com

请问解决了吗?

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