feat:存一波

This commit is contained in:
许永平
2025-07-04 16:11:02 +08:00
parent 8de943d4a4
commit 7e0d9210a9
5 changed files with 76 additions and 36 deletions

View File

@@ -13,8 +13,8 @@ export default function BottomNav() {
const location = useLocation();
return (
<nav className="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 z-50">
<div className="w-full mx-auto flex justify-around">
<nav className="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 z-50 h-16">
<div className="w-full h-full mx-auto flex justify-around items-center">
{navItems.map((item) => {
const IconComponent = item.icon;
const isActive = location.pathname === item.href;
@@ -23,7 +23,7 @@ export default function BottomNav() {
<Link
key={item.href}
to={item.href}
className={`flex flex-col items-center py-2 px-3 ${
className={`flex flex-col items-center justify-center py-2 px-3 h-full ${
isActive ? "text-blue-500" : "text-gray-500"
}`}
>

View File

@@ -42,7 +42,7 @@ export default function LayoutWrapper({ children }: LayoutWrapperProps) {
// 其他页面显示底部导航
return (
<div className="flex flex-col h-screen">
<div className="flex-1 overflow-hidden">
<div className="flex-1 overflow-y-auto">
{children}
</div>
{shouldShowBottomNav && <BottomNav />}