Component Description: picker: the scroll selector. Currently, three selectors are supported, which are distinguished by the mode attribute, namely, the modeselector, the modetime, and the modedat...
Picker:
Scroll selector. three selectors are supported. They are distinguished by the mode attribute, namely normal selector, time selector (mode = time), and date selector (mode = date ), the default value is normal selector.
Wxml
Picker
Selector
Region Selector
Current selection: {array [index]}
Time selector
Current selection: {time }}
Date selector
Current selection: {date }}
Js
Page ({data: {array: ['China', 'America ', 'Brazil', 'Japan '], index: 0, date: '2017-09-01', time: '12: 01'}, bindPickerChange: function (e) {console. log ('picker transmission selection changed, carrying value ', e. detail. value) this. setData ({index: e. detail. value})}, bindDateChange: function (e) {this. setData ({date: e. detail. value})}, bindTimeChange: function (e) {this. setData ({time: e. detail. value })}})
Wxss
.page { min-height: 100%; flex: 1; background-color: #FBF9FE; font-size: 32rpx; font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif; overflow: hidden;}.pagehd{ padding: 50rpx 50rpx 100rpx 50rpx; text-align: center;}.pagetitle{ display: inline-block; padding: 20rpx 40rpx; font-size: 32rpx; color: #AAAAAA; border-bottom: 1px solid #CCCCCC;}.pagedesc{ display: none; margin-top: 20rpx; font-size: 26rpx; color: #BBBBBB;}.picker{ padding: 26rpx; background-color: #FFFFFF;}.section{ margin-bottom: 80rpx;}.sectiontitle{ margin-bottom: 16rpx; padding-left: 30rpx; padding-right: 30rpx;}
Main Attributes:
The above is the details of the picker scroll selector. For more information, see other related articles in the first PHP community!