ant-design/components/popover/demo/arrow-point-at-center.md

40 lines
768 B
Markdown
Raw Normal View History

---
order: 4
2016-09-29 13:43:55 +08:00
title:
2019-05-07 14:57:32 +08:00
zh-CN: 箭头指向
2016-09-29 13:43:55 +08:00
en-US: Arrow pointing
---
2016-09-29 13:43:55 +08:00
## zh-CN
设置了 `arrowPointAtCenter` 后,箭头将指向目标元素的中心。
2016-09-29 13:43:55 +08:00
## en-US
The arrow points to the center of the target element, which set `arrowPointAtCenter`.
```tsx
2022-05-23 14:37:16 +08:00
import { Button, Popover } from 'antd';
import React from 'react';
const content = (
<>
2016-09-29 13:43:55 +08:00
<p>Content</p>
<p>Content</p>
</>
);
const App: React.FC = () => (
<>
<Popover placement="topLeft" title="Title" content={content}>
2016-10-07 15:20:10 +08:00
<Button>Align edge / 边缘对齐</Button>
</Popover>
<Popover placement="topLeft" title="Title" content={content} arrowPointAtCenter>
2016-10-07 15:20:10 +08:00
<Button>Arrow points to center / 箭头指向中心</Button>
</Popover>
</>
2018-11-28 15:00:03 +08:00
);
export default App;
2019-05-07 14:57:32 +08:00
```