当前位置:网站首页>The method of changing a value in the array and a value in the object of wechat applet
The method of changing a value in the array and a value in the object of wechat applet
2022-04-23 17:44:00 【Youyoujing】
1、 Change the value in the array
paraList: [
{
txt:'123',chose:false},
{
txt:'1234',chose:false}
]
let choseChange = "paraList[" + index + "].chose"
this.setData({
[choseChange]: true
})
Be careful : The string of the selected array does not need to be written this.data. !!!
You can change the value of a specific subscript in the array
2、 Change the value in the object
navbarData: {
isfixed: false,
iswhite: false, //icon color
showCapsule: 1, // Whether to display the icon in the upper left corner 1 Presentation display 0 Means not to show
title: ' Customer list ', // The navigation bar Middle title
backgroundcolor: '#fff',
isintercept: false, // Back to intercept
},
let title = 'navbarData.title'
this.setData({
[title]: ' Team member customer ',
})
版权声明
本文为[Youyoujing]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230550532201.html
边栏推荐
- Node template engine (EJS, art template)
- Gets the time range of the current week
- Change Oracle to MySQL
- 土地覆盖/利用数据产品下载
- 440. The k-th small number of dictionary order (difficult) - dictionary tree - number node - byte skipping high-frequency question
- 48. Rotate image
- Model problems of stock in and stock out and inventory system
- 01 - get to know the advantages of sketch sketch
- 嵌入式系统中,FLASH中的程序代码必须搬到RAM中运行吗?
- How to manually implement the mechanism of triggering garbage collection in node
猜你喜欢

双指针进阶--leetcode题目--盛最多水的容器

Client example analysis of easymodbustcp

Qt error: /usr/bin/ld: cannot find -lGL: No such file or directory

958. Complete binary tree test

PC电脑使用无线网卡连接上手机热点,为什么不能上网
![Using quartz under. Net core -- general properties and priority of triggers for [5] jobs and triggers](/img/65/89473397da4217201eeee85aef3c10.png)
Using quartz under. Net core -- general properties and priority of triggers for [5] jobs and triggers

92. 反转链表 II-字节跳动高频题

SiteServer CMS5. 0 Usage Summary

2022年上海市安全员C证操作证考试题库及模拟考试
Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]
随机推荐
Ring back to origin problem - byte jumping high frequency problem
剑指 Offer 22. 链表中倒数第k个节点-快慢指针
Learning record of uni app dark horse yougou project (Part 2)
Manually implement simple promise and its basic functions
587. 安装栅栏 / 剑指 Offer II 014. 字符串中的变位词
Future 用法详解
MySQL进阶学习之SQL优化【插入,主键,排序,分组,分页,计数】
JS parsing and execution process
SystemVerilog(六)-变量
394. String decoding - auxiliary stack
[ES6] promise related (event loop, macro / micro task, promise, await / await)
[batch change MySQL table and corresponding codes of fields in the table]
Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]
Using quartz under. Net core -- general properties and priority of triggers for [5] jobs and triggers
SQL optimization for advanced learning of MySQL [insert, primary key, sort, group, page, count]
[simple understanding of database]
剑指 Offer 03. 数组中重复的数字
Double pointer advanced -- leetcode title -- container with the most water
油猴网站地址
关于gcc输出typeid完整名的方法