如果需要监听vue下面的数组,数组里的是对象,如果需要根据数组的改变,必须使用深度监听
方法:
watch: {
textList: {
handler(newVal, oldVal) {
console.log(newVal);
console.log(oldVal);
},
deep: true
}
},
如果需要监听vue下面的数组,数组里的是对象,如果需要根据数组的改变,必须使用深度监听
方法:
watch: {
textList: {
handler(newVal, oldVal) {
console.log(newVal);
console.log(oldVal);
},
deep: true
}
},