当前位置:网站首页>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
边栏推荐
- Sword finger offer 22 The penultimate node in the linked list - speed pointer
- 92. Reverse linked list II byte skipping high frequency question
- Compare the performance of query based on the number of paging data that meet the query conditions
- stm32入门开发板选野火还是正点原子呢?
- Sword finger offer 03 Duplicate number in array
- Matlab / Simulink simulation of double closed loop DC speed regulation system
- JS interview question: FN call. call. call. Call (FN2) parsing
- Ring back to origin problem - byte jumping high frequency problem
- [binary number] maximum depth of binary tree + maximum depth of n-ary tree
- How to use the input table one-way service to send (occupy less) picture files (body transmission)? FileReader built-in object involved
猜你喜欢

2022年上海市安全员C证操作证考试题库及模拟考试

Use of five routing guards

If you start from zero according to the frame

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

Tdan over half

Index: teach you index from zero basis to proficient use

Element calculation distance and event object

Compilation principle first set follow set select set prediction analysis table to judge whether the symbol string conforms to the grammar definition (with source code!!!)

Double pointer advanced -- leetcode title -- container with the most water
![SQL optimization for advanced learning of MySQL [insert, primary key, sort, group, page, count]](/img/60/e4d47d458dd98a0c6ba51874e07c30.png)
SQL optimization for advanced learning of MySQL [insert, primary key, sort, group, page, count]
随机推荐
ECMAScript history
练习:求偶数和、阈值分割和求差( list 对象的两个基础小题)
394. String decoding - auxiliary stack
2022年茶艺师(初级)考试模拟100题及模拟考试
超分之TDAN
Kubernetes 服务发现 监控Endpoints
Sword finger offer 22 The penultimate node in the linked list - speed pointer
Halo 开源项目学习(二):实体类与数据表
Allowed latency and side output
2022年上海市安全员C证操作证考试题库及模拟考试
102. 二叉树的层序遍历
JS parsing and execution process
ros常用的函数——ros::ok(),ros::Rate,ros::spin()和ros::spinOnce()
[batch change MySQL table and corresponding codes of fields in the table]
Chrome浏览器的跨域设置----包含新老版本两种设置
一些问题一些问题一些问题一些问题
[binary number] maximum depth of binary tree + maximum depth of n-ary tree
STM32 entry development board choose wildfire or punctual atom?
Hcip fifth experiment
How to change input into text