小程序picker-view默认显示某个值

在value设置,切记在value设置

<picker-view bindchange="bindintWeightChange"

indicator-style="height: 50px;"

style="width: 100%; height: 120px;"

value="{{idxIntWeight}}"

class="margin">

<picker-view-column>

<view wx:for="{{weightArray}}"

wx:key="{{index}}"

style="line-height: 50px">{{weightArray[index]+30}}</view>

</picker-view-column>

</picker-view>

猜你喜欢

转载自blog.csdn.net/webzrh/article/details/81202568