2016-10-28 14:02:55 +08:00
|
|
|
---
|
|
|
|
order: 0
|
|
|
|
title:
|
|
|
|
zh-CN: 基本
|
|
|
|
en-US: Basic
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
最简单的用法。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
The simplest usage.
|
|
|
|
|
2020-01-21 16:21:37 +08:00
|
|
|
```tsx
|
2016-11-03 16:45:13 +08:00
|
|
|
import { Anchor } from 'antd';
|
2022-05-21 22:14:15 +08:00
|
|
|
import React from 'react';
|
2018-06-27 15:55:04 +08:00
|
|
|
|
2016-11-07 11:04:36 +08:00
|
|
|
const { Link } = Anchor;
|
2016-10-28 14:02:55 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2016-10-28 14:02:55 +08:00
|
|
|
<Anchor>
|
2016-11-09 14:22:38 +08:00
|
|
|
<Link href="#components-anchor-demo-basic" title="Basic demo" />
|
2019-01-09 23:40:47 +08:00
|
|
|
<Link href="#components-anchor-demo-static" title="Static demo" />
|
2016-11-09 15:26:22 +08:00
|
|
|
<Link href="#API" title="API">
|
|
|
|
<Link href="#Anchor-Props" title="Anchor Props" />
|
|
|
|
<Link href="#Link-Props" title="Link Props" />
|
|
|
|
</Link>
|
2022-04-03 23:27:45 +08:00
|
|
|
</Anchor>
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2016-11-09 14:22:38 +08:00
|
|
|
```
|
2016-11-09 14:45:50 +08:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.code-box-demo .ant-affix {
|
|
|
|
z-index: 11;
|
|
|
|
}
|
|
|
|
</style>
|