el-dialog缩小内部内容随着缩小
时间: 2023-10-02 20:10:10 浏览: 162
要实现el-dialog缩小内部内容随着缩小,可以按照以下步骤进行操作:
1. 首先,在el-dialog的样式中将其改为flex布局。可以添加以下样式代码:
```html
<style>
.el-dialog {
display: flex;
flex-direction: column;
width: 90%;
height: 90%;
margin: 0 5% !important;
}
.el-dialog__header {
height: 5%;
}
.el-dialog__body {
height: 95%;
padding: 0 2%;
}
.el-dialog__wrapper {
display: flex;
justify-content: center;
flex-direction: column;
}
</style>
```
2. 然后,将el-table设置为自适应高宽。可以使用el-table的属性来实现。可以将el-table的高度设置为100%或以百分比的方式来设置,以
#### 引用[.reference_title]
- *1* [vue的el-dialog弹窗放大缩小](https://blog.csdn.net/m0_70722541/article/details/130406818)[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* [el-dialog中el-table实现自适应](https://blog.csdn.net/Raslirty/article/details/131049841)[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 ]
阅读全文