[Violation] 'setTimeout' handler took 91ms
[sitemap 索引情况提示] 根据 sitemap 的规则[0],当前页面 [pages/index/index] 将被索引
[WXML Runtime warning] ./pages/index/index.wxml
wx:key="{{index}}" does not look like a valid key name (did you mean wx:key="index" ?)
5 | <view class="list-scroll-view">
6 |
> 7 | <view wx:for="{{list}}" wx:key="{{index}}" wx:for-item="course" wx:for-index="i" class="course-card ">
| ^
8 | <view>
9 | <image src="{{course.coverPath}}" mode="widthFix"></image>
10 | </view>
wx:key 的值不用花括号 直接写就可以。比如:wx:key="index"
问题填啥他都这样报警
wx:for="{{index,list}}"或者wx:for="{{list,index}}",试下。
报警原因都告诉你了,它不知道你这个index是什么
wx:key="{{list.index}}" does not look like a valid key name (did you mean wx:key="index" ?)
5 | <view class="list-scroll-view">
6 |
> 7 | <view wx:for="{{list}}" wx:key="{{list.index}}" wx:for-item="course" wx:for-index="i" class="course-card ">
| ^
8 | <view>
9 | <image src="{{course.coverPath}}" mode="widthFix"></image>
10 | </view>