Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use WeChat Mini Programs form component checkbox

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

这篇文章主要介绍"微信小程序表单组件checkbox怎么用"的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇"微信小程序表单组件checkbox怎么用"文章能帮助大家解决问题。

checkboxcheckbox-group

多项选择器,内部由多个checkbox组成。

属性名类型默认值说明bindchangeEventHandle中选中项发生改变是触发change事件,detail = {value:[选中的checkbox的value的数组]}checkbox

多选项目。

属性名类型默认值说明valueString标识,选中时触发的change事件,并携带的valuedisabledBooleanfalse是否禁用checkedBooleanfalse当前是否选中,可用来设置默认选中colorColorcheckbox的颜色,同css的color

示例:

{{item.value}}Page({ data: { items: [ {name: 'USA', value: '美国'}, {name: 'CHN', value: '中国', checked: 'true'}, {name: 'BRA', value: '巴西'}, {name: 'JPN', value: '日本'}, {name: 'ENG', value: '英国'}, {name: 'TUR', value: '法国'}, ] }, checkboxChange: function(e) {console.log('checkbox发生change事件,携带value值为:', e.detail.value) }})关于"微信小程序表单组件checkbox怎么用"的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识,可以关注行业资讯频道,小编每天都会为大家更新不同的知识点。

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report