網站首頁 編程語言 正文
ps :樣式不能寫在scoped里面,否則失效
1.?給dialog?起個類名,custom-class="dialogStyle"
<el-dialog
v-model="dialogVisible"
:title="dialogTitle"
width="38%"
center
destroy-on-close
V-el-drag-dialog
V-if="dialogVisible"
append-to-body
custom-class="dialogStyle"
:before-close="handleClose"
>
<!-- formID 指的是ID -->
<indexForm
:newFormdata="newFormdata"
ref="fromViewRef"
/>
</el-dialog>
2.?直接復制粘貼此代碼即可生效。
<style>
.dialogStyle {
display: flex;
flex-direction: column;
margin: 0 !important;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-height: calc(100% - 30px);
max-width: calc(100% - 30px);
}
</style>
如果dialog?內容過多要有滾動,需加下面這句
::v-deep .el-dialog .el-dialog__body{ flex:1; overflow: auto; }
原文鏈接:https://blog.csdn.net/CMDN123456/article/details/131590531
- 上一篇:沒有了
- 下一篇:沒有了
相關推薦
- 2023-03-22 React使用Context與router實現權限路由詳細介紹_React
- 2022-06-02 Apache教程Hudi與Hive集成手冊_服務器其它
- 2022-11-10 C++在多線程中使用condition_variable實現wait_C 語言
- 2022-02-27 報錯:Unable to find main class
- 2022-06-01 Python使用list列表和tuple元組的方法_python
- 2022-08-14 python?open函數中newline參數實例詳解_python
- 2022-09-15 Android自定義ViewGroup實現選擇面板_Android
- 2022-09-07 Golang?range?slice?與range?array?之間的區別_Golang
- 欄目分類
-
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支