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
a8ef08b6
Commit
a8ef08b6
authored
Jun 29, 2018
by
陈帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed #1750 Excessive loading in the workplace
parent
eaf60da7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
20 deletions
+22
-20
src/components/PageHeader/index.js
src/components/PageHeader/index.js
+3
-3
src/models/setting.js
src/models/setting.js
+1
-0
src/routes/Dashboard/Workplace.js
src/routes/Dashboard/Workplace.js
+18
-17
No files found.
src/components/PageHeader/index.js
View file @
a8ef08b6
import
React
,
{
PureComponent
,
createElement
}
from
'
react
'
;
import
pathToRegexp
from
'
path-to-regexp
'
;
import
{
Breadcrumb
,
Tabs
}
from
'
antd
'
;
import
{
Breadcrumb
,
Tabs
,
Card
}
from
'
antd
'
;
import
classNames
from
'
classnames
'
;
import
styles
from
'
./index.less
'
;
import
{
urlToList
}
from
'
../_utils/pathTools
'
;
...
...
@@ -190,7 +190,7 @@ export default class PageHeader extends PureComponent {
}
const
{
breadcrumb
}
=
this
.
state
;
return
(
<
div
className
=
{
clsString
}
>
<
Card
className
=
{
clsString
}
bodyStyle
=
{{
padding
:
0
}
}
>
{
breadcrumb
}
<
div
className
=
{
styles
.
detail
}
>
{
logo
&&
<
div
className
=
{
styles
.
logo
}
>
{
logo
}
<
/div>
}
...
...
@@ -216,7 +216,7 @@ export default class PageHeader extends PureComponent {
{
tabList
.
map
(
item
=>
<
TabPane
tab
=
{
item
.
tab
}
key
=
{
item
.
key
}
/>
)
}
<
/Tabs
>
)}
<
/
div
>
<
/
Card
>
);
}
}
src/models/setting.js
View file @
a8ef08b6
...
...
@@ -9,6 +9,7 @@ const defaultSetting = {
fixSiderbar
:
false
,
colorWeak
:
'
close
'
,
};
export
default
{
namespace
:
'
setting
'
,
state
:
defaultSetting
,
...
...
src/routes/Dashboard/Workplace.js
View file @
a8ef08b6
...
...
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
import
moment
from
'
moment
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Link
}
from
'
dva/router
'
;
import
{
Row
,
Col
,
Card
,
List
,
Avatar
,
Spin
}
from
'
antd
'
;
import
{
Row
,
Col
,
Card
,
List
,
Avatar
}
from
'
antd
'
;
import
{
Radar
}
from
'
components/Charts
'
;
import
EditableLinkGroup
from
'
components/EditableLinkGroup
'
;
...
...
@@ -117,23 +117,20 @@ export default class Workplace extends PureComponent {
chart
:
{
radarData
},
}
=
this
.
props
;
const
pageHeaderContent
=
(
<
Spin
spinning
=
{
currentUserLoading
}
>
{
currentUser
&&
Object
.
keys
(
currentUser
).
length
?
(
<
div
className
=
{
styles
.
pageHeaderContent
}
>
<
div
className
=
{
styles
.
avatar
}
>
<
Avatar
size
=
"
large
"
src
=
{
currentUser
.
avatar
}
/
>
<
/div
>
<
div
className
=
{
styles
.
content
}
>
<
div
className
=
{
styles
.
contentTitle
}
>
早安
,
{
currentUser
.
name
}
,
祝你开心每一天
!
<
/div
>
<
div
>
{
currentUser
.
title
}
|
{
currentUser
.
group
}
<
/div
>
const
pageHeaderContent
=
currentUser
&&
Object
.
keys
(
currentUser
).
length
?
(
<
div
className
=
{
styles
.
pageHeaderContent
}
>
<
div
className
=
{
styles
.
avatar
}
>
<
Avatar
size
=
"
large
"
src
=
{
currentUser
.
avatar
}
/
>
<
/div
>
<
div
className
=
{
styles
.
content
}
>
<
div
className
=
{
styles
.
contentTitle
}
>
早安
,
{
currentUser
.
name
}
,
祝你开心每一天
!
<
/div
>
<
div
>
{
currentUser
.
title
}
|
{
currentUser
.
group
}
<
/div
>
<
/div
>
)
:
null
}
<
/Spin
>
);
<
/div
>
)
:
null
;
const
extraContent
=
(
<
div
className
=
{
styles
.
extraContent
}
>
...
...
@@ -156,7 +153,11 @@ export default class Workplace extends PureComponent {
);
return
(
<
PageHeaderLayout
content
=
{
pageHeaderContent
}
extraContent
=
{
extraContent
}
>
<
PageHeaderLayout
loading
=
{
currentUserLoading
}
content
=
{
pageHeaderContent
}
extraContent
=
{
extraContent
}
>
<
Row
gutter
=
{
24
}
>
<
Col
xl
=
{
16
}
lg
=
{
24
}
md
=
{
24
}
sm
=
{
24
}
xs
=
{
24
}
>
<
Card
...
...
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