Skip to content

Commit c64f201

Browse files
authored
Merge pull request #532 from rulishu/rls
doc: 添加日志管理文档页面
2 parents 8d0ca2e + 9d80015 commit c64f201

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
@@ -90,6 +90,7 @@ export const docsMenus: MenuData[] = [
9090
{ path: '/docs/react-native-template/quickstart', name: '快速开始' },
9191
{ path: '/docs/react-native-template/new-page', name: '新增页面' },
9292
{ path: '/docs/react-native-template/mock-data', name: 'Mock 数据' },
93+
{ path: '/docs/react-native-template/log-management', name: '日志管理' },
9394
{ divider: true, name: '发布应用商店' },
9495
{ path: '/docs/app-store/ios', name: '发布 iOS 应用商店' },
9596
{ 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
@@ -73,6 +73,10 @@ export const routeData = [
7373
path: '/docs/react-native-template/mock-data',
7474
component: lazy(() => import('../pages/docs/react-native-template/mock-data')),
7575
},
76+
{
77+
path: '/docs/react-native-template/log-management',
78+
component: lazy(() => import('../pages/docs/react-native-template/log-management')),
79+
},
7680
{
7781
path: '/components/about',
7882
component: lazy(() => import('../pages/components/about')),

0 commit comments

Comments
 (0)