Update README.md

This commit is contained in:
afc163 2016-05-23 22:56:42 +08:00
parent 1b9513e0eb
commit c65a736714

View File

@ -37,11 +37,7 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
### Use modularized antd ### Use modularized antd
```jsx - Use [babel-plugin-antd](https://github.com/ant-design/babel-plugin-antd) (Recommended)
import DatePicker from 'antd/lib/date-picker'; // just for js
```
Or we recommend use [babel-plugin-antd](https://github.com/ant-design/babel-plugin-antd) with config:
```js ```js
// .babelrc // .babelrc
@ -50,13 +46,20 @@ Or we recommend use [babel-plugin-antd](https://github.com/ant-design/babel-plug
} }
``` ```
Then you can import antd modularly and simply: Then you can import components from antd directly.
```jsx ```jsx
// import js and css modularly // import js and css modularly, parsed by babel-plugin-antd
import { DatePicker } from 'antd'; import { DatePicker } from 'antd';
``` ```
- Manually import
```jsx
import DatePicker from 'antd/lib/date-picker'; // just for js
```
## Browser Support ## Browser Support
Normal browsers and Internet Explorer 8+. Normal browsers and Internet Explorer 8+.