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
fe26f899
Commit
fe26f899
authored
Jan 08, 2018
by
ddcat1115
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove useless code
parent
b290f01d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
120 deletions
+2
-120
src/components/GlobalHeader/index.js
src/components/GlobalHeader/index.js
+2
-2
src/routes/Dashboard.css
src/routes/Dashboard.css
+0
-5
src/routes/Dashboard.js
src/routes/Dashboard.js
+0
-101
src/routes/Dashboard.test.js
src/routes/Dashboard.test.js
+0
-12
No files found.
src/components/GlobalHeader/index.js
View file @
fe26f899
...
...
@@ -4,8 +4,8 @@ import moment from 'moment';
import
groupBy
from
'
lodash/groupBy
'
;
import
Debounce
from
'
lodash-decorators/debounce
'
;
import
{
Link
}
from
'
dva/router
'
;
import
NoticeIcon
from
'
../
../components/
NoticeIcon
'
;
import
HeaderSearch
from
'
../
../components/
HeaderSearch
'
;
import
NoticeIcon
from
'
../NoticeIcon
'
;
import
HeaderSearch
from
'
../HeaderSearch
'
;
import
styles
from
'
./index.less
'
;
const
{
Header
}
=
Layout
;
...
...
src/routes/Dashboard.css
deleted
100644 → 0
View file @
b290f01d
.normal
{
font-family
:
Georgia
,
sans-serif
;
margin-top
:
3em
;
text-align
:
center
;
}
src/routes/Dashboard.js
deleted
100644 → 0
View file @
b290f01d
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Row
,
Col
,
Card
,
Table
,
Icon
,
Divider
}
from
'
antd
'
;
const
columns
=
[{
title
:
'
Name
'
,
dataIndex
:
'
name
'
,
key
:
'
name
'
,
},
{
title
:
'
Age
'
,
dataIndex
:
'
age
'
,
key
:
'
age
'
,
},
{
title
:
'
Address
'
,
dataIndex
:
'
address
'
,
key
:
'
address
'
,
},
{
title
:
'
Action
'
,
key
:
'
action
'
,
render
:
(
text
,
record
)
=>
(
<
span
>
<
a
href
=
""
>
Action
一
{
record
.
name
}
<
/a
>
<
Divider
type
=
"
vertical
"
/>
<
a
href
=
""
>
Delete
<
/a
>
<
Divider
type
=
"
vertical
"
/>
<
a
href
=
""
className
=
"
ant-dropdown-link
"
>
More
actions
<
Icon
type
=
"
down
"
/>
<
/a
>
<
/span
>
),
}];
class
Dashboard
extends
PureComponent
{
componentDidMount
()
{
this
.
props
.
dispatch
({
type
:
'
user/fetch
'
,
});
}
render
()
{
const
{
user
:
{
list
},
loading
}
=
this
.
props
;
return
(
<
div
>
<
Row
gutter
=
{
24
}
>
<
Col
span
=
{
8
}
>
<
Card
bordered
=
{
false
}
>
<
p
>
卡片内容
<
/p
>
<
p
>
卡片内容
<
/p
>
<
p
>
卡片内容
<
/p
>
<
/Card
>
<
/Col
>
<
Col
span
=
{
8
}
>
<
Card
bordered
=
{
false
}
>
<
p
>
卡片内容
<
/p
>
<
p
>
卡片内容
<
/p
>
<
p
>
卡片内容
<
/p
>
<
/Card
>
<
/Col
>
<
Col
span
=
{
8
}
>
<
Card
bordered
=
{
false
}
>
<
p
>
卡片内容
<
/p
>
<
p
>
卡片内容
<
/p
>
<
p
>
卡片内容
<
/p
>
<
/Card
>
<
/Col
>
<
/Row
>
<
Row
gutter
=
{
24
}
style
=
{{
marginTop
:
24
}}
>
<
Col
span
=
{
12
}
>
<
Card
bordered
=
{
false
}
>
<
p
>
卡片内容
<
/p
>
<
p
>
卡片内容
<
/p
>
<
p
>
卡片内容
<
/p
>
<
/Card
>
<
/Col
>
<
Col
span
=
{
12
}
>
<
Card
bordered
=
{
false
}
>
<
p
>
卡片内容
<
/p
>
<
p
>
卡片内容
<
/p
>
<
p
>
卡片内容
<
/p
>
<
/Card
>
<
/Col
>
<
/Row
>
<
Row
gutter
=
{
24
}
style
=
{{
marginTop
:
24
}}
>
<
Col
span
=
{
24
}
>
<
Card
title
=
"
业务表格
"
bordered
=
{
false
}
extra
=
{
<
Icon
type
=
"
setting
"
/>
}
>
<
Table
dataSource
=
{
list
}
loading
=
{
loading
}
columns
=
{
columns
}
/
>
<
/Card
>
<
/Col
>
<
/Row
>
<
/div
>
);
}
}
export
default
connect
(({
user
,
loading
})
=>
({
user
,
loading
:
loading
.
effects
[
'
user/fetch
'
],
}))(
Dashboard
);
src/routes/Dashboard.test.js
deleted
100644 → 0
View file @
b290f01d
import
React
from
'
react
'
;
import
{
shallow
}
from
'
enzyme
'
;
import
Dashboard
from
'
./Dashboard
'
;
it
(
'
renders Dashboard
'
,
()
=>
{
const
fetchFn
=
jest
.
fn
();
const
wrapper
=
shallow
(
<
Dashboard
.
WrappedComponent
user
=
{{
list
:
[]
}}
dispatch
=
{
fetchFn
}
/
>
);
expect
(
wrapper
.
find
(
'
Table
'
).
props
().
dataSource
).
toEqual
([]);
expect
(
fetchFn
).
toBeCalled
();
});
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