mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
docs: update docs detail
This commit is contained in:
parent
2cb147f96d
commit
a7d335ec7a
@ -19,7 +19,8 @@ import { BackTop } from 'antd';
|
||||
ReactDOM.render(
|
||||
<div>
|
||||
<BackTop />
|
||||
Scroll down to see the bottom right gray button.
|
||||
</div>
|
||||
, mountNode);
|
||||
Scroll down to see the bottom right <strong>gray</strong> button.
|
||||
</div>,
|
||||
mountNode
|
||||
);
|
||||
````
|
||||
|
@ -17,23 +17,29 @@ You can customize the style of the button, just note the size limit: no more tha
|
||||
````jsx
|
||||
import { BackTop } from 'antd';
|
||||
|
||||
const style = {
|
||||
height: 40,
|
||||
width: 40,
|
||||
lineHeight: '40px',
|
||||
borderRadius: 4,
|
||||
backgroundColor: '#57c5f7',
|
||||
color: '#fff',
|
||||
textAlign: 'center',
|
||||
fontSize: 20,
|
||||
};
|
||||
|
||||
ReactDOM.render(
|
||||
<div>
|
||||
<BackTop style={{ bottom: 100 }}>
|
||||
<div style={style}>UP</div>
|
||||
<BackTop>
|
||||
<div className="ant-back-top-inner">UP</div>
|
||||
</BackTop>
|
||||
Scroll down to see the bottom right blue button.
|
||||
</div>
|
||||
, mountNode);
|
||||
Scroll down to see the bottom right <strong>blue</strong> button.
|
||||
</div>,
|
||||
mountNode
|
||||
);
|
||||
````
|
||||
|
||||
````css
|
||||
#components-back-top-demo-custom .ant-back-top {
|
||||
bottom: 100px;
|
||||
}
|
||||
#components-back-top-demo-custom .ant-back-top-inner {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 4px;
|
||||
background-color: #57c5f7;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
````
|
||||
|
@ -20,9 +20,12 @@ If a large or small button is desired, set the `size` property to either `large`
|
||||
````jsx
|
||||
import { Button } from 'antd';
|
||||
|
||||
ReactDOM.render(<div>
|
||||
<Button type="primary" size="large">Large</Button>
|
||||
<Button type="primary">Default</Button>
|
||||
<Button type="primary" size="small">Small</Button>
|
||||
</div>, mountNode);
|
||||
ReactDOM.render(
|
||||
<div>
|
||||
<Button type="primary" size="large">Large</Button>
|
||||
<Button type="primary">Default</Button>
|
||||
<Button type="primary" size="small">Small</Button>
|
||||
</div>,
|
||||
mountNode
|
||||
);
|
||||
````
|
||||
|
@ -101,8 +101,9 @@ If you use `react@<15.3.0`, then, you can't use `getFieldDecorator` in stateless
|
||||
|
||||
### Form.Item
|
||||
|
||||
> * If Form.Item has multiple children, `help`, `required`, and `validateStatus` can't be generated automatically.
|
||||
> * Form controls must be child of Form.Item, otherwise, you need to set `help`, `required` and `validateStatus` by yourself.
|
||||
Note:
|
||||
* If Form.Item has multiple children that had been decorated by `getFieldDecorator`, `help` and `required` and `validateStatus` can't be generated automatically.
|
||||
* Before `2.2.0`, form controls must be child of Form.Item, otherwise, you need to set `help`, `required` and `validateStatus` by yourself.
|
||||
|
||||
| Property | Description | Type | Optional | Default Value |
|
||||
|-----------|------------------------------------------|-----------|-------|--------|
|
||||
|
@ -102,8 +102,9 @@ CustomizedForm = Form.create({})(CustomizedForm);
|
||||
|
||||
### Form.Item
|
||||
|
||||
> * 一个 Form.Item 建议只放一个 child,有多个 child 时,`help` `required` `validateStatus` 无法自动生成。
|
||||
> * 只有当表单域为 Form.Item 的子元素时,才会自动生成 `help` `required` `validateStatus`,其它情况请自行设置。
|
||||
注意:
|
||||
* 一个 Form.Item 建议只放一个被 getFieldDecorator 装饰过的 child,当有多个被装饰过的 child 时,`help` `required` `validateStatus` 无法自动生成。
|
||||
* `2.2.0` 之前,只有当表单域为 Form.Item 的子元素时,才会自动生成 `help` `required` `validateStatus`,嵌套情况需要自行设置。
|
||||
|
||||
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
||||
|-----------|------------------------------------------|-----------|-------|--------|
|
||||
|
@ -60,8 +60,8 @@ ReactDOM.render(<IconSet className="icons" catigory="other" />, mountNode);
|
||||
|
||||
| Property | Description | Type | Default |
|
||||
|----------|------------------|------- |---------|
|
||||
| type | Type of ant design icons | String | - |
|
||||
| spin | Rotate icon with animation | Boolean | false |
|
||||
| type | Type of ant design icons | string | - |
|
||||
| spin | Rotate icon with animation | boolean | false |
|
||||
|
||||
<style>
|
||||
.markdown .icons {
|
||||
|
@ -61,8 +61,8 @@ ReactDOM.render(<IconSet className="icons" catigory="other" />, mountNode);
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|----------|------------------|----------|--------|
|
||||
| type | 图标类型 | String | - |
|
||||
| spin | 是否有旋转动画 | Boolean | false |
|
||||
| type | 图标类型 | string | - |
|
||||
| spin | 是否有旋转动画 | boolean | false |
|
||||
|
||||
<style>
|
||||
.markdown .icons {
|
||||
|
Loading…
Reference in New Issue
Block a user