You are viewing a single comment's thread from:RE: Vue.js实战笔记View the full contextlemooljiang (75)in #starnote • 4 years ago 参考 参考2 可以动态更新data中的数据显示,也就是操作data的方法 data() { return { post: {id:1, body:'hello'}, } }, methods:{ addCollection() { this.$set(this.post, 'id', 3) //更改id值 this.$set(this.post, "body", "world") this.$set(this.post, "child", []) //增加一个child属性 },