数组: 根据VUE官网: 数组修改: 修改数组某个元素的值: Vue.set(this.items, indexOfItem, newValue); this.$set(this.items, indexOfItem, newValue); this.items.splice(indexOfItem Read More
posted @ 2019-10-24 11:45 0恋晨曦0 Views(7225) Comments(0) Diggs(0) Edit
//声明对象 data() { return { obj: { name: '黄国华' } } }, watch: { obj: { handler: function(newVal, oldVal) { console.log(newVal, oldVal); //因为对象为引用类型数据,所以新旧 Read More
posted @ 2019-10-24 11:14 0恋晨曦0 Views(739) Comments(1) Diggs(1) Edit