el-select的option空格
时间: 2023-10-14 08:03:59 浏览: 94
空格被清除的问题可以通过在渲染数据之前先将空格替换成特殊字符来解决。你可以在拿到数据时循环数组对象,对ydlbmc字段中的空格进行替换。一种解决方法是使用" &nbsp;"来替换空格,并在渲染el-select组件时使用v-html指令来解析数据。这样就可以保留空格并正确显示在el-select的option中了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [关于解决el-select组件自动清除数据空格的问题](https://blog.csdn.net/weixin_44171757/article/details/99410574)[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: 50%"]
- *3* [VHD_manager_v1.3](https://download.csdn.net/download/hbh666666/10897798)[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: 50%"]
[ .reference_list ]
阅读全文