<input v-model='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>
为什么我执行submitForm这个函数,改变password,而this.$refs.password.value打印出来的却不是password的值
茅侃侃
相关分类