naive-ui/demo/documentation/components/anchor/enUS/index.md

20 lines
669 B
Markdown
Raw Normal View History

2019-10-12 23:22:52 +08:00
# Anchor
<!--single-column-->
2020-01-29 21:35:19 +08:00
The demo used to use some charactor names from *Hard-Boiled Wonderland and the End of the World* as anchor links, but if so there will be too wired in this page. So I rewrite them. What a pity.
2020-01-29 20:51:51 +08:00
## Demos
2019-10-12 23:22:52 +08:00
```demo
basic
2019-12-09 12:49:51 +08:00
affix
scrollto
2020-01-29 20:51:51 +08:00
```
## Props
|Name|Type|Default|Description|
|-|-|-|-|
|affix|`boolean`|`false`|If it works like a affix. If set to `true`, it will recieve props from [affix](n-affix#Props)|
|target|`() => HTMLElement`|A function that returns the nearest scrollable ascendant element|The element that anchor listens to scroll event.|
|bound|`number`|`12`||
## Methods
|Method|Description|
|-|-|
|`scrollTo(href: string)`||