From 9146bdb554cc29374583a12b43336627fe06454c Mon Sep 17 00:00:00 2001 From: yoyo <15014217605@163.com> Date: Tue, 27 Feb 2024 10:06:16 +0800 Subject: [PATCH] fix(theme/notify): [notify] fix notify title white-space (#1413) * fix(theme/notify): [notify] fix notify title white-space * fix(theme/notify): [notify] fix notify title white-space 2 * fix(theme/notify): [notify] fix notify title white-space 3 --- packages/theme-saas/src/notify/index.less | 1 + packages/theme/src/notify/aurora-theme.js | 3 +++ packages/theme/src/notify/index.less | 3 +++ packages/theme/src/notify/vars.less | 2 ++ 4 files changed, 9 insertions(+) create mode 100644 packages/theme/src/notify/aurora-theme.js diff --git a/packages/theme-saas/src/notify/index.less b/packages/theme-saas/src/notify/index.less index 8880584d3..2e736cd6e 100644 --- a/packages/theme-saas/src/notify/index.less +++ b/packages/theme-saas/src/notify/index.less @@ -82,6 +82,7 @@ & &__message-zone { @apply w-full; @apply ~'ml-2.5'; + @apply min-w-0; } & &__close-zone { diff --git a/packages/theme/src/notify/aurora-theme.js b/packages/theme/src/notify/aurora-theme.js new file mode 100644 index 000000000..2b6b081e2 --- /dev/null +++ b/packages/theme/src/notify/aurora-theme.js @@ -0,0 +1,3 @@ +export const tinyPagerAuroraTheme = { + 'ti-notify-title-white-space': 'nowrap' +} diff --git a/packages/theme/src/notify/index.less b/packages/theme/src/notify/index.less index 476f47dd2..58d38ebd8 100644 --- a/packages/theme/src/notify/index.less +++ b/packages/theme/src/notify/index.less @@ -77,6 +77,9 @@ font-size: var(--ti-notify-title-font-size); color: var(--ti-notify-title-text-color); line-height: 1.5; + white-space: var(--ti-notify-title-white-space); + overflow-x: hidden; + text-overflow: ellipsis; } & &__icon { diff --git a/packages/theme/src/notify/vars.less b/packages/theme/src/notify/vars.less index 67399b5d0..5e0ed2039 100644 --- a/packages/theme/src/notify/vars.less +++ b/packages/theme/src/notify/vars.less @@ -47,6 +47,8 @@ --ti-notify-title-margin-horizontal: var(--ti-common-space-0, 0px); // 弹框标题底部外边距 --ti-notify-title-margin-bottom: var(--ti-common-space-2x, 8px); + // 弹框标题换行(hide) + --ti-notify-title-white-space: normal; // 弹框内容字号(没有效果,优先级被覆盖) --ti-notify-content-font-size: var(--ti-common-font-size-1, 14px); // 弹框文字顶部外边距