3👍
✅
for object value, add a deep
in watch, also, you need lodash.isEqual()
to compare if two objects are equal
import _ from 'lodash';
...
watch: {
form: {
handler(value){
if(value) {
this.changed = !_.isEqual(value, this.actual);
}
},
deep: true,
}
},
...
0👍
Try to use @change="onChangeFn" or v-on:change="onChangeFn" on
methods: {
onChangeFn () {
this.changed = true
}
}
Source:stackexchange.com