fix: 修复页面过渡动画导致 fixed 定位失效和全局徽章被遮挡

This commit is contained in:
2026-02-26 16:49:06 +08:00
parent add9733bc9
commit b1cbf0d589
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -40,8 +40,8 @@ export default function RootLayout({
</head>
<body className={`${geistSans.variable} font-sans antialiased`}>
<ServiceWorkerRegistrar />
<GlobalUserBadge />
<PageTransition>{children}</PageTransition>
<GlobalUserBadge />
</body>
</html>
);
+1 -1
View File
@@ -53,7 +53,7 @@ export default function GlobalUserBadge() {
return (
<>
<motion.div
className="fixed right-4 top-3 z-40 flex items-center gap-1.5"
className="fixed right-4 top-3 z-50 flex items-center gap-1.5"
initial={{ opacity: 0, scale: 0.9 }}
animate={{ opacity: 1, scale: 1 }}
transition={{ delay: 0.1, duration: 0.3 }}
+3 -3
View File
@@ -20,9 +20,9 @@ function FrozenRoute({ children }: PropsWithChildren) {
}
const variants = {
enter: { opacity: 0, y: 12 },
center: { opacity: 1, y: 0 },
exit: { opacity: 0, y: -12 },
enter: { opacity: 0 },
center: { opacity: 1 },
exit: { opacity: 0 },
};
export default function PageTransition({ children }: PropsWithChildren) {