fix: 修复页面过渡动画导致 fixed 定位失效和全局徽章被遮挡
This commit is contained in:
+1
-1
@@ -40,8 +40,8 @@ export default function RootLayout({
|
||||
</head>
|
||||
<body className={`${geistSans.variable} font-sans antialiased`}>
|
||||
<ServiceWorkerRegistrar />
|
||||
<GlobalUserBadge />
|
||||
<PageTransition>{children}</PageTransition>
|
||||
<GlobalUserBadge />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user