Browse Source

docs: backTop tranlation (#2244)

pull/2338/head
ddcat1115 8 years ago
committed by Benjy Cui
parent
commit
3c1a9c6939
  1. 10
      components/back-top/demo/basic.md
  2. 11
      components/back-top/demo/custom.md
  3. 25
      components/back-top/index.en-US.md
  4. 3
      components/back-top/index.zh-CN.md

10
components/back-top/demo/basic.md

@ -1,10 +1,18 @@
--- ---
order: 0 order: 0
title: 基本 title:
zh-CN: 基本
en-US: Basic
--- ---
## zh-CN
最简单的用法。 最简单的用法。
## en-US
The most basic usage.
````jsx ````jsx
import { BackTop } from 'antd'; import { BackTop } from 'antd';

11
components/back-top/demo/custom.md

@ -1,10 +1,19 @@
--- ---
order: 1 order: 1
title: 自定义样式 title:
zh-CN: 自定义样式
en-US: Custom style
--- ---
## zh-CN
可以自定义置顶按钮的样式,限制宽高:`40px * 40px`。 可以自定义置顶按钮的样式,限制宽高:`40px * 40px`。
## en-US
You can customize the style of the button, just note the size limit: no more than `40px * 40px`.
````jsx ````jsx
import { BackTop } from 'antd'; import { BackTop } from 'antd';

25
components/back-top/index.en-US.md

@ -0,0 +1,25 @@
---
category: Components
type: Other
title: BackTop
---
`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.
## 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
-----|-----|-----|------
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 | -

3
components/back-top/index.md → components/back-top/index.zh-CN.md

@ -1,7 +1,7 @@
--- ---
category: Components category: Components
chinese: 置顶
type: Other type: Other
chinese: 置顶
english: BackTop english: BackTop
--- ---
@ -15,6 +15,7 @@ english: BackTop
## API ## API
> 有默认样式,距离底部 `50px`,可覆盖。 > 有默认样式,距离底部 `50px`,可覆盖。
> 自定义样式宽高不大于 40px * 40px。 > 自定义样式宽高不大于 40px * 40px。
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
Loading…
Cancel
Save