Browse Source
* docs: 5.0.0 changelog * chore: bump version * chore: english changelog * chore: code clean * docs: add missing break line * docs: eng version pretter * chore: update * chore: clean * chore: remove backtop doc * chore: update changelog * chore: code clean * docs: update * rm eng log Co-authored-by: 二货机器人 <smith3816@gmail.com>pull/38619/head
MadCcc
2 years ago
committed by
GitHub
7 changed files with 160 additions and 6831 deletions
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,34 +0,0 @@ |
|||
--- |
|||
category: Components |
|||
title: BackTop |
|||
cover: https://gw.alipayobjects.com/zos/alicdn/tJZ5jbTwX/BackTop.svg |
|||
demo: |
|||
cols: 2 |
|||
group: Other |
|||
--- |
|||
|
|||
`BackTop` makes it easy to go back to the top of the page. |
|||
|
|||
## When To Use |
|||
|
|||
- When the page content is very long. |
|||
- When you need to go back to the top very frequently in order to view the contents. |
|||
|
|||
## Examples |
|||
|
|||
<!-- prettier-ignore --> |
|||
<code src="./demo/basic.tsx">Basic</code> |
|||
<code src="./demo/custom.tsx" iframe="400">Custom style</code> |
|||
|
|||
## API |
|||
|
|||
> The distance to the bottom is set to `50px` by default, which is overridable. |
|||
> |
|||
> If you decide to use custom styles, please note the size limit: no more than `40px * 40px`. |
|||
|
|||
| Property | Description | Type | Default | Version | |
|||
| --- | --- | --- | --- | --- | |
|||
| duration | Time to return to top(ms) | number | 450 | 4.4.0 | |
|||
| target | Specifies the scrollable area dom node | () => HTMLElement | () => window | | |
|||
| visibilityHeight | The BackTop button will not show until the scroll height reaches this value | number | 400 | | |
|||
| onClick | A callback function, which can be executed when you click the button | function | - | | |
@ -1,35 +0,0 @@ |
|||
--- |
|||
category: Components |
|||
subtitle: 回到顶部 |
|||
title: BackTop |
|||
cover: https://gw.alipayobjects.com/zos/alicdn/tJZ5jbTwX/BackTop.svg |
|||
demo: |
|||
cols: 2 |
|||
group: 其他 |
|||
--- |
|||
|
|||
返回页面顶部的操作按钮。 |
|||
|
|||
## 何时使用 |
|||
|
|||
- 当页面内容区域比较长时; |
|||
- 当用户需要频繁返回顶部查看相关内容时。 |
|||
|
|||
## 代码演示 |
|||
|
|||
<!-- prettier-ignore --> |
|||
<code src="./demo/basic.tsx">基本</code> |
|||
<code src="./demo/custom.tsx" iframe="400">自定义样式</code> |
|||
|
|||
## API |
|||
|
|||
> 有默认样式,距离底部 `50px`,可覆盖。 |
|||
> |
|||
> 自定义样式宽高不大于 40px \* 40px。 |
|||
|
|||
| 参数 | 说明 | 类型 | 默认值 | 版本 | |
|||
| --- | --- | --- | --- | --- | |
|||
| duration | 回到顶部所需时间(ms) | number | 450 | 4.4.0 | |
|||
| target | 设置需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数 | () => HTMLElement | () => window | | |
|||
| visibilityHeight | 滚动高度达到此参数值才出现 BackTop | number | 400 | | |
|||
| onClick | 点击按钮的回调函数 | function | - | | |
Loading…
Reference in new issue