This article mainly introduces the detailed introduction of the mini-program picker component. if you need it, you can refer to the next article to introduce the detailed introduction of the mini-program picker component, for more information, see
Wxml
Common selector
{Array [index]}
Time selector
{Time }}
Date selector
{Date }}
Js
Page ({data: {// text: "This is a Page" array: ['Android', 'iOS ', 'reactnativ', 'WeChat', 'web'], index: 0, time: '08: 30', date: '2017-09-26 '},/*** listen to common picker selector */listenerPickerSelected: function (e) {// change the index value. re-paint the interface using the setData () method. this. setData ({index: e. detail. value}) ;},/*** listener time picker selector */listenerTimePickerSelected: function (e) {// call setData () to re-draw this. setData ({time: e. detail. value,}) ;},/*** listener date picker selector */listenerDatePickerSelected: function (e) {this. setDate ({date: e. detail. value})}, onLoad: function (options) {// parameters brought about by page navigation during page initialization options}, onReady: function () {// page rendering completed }, onShow: function () {// page display}, onHide: function () {// page hide}, onUnload: function () {// page close }})
For more articles about picker Components of small programs, please follow the PHP Chinese network!