afc163
8 years ago
9 changed files with 84 additions and 95 deletions
@ -0,0 +1,29 @@ |
|||
--- |
|||
order: 2 |
|||
title: |
|||
zh-CN: 固定 |
|||
en-US: Fixed Anchor |
|||
--- |
|||
|
|||
## zh-CN |
|||
|
|||
不会随页面滚动变化。 |
|||
|
|||
## en-US |
|||
|
|||
Do not change state when page is scrolling. |
|||
|
|||
```jsx |
|||
import { Anchor } from 'antd'; |
|||
const { Link } = Anchor; |
|||
|
|||
ReactDOM.render( |
|||
<Anchor affix={false}> |
|||
<Link href="#components-anchor-demo-basic" title="Basic demo" /> |
|||
<Link href="#components-anchor-demo-independ" title="Independ demo" /> |
|||
<Link href="#API" title="API" /> |
|||
<Link href="#Anchor-Props" title="Anchor Props" /> |
|||
<Link href="#Link-Props" title="Link Props" /> |
|||
</Anchor> |
|||
, mountNode); |
|||
``` |
@ -1,23 +0,0 @@ |
|||
--- |
|||
order: 2 |
|||
title: |
|||
zh-CN: 独立使用 AnchorLink |
|||
en-US: Independent AnchorLink |
|||
--- |
|||
|
|||
## zh-CN |
|||
|
|||
独立使用 AnchorLink |
|||
|
|||
## en-US |
|||
|
|||
Independent AnchorLink |
|||
|
|||
```jsx |
|||
import { Anchor } from 'antd'; |
|||
const { Link } = Anchor; |
|||
|
|||
ReactDOM.render( |
|||
<Link href="#components-anchor-demo-basic" title="Basic" /> |
|||
, mountNode); |
|||
``` |
@ -1,28 +0,0 @@ |
|||
--- |
|||
order: 1 |
|||
title: |
|||
zh-CN: 嵌套的 AnchorLink |
|||
en-US: Mixed AnchorLink |
|||
--- |
|||
|
|||
## zh-CN |
|||
|
|||
最简单的用法。 |
|||
|
|||
## en-US |
|||
|
|||
The simplest usage. |
|||
|
|||
```jsx |
|||
import { Anchor } from 'antd'; |
|||
const { Link } = Anchor; |
|||
|
|||
ReactDOM.render( |
|||
<Anchor offsetTop={100}> |
|||
<Link href="#components-anchor-demo-basic" title="Bacis"> |
|||
<Link href="#components-anchor-demo-mix" title="Mixed AnchorLink" /> |
|||
</Link> |
|||
<Link href="#components-anchor-demo-independ" title="Independent AnchorLink" /> |
|||
</Anchor> |
|||
, mountNode); |
|||
``` |
Loading…
Reference in new issue