classic.md 2.33 KB
Newer Older
1 2 3 4 5 6 7 8
---
order: 1
title: Classic
---

典型结果页面。

````jsx
nikogu's avatar
nikogu committed
9
import Result from 'ant-design-pro/lib/Result';
10 11
import { Button, Row, Col, Icon, Steps } from 'antd';

afc163's avatar
afc163 committed
12
const { Step } = Steps;
13 14

const desc1 = (
15 16 17
  <div style={{ fontSize: 14, position: 'relative', left: 38 }}>
    <div style={{ marginTop: 8, marginBottom: 4 }}>
      曲丽丽
afc163's avatar
afc163 committed
18
      <Icon type="dingding" style={{ marginLeft: 8 }} />
ddcat1115's avatar
ddcat1115 committed
19
    </div>
20
    <div style={{ marginTop: 8, marginBottom: 4 }}>2016-12-12 12:32</div>
21 22 23 24
  </div>
);

const desc2 = (
25 26 27
  <div style={{ fontSize: 14, position: 'relative', left: 38 }}>
    <div style={{ marginTop: 8, marginBottom: 4 }}>
      周毛毛
afc163's avatar
afc163 committed
28
      <Icon type="dingding" style={{ color: '#00A0E9', marginLeft: 8 }} />
ddcat1115's avatar
ddcat1115 committed
29
    </div>
30
    <div style={{ marginTop: 8, marginBottom: 4 }}><a href="">催一下</a></div>
31 32 33 34 35
  </div>
);

const extra = (
  <div>
36
    <div style={{ fontSize: 16, color: 'rgba(0, 0, 0, 0.85)', fontWeight: 500, marginBottom: 20 }}>
37 38
      项目名称
    </div>
ddcat1115's avatar
ddcat1115 committed
39 40 41 42 43 44 45 46 47 48 49 50 51
    <Row style={{ marginBottom: 16 }}>
      <Col xs={24} sm={12} md={12} lg={12} xl={6}>
        <span style={{ color: 'rgba(0, 0, 0, 0.85)' }}>项目 ID:</span>
        23421
      </Col>
      <Col xs={24} sm={12} md={12} lg={12} xl={6}>
        <span style={{ color: 'rgba(0, 0, 0, 0.85)' }}>负责人:</span>
        曲丽丽
      </Col>
      <Col xs={24} sm={24} md={24} lg={24} xl={12}>
        <span style={{ color: 'rgba(0, 0, 0, 0.85)' }}>生效时间:</span>
        2016-12-12 ~ 2017-12-12
      </Col>
52 53 54 55 56 57 58 59 60 61 62 63
    </Row>
    <Steps progressDot current={1}>
      <Step title="创建项目" description={desc1} />
      <Step title="部门初审" description={desc2} />
      <Step title="财务复核" />
      <Step title="完成" />
    </Steps>
  </div>
);

const actions = (
  <div>
afc163's avatar
afc163 committed
64 65 66
    <Button type="primary">返回列表</Button>
    <Button>查看项目</Button>
    <Button>打 印</Button>
67 68 69 70 71 72 73 74 75 76
  </div>
);

ReactDOM.render(
  <Result
    type="success"
    title="提交成功"
    description="提交结果页用于反馈一系列操作任务的处理结果,如果仅是简单操作,使用 Message 全局提示反馈即可。本文字区域可以展示简单的补充说明,如果有类似展示“单据”的需求,下面这个灰色区域可以呈现比较复杂的内容。"
    extra={extra}
    actions={actions}
ddcat1115's avatar
ddcat1115 committed
77
    style={{ width: '100%' }}
78 79 80
  />
, mountNode);
````