7 changed files with 83 additions and 80 deletions
@ -0,0 +1,2 @@ |
|||||||
|
import { TestPage } from '@/pages'; |
||||||
|
export default TestPage; |
||||||
@ -0,0 +1,38 @@ |
|||||||
|
import { StyleSheet } from 'react-native'; |
||||||
|
|
||||||
|
export const styles = StyleSheet.create({ |
||||||
|
container: { |
||||||
|
flex: 1, |
||||||
|
}, |
||||||
|
scrollView: { |
||||||
|
flex: 1, |
||||||
|
}, |
||||||
|
content: { |
||||||
|
padding: 20, |
||||||
|
}, |
||||||
|
title: { |
||||||
|
marginBottom: 16, |
||||||
|
}, |
||||||
|
description: { |
||||||
|
marginBottom: 24, |
||||||
|
lineHeight: 24, |
||||||
|
}, |
||||||
|
section: { |
||||||
|
marginBottom: 24, |
||||||
|
}, |
||||||
|
item: { |
||||||
|
marginTop: 8, |
||||||
|
marginLeft: 8, |
||||||
|
lineHeight: 24, |
||||||
|
}, |
||||||
|
infoBox: { |
||||||
|
padding: 16, |
||||||
|
borderRadius: 8, |
||||||
|
backgroundColor: 'rgba(0, 122, 255, 0.1)', |
||||||
|
marginTop: 8, |
||||||
|
}, |
||||||
|
infoText: { |
||||||
|
marginTop: 8, |
||||||
|
lineHeight: 22, |
||||||
|
}, |
||||||
|
}); |
||||||
@ -0,0 +1,36 @@ |
|||||||
|
/** |
||||||
|
* pages 统一导出 |
||||||
|
* |
||||||
|
* 这个目录用于存放复杂的业务页面组件 |
||||||
|
* |
||||||
|
* 目录结构建议: |
||||||
|
* pages/ |
||||||
|
* ├── index.ts # 统一导出 |
||||||
|
* ├── TestPage/ # 测试页面 |
||||||
|
* │ ├── index.tsx # 页面主组件 |
||||||
|
* │ ├── components/ # 页面私有组件 |
||||||
|
* │ └── styles.ts # 页面样式 |
||||||
|
* ├── ProfilePage/ # 个人资料页面 |
||||||
|
* └── SettingsPage/ # 设置页面 |
||||||
|
* |
||||||
|
* 使用方式: |
||||||
|
* 1. 在 pages/ 目录下创建页面组件 |
||||||
|
* 2. 在 app/ 目录下创建路由文件,引用 pages/ 中的组件 |
||||||
|
* 3. 从这里统一导出,方便管理 |
||||||
|
* |
||||||
|
* 示例: |
||||||
|
* ```typescript
|
||||||
|
* // pages/TestPage/index.tsx
|
||||||
|
* export default function TestPage() { |
||||||
|
* return <View>...</View>; |
||||||
|
* } |
||||||
|
* |
||||||
|
* // app/test.tsx
|
||||||
|
* import TestPage from '@/pages/TestPage'; |
||||||
|
* export default TestPage; |
||||||
|
* ``` |
||||||
|
*/ |
||||||
|
|
||||||
|
// 导出业务页面组件
|
||||||
|
export { default as TestPage } from './TestPage'; |
||||||
|
|
||||||
@ -1,36 +0,0 @@ |
|||||||
/** |
|
||||||
* Screens 统一导出 |
|
||||||
*
|
|
||||||
* 这个目录用于存放复杂的业务页面组件 |
|
||||||
*
|
|
||||||
* 目录结构建议: |
|
||||||
* screens/ |
|
||||||
* ├── index.ts # 统一导出 |
|
||||||
* ├── TestScreen/ # 测试页面 |
|
||||||
* │ ├── index.tsx # 页面主组件 |
|
||||||
* │ ├── components/ # 页面私有组件 |
|
||||||
* │ └── styles.ts # 页面样式 |
|
||||||
* ├── ProfileScreen/ # 个人资料页面 |
|
||||||
* └── SettingsScreen/ # 设置页面 |
|
||||||
*
|
|
||||||
* 使用方式: |
|
||||||
* 1. 在 screens/ 目录下创建页面组件 |
|
||||||
* 2. 在 app/ 目录下创建路由文件,引用 screens/ 中的组件 |
|
||||||
* 3. 从这里统一导出,方便管理 |
|
||||||
*
|
|
||||||
* 示例: |
|
||||||
* ```typescript
|
|
||||||
* // screens/TestScreen/index.tsx
|
|
||||||
* export default function TestScreen() { |
|
||||||
* return <View>...</View>; |
|
||||||
* } |
|
||||||
*
|
|
||||||
* // app/test.tsx
|
|
||||||
* import TestScreen from '@/screens/TestScreen'; |
|
||||||
* export default TestScreen; |
|
||||||
* ``` |
|
||||||
*/ |
|
||||||
|
|
||||||
// 当前暂无导出,等待添加业务页面组件
|
|
||||||
export {}; |
|
||||||
|
|
||||||
Loading…
Reference in new issue