el-form 的model
时间: 2023-10-09 12:05:30 浏览: 86
el-form的model属性是用来绑定表单数据的对象。在Vue中,我们可以通过在el-form组件上使用v-model指令来绑定表单数据对象。通过model属性,我们可以将表单中的输入框、下拉框等元素的值与数据对象中的属性进行双向绑定。比如,我们可以在model对象中定义一个name属性,然后使用v-model="model.name"将输入框的值与model.name进行绑定。这样,在输入框中输入的内容会实时反映到model.name中,同时model.name的值变化时也会同步更新到输入框中。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [结合表单验证谈el-form中model、prop、rules属性](https://blog.csdn.net/m0_52711377/article/details/123705574)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [el-form的model](https://blog.csdn.net/weixin_51662487/article/details/129383985)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文