Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.1k views
in Technique[技术] by (71.8m points)

用vuetify的from表单验证,在不输入内容的情况下触发重置表单,为什么data里面的值会变成undefined?

### 用vuetify V-from表单验证的时候,表单上的值和data里面的数据是双向绑定。当我点击取消按钮触发this.$refs.form.reset();data里面和from表单双向绑定的值变成了undefined。
这个是data里面的数据刚开始为空
修改from表单的弹出框data里面的值是空字符串
点击取消触发this.$refs.form.reset()变成undefined
这个是from表单的代码

### 问题出现的环境背景及自己尝试过哪些方法

### 相关代码
粘贴代码文本(请勿用截图)

###


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...