mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
782 B
782 B
order | title | ||||
---|---|---|---|---|---|
4 |
|
zh-CN
设置了 arrowPointAtCenter
后,箭头将指向目标元素的中心。
en-US
The arrow points to the center of the target element, which set arrowPointAtCenter
.
import { Popover, Button } from 'antd';
const text = <span>Title</span>;
const content = (
<div>
<p>Content</p>
<p>Content</p>
</div>
);
ReactDOM.render(
<div>
<Popover placement="topLeft" title={text} content={content}>
<Button>Align edge of element by default.</Button>
</Popover>
<Popover placement="topLeft" title={text} content={content} arrowPointAtCenter>
<Button>The arrow points to the center of the target element.</Button>
</Popover>
</div>
, mountNode);