Skip to content

Commit 9d80015

Browse files
author
rulishu
committed
doc: 添加日志管理文档页面
1 parent 40a8113 commit 9d80015

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
### 日志管理
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import Preview from 'src/component/Preview';
2+
import md from './README.md';
3+
4+
const transformImageUri = (url: string) => {
5+
const reqImage = (require as any).context!('./', true, /\.(png|gif|jpg|svg)$/);
6+
const urlAddr = reqImage(url);
7+
return urlAddr;
8+
};
9+
10+
const DEMO = () => (
11+
<Preview
12+
{...md}
13+
transformImageUri={transformImageUri}
14+
path="website/src/pages/docs/react-native-template/log-management/README.md"
15+
/>
16+
);
17+
18+
export default DEMO;

website/src/routes/menus.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export const docsMenus: MenuData[] = [
8989
{ divider: true, name: 'React Native Template' },
9090
{ path: '/docs/react-native-template/quickstart', name: '快速开始' },
9191
{ path: '/docs/react-native-template/mock-data', name: 'Mock 数据' },
92+
{ path: '/docs/react-native-template/log-management', name: '日志管理' },
9293
{ divider: true, name: '发布应用商店' },
9394
{ path: '/docs/app-store/ios', name: '发布 iOS 应用商店' },
9495
{ path: '/docs/app-store/android', name: '发布 Android 应用商店' },

website/src/routes/router.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ export const routeData = [
6969
path: '/docs/react-native-template/mock-data',
7070
component: lazy(() => import('../pages/docs/react-native-template/mock-data')),
7171
},
72+
{
73+
path: '/docs/react-native-template/log-management',
74+
component: lazy(() => import('../pages/docs/react-native-template/log-management')),
75+
},
7276
{
7377
path: '/components/about',
7478
component: lazy(() => import('../pages/components/about')),

0 commit comments

Comments
 (0)