diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx
index 5e4c871..bd37ee7 100644
--- a/app/(tabs)/_layout.tsx
+++ b/app/(tabs)/_layout.tsx
@@ -1,5 +1,3 @@
-import { HapticTab } from '@/components/HapticTab';
-import AskNavbar from '@/components/layout/ask';
import { TabBarIcon } from '@/components/navigation/TabBarIcon';
import { requestNotificationPermission } from '@/components/owner/utils';
import TabBarBackground from '@/components/ui/TabBarBackground';
@@ -191,25 +189,21 @@ export default function TabLayout() {
screenOptions={{
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
headerShown: false,
- tabBarButton: HapticTab,
- tabBarBackground: TabBarBackground,
- tabBarStyle: Platform.select({
- ios: {
- // Use a transparent background on iOS to show the blur effect
- position: 'absolute',
- },
- default: {},
- }),
+ tabBarShowLabel: false,
+ tabBarStyle: {
+ position: 'absolute',
+ borderTopWidth: 0,
+ elevation: 0,
+ height: Platform.OS === 'ios' ? 90 : 70,
+ },
+ tabBarBackground: () => ,
}}
>
{/* 落地页 */}
null, // 隐藏底部标签栏
- headerShown: false, // 隐藏导航栏
- tabBarStyle: { display: 'none' } // 确保在标签栏中不显示
+ href: null,
}}
/>
{/* 登录 */}
@@ -260,10 +254,7 @@ export default function TabLayout() {
null, // 隐藏底部标签栏
- headerShown: false, // 隐藏导航栏
- tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
+ href: null,
...TransitionPresets.ShiftTransition,
}}
/>
@@ -271,10 +262,7 @@ export default function TabLayout() {
null, // 隐藏底部标签栏
- headerShown: false, // 隐藏导航栏
- tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
+ href: null,
...TransitionPresets.ShiftTransition,
}}
/>
@@ -282,10 +270,7 @@ export default function TabLayout() {
null, // 隐藏底部标签栏
- headerShown: false, // 隐藏导航栏
- tabBarStyle: { display: 'none' }, // 确保在标签栏中不显示
+ href: null,
...TransitionPresets.ShiftTransition,
}}
/>
@@ -377,7 +362,6 @@ export default function TabLayout() {
}}
/>
-
>
);
}
diff --git a/app/(tabs)/ask.tsx b/app/(tabs)/ask.tsx
index 4ff99d9..03ca67c 100644
--- a/app/(tabs)/ask.tsx
+++ b/app/(tabs)/ask.tsx
@@ -267,7 +267,7 @@ export default function AskScreen() {
console.log('失去焦点失败:', error);
}
Keyboard.dismiss();
- router.navigate('/memo-list');
+ router.replace('/memo-list');
}}
>
diff --git a/components/ui/TabBarBackground.tsx b/components/ui/TabBarBackground.tsx
index 70d1c3c..bdab3ba 100644
--- a/components/ui/TabBarBackground.tsx
+++ b/components/ui/TabBarBackground.tsx
@@ -1,5 +1,10 @@
+import React from 'react';
+import { View } from 'react-native';
+
// This is a shim for web and Android where the tab bar is generally opaque.
-export default undefined;
+export default function TabBarBackground() {
+ return ;
+}
export function useBottomTabOverflow() {
return 0;