https://developers.weixin.qq.com/miniprogram/dev/component/picker-view.html
直接用示例代码里面的在开发者工具中预览效果 后提示
VM32:1 ./index/index.wxml
Now you can provide attr `wx:key` for a `wx:for` to improve performance.
3 | <picker-view indicator-style="height: 50px;" style="width: 100%; height: 300px;" value="{{value}}" bindchange="bindChange">
4 | <picker-view-column>
> 5 | <view wx:for="{{years}}" style="line-height: 50px">{{item}}年</view>
| ^
6 | </picker-view-column>
7 | <picker-view-column>
8 | <view wx:for="{{months}}" style="line-height: 50px">{{item}}月</view>
如果复制样例中带有wx:key的代码则提示
VM54:1 ./index/index.wxml
wx:key="{{days}}" does not look like a valid key name (did you mean wx:key="days" ?)
10 | </picker-view-column>
11 | <picker-view-column>
> 12 | <view wx:for="{{days}}" wx:key="{{days}}" style="line-height: 50px; text-align: center;">{{item}}日</view>
| ^
13 | </picker-view-column>
14 | <picker-view-column>
15 | <view class="icon-container">
你好,可以先根据文档说明自行完善一下:https://developers.weixin.qq.com/miniprogram/dev/reference/wxml/list.html