site: improve build speed

This commit is contained in:
Benjy Cui 2017-01-19 15:19:03 +08:00
parent e90189db8d
commit 3e17551b7e
309 changed files with 313 additions and 313 deletions

View File

@ -13,7 +13,7 @@ title:
The simplest usage. The simplest usage.
````jsx ````__react
import { Affix, Button } from 'antd'; import { Affix, Button } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
Callback with affixed state. Callback with affixed state.
````jsx ````__react
import { Affix, Button } from 'antd'; import { Affix, Button } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
Set a `target` for 'Affix', which is listen to scroll event of target element (default is `window`). Set a `target` for 'Affix', which is listen to scroll event of target element (default is `window`).
````jsx ````__react
import { Affix, Button } from 'antd'; import { Affix, Button } from 'antd';
class Demo extends React.Component { class Demo extends React.Component {

View File

@ -13,7 +13,7 @@ title:
When `Alert` is used as banner, it has particular style, Icon and `type`(warning) are specified by default. When `Alert` is used as banner, it has particular style, Icon and `type`(warning) are specified by default.
````jsx ````__react
import { Alert } from 'antd'; import { Alert } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
The simplest usage for short messages. The simplest usage for short messages.
````jsx ````__react
import { Alert } from 'antd'; import { Alert } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
To show close button. To show close button.
````jsx ````__react
import { Alert } from 'antd'; import { Alert } from 'antd';
const onClose = function (e) { const onClose = function (e) {

View File

@ -13,7 +13,7 @@ title:
Replace the default icon with customized text. Replace the default icon with customized text.
````jsx ````__react
import { Alert } from 'antd'; import { Alert } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
Additional description for alert message. Additional description for alert message.
````jsx ````__react
import { Alert } from 'antd'; import { Alert } from 'antd';
ReactDOM.render(<div> ReactDOM.render(<div>

View File

@ -13,7 +13,7 @@ title:
Decent icon make information more clear and more friendly. Decent icon make information more clear and more friendly.
````jsx ````__react
import { Alert } from 'antd'; import { Alert } from 'antd';
ReactDOM.render(<div> ReactDOM.render(<div>

View File

@ -13,7 +13,7 @@ title:
There are 4 types of Alert: `success`, `info`, `warning`, `error`. There are 4 types of Alert: `success`, `info`, `warning`, `error`.
````jsx ````__react
import { Alert } from 'antd'; import { Alert } from 'antd';
ReactDOM.render(<div> ReactDOM.render(<div>

View File

@ -13,7 +13,7 @@ title:
The simplest usage. The simplest usage.
```jsx ```__react
import { Anchor } from 'antd'; import { Anchor } from 'antd';
const { Link } = Anchor; const { Link } = Anchor;

View File

@ -13,7 +13,7 @@ title:
Do not change state when page is scrolling. Do not change state when page is scrolling.
```jsx ```__react
import { Anchor } from 'antd'; import { Anchor } from 'antd';
const { Link } = Anchor; const { Link } = Anchor;

View File

@ -13,7 +13,7 @@ title:
Basic Usage, set datasource of autocomplete with `dataSource` property. Basic Usage, set datasource of autocomplete with `dataSource` property.
````jsx ````__react
import { AutoComplete } from 'antd'; import { AutoComplete } from 'antd';
function onSelect(value) { function onSelect(value) {

View File

@ -13,7 +13,7 @@ title:
You could pass `AutoComplete.Option` as children of `AutoComplete`, instead of using `dataSource` You could pass `AutoComplete.Option` as children of `AutoComplete`, instead of using `dataSource`
````jsx ````__react
import { AutoComplete } from 'antd'; import { AutoComplete } from 'antd';
const Option = AutoComplete.Option; const Option = AutoComplete.Option;

View File

@ -13,7 +13,7 @@ title:
The most basic usage. The most basic usage.
````jsx ````__react
import { BackTop } from 'antd'; import { BackTop } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -14,7 +14,7 @@ title:
You can customize the style of the button, just note the size limit: no more than `40px * 40px`. You can customize the style of the button, just note the size limit: no more than `40px * 40px`.
````jsx ````__react
import { BackTop } from 'antd'; import { BackTop } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
Simplest Usage. Simplest Usage.
````jsx ````__react
import { Badge } from 'antd'; import { Badge } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
The count will be animated as it changes. The count will be animated as it changes.
````jsx ````__react
import { Badge, Button, Icon, Switch } from 'antd'; import { Badge, Button, Icon, Switch } from 'antd';
const ButtonGroup = Button.Group; const ButtonGroup = Button.Group;

View File

@ -13,7 +13,7 @@ title:
This will simply display a red badge, without a specific count. This will simply display a red badge, without a specific count.
````jsx ````__react
import { Badge, Icon } from 'antd'; import { Badge, Icon } from 'antd';
ReactDOM.render(<div> ReactDOM.render(<div>

View File

@ -13,7 +13,7 @@ title:
The badge can be wrapped with `a` tag to make it linkable. The badge can be wrapped with `a` tag to make it linkable.
````jsx ````__react
import { Badge } from 'antd'; import { Badge } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -15,7 +15,7 @@ title:
Used in standalone when children is empty. Used in standalone when children is empty.
````jsx ````__react
import { Badge } from 'antd'; import { Badge } from 'antd';
ReactDOM.render(<div> ReactDOM.render(<div>

View File

@ -13,7 +13,7 @@ title:
`${overflowCount}+` is displayed when count is larger than `overflowCount`. The default value of `overflowCount` is `99`. `${overflowCount}+` is displayed when count is larger than `overflowCount`. The default value of `overflowCount` is `99`.
````jsx ````__react
import { Badge } from 'antd'; import { Badge } from 'antd';
ReactDOM.render(<div> ReactDOM.render(<div>

View File

@ -13,7 +13,7 @@ title:
Standalone badge with status. Standalone badge with status.
````jsx ````__react
import { Badge } from 'antd'; import { Badge } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
The simplest use The simplest use
````jsx ````__react
import { Breadcrumb } from 'antd'; import { Breadcrumb } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -14,7 +14,7 @@ title:
Used together with `react-router@2+`. Used together with `react-router@2+`.
````jsx ````__react
import { Router, Route, Link, hashHistory } from 'react-router'; import { Router, Route, Link, hashHistory } from 'react-router';
import { Breadcrumb, Alert } from 'antd'; import { Breadcrumb, Alert } from 'antd';

View File

@ -13,7 +13,7 @@ title:
The separator can be customized by setting the separator property: separator=">" The separator can be customized by setting the separator property: separator=">"
````jsx ````__react
import { Breadcrumb } from 'antd'; import { Breadcrumb } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
The icon should be placed in front of the text. The icon should be placed in front of the text.
````jsx ````__react
import { Breadcrumb, Icon } from 'antd'; import { Breadcrumb, Icon } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -21,7 +21,7 @@ There are primary button, default button, ghost button and dashed button in antd
Primary button and default button can be used without other button, but ghost button must be used with primary button. Primary button and default button can be used without other button, but ghost button must be used with primary button.
````jsx ````__react
import { Button } from 'antd'; import { Button } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -17,7 +17,7 @@ Buttons can be grouped by placing multiple `Button` components into a `Button.Gr
The `size` can be set to `large`, `small` or left unset resulting in a default size. The `size` can be set to `large`, `small` or left unset resulting in a default size.
````jsx ````__react
import { Button, Icon } from 'antd'; import { Button, Icon } from 'antd';
const ButtonGroup = Button.Group; const ButtonGroup = Button.Group;

View File

@ -13,7 +13,7 @@ title:
To mark a button as disabled, add the `disabled` property to the `Button`. To mark a button as disabled, add the `disabled` property to the `Button`.
````jsx ````__react
import { Button } from 'antd'; import { Button } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -17,7 +17,7 @@ title:
If you want specific control over the positioning and placement of the `Icon`, then that should be done by placing the `Icon` component within the `Button` rather than using the `icon` property. If you want specific control over the positioning and placement of the `Icon`, then that should be done by placing the `Icon` component within the `Button` rather than using the `icon` property.
````jsx ````__react
import { Button } from 'antd'; import { Button } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
A loading indicator can be added to a button by setting the `loading` property on the `Button`. A loading indicator can be added to a button by setting the `loading` property on the `Button`.
````jsx ````__react
import { Button } from 'antd'; import { Button } from 'antd';
const App = React.createClass({ const App = React.createClass({

View File

@ -14,7 +14,7 @@ title:
If you need several buttons, we recommend that you use 1 primary button + n secondary buttons, and if there are more than three operations, you can group some of them into `Dropdown.Button`. If you need several buttons, we recommend that you use 1 primary button + n secondary buttons, and if there are more than three operations, you can group some of them into `Dropdown.Button`.
````jsx ````__react
import { Button, Menu, Dropdown, Icon } from 'antd'; import { Button, Menu, Dropdown, Icon } from 'antd';
function handleMenuClick(e) { function handleMenuClick(e) {

View File

@ -17,7 +17,7 @@ Ant Design supports a default button size as well as a large and small size.
If a large or small button is desired, set the `size` property to either `large` or `small` respectively. Omit the `size` property for a button with the default size. If a large or small button is desired, set the `size` property to either `large` or `small` respectively. Omit the `size` property for a button with the default size.
````jsx ````__react
import { Button, Radio, Icon } from 'antd'; import { Button, Radio, Icon } from 'antd';
class ButtonSize extends React.Component { class ButtonSize extends React.Component {

View File

@ -13,7 +13,7 @@ title:
A basic calendar component with Year/Month switch. A basic calendar component with Year/Month switch.
````jsx ````__react
import { Calendar } from 'antd'; import { Calendar } from 'antd';
function onPanelChange(value, mode) { function onPanelChange(value, mode) {

View File

@ -13,7 +13,7 @@ title:
Nested inside a container element for rendering in limited space. Nested inside a container element for rendering in limited space.
````jsx ````__react
import { Calendar } from 'antd'; import { Calendar } from 'antd';
function onPanelChange(value, mode) { function onPanelChange(value, mode) {

View File

@ -13,7 +13,7 @@ title:
To set the language. en_US, zh_CN are supported by default. To set the language. en_US, zh_CN are supported by default.
````jsx ````__react
import { Calendar } from 'antd'; import { Calendar } from 'antd';
import enUS from 'antd/lib/calendar/locale/en_US'; import enUS from 'antd/lib/calendar/locale/en_US';
import moment from 'moment'; import moment from 'moment';

View File

@ -13,7 +13,7 @@ title:
This component can be rendered by using `dateCellRender` and `monthCellRender` with the data you need. This component can be rendered by using `dateCellRender` and `monthCellRender` with the data you need.
````jsx ````__react
import { Calendar } from 'antd'; import { Calendar } from 'antd';
function getListData(value) { function getListData(value) {

View File

@ -13,7 +13,7 @@ title:
A basic card containing a title, content and an extra corner content. A basic card containing a title, content and an extra corner content.
````jsx ````__react
import { Card } from 'antd'; import { Card } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
A borderless card on a gray background. A borderless card on a gray background.
````jsx ````__react
import { Card } from 'antd'; import { Card } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
Cards usually cooperate with grid layout in overview page. Cards usually cooperate with grid layout in overview page.
````jsx ````__react
import { Card, Col, Row } from 'antd'; import { Card, Col, Row } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
Shows a loading indicator while the contents of the card is being fetched. Shows a loading indicator while the contents of the card is being fetched.
````jsx ````__react
import { Card } from 'antd'; import { Card } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -14,7 +14,7 @@ title:
Customizing default width and margin. Customizing default width and margin.
````jsx ````__react
import { Card } from 'antd'; import { Card } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
A simple card only containing a content area. A simple card only containing a content area.
````jsx ````__react
import { Card } from 'antd'; import { Card } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
Timing of scrolling to the next card/picture. Timing of scrolling to the next card/picture.
````jsx ````__react
import { Carousel } from 'antd'; import { Carousel } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
Basic usage. Basic usage.
````jsx ````__react
import { Carousel } from 'antd'; import { Carousel } from 'antd';
function onChange(a, b, c) { function onChange(a, b, c) {

View File

@ -13,7 +13,7 @@ title:
Slides use fade for transition. Slides use fade for transition.
````jsx ````__react
import { Carousel } from 'antd'; import { Carousel } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
Vertical pagination. Vertical pagination.
````jsx ````__react
import { Carousel } from 'antd'; import { Carousel } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ title:
Cascade selection box for selecting province/city/district. Cascade selection box for selecting province/city/district.
````jsx ````__react
import { Cascader } from 'antd'; import { Cascader } from 'antd';
const options = [{ const options = [{

View File

@ -13,7 +13,7 @@ title:
Allow only select parent options. Allow only select parent options.
````jsx ````__react
import { Cascader } from 'antd'; import { Cascader } from 'antd';
const options = [{ const options = [{

View File

@ -13,7 +13,7 @@ title:
For instance, add an external link after the selected value. For instance, add an external link after the selected value.
````jsx ````__react
import { Cascader } from 'antd'; import { Cascader } from 'antd';
const options = [{ const options = [{

View File

@ -13,7 +13,7 @@ title:
Separate trigger button and result. Separate trigger button and result.
````jsx ````__react
import { Cascader } from 'antd'; import { Cascader } from 'antd';
const options = [{ const options = [{

View File

@ -13,7 +13,7 @@ title:
Specifies default value by an array. Specifies default value by an array.
````jsx ````__react
import { Cascader } from 'antd'; import { Cascader } from 'antd';
const options = [{ const options = [{

View File

@ -13,7 +13,7 @@ title:
Disable option by specifying the `disabled` property in `options`. Disable option by specifying the `disabled` property in `options`.
````jsx ````__react
import { Cascader } from 'antd'; import { Cascader } from 'antd';
const options = [{ const options = [{

View File

@ -13,7 +13,7 @@ title:
Hover to expand sub menu, click to select option. Hover to expand sub menu, click to select option.
````jsx ````__react
import { Cascader } from 'antd'; import { Cascader } from 'antd';
const options = [{ const options = [{

View File

@ -17,7 +17,7 @@ Load options lazily with `loadData`.
> Note: `loadData` cannot work with `showSearch`. > Note: `loadData` cannot work with `showSearch`.
````jsx ````__react
import { Cascader } from 'antd'; import { Cascader } from 'antd';
const options = [{ const options = [{

View File

@ -13,7 +13,7 @@ title:
Search and select options directly. Search and select options directly.
````jsx ````__react
import { Cascader } from 'antd'; import { Cascader } from 'antd';
const options = [{ const options = [{

View File

@ -13,7 +13,7 @@ title:
Cascade selection box of different sizes. Cascade selection box of different sizes.
````jsx ````__react
import { Cascader } from 'antd'; import { Cascader } from 'antd';
const options = [{ const options = [{

View File

@ -13,7 +13,7 @@ title:
Basic usage of checkbox. Basic usage of checkbox.
````jsx ````__react
import { Checkbox } from 'antd'; import { Checkbox } from 'antd';
function onChange(e) { function onChange(e) {

View File

@ -13,7 +13,7 @@ title:
The `indeterminate` property can help you to achieve a 'check all' effect. The `indeterminate` property can help you to achieve a 'check all' effect.
````jsx ````__react
import { Checkbox } from 'antd'; import { Checkbox } from 'antd';
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;

View File

@ -13,7 +13,7 @@ title:
Communicated with other components. Communicated with other components.
````jsx ````__react
import { Checkbox, Button } from 'antd'; import { Checkbox, Button } from 'antd';
const App = React.createClass({ const App = React.createClass({

View File

@ -13,7 +13,7 @@ checkbox 不可用。
Disabled checkbox. Disabled checkbox.
````jsx ````__react
import { Checkbox } from 'antd'; import { Checkbox } from 'antd';
ReactDOM.render(<div> ReactDOM.render(<div>

View File

@ -13,7 +13,7 @@ title:
Generate a group of checkboxes from an array. Generate a group of checkboxes from an array.
````jsx ````__react
import { Checkbox } from 'antd'; import { Checkbox } from 'antd';
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;

View File

@ -13,7 +13,7 @@ title:
Accordion mode, only one panel can be expanded at a time. The first panel will be expanded by default. Accordion mode, only one panel can be expanded at a time. The first panel will be expanded by default.
````jsx ````__react
import { Collapse } from 'antd'; import { Collapse } from 'antd';
const Panel = Collapse.Panel; const Panel = Collapse.Panel;

View File

@ -13,7 +13,7 @@ title:
More than one panel can be expanded at a time, the first panel is initialized to be active in this case. More than one panel can be expanded at a time, the first panel is initialized to be active in this case.
````jsx ````__react
import { Collapse } from 'antd'; import { Collapse } from 'antd';
const Panel = Collapse.Panel; const Panel = Collapse.Panel;

View File

@ -13,7 +13,7 @@ title:
A borderless style of Collapse. A borderless style of Collapse.
````jsx ````__react
import { Collapse } from 'antd'; import { Collapse } from 'antd';
const Panel = Collapse.Panel; const Panel = Collapse.Panel;

View File

@ -13,7 +13,7 @@ title:
Customize the background, border and margin styles for each panel. Customize the background, border and margin styles for each panel.
````jsx ````__react
import { Collapse } from 'antd'; import { Collapse } from 'antd';
const Panel = Collapse.Panel; const Panel = Collapse.Panel;

View File

@ -13,7 +13,7 @@ title:
`Collapse` is nested inside the `Collapse`. `Collapse` is nested inside the `Collapse`.
````jsx ````__react
import { Collapse } from 'antd'; import { Collapse } from 'antd';
const Panel = Collapse.Panel; const Panel = Collapse.Panel;

View File

@ -13,7 +13,7 @@ title:
Basic use case. Users can select or input a date in panel. Basic use case. Users can select or input a date in panel.
````jsx ````__react
import { DatePicker } from 'antd'; import { DatePicker } from 'antd';
const { MonthPicker, RangePicker } = DatePicker; const { MonthPicker, RangePicker } = DatePicker;

View File

@ -13,7 +13,7 @@ title:
Disabled part of dates and time by `disabledDate` and `disabledTime` respectively, and `disabledTime` only works with `showTime`. Disabled part of dates and time by `disabledDate` and `disabledTime` respectively, and `disabledTime` only works with `showTime`.
````jsx ````__react
import { DatePicker } from 'antd'; import { DatePicker } from 'antd';
const RangePicker = DatePicker.RangePicker; const RangePicker = DatePicker.RangePicker;

View File

@ -13,7 +13,7 @@ title:
A disabled state of the `DatePicker`. A disabled state of the `DatePicker`.
````jsx ````__react
import { DatePicker } from 'antd'; import { DatePicker } from 'antd';
import moment from 'moment'; import moment from 'moment';
const { MonthPicker, RangePicker } = DatePicker; const { MonthPicker, RangePicker } = DatePicker;

View File

@ -13,7 +13,7 @@ title:
We can set the date format by `format`. We can set the date format by `format`.
````jsx ````__react
import { DatePicker } from 'antd'; import { DatePicker } from 'antd';
import moment from 'moment'; import moment from 'moment';
const { MonthPicker, RangePicker } = DatePicker; const { MonthPicker, RangePicker } = DatePicker;

View File

@ -18,7 +18,7 @@ Use locale to set the language. `en_US`, `zh_CN` are supported by default.
moment will use your time zone automatically. If you want to set other time zone, please set it by yourself. moment will use your time zone automatically. If you want to set other time zone, please set it by yourself.
````jsx ````__react
import { DatePicker } from 'antd'; import { DatePicker } from 'antd';
import enUS from 'antd/lib/date-picker/locale/en_US'; import enUS from 'antd/lib/date-picker/locale/en_US';
import moment from 'moment-timezone/moment-timezone'; import moment from 'moment-timezone/moment-timezone';

View File

@ -13,7 +13,7 @@ RangePicker 可以设置常用的 预设范围 提高用户体验。
We can set presetted ranges to RangePicker to improve user experience. We can set presetted ranges to RangePicker to improve user experience.
````jsx ````__react
import { DatePicker } from 'antd'; import { DatePicker } from 'antd';
import moment from 'moment'; import moment from 'moment';
const RangePicker = DatePicker.RangePicker; const RangePicker = DatePicker.RangePicker;

View File

@ -14,7 +14,7 @@ title:
The input box comes in three sizes. `default` will be used if `size` is omitted. The input box comes in three sizes. `default` will be used if `size` is omitted.
````jsx ````__react
import { DatePicker, Radio } from 'antd'; import { DatePicker, Radio } from 'antd';
const { MonthPicker, RangePicker } = DatePicker; const { MonthPicker, RangePicker } = DatePicker;

View File

@ -17,7 +17,7 @@ When `RangePicker` is not satisfied your requirements, try to implement similar
> * Use the `disabledDate` property to limit the start and end dates. > * Use the `disabledDate` property to limit the start and end dates.
> * Imporve user experience with `open` `onOpenChange`. > * Imporve user experience with `open` `onOpenChange`.
````jsx ````__react
import { DatePicker } from 'antd'; import { DatePicker } from 'antd';
class DateRange extends React.Component { class DateRange extends React.Component {

View File

@ -13,7 +13,7 @@ title:
This property provide an additional time selection. When `showTime` is an Object, its properties will be passed on to built-in `TimePicker`. This property provide an additional time selection. When `showTime` is an Object, its properties will be passed on to built-in `TimePicker`.
````jsx ````__react
import { DatePicker } from 'antd'; import { DatePicker } from 'antd';
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;

View File

@ -13,7 +13,7 @@ title:
The most basic dropdown menu. The most basic dropdown menu.
````jsx ````__react
import { Menu, Dropdown, Icon } from 'antd'; import { Menu, Dropdown, Icon } from 'antd';
const menu = ( const menu = (

View File

@ -13,7 +13,7 @@ title:
A button is on the left, and a related functional menu is on the right. A button is on the left, and a related functional menu is on the right.
````jsx ````__react
import { Menu, Dropdown, Button, Icon, message } from 'antd'; import { Menu, Dropdown, Button, Icon, message } from 'antd';
function handleButtonClick(e) { function handleButtonClick(e) {

View File

@ -13,7 +13,7 @@ title:
An event will be triggered when you click menu items, in which you can make different operations according to item's key. An event will be triggered when you click menu items, in which you can make different operations according to item's key.
````jsx ````__react
import { Menu, Dropdown, Icon, message } from 'antd'; import { Menu, Dropdown, Icon, message } from 'antd';
const onClick = function ({ key }) { const onClick = function ({ key }) {
message.info(`Click on item ${key}`); message.info(`Click on item ${key}`);

View File

@ -13,7 +13,7 @@ title:
Divider and disabled menu item. Divider and disabled menu item.
````jsx ````__react
import { Menu, Dropdown, Icon } from 'antd'; import { Menu, Dropdown, Icon } from 'antd';
const menu = ( const menu = (

View File

@ -13,7 +13,7 @@ title:
The default is to close the menu when you click on menu items, this feature can be turned off. The default is to close the menu when you click on menu items, this feature can be turned off.
````jsx ````__react
import { Menu, Dropdown, Icon } from 'antd'; import { Menu, Dropdown, Icon } from 'antd';
const OverlayVisible = React.createClass({ const OverlayVisible = React.createClass({

View File

@ -13,7 +13,7 @@ title:
The menu has multiple levels. The menu has multiple levels.
````jsx ````__react
import { Menu, Dropdown, Icon } from 'antd'; import { Menu, Dropdown, Icon } from 'antd';
const SubMenu = Menu.SubMenu; const SubMenu = Menu.SubMenu;

View File

@ -13,7 +13,7 @@ title:
The default trigger mode is `hover`, you can change it to `click`. The default trigger mode is `hover`, you can change it to `click`.
````jsx ````__react
import { Menu, Dropdown, Icon } from 'antd'; import { Menu, Dropdown, Icon } from 'antd';
const menu = ( const menu = (

View File

@ -18,7 +18,7 @@ Three columns layout is often used for advanced searching of data table.
Because the width of label is not fixed, you may need to adjust it by customizing its style. Because the width of label is not fixed, you may need to adjust it by customizing its style.
````jsx ````__react
import { Form, Row, Col, Input, Button, Icon } from 'antd'; import { Form, Row, Col, Input, Button, Icon } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;

View File

@ -13,7 +13,7 @@ title:
Use `setFieldsValue` to set other control's value programmaticly. Use `setFieldsValue` to set other control's value programmaticly.
````jsx ````__react
import { Form, Select, Input, Button } from 'antd'; import { Form, Select, Input, Button } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;
const Option = Select.Option; const Option = Select.Option;

View File

@ -18,7 +18,7 @@ Customized or third-party form controls can be used in Form, too. Controls must
> * It has event `onChange` or an event which name is equal to the value of [`trigger`](http://ant.design/components/form/?locale=en-US#getFieldDecorator's-parameters). > * It has event `onChange` or an event which name is equal to the value of [`trigger`](http://ant.design/components/form/?locale=en-US#getFieldDecorator's-parameters).
````jsx ````__react
import { Form, Input, Select, Button } from 'antd'; import { Form, Input, Select, Button } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;
const Option = Select.Option; const Option = Select.Option;

View File

@ -13,7 +13,7 @@ title:
Add or remove form items dynamically. Add or remove form items dynamically.
````jsx ````__react
import { Form, Input, Icon, Button } from 'antd'; import { Form, Input, Icon, Button } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;

View File

@ -13,7 +13,7 @@ title:
When user visit a page with a list of items, and want to create a new item. The page can popup a form in Modal, then let user fills in the form to create an item. When user visit a page with a list of items, and want to create a new item. The page can popup a form in Modal, then let user fills in the form to create an item.
````jsx ````__react
import { Button, Modal, Form, Input, Radio } from 'antd'; import { Button, Modal, Form, Input, Radio } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;

View File

@ -13,7 +13,7 @@ title:
We can store form data into upper component or [Redux](https://github.com/reactjs/redux) or [dva](https://github.com/dvajs/dva) by using `onFieldsChange` and `mapPropsToFields`. We can store form data into upper component or [Redux](https://github.com/reactjs/redux) or [dva](https://github.com/dvajs/dva) by using `onFieldsChange` and `mapPropsToFields`.
````jsx ````__react
import { Form, Input } from 'antd'; import { Form, Input } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;

View File

@ -13,7 +13,7 @@ title:
Horizontal login form is often used in navigation bar. Horizontal login form is often used in navigation bar.
````jsx ````__react
import { Form, Icon, Input, Button } from 'antd'; import { Form, Icon, Input, Button } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;

View File

@ -13,7 +13,7 @@ title:
There are three layout for form: `horizontal`, `vertical`, `inline`. There are three layout for form: `horizontal`, `vertical`, `inline`.
````jsx ````__react
import { Form, Input, Button, Radio } from 'antd'; import { Form, Input, Button, Radio } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;

View File

@ -13,7 +13,7 @@ title:
Normal login form which can contain more elements. Normal login form which can contain more elements.
````jsx ````__react
import { Form, Icon, Input, Button, Checkbox } from 'antd'; import { Form, Icon, Input, Button, Checkbox } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;

View File

@ -13,7 +13,7 @@ title:
Fill in this form to create a new account for you. Fill in this form to create a new account for you.
````jsx ````__react
import { Form, Input, Tooltip, Icon, Cascader, Select, Row, Col, Checkbox, Button } from 'antd'; import { Form, Input, Tooltip, Icon, Cascader, Select, Row, Col, Checkbox, Button } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;
const Option = Select.Option; const Option = Select.Option;

View File

@ -13,7 +13,7 @@ title:
After `antd@2.0`, the `value` of time-related components had been changed to `moment`. So, we need to pre-process those values. After `antd@2.0`, the `value` of time-related components had been changed to `moment`. So, we need to pre-process those values.
````jsx ````__react
import { Form, DatePicker, TimePicker, Button } from 'antd'; import { Form, DatePicker, TimePicker, Button } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;
const MonthPicker = DatePicker.MonthPicker; const MonthPicker = DatePicker.MonthPicker;

View File

@ -13,7 +13,7 @@ title:
Demostration for validataion configuration for form controls which are not show in the above demos. Demostration for validataion configuration for form controls which are not show in the above demos.
````jsx ````__react
import { import {
Form, Select, InputNumber, Switch, Radio, Form, Select, InputNumber, Switch, Radio,
Slider, Button, Upload, Icon, Slider, Button, Upload, Icon,

View File

@ -25,7 +25,7 @@ To set `hasFeedback` property to `true` enable to display feed icon of input con
**PS**: Feed icon is just available for `<Input />`. **PS**: Feed icon is just available for `<Input />`.
````jsx ````__react
import { Form, Input, DatePicker, Col } from 'antd'; import { Form, Input, DatePicker, Col } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;

View File

@ -13,7 +13,7 @@ title:
`Form.create` will collect and validate form data automatically. But if you don't need this feature or the default behaviour cannot satisfy you business, you can drop `Form.create` and handle form data manually. `Form.create` will collect and validate form data automatically. But if you don't need this feature or the default behaviour cannot satisfy you business, you can drop `Form.create` and handle form data manually.
````jsx ````__react
import { Form, InputNumber } from 'antd'; import { Form, InputNumber } from 'antd';
const FormItem = Form.Item; const FormItem = Form.Item;

View File

@ -17,7 +17,7 @@ From the stack to the horizontal arrangement.
You can create a basic grid system by using a single set of `Row` and` Col` grid assembly, all of the columns (Col) must be placed in `Row`. You can create a basic grid system by using a single set of `Row` and` Col` grid assembly, all of the columns (Col) must be placed in `Row`.
````jsx ````__react
import { Row, Col } from 'antd'; import { Row, Col } from 'antd';
ReactDOM.render( ReactDOM.render(

View File

@ -13,7 +13,7 @@ Flex 子元素垂直对齐。
Flex child elements vertically aligned. Flex child elements vertically aligned.
````jsx ````__react
import { Row, Col } from 'antd'; import { Row, Col } from 'antd';
const DemoBox = props => <p className={`height-${props.value}`}>{props.children}</p>; const DemoBox = props => <p className={`height-${props.value}`}>{props.children}</p>;

Some files were not shown because too many files have changed in this diff Show More