From a9d16f2b85f01f620a118ba8949795051cb320db Mon Sep 17 00:00:00 2001 From: ZhangAo Date: Fri, 24 Oct 2025 17:27:35 +0800 Subject: [PATCH] u --- code/app/base-app/.vscode/settings.json | 3 +- code/app/base-app/app/(tabs)/_layout.tsx | 23 +++ code/app/base-app/app/(tabs)/index.tsx | 17 ++ code/app/base-app/app/(tabs)/settings.tsx | 17 ++ code/app/base-app/app/_layout.tsx | 15 +- code/app/base-app/app/index.tsx | 20 --- .../{eslint.config.js => eslint.config.mjs} | 1 - code/app/base-app/package.json | 5 +- .../base-app/plugins/withAndroidSignature.js | 2 +- code/app/base-app/pnpm-lock.yaml | 152 ++++++------------ code/app/base-app/tsconfig.json | 4 +- notes/前端开发/react-native/expo.md | 13 +- 12 files changed, 127 insertions(+), 145 deletions(-) create mode 100644 code/app/base-app/app/(tabs)/_layout.tsx create mode 100644 code/app/base-app/app/(tabs)/index.tsx create mode 100644 code/app/base-app/app/(tabs)/settings.tsx delete mode 100644 code/app/base-app/app/index.tsx rename code/app/base-app/{eslint.config.js => eslint.config.mjs} (95%) diff --git a/code/app/base-app/.vscode/settings.json b/code/app/base-app/.vscode/settings.json index b0d616e3..9f2f4482 100644 --- a/code/app/base-app/.vscode/settings.json +++ b/code/app/base-app/.vscode/settings.json @@ -33,6 +33,7 @@ "html", "markdown", "json", + "json5", "jsonc", "yaml", "toml", @@ -47,4 +48,4 @@ "pcss", "postcss" ] -} \ No newline at end of file +} diff --git a/code/app/base-app/app/(tabs)/_layout.tsx b/code/app/base-app/app/(tabs)/_layout.tsx new file mode 100644 index 00000000..2a89740c --- /dev/null +++ b/code/app/base-app/app/(tabs)/_layout.tsx @@ -0,0 +1,23 @@ +import FontAwesome from '@expo/vector-icons/FontAwesome' +import { Tabs } from 'expo-router' + +export default function TabLayout() { + return ( + + , + }} + /> + , + }} + /> + + ) +} diff --git a/code/app/base-app/app/(tabs)/index.tsx b/code/app/base-app/app/(tabs)/index.tsx new file mode 100644 index 00000000..a1bad31c --- /dev/null +++ b/code/app/base-app/app/(tabs)/index.tsx @@ -0,0 +1,17 @@ +import { StyleSheet, Text, View } from 'react-native' + +export default function Tab() { + return ( + + Tab [Home] + + ) +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + }, +}) diff --git a/code/app/base-app/app/(tabs)/settings.tsx b/code/app/base-app/app/(tabs)/settings.tsx new file mode 100644 index 00000000..e7aceecc --- /dev/null +++ b/code/app/base-app/app/(tabs)/settings.tsx @@ -0,0 +1,17 @@ +import { StyleSheet, Text, View } from 'react-native' + +export default function Tab() { + return ( + + Tab [Settings] + + ) +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + }, +}) diff --git a/code/app/base-app/app/_layout.tsx b/code/app/base-app/app/_layout.tsx index 6f2d471e..3b6b5142 100644 --- a/code/app/base-app/app/_layout.tsx +++ b/code/app/base-app/app/_layout.tsx @@ -1,5 +1,4 @@ import { Stack } from 'expo-router' -import { StyleSheet } from 'react-native' export default function Layout() { return ( @@ -10,19 +9,9 @@ export default function Layout() { }} > - {/* 其他页面可以在这里添加 */} ) } - -const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: 'black', - }, -}) diff --git a/code/app/base-app/app/index.tsx b/code/app/base-app/app/index.tsx deleted file mode 100644 index 55e822ce..00000000 --- a/code/app/base-app/app/index.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Button, Text, View } from 'react-native' -import { useCounter } from '@/hooks/useCounter' - -export default function App() { - const { count, increment, decrement, reset } = useCounter(0) - - return ( - - - Welcome to Nativewind! - - - Count: - {count} - - -