Skip to content

Commit 411f3cc

Browse files
committed
website: add environment-setup/android-windows.
1 parent 9563e18 commit 411f3cc

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

website/src/component/Container/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function Container(props: ContainerProps) {
1212
const { data, children, path } = props;
1313
return (
1414
<Fragment>
15-
<Header showBorder={path !== '/home'}/>
15+
<Header showBorder={path !== '/home'} path={path} />
1616
<div className={styles.warpper}>
1717
{data && data.length > 0 && (
1818
<SubMenus data={data} />

website/src/component/Header/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import { ReactComponent } from '../../assets/logo-dark.svg';
55

66
type HeaderProps = {
77
showBorder?: boolean;
8+
path?: string;
89
}
910

1011
export default function Header(props: HeaderProps) {
11-
const { showBorder = true } = props;
12+
const { showBorder = true } = props;
1213
// @ts-ignore
1314
// eslint-disable-next-line
1415
const version = pkg.version || '2.0.0';
@@ -26,7 +27,7 @@ export default function Header(props: HeaderProps) {
2627
</Link>
2728
<div className={styles.menus}>
2829
<NavLink to="/home">首页</NavLink>
29-
<NavLink to="/docs/getting-started">文档</NavLink>
30+
<NavLink to="/docs/">文档</NavLink>
3031
<NavLink to="/components/">RN组件</NavLink>
3132
<a target="__blank" href="https://github.com/uiwjs/react-native-uiw/issues">问题反馈</a>
3233
<a target="__blank" href="https://uiwjs.github.io">Web 组件</a>

website/src/routes/Controller.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default function Controller(props: Props) {
1414
return (
1515
<Switch>
1616
<Route exact path="/components" render={() => <Redirect to="/components/about" />} />
17+
<Route exact path="/docs" render={() => <Redirect to="/docs/getting-started" />} />
1718
<Route path="/" render={(props) => <BasicLayout {...props} routerData={routerData} />} />
1819
</Switch>
1920
);

website/src/routes/menus.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const docsMenus: MenuData[] = [
4444
{ path: '/docs/getting-started', name: '快速上手' },
4545
{ divider: true, name: "环境安装" },
4646
{ path: '/docs/environment-setup/ios', name: 'iOS 环境安装' },
47-
{ path: '/docs/environment-setup/android', name: 'Android 环境安装(Mac)' },
47+
{ path: '/docs/environment-setup/android', name: 'Android(Mac) 环境安装' },
48+
{ path: '/docs/environment-setup/android-windows', name: 'Android(Windows) 环境安装' },
4849
{ href: 'https://github.com/uiwjs/react-native-uiw/releases', target: '_blank', name: '更新日志' },
4950
]

website/src/routes/router.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ export const getRouterData = {
4545
'/docs/environment-setup/android': {
4646
component: dynamicWrapper([], () => import('../pages/docs/environment-setup/android')),
4747
},
48+
'/docs/environment-setup/android-windows': {
49+
component: dynamicWrapper([], () => import('../pages/docs/environment-setup/android-windows')),
50+
},
4851
'/docs/getting-started': {
4952
component: dynamicWrapper([], () => import('../pages/docs/getting-started')),
5053
},

0 commit comments

Comments
 (0)