From 90344f694d26a13fda2a743dc1271f6250890a20 Mon Sep 17 00:00:00 2001 From: sakurayinfei <970412446@qq.com> Date: Tue, 16 Sep 2025 14:10:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20dialog=E7=BB=84=E4=BB=B6=E9=80=82?= =?UTF-8?q?=E9=85=8D=E6=96=B0=E7=9A=84=E5=8F=98=E9=87=8F=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opendesign/src/dialog/style/index.scss | 2 +- .../opendesign/src/dialog/style/media.scss | 74 ++++++++++--------- packages/opendesign/src/dialog/style/var.scss | 10 +-- 3 files changed, 45 insertions(+), 41 deletions(-) diff --git a/packages/opendesign/src/dialog/style/index.scss b/packages/opendesign/src/dialog/style/index.scss index e6b6f59b..8bb47c58 100644 --- a/packages/opendesign/src/dialog/style/index.scss +++ b/packages/opendesign/src/dialog/style/index.scss @@ -1,3 +1,3 @@ @use './style.scss' as *; -@use './media.scss' as *; @use './var.scss' as *; +@use './media.scss' as *; diff --git a/packages/opendesign/src/dialog/style/media.scss b/packages/opendesign/src/dialog/style/media.scss index 1cab5aeb..b63aefb6 100644 --- a/packages/opendesign/src/dialog/style/media.scss +++ b/packages/opendesign/src/dialog/style/media.scss @@ -33,22 +33,18 @@ } .o-dialog { - @include respond-to('laptop') { + @include respond-to('laptop-pc_s') { --dlg-edge-gap: 24px; --dlg-inner-gap: 16px; } - @include respond-to('pad_h') { - --dlg-edge-gap: 24px; - --dlg-inner-gap: 16px; - } - @include respond-to('<=pad_v') { + @include respond-to('<=pad') { --dlg-edge-gap: 16px; --dlg-inner-gap: 12px; } } .o-dlg-header { - @include respond-to('laptop') { + @include respond-to('laptop-pc_s') { font-size: var(--o-font_size-h4); line-height: var(--o-line_height-h4); } @@ -59,39 +55,46 @@ } .o-dialog-exlarge { - @include respond-to('laptop') { + @include respond-to('laptop-pc_s') { + --dlg-width: 75%; + --dlg-max-height: 80%; + --dlg-min-height: 65%; + } + @include respond-to('pad_h') { --dlg-width: 80%; --dlg-max-height: 80%; --dlg-min-height: 65%; } - @include respond-to('<=pad') { + @include respond-to('<=pad_v') { --dlg-width: 100%; --dlg-max-height: 100%; + --dlg-min-height: 100%; --dlg-radius: 0; --dlg-margin: 0; - --dlg-edge-gap: 24px; - --dlg-inner-gap: 16px; } } .o-dialog-large { - @include respond-to('laptop') { + @include respond-to('laptop-pc_s') { + --dlg-width: 60%; + --dlg-max-height: 80%; + --dlg-min-height: 50%; + } + @include respond-to('pad_h') { --dlg-width: 65%; --dlg-max-height: 80%; --dlg-min-height: 50%; } - - @include respond-to('<=pad') { + @include respond-to('<=pad_v') { --dlg-width: 100%; --dlg-max-height: 100%; + --dlg-min-height: 100%; --dlg-radius: 0; --dlg-margin: 0; - --dlg-edge-gap: 24px; - --dlg-inner-gap: 16px; } } .o-dialog-medium { - @include respond-to('laptop') { - --dlg-width: 50%; + @include respond-to('laptop-pc_s') { + --dlg-width: 40%; --dlg-max-height: 80%; --dlg-min-height: 35%; } @@ -99,40 +102,41 @@ --dlg-width: 65%; --dlg-max-height: 80%; --dlg-min-height: 128px; - --dlg-margin: 24px; } - @include respond-to('<=pad_v') { - --dlg-width: calc(100vw - 48px); + @include respond-to('pad_v') { + --dlg-width: 75%; + --dlg-max-height: 80%; + --dlg-min-height: 128px; + } + @include respond-to('phone') { + --dlg-width: 100vw; --dlg-max-height: 65%; --dlg-min-height: 128px; --dlg-margin: 24px; } } .o-dialog-small { - @include respond-to('laptop') { - --dlg-width: 35%; + @include respond-to('laptop-pc_s') { + --dlg-width: 25%; --dlg-max-height: 50%; --dlg-min-height: 20%; } - @include respond-to('<=pad') { + @include respond-to('pad_h') { + --dlg-width: 32%; --dlg-min-height: 128px; --dlg-max-height: 80%; - - --dlg-margin: 24px; - - --dlg-edge-gap: 16px; - --dlg-inner-gap: 12px; - --dlg-header-gap: 12px; - } - @include respond-to('pad_h') { - --dlg-width: 50%; } @include respond-to('pad_v') { - --dlg-width: 65%; + --dlg-width: 75%; + --dlg-min-height: 128px; + --dlg-max-height: 80%; } @include respond-to('phone') { - --dlg-width: calc(100vw - 48px); + --dlg-width: 100vw; + --dlg-min-height: 128px; --dlg-max-height: 65%; + + --dlg-margin: 24px; } } diff --git a/packages/opendesign/src/dialog/style/var.scss b/packages/opendesign/src/dialog/style/var.scss index a17f3486..a20c8c57 100644 --- a/packages/opendesign/src/dialog/style/var.scss +++ b/packages/opendesign/src/dialog/style/var.scss @@ -13,7 +13,7 @@ --dlg-max-height: 100%; --dlg-min-width: 272px; - --dlg-margin: 24px; + --dlg-margin: 0px; --dlg-edge-gap: 32px; --dlg-inner-gap: 24px; @@ -25,23 +25,23 @@ } .o-dialog-exlarge { - --dlg-width: 1170px; + --dlg-width: 65%; --dlg-max-height: 780px; --dlg-min-height: 520px; } .o-dialog-large { - --dlg-width: 930px; + --dlg-width: 60%; --dlg-max-height: 780px; --dlg-min-height: 424px; } .o-dialog-medium { - --dlg-width: 690px; + --dlg-width: 40%; --dlg-max-height: 480px; --dlg-min-height: 328px; } .o-dialog-small { - --dlg-width: 450px; + --dlg-width: 25%; --dlg-max-height: 272px; --dlg-min-height: 224px; -- Gitee From df21a2788da6e20e2208e2d684d740e51ad19a4a Mon Sep 17 00:00:00 2001 From: sakurayinfei <970412446@qq.com> Date: Tue, 16 Sep 2025 14:39:14 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E6=96=B0=E5=A2=9E--dlg-btn-gap?= =?UTF-8?q?=E5=8F=98=E9=87=8F=EF=BC=8C=E7=94=A8=E4=BA=8E=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E6=8C=89=E9=92=AE=E9=97=B4=E8=B7=9D=EF=BC=8C?= =?UTF-8?q?=E9=97=B4=E8=B7=9D=E5=93=8D=E5=BA=94=E8=A7=86=E5=AE=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/opendesign/src/dialog/style/media.scss | 12 ++++++++++++ packages/opendesign/src/dialog/style/style.scss | 2 +- packages/opendesign/src/dialog/style/var.scss | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/opendesign/src/dialog/style/media.scss b/packages/opendesign/src/dialog/style/media.scss index b63aefb6..26236ff2 100644 --- a/packages/opendesign/src/dialog/style/media.scss +++ b/packages/opendesign/src/dialog/style/media.scss @@ -151,3 +151,15 @@ } } } + +@include respond-to('laptop-pc_s') { + .o-dialog { + --dlg-btn-gap: 12px; + } +} + +@include respond-to('<=pad') { + .o-dialog { + --dlg-btn-gap: 8px; + } +} diff --git a/packages/opendesign/src/dialog/style/style.scss b/packages/opendesign/src/dialog/style/style.scss index 1eb28aa7..ffa70243 100644 --- a/packages/opendesign/src/dialog/style/style.scss +++ b/packages/opendesign/src/dialog/style/style.scss @@ -77,6 +77,6 @@ } .o-dlg-btn { + .o-dlg-btn { - margin-left: 16px; + margin-left: var(--dlg-btn-gap); } } diff --git a/packages/opendesign/src/dialog/style/var.scss b/packages/opendesign/src/dialog/style/var.scss index a20c8c57..327d56b6 100644 --- a/packages/opendesign/src/dialog/style/var.scss +++ b/packages/opendesign/src/dialog/style/var.scss @@ -18,6 +18,7 @@ --dlg-edge-gap: 32px; --dlg-inner-gap: 24px; --actions-justify: var(--dlg-actions-justify, center); + --dlg-btn-gap: 16px; } .o-dialog-auto { -- Gitee From 718ff7aa45a3c08e9f3f798cb73c924ccec4c455 Mon Sep 17 00:00:00 2001 From: sakurayinfei <970412446@qq.com> Date: Thu, 18 Sep 2025 17:58:55 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20dialog=E6=96=B0=E5=A2=9E=E7=9A=AE?= =?UTF-8?q?=E8=82=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/dialog/style/theme-ascend.scss | 2 +- .../src/dialog/style/theme-common.scss | 125 ++++++++++++++++++ .../src/dialog/style/theme-kunpeng.scss | 2 +- .../src/dialog/style/theme-openeuler.scss | 2 +- 4 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 packages/opendesign/src/dialog/style/theme-common.scss diff --git a/packages/opendesign/src/dialog/style/theme-ascend.scss b/packages/opendesign/src/dialog/style/theme-ascend.scss index 1b06a188..a257ffca 100644 --- a/packages/opendesign/src/dialog/style/theme-ascend.scss +++ b/packages/opendesign/src/dialog/style/theme-ascend.scss @@ -1 +1 @@ -@use '../../theme/grid.scss' as *; +@use './theme-common.scss' as *; \ No newline at end of file diff --git a/packages/opendesign/src/dialog/style/theme-common.scss b/packages/opendesign/src/dialog/style/theme-common.scss new file mode 100644 index 00000000..d2329307 --- /dev/null +++ b/packages/opendesign/src/dialog/style/theme-common.scss @@ -0,0 +1,125 @@ +@use '../../_styles/mixin.scss' as *; +@use '../../theme/grid.scss' as *; + +// 栅格 +.o-dialog-exlarge { + --dlg-width: var(--grid-16); +} +.o-dialog-large { + --dlg-width: var(--grid-14); +} +.o-dialog-medium { + --dlg-width: var(--grid-10); +} +.o-dialog-small { + --dlg-width: var(--grid-6); +} + +@include respond-to('laptop-pc_s') { + .o-dialog-exlarge { + --dlg-width: var(--grid-18); + } + .o-dialog-large { + --dlg-width: var(--grid-14); + } + .o-dialog-medium { + --dlg-width: var(--grid-10); + } + .o-dialog-small { + --dlg-width: var(--grid-6); + } +} +@include respond-to('pad_h') { + .o-dialog-exlarge { + --dlg-width: var(--grid-10); + } + .o-dialog-large { + --dlg-width: var(--grid-8); + } + .o-dialog-medium { + --dlg-width: var(--grid-6); + } + .o-dialog-small { + --dlg-width: var(--grid-4); + } +} +@include respond-to('pad_v') { + .o-dialog-exlarge { + --dlg-width: 100%; + } + .o-dialog-large { + --dlg-width: 100%; + } + .o-dialog-medium { + --dlg-width: var(--grid-6); + } + .o-dialog-small { + --dlg-width: var(--grid-6); + } +} +@include respond-to('phone') { + .o-dialog-exlarge { + --dlg-width: 100%; + } + .o-dialog-large { + --dlg-width: 100%; + } + .o-dialog-medium { + --dlg-width: var(--grid-4); + --dlg-margin: 0; + } + .o-dialog-small { + --dlg-width: var(--grid-4); + --dlg-margin: 0; + } + .o-dialog-phone-half-full { + --dlg-width: 100%; + --dlg-margin: 0; + } +} + +// 正文字号 +@include respond-to('<=pc_s') { + .o-dlg-body { + font-size: var(--o-font_size-tip1); + line-height: var(--o-line_height-tip1); + } +} + +// 按钮对其方式 +.c-dlg-action-end { + display: flex; + + justify-content: flex-end; + > * + * { + margin-left: var(--dlg-btn-gap); + } +} +.c-dlg-action-center { + display: flex; + + justify-content: center; + > * + * { + margin-left: var(--dlg-btn-gap); + } +} + +// 运营弹窗 +.c-dlg-operation { + --layer-align: center !important; + --dlg-body-padding: 0 !important; + --dlg-margin: 40px; + --dlg-min-height: 320px; + --dlg-max-height: 468px; + .o-dlg-btn-close { + right: 50%; + transform: translateX(50%); + top: calc(100% + 16px); + border: 1px solid var(--o-color-info1-inverse); + border-radius: 50%; + font-size: var(--o-icon_size_control-xs); + color: var(--o-color-info1-inverse); + padding: 4px; + display: flex; + } +} diff --git a/packages/opendesign/src/dialog/style/theme-kunpeng.scss b/packages/opendesign/src/dialog/style/theme-kunpeng.scss index 6fa102ff..a257ffca 100644 --- a/packages/opendesign/src/dialog/style/theme-kunpeng.scss +++ b/packages/opendesign/src/dialog/style/theme-kunpeng.scss @@ -1 +1 @@ -@use '../../theme/grid.scss' as *; \ No newline at end of file +@use './theme-common.scss' as *; \ No newline at end of file diff --git a/packages/opendesign/src/dialog/style/theme-openeuler.scss b/packages/opendesign/src/dialog/style/theme-openeuler.scss index 6fa102ff..a257ffca 100644 --- a/packages/opendesign/src/dialog/style/theme-openeuler.scss +++ b/packages/opendesign/src/dialog/style/theme-openeuler.scss @@ -1 +1 @@ -@use '../../theme/grid.scss' as *; \ No newline at end of file +@use './theme-common.scss' as *; \ No newline at end of file -- Gitee