el-select只读不可选
时间: 2023-10-08 19:08:12 浏览: 227
el-select-tree:ElementUI的el-select与el-tree结合
5星 · 资源好评率100%
el-select可以通过设置disabled属性来实现只读不可选的效果。例如,在el-select标签中添加disabled="disabled"属性即可实现。另外,有些情况下,使用readonly属性可能无效,所以最好使用disabled属性来实现只读不可选的效果。此外,还可以使用Number()函数将值转换为数字,以确保只读不可选的效果。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [如何设置select只读不可编辑且select的值可传递](https://download.csdn.net/download/weixin_38616435/14830457)[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_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [vue下拉框字典映射转换失败 字符转数字parseInt :value 下拉框无法选择 el-select默认选中 设为只读 input...](https://blog.csdn.net/tanzongbiao/article/details/130842602)[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_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文