WeChat applet development: picker scroll selector details

Source: Internet
Author: User
Component Description: picker: the scroll selector. Currently, three selectors are supported. They are distinguished by the mode attribute, namely, the modeselector, the modetime, and the modedate ), the default value is normal selector. Component Description:

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;}.page__hd{    padding: 50rpx 50rpx 100rpx 50rpx;    text-align: center;}.page__title{    display: inline-block;    padding: 20rpx 40rpx;    font-size: 32rpx;    color: #AAAAAA;    border-bottom: 1px solid #CCCCCC;}.page__desc{    display: none;    margin-top: 20rpx;    font-size: 26rpx;    color: #BBBBBB;}.picker{  padding: 26rpx;  background-color: #FFFFFF;}.section{    margin-bottom: 80rpx;}.section__title{    margin-bottom: 16rpx;    padding-left: 30rpx;    padding-right: 30rpx;}

Main Attributes:

Normal selector: (mode = selector)

The above is the small program development: picker scroll selector details, more please follow the first PHP community other related articles!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.