原文地址:http://blog.csdn.net/u012329294/article/details/74906504.net
<view class="section">
<view class="section__title">選擇用戶</view>
<picker bindchange="bindPickerChange" value="{{index}}" range="{{lstpu}}" range-key="{{'name'}}">
<view class="picker">
當前選擇:{{lstpu[index].name}}
</view>
</picker>blog
</view>字符串
或者直接使用字符串,如it
<picker bindchange="bindPickerChange" value="{{index}}" range="{{lstpu}}" range-key="name">io
如上面的代碼,要選擇用戶,那麼range-key中的字段必須帶單引號,不然無效!class