Commit 0148ddb3 authored by afc163's avatar afc163

Add document links

parent 9867f6e6
import BasicLayout from '../layouts/BasicLayout';
import UserLayout from '../layouts/UserLayout';
import BlankLayout from '../layouts/BlankLayout';
import Analysis from '../routes/Dashboard/Analysis';
import Monitor from '../routes/Dashboard/Monitor';
......@@ -172,6 +173,15 @@ const data = [{
component: RegisterResult,
}],
}],
}, {
component: BlankLayout,
layout: 'BlankLayout',
children: {
name: 'ไฝฟ็”จๆ–‡ๆกฃ',
path: 'http://pro.ant.design/docs/getting-started',
target: '_blank',
icon: 'book',
},
}];
export function getNavData() {
......
......@@ -76,7 +76,12 @@ class BasicLayout extends React.PureComponent {
if (!item.name) {
return null;
}
const itemPath = `${parentPath}/${item.path || ''}`.replace(/\/+/g, '/');
let itemPath;
if (item.path.indexOf('http') === 0) {
itemPath = item.path;
} else {
itemPath = `${parentPath}/${item.path || ''}`.replace(/\/+/g, '/');
}
if (item.children && item.children.some(child => child.name)) {
return (
<SubMenu
......@@ -96,7 +101,7 @@ class BasicLayout extends React.PureComponent {
}
return (
<Menu.Item key={item.key || item.path}>
<Link to={itemPath}>
<Link to={itemPath} target={item.target}>
{item.icon && <Icon type={item.icon} />}
<span>{item.name}</span>
</Link>
......@@ -295,17 +300,21 @@ class BasicLayout extends React.PureComponent {
</Switch>
<GlobalFooter
links={[{
title: 'ๅธฎๅŠฉ',
href: '',
title: 'Pro ้ฆ–้กต',
href: 'http://pro.ant.design',
blankTarget: true,
}, {
title: '้š็ง',
href: '',
title: 'ๆ–‡ๆกฃ',
href: 'http://pro.ant.design/docs/getting-started',
}, {
title: 'ๆกๆฌพ',
href: '',
blankTarget: true,
title: 'GitHub',
href: 'https://github.com/ant-design/ant-design-pro',
}]}
copyright={<div>Copyright <Icon type="copyright" /> 2017 ่š‚่š้‡‘ๆœไฝ“้ชŒๆŠ€ๆœฏ้ƒจๅ‡บๅ“</div>}
copyright={
<div>
Copyright <Icon type="copyright" /> 2017 ่š‚่š้‡‘ๆœไฝ“้ชŒๆŠ€ๆœฏ้ƒจๅ‡บๅ“
</div>
}
/>
</Content>
</Layout>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment