Skip to content

Commit 1b9ba3b

Browse files
committed
doc: 修改首页新建页面文档
1 parent ce79e5d commit 1b9ba3b

File tree

2 files changed

+29
-10
lines changed
  • packages/core/src/Calendar
  • website/src/pages/docs/react-native-template/new-page

2 files changed

+29
-10
lines changed

packages/core/src/Calendar/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const { Header, Body, Footer } = Layout;
123123
<Container>
124124
<Layout>
125125
<Body>
126-
<Calendar renderDay={()=><View><Text>1</Text></View>} />
126+
<Calendar renderDay={(date)=><View><Text>1</Text></View>} />
127127
</Body>
128128
<Footer />
129129
</Layout>

website/src/pages/docs/react-native-template/new-page/README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,37 @@
22

33
这里的『页面』指配置了路由,能够通过链接直接访问的模块。
44

5+
## 目录结构
6+
7+
```
8+
9+
├── mocker # mocker data
10+
├── android # native android code
11+
├── ios # native ios code
12+
├── src # code directory
13+
│ ├── components # react components
14+
│ ├── models # The models brings together state, reducers, async actions & action creators in one place
15+
│ ├── pages # route pages
16+
│ ├── routes # route configuration
17+
│ ├── services # api request
18+
│ ├── utils # public method
19+
│ ├── App.js # route entery page
20+
│ ├── config.js # app configuration
21+
│ └── global.js # Store some global objects for easy calling
22+
├── .eslintrc # eslint configuration
23+
├── index.js # app entry file
24+
└── package.json # This document is all you need to know about what’s required in your package.json file.
25+
```
26+
527
## 手动创建
628

729
在 src / pages 下创建新的 js 文件。 如果有多个相关页面,您可以创建一个新文件夹来放置相关文件
8-
```bash
9-
src
10-
models
11-
pages
12-
+ NewPage
13-
+ index.js
14-
...
15-
...
16-
package.json
30+
31+
```
32+
├── src
33+
│ ├── pages
34+
│ │ └── NewPage # 📑 添加 新页面目录
35+
│ │ └── index.js # 📑 添加 新页面
1736
```
1837

1938
为了更好的演示,我们初始化NewPage/index.js的内容如下:

0 commit comments

Comments
 (0)