Commit 9b55900d authored by ddcat1115's avatar ddcat1115

fix button list rule

parent 52f53560
......@@ -8,9 +8,10 @@ title: Standard
````jsx
import PageHeader from 'ant-design-pro/lib/PageHeader';
import DescriptionList from 'ant-design-pro/lib/DescriptionList';
import { Button, Menu, Icon, Row, Col } from 'antd';
import { Button, Menu, Dropdown, Icon, Row, Col } from 'antd';
const { Description } = DescriptionList;
const ButtonGroup = Button.Group;
const description = (
<DescriptionList col="2">
......@@ -31,8 +32,13 @@ const menu = (
const action = (
<div>
<Button>操作</Button>
<Button>操作</Button>
<ButtonGroup>
<Button>操作</Button>
<Button>操作</Button>
<Dropdown overlay={menu} placement="bottomRight">
<Button><Icon type="ellipsis" /></Button>
</Dropdown>
</ButtonGroup>
<Button type="primary">主操作</Button>
</div>
);
......
......@@ -118,10 +118,14 @@
.pageHeader {
.action {
:global {
.ant-btn-group, :not(.ant-btn-group) .ant-btn {
.ant-btn-group, .ant-btn {
display: block;
margin-bottom: 8px;
}
.ant-btn-group > .ant-btn {
display: inline-block;
margin-bottom: 0;
}
}
}
}
......
......@@ -10,6 +10,7 @@ import styles from './AdvancedProfile.less';
const { Step } = Steps;
const { Description } = DescriptionList;
const ButtonGroup = Button.Group;
const getWindowWidth = () => (window.innerWidth || document.documentElement.clientWidth);
......@@ -23,13 +24,13 @@ const menu = (
const action = (
<div>
<Button>操作</Button>
<Button>操作</Button>
<Dropdown overlay={menu}>
<Button>
更多 <Icon type="down" />
</Button>
</Dropdown>
<ButtonGroup>
<Button>操作</Button>
<Button>操作</Button>
<Dropdown overlay={menu} placement="bottomRight">
<Button><Icon type="ellipsis" /></Button>
</Dropdown>
</ButtonGroup>
<Button type="primary">主操作</Button>
</div>
);
......
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