当前位置:网站首页>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');
边栏推荐
猜你喜欢
随机推荐
异步FIFO
The relationship between derivative and differential of function
A group of K overturned linked lists [disassembly / overturning / assembly of linked lists]
Practice brings true knowledge: the strongest seckill system architecture in the whole network is decrypted. Not all seckills are seckills!!
一个spark app demo
Introduction and example application of PostgreSQL string separator function (regexp\u split\u to\u table)
为 localStorage 添加过期时间
Safe and reliable! Tianyi cloud data security management platform passed the evaluation
Explain the startup process of opengauss multithreading architecture in detail
Case 2 of SQL performance degradation caused by modifying implicit parameters
OJ每日一练—— 班级就餐
LeakCanary 源码详解(2)
SQL performance optimization method for interval retrieval
C sqlsugar, hisql, FreeSQL ORM framework all-round performance test vs. sqlserver performance test
安装typescript环境并开启VSCode自动监视编译ts文件为js文件
2020-12-20
Phantomjs实用代码段(持续更新中……)
2020-12-04
WebRTC系列-网络传输之4Connection排序
数据库访问工具简介








