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
189c5882
Commit
189c5882
authored
Jan 25, 2019
by
陈帅
Committed by
陈小聪
Jan 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove PureComponent (#3470)
* remove PureComponent * fix typo
parent
b095b0bc
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
41 deletions
+25
-41
src/components/SiderMenu/SiderMenu.js
src/components/SiderMenu/SiderMenu.js
+1
-1
src/components/SiderMenu/index.less
src/components/SiderMenu/index.less
+2
-2
src/layouts/BasicLayout.js
src/layouts/BasicLayout.js
+1
-1
src/layouts/Header.js
src/layouts/Header.js
+2
-2
src/layouts/UserLayout.js
src/layouts/UserLayout.js
+19
-35
No files found.
src/components/SiderMenu/SiderMenu.js
View file @
189c5882
...
...
@@ -51,7 +51,7 @@ export default class SiderMenu extends PureComponent {
const
defaultProps
=
collapsed
?
{}
:
{
openKeys
};
const
siderClassName
=
classNames
(
styles
.
sider
,
{
[
styles
.
fixSider
b
ar
]:
fixSiderbar
,
[
styles
.
fixSider
B
ar
]:
fixSiderbar
,
[
styles
.
light
]:
theme
===
'
light
'
,
});
return
(
...
...
src/components/SiderMenu/index.less
View file @
189c5882
...
...
@@ -25,13 +25,13 @@
font-weight: 600;
}
}
.sider {
min-height: 100vh;
box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
position: relative;
z-index: 10;
&.fixSiderbar {
&.fixSiderBar {
box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
position: fixed;
top: 0;
left: 0;
...
...
src/layouts/BasicLayout.js
View file @
189c5882
...
...
@@ -51,7 +51,7 @@ const query = {
},
};
class
BasicLayout
extends
React
.
Pure
Component
{
class
BasicLayout
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
getPageTitle
=
memoizeOne
(
this
.
getPageTitle
);
...
...
src/layouts/Header.js
View file @
189c5882
import
React
,
{
Pure
Component
}
from
'
react
'
;
import
React
,
{
Component
}
from
'
react
'
;
import
{
formatMessage
}
from
'
umi/locale
'
;
import
{
Layout
,
message
}
from
'
antd
'
;
import
Animate
from
'
rc-animate
'
;
...
...
@@ -10,7 +10,7 @@ import styles from './Header.less';
const
{
Header
}
=
Layout
;
class
HeaderView
extends
Pure
Component
{
class
HeaderView
extends
Component
{
state
=
{
visible
:
true
,
};
...
...
src/layouts/UserLayout.js
View file @
189c5882
...
...
@@ -31,21 +31,7 @@ const copyright = (
<
/Fragment
>
);
class
UserLayout
extends
React
.
PureComponent
{
// @TODO title
// getPageTitle() {
// const { routerData, location } = this.props;
// const { pathname } = location;
// let title = 'Ant Design Pro';
// if (routerData[pathname] && routerData[pathname].name) {
// title = `${routerData[pathname].name} - Ant Design Pro`;
// }
// return title;
// }
render
()
{
const
{
children
}
=
this
.
props
;
return
(
const
UserLayout
=
({
children
})
=>
(
// @TODO <DocumentTitle title={this.getPageTitle()}>
<
div
className
=
{
styles
.
container
}
>
<
div
className
=
{
styles
.
lang
}
>
...
...
@@ -65,8 +51,6 @@ class UserLayout extends React.PureComponent {
<
/div
>
<
GlobalFooter
links
=
{
links
}
copyright
=
{
copyright
}
/
>
<
/div
>
);
}
}
);
export
default
UserLayout
;
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