el-popover里el-select 下拉框
时间: 2023-08-25 22:11:43 浏览: 175
el-select 下拉框多选实现全选的实现
5星 · 资源好评率100%
对于el-popover里的el-select下拉框,你可以通过添加属性:popper-append-to-body="false"来解决偏移的问题。具体做法是在el-select元素上添加这个属性,并将其值设置为false。例如:
```html
<el-popover>
<el-select :popper-append-to-body="false">
<!-- 下拉选项 -->
</el-select>
</el-popover>
```
这样设置之后,el-select下拉框的内容将不会被移动到body元素中,而是保持在其原本的位置。这可以避免出现偏移的情况。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* *3* [修改el-popover和el-select样式](https://blog.csdn.net/zhouzuoluo/article/details/119996447)[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^chatsearchT0_1"}} ] [.reference_item]
- *2* [element 中select下拉框和el-popover下拉框 位置偏移的情况](https://blog.csdn.net/qq_44603011/article/details/126036637)[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^chatsearchT0_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文