WeChat applet components: radio single-choice Project

Source: Internet
Author: User
Radio single-choice Project Component Description: radio: single-choice Project. Radio-group: a single selector, which consists of multiple & lt; radio & gt. Radio project component description:

Radio: single-choice Project.

Radio-group:

Single selector, which consists of multiple .

The example code of radio single-choice Project runs as follows:

The following is the WXML code:

   
      
   
    
Radio
       
   
    
Single region
     
    
      
         
            
               
      {Item. value }}      
        
     
  
 

The following is the JS code:

Page ({data: {items: [{name: 'USA', value: 'u.s.}, {name: 'chn', value: 'China', checked: 'true'}, {name: 'br', value: 'Brazil '}, {name: 'jpn', value: 'Japan '}, {name: 'eng ', value: 'British '}, {name: 'Fra', value: 'French'},]}, radioChange: function (e) {console. log ('Radio has a change event with the value ', e. detail. value )}})

The following is the WXSS code:

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;}.radio {  display: block;  margin-bottom: 20rpx;}.section{    margin-bottom: 80rpx;}.section_gap{    padding: 0 30rpx;}

Main properties of a radio project:

Radio-group:

The above is a detailed explanation of the mini-program component: detailed content of the radio single-choice Project. For more details, please follow other related articles in the first PHP community!

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.