Commit e5dd0ecc authored by afc163's avatar afc163

Use Divider component

parent a50a4faa
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { Row, Col, Card, Table, Icon } from 'antd';
import { Row, Col, Card, Table, Icon, Divider } from 'antd';
const columns = [{
title: 'Name',
......@@ -20,9 +20,9 @@ const columns = [{
render: (text, record) => (
<span>
<a href="">Action {record.name}</a>
<span className="ant-divider" />
<Divider type="vertical" />
<a href="">Delete</a>
<span className="ant-divider" />
<Divider type="vertical" />
<a href="" className="ant-dropdown-link">
More actions <Icon type="down" />
</a>
......
import React, { PureComponent } from 'react';
import { Table, Button, Input, message, Popconfirm } from 'antd';
import { Table, Button, Input, message, Popconfirm, Divider } from 'antd';
import styles from './style.less';
export default class TableForm extends PureComponent {
......@@ -177,7 +177,7 @@ export default class TableForm extends PureComponent {
return (
<span>
<a onClick={e => this.saveRow(e, record.key)}>保存</a>
<span className="ant-divider" />
<Divider type="vertical" />
<a onClick={e => this.remove(e, record.key)}>删除</a>
</span>
);
......@@ -185,7 +185,7 @@ export default class TableForm extends PureComponent {
return (
<span>
<a onClick={e => this.saveRow(e, record.key)}>保存</a>
<span className="ant-divider" />
<Divider type="vertical" />
<a onClick={e => this.cancel(e, record.key)}>取消</a>
</span>
);
......@@ -193,7 +193,7 @@ export default class TableForm extends PureComponent {
return (
<span>
<a onClick={e => this.toggleEditable(e, record.key)}>编辑</a>
<span className="ant-divider" />
<Divider type="vertical" />
<Popconfirm title="是否要删除此行?" onConfirm={() => this.remove(record.key)}>
<a>删除</a>
</Popconfirm>
......
import React, { Component } from 'react';
import { connect } from 'dva';
import { Button, Menu, Dropdown, Icon, Row, Col, Steps, Card, Popover, Badge, Table, Tooltip } from 'antd';
import { Button, Menu, Dropdown, Icon, Row, Col, Steps, Card, Popover, Badge, Table, Tooltip, Divider } from 'antd';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import DescriptionList from '../../components/DescriptionList';
import EditableItem from '../../components/EditableItem';
......@@ -229,13 +229,13 @@ export default class AdvancedProfile extends Component {
<Description term="过期时间">2017-08-08</Description>
<Description term="描述">这段描述很长很长很长很长很长很长很长很长很长很长很长很长很长很长...</Description>
</DescriptionList>
<div className={styles.divider} />
<Divider style={{ marginBottom: 16 }} />
<DescriptionList style={{ marginBottom: 16 }} title="组名称" col="1">
<Description term="学名">
Citrullus lanatus (Thunb.) Matsum. et Nakai一年生蔓生藤本枝粗壮具明显的棱卷须较粗..
</Description>
</DescriptionList>
<div className={styles.divider} />
<Divider style={{ marginBottom: 16 }} />
<DescriptionList title="组名称">
<Description term="负责人">付小小</Description>
<Description term="角色码">1234568</Description>
......
......@@ -18,10 +18,3 @@
.textSecondary {
color: @text-color-secondary;
}
.divider {
border: 0;
border-top: 1px solid @border-color-split;
height: 1px;
margin: 0 0 16px 0;
}
import React, { Component } from 'react';
import { connect } from 'dva';
import { Card, Badge, Table } from 'antd';
import { Card, Badge, Table, Divider } from 'antd';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import DescriptionList from '../../components/DescriptionList';
import styles from './BasicProfile.less';
......@@ -133,7 +133,7 @@ export default class BasicProfile extends Component {
<Description term="销售单号">1234123421</Description>
<Description term="子订单">3214321432</Description>
</DescriptionList>
<div className={styles.divider} />
<Divider style={{ marginBottom: 32 }} />
<DescriptionList title="用户信息" style={{ marginBottom: 32 }}>
<Description term="用户姓名">付小小</Description>
<Description term="联系电话">18100000000</Description>
......@@ -141,7 +141,7 @@ export default class BasicProfile extends Component {
<Description term="取货地址">浙江省杭州市西湖区万塘路18号</Description>
<Description term="备注"></Description>
</DescriptionList>
<div className={styles.divider} />
<Divider style={{ marginBottom: 32 }} />
<div className={styles.title}>退货商品</div>
<Table
style={{ marginBottom: 24 }}
......
@import "~antd/lib/style/themes/default.less";
.divider {
border: 0;
border-top: 1px solid @border-color-split;
height: 1px;
margin: 0 0 32px 0;
}
.title {
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
......@@ -18,4 +11,3 @@
text-align: right!important;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment