Vue中的$set的使用

Posted fm060

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Vue中的$set的使用相关的知识,希望对你有一定的参考价值。

改变数组的值

this.$set(this.children,1,666)

 

遍历改变数组中的对象

let that=this
this.children.forEach(function (value,i) {
that.$set(value,‘aa‘,true);
});

以上是关于Vue中的$set的使用的主要内容,如果未能解决你的问题,请参考以下文章