In my vue-app I have a form, which should detect each change. I tried to use @change and also with a watcher, but with no luck...
form: {
name: "",
surname: "",
email: "",
},
changed: false
then in my template:
<form @change="hasChanged">
Then my watcher and method:
watch: {
form: {
handler: function(v) {
return this.hasChanged();
},
deep: true
}
},
methods: {
hasChanged(){
this.changed = true
}
}
But this doesn't work.... what am I doing wrong?