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 switch switch Selector

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

In this article, the editor introduces in detail "WeChat Mini Programs switch switch selector how to use", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "WeChat Mini Programs switch switch selector how to use" can help you solve your doubts.

Effect picture

WXML

Status: {{isChecked1}} status: {{isChecked2}} status: {{isChecked3}} status: {{isChecked4}} status: {{isChecked5}} status: {{isChecked6}}

JS

Var pageObj = {data: {isChecked1: false, isChecked2: true, isChecked3: false, isChecked4: true, isChecked5: false, isChecked6: true}}; for (var I = 0; I < 7; + + I) {(function (I) {pageObj ['changeSwitch' + I] = function (e) {var changedData = {}; changedData [' isChecked' + I] =! this.data ['isChecked' + I]; this.setData (changedData);}) (I)} Page (pageObj)

Properties of the switch component

Type: the style of switch selector-- switch, checkbox

The color of color:switch is the same as css's color

After reading this, the article "how to use WeChat Mini Programs switch switch selector" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it yourself. If you want to know more about the article, you are welcome to follow the industry information channel.

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