elementui的select默认选中
时间: 2023-09-08 22:15:48 浏览: 130
elementUI的select组件默认选中可以通过设置v-model的值来实现。在代码中,v-model绑定的是queryParams.status,而options是循环出的数据。如果想要默认选中第一个数据,可以在queryParams中设置默认值为options.value。这样在页面加载时,默认选中第一个数据。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [vue element ui Select 选择器设置默认状态](https://blog.csdn.net/m0_58565372/article/details/127316004)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [vue使用Element的select 选择器,需要默认选中第一个](https://blog.csdn.net/m0_59023970/article/details/123879018)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [elementUI select组件默认选中效果实现的方法](https://download.csdn.net/download/weixin_38717980/12944922)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文