data() {
return {
model: {
email: ''
}
}
},
watch: {
// TODO 下面注释的这种形式为何取不到 this
'model.email': (value) => {
// 这里的this
console.log('arrow function', this)
},
'model.email': function(value) {
// this 指向当前组件
consoel.log('normal function', this);
}
}