今天在敲代码的时候,遇到了一个bug:
Cannot read properties of undefined (reading 'username')
1、经过一番研究,结果竟然是数据写到了别的页面了哎
2、粗心导致的,供大家进行参考:
3、export绑定好数据就可以了
export default { data() { return { form: { username: '', password: '', repassword: '' } } } }
Cannot read properties of undefined (reading 'username')
export default { data() { return { form: { username: '', password: '', repassword: '' } } } }