data() {
return {
colorlist: [
{
color: "-sharp333333",
ftcolor: "-sharpffffff",
name: "1"
},
{
color: "-sharp55CD31",
ftcolor: "-sharpffffff",
name: "2"
},
{
color: "-sharp31ADCD",
ftcolor: "-sharpffffff",
name: "3"
}
]
}
},
watch: {
colorlist: {
handler: function(val, oldVal) {
console.log(val, oldVal)
},
deep: true
}
}
I changed the color of the third one to red. Console output result:
shouldn"t the color of the third oldVal be-sharp31ADCD?