- picker的示例代码有问题
[代码]<view class="section"> <view class="section__title">普通选择器</view> <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}"> <view class="picker"> 当前选择:{{array[index]}} </view> </picker></view><view class="section">[代码][代码] data: { array: ['美国', '中国', '巴西', '日本'], objectArray: [ { id: 0, name: '美国' }, { id: 1, name: '中国' }, { id: 2, name: '巴西' }, { id: 3, name: '日本' } ], index: 0,[代码][代码]bindPickerChange: function(e) { console.log('picker发送选择改变,携带值为', e.detail.value) this.setData({ index: e.detail.value }) },[代码]提交表单的时候picker的value初始值是number 0,但是改变以后的值是string '0' '1' '2' '3'
2017-08-31 - 新的工具radio值会reset
为什么改变表单的picker值或者点击按钮 表单里面的radio值会回复初始值 ,旧版本不会
2017-08-31