remove useless mock

This commit is contained in:
Baorong Li
2018-09-09 08:53:06 +08:00
parent ae8aba68f2
commit 417215cfcc
5 changed files with 7 additions and 48 deletions
+1 -3
View File
@@ -57,11 +57,9 @@ const Dashboard = Mock.mock({
},
],
user: {
name: 'zuiidea',
email: 'zuiiidea@.gmail.com',
name: 'github',
sales: 3241,
sold: 3556,
avatar: 'http://tva4.sinaimg.cn/crop.0.0.996.996.180/6ee6a3a3jw8f0ks5pk7btj20ro0rodi0.jpg',
},
'completed|12': [
{
-34
View File
@@ -88,40 +88,6 @@ let database = [
icon: 'area-chart',
route: '/chart/Recharts',
},
{
id: '6',
bpid: '1',
name: 'Test Navigation',
icon: 'setting',
},
{
id: '61',
bpid: '6',
mpid: '6',
name: 'Test Navigation1',
route: '/navigation/navigation1',
},
{
id: '62',
bpid: '6',
mpid: '6',
name: 'Test Navigation2',
route: '/navigation/navigation2',
},
{
id: '621',
bpid: '62',
mpid: '62',
name: 'Test Navigation21',
route: '/navigation/navigation2/navigation1',
},
{
id: '622',
bpid: '62',
mpid: '62',
name: 'Test Navigation22',
route: '/navigation/navigation2/navigation2',
},
]
module.exports = {
+2 -2
View File
@@ -20,14 +20,14 @@ const countUpProps = {
separator: ',',
}
function Cpu ({ usage, space, cpu, data }) {
function Cpu ({ usage=0, space=0, cpu=0, data }) {
return (
<div className={styles.cpu}>
<div className={styles.number}>
<div className={styles.item}>
<p>usage</p>
<p>
<CountUp end={usage || 0} suffix="GB" {...countUpProps} />
<CountUp end={usage} suffix="GB" {...countUpProps} />
</p>
</div>
<div className={styles.item}>
+2 -6
View File
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { Button } from 'antd'
import { Button, Icon } from 'antd'
import CountUp from 'react-countup'
import { color } from 'utils'
import styles from './user.less'
@@ -18,12 +18,8 @@ function User ({ avatar, name, email, sales, sold }) {
<div className={styles.user}>
<div className={styles.header}>
<div className={styles.headerinner}>
<div
className={styles.avatar}
style={{ backgroundImage: `url(${avatar})` }}
/>
<Icon className={styles.avatar} type="github" theme="outlined" />
<h5 className={styles.name}>{name}</h5>
<p>{email}</p>
</div>
</div>
<div className={styles.number}>
+2 -3
View File
@@ -16,7 +16,7 @@
&::after {
content: '';
background: #caa2d6;
background: #c5bec7;
position: absolute;
width: 100%;
height: 200px;
@@ -27,8 +27,7 @@
}
.avatar {
width: 64px;
height: 64px;
font-size: 48px;
background-position: center;
background-size: cover;
border-radius: 50%;