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!