Get the App
SLTechnology News&Howtos  ›  Development  › 

How to customize a single selector style in WeChat Mini Programs

Shulou Source: shulou.com Published: 2022-05-31 21:14:25 10月03日 Update

Today, the editor will share with you the relevant knowledge points about how to customize a single selector style in WeChat Mini Programs. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article, let's take a look at it.

Wxml:

{{item.value}}

Wcss:

.list _ item {display: flex; justify-content: space-between; align-items: center; margin:0 25rpx; width:700rpx; font-size: 30rpx; color: rgb (79 last 79); padding: 28rpx 0; border-bottom:1px solid rgb (209209209);} .item {width: 28rpx; height: 28rpx; border: 2px solid rgb (144144144); border-radius: 100%; display: flex; align-items: center; justify-content: center;}

Js:

Page ({data: {radioValues: [{'value':' unpaid orders', 'selected': false}, {' value': 'orders in progress', 'selected': false}, {' value': 'completed orders', 'selected': false}, {' value': 'all orders', 'selected': true},]}, onLoad: function (options) {} RadioChange:function (e) {var index = e.currentTarget.dataset.index Var arr = this.data.radioValues; for (var v in arr) {if (v = = index) {arr [v] .selected = true;} else {arr [v] .selected = false;}} this.setData ({radioValues:arr})}) these are all the contents of the article "how to customize a single selector style in WeChat Mini Programs". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Tags: Knowledge articles orders individual items individual selections styles procedures choices content differences big most that is more knowledge points industry information information channels logic faceted Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia MySQL Apple Huawei macOS