【发布时间】:2021-07-15 09:37:43
【问题描述】:
所以这是我的问题。
我只是在对话框中放置了一个表单,当我第一次打开它时,一切都很好,vuelidate 有效,如果我的字段为空也会出错。我完成了表单发送它,它关闭了模式。
但是,当我再次打开它以完成它时,会无缘无故地显示错误: Image of the error
<v-select
v-model="selectedDoctor"
:items="doctors"
item-text="username"
item-value="id"
:label="$t('components.homeCardTeleconsultation.doctor')"
:error-messages="
fieldErrors($v.selectedDoctor, $t('components.homeCardTeleconsultation.doctor'))"
return-object
/>
addTeleconsultant () {
this.$v.$touch()
if (this.$v.$invalid || this.isSaving) {
} else {
const query = {
xxxxx
}
this.$repositories.teleconsultations.create(query).then((reponse) => {
this.teleconsults = reponse.data
})
this.close()
}
当我打开模式时似乎 vuelidate 检查我的字段是否需要,但不是第一次。我真的不明白这是怎么回事,所以如果有人有解决方案或什么的......
谢谢!
【问题讨论】:
标签: forms vue.js vuejs2 vuetify.js vuelidate