我无法在 vee-validate 中使用我的表单。
在文档中,它说使用 <Field />
但我不能在选择表单中使用。
我该如何构建这个谢谢。
<Form @submit="submit">
<Field name="email" type="email">
<div class="form-floating">
//cant get idea to convert select to Field
<select class="form-select" >
<option selected>Select your category</option>
<option value="a">a</option>
<option value="c">b-</option>
</select>
</div>
</Form>
我该如何使用? 谢谢
最佳答案
您可以将 type="email"
替换为 as="select"
<Field name="field" as="select">
<option value="">Select value</option>
<option value="..">...</option>
</Field>
您可以在此处阅读更多信息:https://vee-validate.logaretm.com/v4/api/field
关于vue.js - 如何在 vee-validate 中使用 <select>?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67887083/