Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pro-blocks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
pro-blocks
Commits
0148ddb3
Commit
0148ddb3
authored
Oct 25, 2017
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add document links
parent
9867f6e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
10 deletions
+29
-10
src/common/nav.js
src/common/nav.js
+10
-0
src/layouts/BasicLayout.js
src/layouts/BasicLayout.js
+19
-10
No files found.
src/common/nav.js
View file @
0148ddb3
import
BasicLayout
from
'
../layouts/BasicLayout
'
;
import
BasicLayout
from
'
../layouts/BasicLayout
'
;
import
UserLayout
from
'
../layouts/UserLayout
'
;
import
UserLayout
from
'
../layouts/UserLayout
'
;
import
BlankLayout
from
'
../layouts/BlankLayout
'
;
import
Analysis
from
'
../routes/Dashboard/Analysis
'
;
import
Analysis
from
'
../routes/Dashboard/Analysis
'
;
import
Monitor
from
'
../routes/Dashboard/Monitor
'
;
import
Monitor
from
'
../routes/Dashboard/Monitor
'
;
...
@@ -172,6 +173,15 @@ const data = [{
...
@@ -172,6 +173,15 @@ const data = [{
component
:
RegisterResult
,
component
:
RegisterResult
,
}],
}],
}],
}],
},
{
component
:
BlankLayout
,
layout
:
'
BlankLayout
'
,
children
:
{
name
:
'
使用文档
'
,
path
:
'
http://pro.ant.design/docs/getting-started
'
,
target
:
'
_blank
'
,
icon
:
'
book
'
,
},
}];
}];
export
function
getNavData
()
{
export
function
getNavData
()
{
...
...
src/layouts/BasicLayout.js
View file @
0148ddb3
...
@@ -76,7 +76,12 @@ class BasicLayout extends React.PureComponent {
...
@@ -76,7 +76,12 @@ class BasicLayout extends React.PureComponent {
if
(
!
item
.
name
)
{
if
(
!
item
.
name
)
{
return
null
;
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
))
{
if
(
item
.
children
&&
item
.
children
.
some
(
child
=>
child
.
name
))
{
return
(
return
(
<
SubMenu
<
SubMenu
...
@@ -96,7 +101,7 @@ class BasicLayout extends React.PureComponent {
...
@@ -96,7 +101,7 @@ class BasicLayout extends React.PureComponent {
}
}
return
(
return
(
<
Menu
.
Item
key
=
{
item
.
key
||
item
.
path
}
>
<
Menu
.
Item
key
=
{
item
.
key
||
item
.
path
}
>
<
Link
to
=
{
itemPath
}
>
<
Link
to
=
{
itemPath
}
target
=
{
item
.
target
}
>
{
item
.
icon
&&
<
Icon
type
=
{
item
.
icon
}
/>
}
{
item
.
icon
&&
<
Icon
type
=
{
item
.
icon
}
/>
}
<
span
>
{
item
.
name
}
<
/span
>
<
span
>
{
item
.
name
}
<
/span
>
<
/Link
>
<
/Link
>
...
@@ -295,17 +300,21 @@ class BasicLayout extends React.PureComponent {
...
@@ -295,17 +300,21 @@ class BasicLayout extends React.PureComponent {
<
/Switch
>
<
/Switch
>
<
GlobalFooter
<
GlobalFooter
links
=
{[{
links
=
{[{
title
:
'
帮助
'
,
title
:
'
Pro 首页
'
,
href
:
''
,
href
:
'
http://pro.ant.design
'
,
blankTarget
:
true
,
},
{
},
{
title
:
'
隐私
'
,
title
:
'
文档
'
,
href
:
''
,
href
:
'
http://pro.ant.design/docs/getting-started
'
,
},
{
},
{
title
:
'
条款
'
,
title
:
'
GitHub
'
,
href
:
''
,
href
:
'
https://github.com/ant-design/ant-design-pro
'
,
blankTarget
:
true
,
}]}
}]}
copyright
=
{
<
div
>
Copyright
<
Icon
type
=
"
copyright
"
/>
2017
蚂蚁金服体验技术部出品
<
/div>
}
copyright
=
{
<
div
>
Copyright
<
Icon
type
=
"
copyright
"
/>
2017
蚂蚁金服体验技术部出品
<
/div
>
}
/
>
/
>
<
/Content
>
<
/Content
>
<
/Layout
>
<
/Layout
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment