From 7dd10f9c96e2947af65aa52e674b179a8c999099 Mon Sep 17 00:00:00 2001 From: PKC278 <52959804+PKC278@users.noreply.github.com> Date: Sat, 3 Jan 2026 23:28:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(VersionUpdateToast):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=A0=B7=E5=BC=8F=E5=92=8C=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/toast/VersionUpdateToast.vue | 3 ++- src/styles/main.scss | 27 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/components/toast/VersionUpdateToast.vue b/src/components/toast/VersionUpdateToast.vue index 0f5bb784..dc13b757 100644 --- a/src/components/toast/VersionUpdateToast.vue +++ b/src/components/toast/VersionUpdateToast.vue @@ -36,7 +36,8 @@ const handleRefresh = () => { .message { flex: 1; - white-space: nowrap; + word-break: break-all; + line-height: 1.4; } .refresh-button { diff --git a/src/styles/main.scss b/src/styles/main.scss index c0fac356..b7692a03 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -16,4 +16,31 @@ .version-update-toast-container { min-width: unset !important; width: fit-content !important; + + // 移动端适配:强制靠右并修正位置 + @media only screen and (width <= 600px) { + max-width: calc(100vw - 1rem) !important; + margin-inline: 0 0.5rem !important; + border-radius: 8px !important; + position: relative !important; + top: calc(100vh - 12rem) !important; + } +} + +// 使用 :has 选择器精准控制包含更新通知的容器 +.Vue-Toastification__container:has(.version-update-toast-container) { + @media only screen and (width <= 600px) { + top: auto !important; + bottom: 0 !important; + display: flex !important; + flex-direction: column !important; + align-items: flex-end !important; + padding-block-end: 4.5rem !important; + pointer-events: none; + + .version-update-toast-container { + pointer-events: auto; + margin-inline-end: 0.5rem !important; + } + } }