From 4055b7a2a93049409f77dcc276e49288187abc85 Mon Sep 17 00:00:00 2001 From: Vicky <10212746+haifeng-jiang@user.noreply.gitee.com> Date: Thu, 5 Nov 2026 10:56:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(layout):=20=E4=BF=AE=E5=A4=8D=E9=A1=B6?= =?UTF-8?q?=E6=A0=8F=E9=80=9A=E7=9F=A5=E8=A7=92=E6=A0=87=E8=84=B1=E7=A6=BB?= =?UTF-8?q?=E9=93=83=E9=93=9B=E5=8F=B3=E4=B8=8A=E8=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 角标改为锚定图标右上角(right 9px + 右移 50%), 位数变化时位置不漂移。 --- src/layout/components/TranscodeNoticeButton.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layout/components/TranscodeNoticeButton.vue b/src/layout/components/TranscodeNoticeButton.vue index 6bf6944..9581017 100644 --- a/src/layout/components/TranscodeNoticeButton.vue +++ b/src/layout/components/TranscodeNoticeButton.vue @@ -83,7 +83,9 @@ onBeforeUnmount(() => { } .notice-badge :deep(.el-badge__content.is-fixed) { - top: 8px; - right: 2px; + /* 角标中心骑在铃铛右上角:right 9px + 右移 50%,与位数宽度无关 */ + top: calc(50% - 9px); + right: 9px; + transform: translate(50%, -50%); }