ant-design/components/popover/demo/placement.md
2015-06-24 19:20:47 +08:00

810 B

位置

  • order: 1

位置有四个方向。


var Popover = antd.Popover;
var text = <span>标题</span>;
var content = [
  <p>内容</p>,
  <p>内容</p>
];

React.render(<div>
  <Popover placement="left" title={text} overlay={content}>
    <button className="ant-btn"></button>
  </Popover>
  <Popover placement="right" title={text} overlay={content}>
    <button className="ant-btn"></button>
  </Popover>
  <Popover placement="top" title={text} overlay={content}>
    <button className="ant-btn"></button>
  </Popover>
  <Popover placement="bottom" title={text} overlay={content}>
    <button className="ant-btn"></button>
  </Popover>
</div>, document.getElementById('components-popover-demo-placement'));