微信小程序使用radio显示单选项功能【附源码下载】

前端之家收集整理的这篇文章主要介绍了微信小程序使用radio显示单选项功能【附源码下载】前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

本文实例讲述了微信小程序使用radio显示单选项功能分享给大家供大家参考,具体如下:

1、效果展示

2、关键代码

① index.wxml

dio-group bindchange="radiogroupBindchange"> dio value="radio1">radio1 dio value="radio2">radio2 dio value="radio3">radio3 提示:{{text}}

② index.js

页面" text:'' },radiogroupBindchange:function(e){ console.log(e); this.setData({ text:'您选择了'+e.detail.value }) } })

3、源代码点击此处本站下载

关于radio组件的更多详细说明还可参考官网:https://mp.weixin.qq.com/debug/wxadoc/dev/component/radio.html

希望本文所述对大家微信小程序开发有所帮助。

原文链接:https://www.f2er.com/weapp/34777.html

猜你在找的微信小程序相关文章