docs: update docs detail

This commit is contained in:
Benjy Cui 2016-10-30 12:43:59 +08:00
parent 2cb147f96d
commit a7d335ec7a
7 changed files with 44 additions and 32 deletions

View File

@ -19,7 +19,8 @@ import { BackTop } from 'antd';
ReactDOM.render( ReactDOM.render(
<div> <div>
<BackTop /> <BackTop />
Scroll down to see the bottom right gray button. Scroll down to see the bottom right <strong>gray</strong> button.
</div> </div>,
, mountNode); mountNode
);
```` ````

View File

@ -17,23 +17,29 @@ You can customize the style of the button, just note the size limit: no more tha
````jsx ````jsx
import { BackTop } from 'antd'; import { BackTop } from 'antd';
const style = {
height: 40,
width: 40,
lineHeight: '40px',
borderRadius: 4,
backgroundColor: '#57c5f7',
color: '#fff',
textAlign: 'center',
fontSize: 20,
};
ReactDOM.render( ReactDOM.render(
<div> <div>
<BackTop style={{ bottom: 100 }}> <BackTop>
<div style={style}>UP</div> <div className="ant-back-top-inner">UP</div>
</BackTop> </BackTop>
Scroll down to see the bottom right blue button. Scroll down to see the bottom right <strong>blue</strong> button.
</div> </div>,
, mountNode); 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;
}
```` ````

View File

@ -20,9 +20,12 @@ If a large or small button is desired, set the `size` property to either `large`
````jsx ````jsx
import { Button } from 'antd'; import { Button } from 'antd';
ReactDOM.render(<div> ReactDOM.render(
<Button type="primary" size="large">Large</Button> <div>
<Button type="primary">Default</Button> <Button type="primary" size="large">Large</Button>
<Button type="primary" size="small">Small</Button> <Button type="primary">Default</Button>
</div>, mountNode); <Button type="primary" size="small">Small</Button>
</div>,
mountNode
);
```` ````

View File

@ -101,8 +101,9 @@ If you use `react@<15.3.0`, then, you can't use `getFieldDecorator` in stateless
### Form.Item ### Form.Item
> * If Form.Item has multiple children, `help`, `required`, and `validateStatus` can't be generated automatically. Note:
> * Form controls must be child of Form.Item, otherwise, you need to set `help`, `required` and `validateStatus` by yourself. * 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 | | Property | Description | Type | Optional | Default Value |
|-----------|------------------------------------------|-----------|-------|--------| |-----------|------------------------------------------|-----------|-------|--------|

View File

@ -102,8 +102,9 @@ CustomizedForm = Form.create({})(CustomizedForm);
### Form.Item ### 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`,嵌套情况需要自行设置。
| 参数 | 说明 | 类型 | 可选值 | 默认值 | | 参数 | 说明 | 类型 | 可选值 | 默认值 |
|-----------|------------------------------------------|-----------|-------|--------| |-----------|------------------------------------------|-----------|-------|--------|

View File

@ -60,8 +60,8 @@ ReactDOM.render(<IconSet className="icons" catigory="other" />, mountNode);
| Property | Description | Type | Default | | Property | Description | Type | Default |
|----------|------------------|------- |---------| |----------|------------------|------- |---------|
| type | Type of ant design icons | String | - | | type | Type of ant design icons | string | - |
| spin | Rotate icon with animation | Boolean | false | | spin | Rotate icon with animation | boolean | false |
<style> <style>
.markdown .icons { .markdown .icons {

View File

@ -61,8 +61,8 @@ ReactDOM.render(<IconSet className="icons" catigory="other" />, mountNode);
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
|----------|------------------|----------|--------| |----------|------------------|----------|--------|
| type | 图标类型 | String | - | | type | 图标类型 | string | - |
| spin | 是否有旋转动画 | Boolean | false | | spin | 是否有旋转动画 | boolean | false |
<style> <style>
.markdown .icons { .markdown .icons {