This commit is contained in:
zuiidea
2016-12-06 23:34:11 +08:00
parent 8021306124
commit 79e1608ece
3 changed files with 26 additions and 12 deletions
+16 -4
View File
@@ -10,13 +10,14 @@
- 基于[Mock](https://github.com/nuysoft/Mock)实现脱离后端独立开发。
- 基于Antd UI 设计语言,提供后台管理系统常见使用场景。
## to do list
## To do list
- [x] 登录示例
- [x] 主布局示例
- [x] 数据列表
- [ ] 数据列表交互动效
- [x] 表单相关
- [ ] dashbord首页
- [ ] 可视化图表
- [ ] dashbord页面(部分完成)
- [ ] 可视化图表示例
## 开发及构建
@@ -70,9 +71,20 @@ npm run build
生成dist目录
```
### 注意事项
- 生产环境中,已有数据接口,请将`src/utils/index.js`第四行 `require('./mock.js')`注释
- 开发环境中,如再mock目录新增文件,请在`src/utils/mock.js`第二行的`mockData`数组中添加
- 如需重写异步请求函数,请修改`src/utils/request.js`
- 如需重写antd样式配置,请修改`src/theme.js`
- 项目配置文件在`src/utils/config.js`
## 参考
https://github.com/dvajs/dva/tree/master/examples/user-dashboard
用户列表:https://github.com/dvajs/dva/tree/master/examples/user-dashboard
dashboard设计稿:
## 截屏
+1 -1
View File
@@ -28,7 +28,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 60px;
margin-right: 64px;
text-align: right;
&:last-child{
font-weight: 100;
+9 -7
View File
@@ -34,16 +34,18 @@ const numberCardData = [
}
]
const quoteProps={
name:'Joho Doe',
title:'Graphic Designer',
content:`I'm selfish, impatient and a little insecure. I make mistakes, I am out of control and at times hard to handle. But if you can't handle me at my worst, then you sure as hell don't deserve me at my best.`,
avatar:'http://img.hb.aicdn.com/bc442cf0cc6f7940dcc567e465048d1a8d634493198c4-sPx5BR_fw236',
}
function Dashboard() {
const numberCards = numberCardData.map((item,key) => <Col key={key} lg={6} md={12}>
<NumberCard {...item}/>
</Col>)
const quoteProps={
name:'Joho Doe',
title:'Graphic Designer',
content:`I'm selfish, impatient and a little insecure. I make mistakes, I am out of control and at times hard to handle. But if you can't handle me at my worst, then you sure as hell don't deserve me at my best.`,
avatar:'http://img.hb.aicdn.com/bc442cf0cc6f7940dcc567e465048d1a8d634493198c4-sPx5BR_fw236',
}
return (<Row gutter={24}>
{numberCards}
<Col lg={18} md={24}>
@@ -59,7 +61,7 @@ function Dashboard() {
</Card>
</Col>
<Col lg={24} md={12}>
<Card bordered={false} bodyStyle={{padding:0,height:204,background:color.purple}}></Card>
<Card bordered={false} bodyStyle={{padding:0,height:204,background:color.red}}></Card>
</Col>
</Row>
</Col>