From 2cae0da455d7d9605169bc36372b0f24c4cdd9b4 Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Sat, 5 Jul 2025 17:45:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=A8=E5=B1=80=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=89=80=E6=9C=89=E5=BC=B9=E7=AA=97=E5=85=B3=E9=97=AD=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在全局样式中强制显示所有弹窗关闭按钮 - 对弹窗头部容器和关闭按钮强制设置显示属性 - 明确设置位置、尺寸、颜色、光标等所有属性 - 添加完整的悬浮和焦点状态样式 影响范围:全局所有使用 el-dialog 和 el-message-box 的弹窗 解决问题:新增、编辑、查看等所有类型弹窗的右上角关闭按钮不显示 --- web/src/assets/styles/art-element-ui.scss | 30 +++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/web/src/assets/styles/art-element-ui.scss b/web/src/assets/styles/art-element-ui.scss index bfe777bd..30853870 100644 --- a/web/src/assets/styles/art-element-ui.scss +++ b/web/src/assets/styles/art-element-ui.scss @@ -805,19 +805,45 @@ } } +// 全局强制显示所有弹窗关闭按钮 +.el-dialog__headerbtn, +.el-message-box__headerbtn { + display: block !important; + visibility: visible !important; + opacity: 1 !important; + position: absolute !important; + top: 6px !important; + right: 6px !important; + z-index: 1000 !important; + width: auto !important; + height: auto !important; +} + .el-message-box__headerbtn .el-message-box__close, .el-dialog__headerbtn .el-dialog__close { + display: block !important; + visibility: visible !important; + opacity: 1 !important; color: var(--art-gray-500) !important; - top: 7px !important; - right: 7px !important; + font-size: 16px !important; + width: 16px !important; + height: 16px !important; padding: 7px !important; border-radius: 6px !important; transition: all 0.3s !important; + background: transparent !important; + border: none !important; + cursor: pointer !important; + outline: none !important; &:hover { background-color: rgba(var(--art-gray-200-rgb), 0.7) !important; color: var(--art-gray-800) !important; } + + &:focus { + outline: none !important; + } } .el-message-box__title {