The World of Remnant

Vue数据改变强制更新视图

数据层数多的情况下改变属性值,视图不更新

// 函数第一行加上
this.$forceUpdate();
//更新的对象obj
JSON.parse(JSON.stringify(obj))