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
A
ant-design-pro
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
ant-design-pro
Commits
cc5c8155
Commit
cc5c8155
authored
Apr 19, 2019
by
拷钉
Committed by
陈帅
Apr 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hiddenBreadcrumb && menu.disableLocal (#4009)
* menu.disableLocal * hiddenBreadcrumb * lint * lint
parent
edd2962e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
6 deletions
+17
-6
src/components/Authorized/CheckPermissions.js
src/components/Authorized/CheckPermissions.js
+1
-0
src/components/Authorized/PromiseRender.js
src/components/Authorized/PromiseRender.js
+1
-0
src/components/Authorized/Secured.js
src/components/Authorized/Secured.js
+1
-0
src/components/PageHeaderWrapper/breadcrumb.js
src/components/PageHeaderWrapper/breadcrumb.js
+5
-1
src/components/PageHeaderWrapper/index.js
src/components/PageHeaderWrapper/index.js
+9
-5
No files found.
src/components/Authorized/CheckPermissions.js
View file @
cc5c8155
import
React
from
'
react
'
;
// eslint-disable-next-line import/no-cycle
import
PromiseRender
from
'
./PromiseRender
'
;
import
{
CURRENT
}
from
'
./renderAuthorize
'
;
...
...
src/components/Authorized/PromiseRender.js
View file @
cc5c8155
import
{
Spin
}
from
'
antd
'
;
import
isEqual
from
'
lodash/isEqual
'
;
import
React
from
'
react
'
;
// eslint-disable-next-line import/no-cycle
import
{
isComponentClass
}
from
'
./Secured
'
;
export
default
class
PromiseRender
extends
React
.
Component
{
...
...
src/components/Authorized/Secured.js
View file @
cc5c8155
import
React
from
'
react
'
;
import
Exception
from
'
../Exception
'
;
// eslint-disable-next-line import/no-cycle
import
CheckPermissions
from
'
./CheckPermissions
'
;
/**
...
...
src/components/PageHeaderWrapper/breadcrumb.js
View file @
cc5c8155
...
...
@@ -3,6 +3,7 @@ import pathToRegexp from 'path-to-regexp';
import
Link
from
'
umi/link
'
;
import
{
formatMessage
}
from
'
umi-plugin-react/locale
'
;
import
{
urlToList
}
from
'
../_utils/pathTools
'
;
import
{
menu
}
from
'
../../defaultSettings
'
;
// 渲染Breadcrumb 子节点
// Render the Breadcrumb child node
...
...
@@ -21,7 +22,10 @@ const itemRender = (route, params, routes, paths) => {
const
renderItemLocal
=
item
=>
{
if
(
item
.
locale
)
{
return
formatMessage
({
id
:
item
.
locale
,
defaultMessage
:
item
.
name
});
const
name
=
menu
.
disableLocal
?
item
.
name
:
formatMessage
({
id
:
item
.
locale
,
defaultMessage
:
item
.
name
});
return
name
;
}
return
item
.
name
;
};
...
...
src/components/PageHeaderWrapper/index.js
View file @
cc5c8155
...
...
@@ -44,6 +44,7 @@ const PageHeaderWrapper = ({
content
,
logo
,
extraContent
,
hiddenBreadcrumb
,
...
restProps
})
=>
{
return
(
...
...
@@ -66,11 +67,14 @@ const PageHeaderWrapper = ({
}
key
=
"
pageheader
"
{...
restProps
}
breadcrumb
=
{
conversionBreadcrumbList
({
...
value
,
...
restProps
,
home
:
<
FormattedMessage
id
=
"
menu.home
"
defaultMessage
=
"
Home
"
/>
,
})}
breadcrumb
=
{
!
hiddenBreadcrumb
&&
conversionBreadcrumbList
({
...
value
,
...
restProps
,
home
:
<
FormattedMessage
id
=
"
menu.home
"
defaultMessage
=
"
Home
"
/>
,
})
}
className
=
{
styles
.
pageHeader
}
linkElement
=
{
Link
}
footer
=
{
renderFooter
(
restProps
)}
...
...
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