诚明小巫
诚明小巫
  • 发布:2019-01-24 16:01
  • 更新:2019-01-30 10:13
  • 阅读:2146

报错 同一组件内嵌套的 v-for 不能连续使用相同的索引,目前为: index,index

分类:uni-app

索引不相同啊,而且都已经改成item.id之类的,还是在不停的报错

2019-01-24 16:01 负责人:无 分享
已邀请:
Dexc

Dexc

你确定id也是不重复的吗? 你可以在第一层index前面加上一个别的字符试试

8***@qq.com

8***@qq.com

<scroll-view class="content" scroll-y="true">
<view class="content_foot" v-for="(item, index) in hotFootList" :key="item.id">
<view class="title">
<view class="name">{{item.title}}</view>
<image class="image" :src="item.img"></image>
</view>
<view class="flex_menu">
<view class="flex_context" v-for="(itemSub, index1) in item.subs" :key="itemSub.name">{{itemSub.name}}</view>

				</view>  
			</view>  
			  
		</scroll-view>  

需要这样才能编译成功

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