feat: 更新抽屉样式以支持横屏模式下的最大宽度设置

This commit is contained in:
kuaifan 2025-11-04 12:52:11 +08:00
parent 708b488af8
commit 717e87cfa9
2 changed files with 27 additions and 6 deletions

View File

@ -239,6 +239,7 @@ export default {
--modal-resize-display: block; --modal-resize-display: block;
--modal-content-left: auto; --modal-content-left: auto;
--modal-content-min-width: auto; --modal-content-min-width: auto;
--modal-content-max-width: 100%;
--modal-body-margin: 0; --modal-body-margin: 0;
--modal-body-border-radius: 0; --modal-body-border-radius: 0;
--modal-body-background-color: #ffffff; --modal-body-background-color: #ffffff;
@ -380,7 +381,7 @@ export default {
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
min-width: var(--modal-content-min-width); min-width: var(--modal-content-min-width);
max-width: 100%; max-width: var(--modal-content-max-width);
} }
&-body { &-body {
@ -419,6 +420,19 @@ export default {
} }
} }
//
body.window-landscape {
.micro-modal {
--modal-content-max-width: calc(100% - 80px);
}
&.transparent-mode {
--modal-content-max-width: 100%;
}
@media (width < 768px) {
--modal-content-max-width: 100%;
}
}
// //
body.dark-mode-reverse { body.dark-mode-reverse {
.micro-modal { .micro-modal {

View File

@ -40,6 +40,7 @@ body {
--title-color: #303133; --title-color: #303133;
--content-bg-color: #ffffff; --content-bg-color: #ffffff;
--border-radius: 0px; --border-radius: 0px;
--body-max-width: 100%;
&.file-drawer { &.file-drawer {
--margin-top: 40px; --margin-top: 40px;
@ -62,7 +63,7 @@ body {
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
height: 100%; height: 100%;
max-width: 100%; max-width: var(--body-max-width);
max-height: 100%; max-height: 100%;
position: relative; position: relative;
@ -189,6 +190,16 @@ body {
} }
} }
body.window-landscape {
// 横屏模式下的抽屉样式
.common-drawer {
--body-max-width: calc(100% - 80px);
}
// 横屏模式下的全屏抽屉样式
.drawer-fullscreen {
--body-max-width: 100%;
}
}
body.dark-mode-reverse { body.dark-mode-reverse {
// 暗黑模式下的抽屉样式 // 暗黑模式下的抽屉样式
.common-drawer { .common-drawer {
@ -196,10 +207,6 @@ body.dark-mode-reverse {
--close-color: #000000; --close-color: #000000;
} }
} }
// 暗黑模式下的全屏抽屉样式
.drawer-fullscreen {
}
} }
// 抽屉动画样式 // 抽屉动画样式