源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

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

  • 时间:2020-06-04 08:08 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:微信小程序使用radio显示单选项功能【附源码下载】
本文实例讲述了微信小程序使用radio显示单选项功能。分享给大家供大家参考,具体如下: [b]1、效果展示[/b] [img]http://files.jb51.net/file_images/article/201712/20171211102804983.gif?20171111102829[/img] [b]2、关键代码[/b] ① index.wxml
<radio-group bindchange="radiogroupBindchange">
 <radio value="radio1">radio1</radio>
 <radio value="radio2">radio2</radio>
 <radio value="radio3">radio3</radio>
</radio-group>
<view>提示:{{text}}</view>

② index.js
Page({
 data:{
  // text:"这是一个页面"
  text:''
 }, 
 radiogroupBindchange:function(e){
  console.log(e);
  this.setData({
   text:'您选择了'+e.detail.value
  })
 }
})

[b]3、源代码[/b]点击此处[url=http://xiazai.jb51.net/201712/yuanma/wxapp_radio(jb51.net).rar][b]本站下载[/b][/url]。 关于radio组件的更多详细说明还可参考官网:[url=https://mp.weixin.qq.com/debug/wxadoc/dev/component/radio.html]https://mp.weixin.qq.com/debug/wxadoc/dev/component/radio.html[/url] 希望本文所述对大家微信小程序开发有所帮助。
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部