<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>

- 发布:2022-09-19 15:12
- 更新:2022-10-17 16:23
- 阅读:147
产品分类: uniapp/快应用/华为
渲染模式: webview
示例代码:
操作步骤:
v-for 中 使用key
v-for 中 使用key
预期结果:
v-for 中可以使用key
v-for 中可以使用key
实际结果:
ERROR: Unexpected JavaScript keyword as attribute name: 'key', please change it.
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
1 个回复
l***@aliyun.com
请问解决了吗?