el-select自适应行数
时间: 2023-09-07 21:14:21 浏览: 150
VUE2.0 ElementUI2.0表格el-table自适应高度的实现方法
el-select默认情况下是不会自适应行数的。el-select的下拉菜单显示的选项数量是可以通过设置popper-class属性来控制的。你可以通过给el-select添加一个自定义的class,然后在CSS中设置该class的最大高度来实现自适应行数的效果。例如,你可以设置max-height为200px,这样下拉菜单最多显示5行选项。如果选项超过5行,就会出现滚动条。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Element UI学习2--input输入框](https://blog.csdn.net/hanrabbit/article/details/112278419)[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%"]
- *2* *3* [vue+element弹窗可拖拽拉伸和弹窗内table高度自适应](https://blog.csdn.net/weixin_39921345/article/details/121846805)[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 ]
阅读全文