< input v text/javascript modelling password` ref="password" / >
< script type= "text/javascript" >
new Vue({
el:".loginDiv",
data:{
password:""
},
methods:{
submitForm:function() {
var sha = hex_sha1(this.password);
this.password = sha;
console.log(this.$refs.password.value)
}
}
})
< / script >
Why do I execute the function submitForm and change password, while this.$refs.password.value prints out a value other than password