当前位置:网站首页>Uniapp modifies array properties, and the view is not updated
Uniapp modifies array properties, and the view is not updated
2022-06-22 23:21:00 【Evil and evil】
principle : The reason why the view is not updated , Because there is no corresponding attribute defined in the array , The solution is to define attributes for the array ,uniapp And vue equally , It is not supported to dynamically add attributes to an object after the instance is created , If you want to dynamically add object attributes , Then it is not possible to use the conventional method , Only by special means , such as this.$set
One :this.$forceUpdate(); Force update ( Golden finger , Invincible plug-in , Refresh the entire page )
that.msg.MediaList[that.audioId].currentTime = '00:00';
that.$forceUpdate();
Two :this.$set()
_this.$set(_this.msg.MediaList[index], 'currentTime', '00:00');
边栏推荐
- Spark RDD Programming Guide(2.4.3)
- 2021-04-14
- Enabling partners, major guarantee of Spring Festival "non-stop"
- 2021-08-22
- Using the hbuilder x editor to install a solution for terminal window plug-ins that are not responding
- 2021-08-21
- 2020-12-04
- A group of K overturned linked lists [disassembly / overturning / assembly of linked lists]
- Business stability construction ideas based on Cloud Architecture
- 获取当前所在周的起始和结束的日期
猜你喜欢

Ensure database and cache consistency

Spark RDD Programming Guide(2.4.3)

The breakthrough of key chips hindering Huawei 5g mobile phones has been achieved, and domestic chips have gained 10% share

2021-08-22

安装typescript环境并开启VSCode自动监视编译ts文件为js文件
![[kubernetes series] overview of kubernetes](/img/c2/b42f7a0db236558cc466a508d3d579.png)
[kubernetes series] overview of kubernetes

Install the typescript environment and enable vscode to automatically monitor the compiled TS file as a JS file

c# sqlsugar,hisql,freesql orm框架全方位性能测试对比 sqlserver 性能测试

2020-12-04

LeakCanary 源码详解(2)
随机推荐
Huawei cloud recruits partners in the field of industrial intelligence to provide strong support + commercial realization
2021-04-14
Do domestic mobile phones turn apples? It turned out that it was realized by 100 yuan machine and sharp price reduction
Mysql database design
Considerations for using redisson to operate distributed queues
2020-12-04
Digital data was invited to participate in Nantong enterprise digital transformation Seminar
获取鼠标移动的方向
js----SVG转PNG
2021-05-02
2021-08-21
Enabling partners, major guarantee of Spring Festival "non-stop"
ArcGIS应用(二十)Arcgis 栅格图像符号系统提示“This dataset does not have valid histogram required for classificati…”
1. class inheritance (point)
The relationship between derivative and differential of function
Greedy interval problem (2)
How to improve work efficiency? Macintosh efficiency tool set
2021-03-06
2021-01-29
2021-04-14