当前位置:网站首页>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
边栏推荐
- Where is the configuration file of tidb server?
- Sword finger offer 03 Duplicate number in array
- MySQL进阶之索引【分类,性能分析,使用,设计原则】
- Leak detection and vacancy filling (VII)
- SQL optimization for advanced learning of MySQL [insert, primary key, sort, group, page, count]
- 双闭环直流调速系统matlab/simulink仿真
- Halo 开源项目学习(二):实体类与数据表
- 470. 用 Rand7() 实现 Rand10()
- Applet learning notes (I)
- XTask与Kotlin Coroutine的使用对比
猜你喜欢
2022年广东省安全员A证第三批(主要负责人)特种作业证考试题库及在线模拟考试
双闭环直流调速系统matlab/simulink仿真
394. 字符串解码-辅助栈
Why do some people say SCM is simple and I have to learn it so hard?
958. 二叉树的完全性检验
Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]
Qt error: /usr/bin/ld: cannot find -lGL: No such file or directory
stm32入门开发板选野火还是正点原子呢?
Compare the performance of query based on the number of paging data that meet the query conditions
Future usage details
随机推荐
Land cover / use data product download
01-初识sketch-sketch优势
This point in JS
41. The first missing positive number
Model problems of stock in and stock out and inventory system
剑指 Offer 03. 数组中重复的数字
Generating access keys using JSON webtoken
The system cannot be started after AHCI is enabled
ros常用的函数——ros::ok(),ros::Rate,ros::spin()和ros::spinOnce()
Using quartz under. Net core -- a simple trigger of [7] operation and trigger
Collection of common SQL statements
开期货,开户云安全还是相信期货公司的软件?
JS parsing and execution process
On the method of outputting the complete name of typeID from GCC
Construction of functions in C language programming
Learning record of uni app dark horse yougou project (Part 2)
122. 买卖股票的最佳时机 II-一次遍历
[related to zhengheyuan cutting tools]
JS failed to change all variables and changed to the return method. Finally, the problem was solved
Low code development platform sorting