mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-10 19:19:20 +08:00
Update README.md
This commit is contained in:
parent
1b9513e0eb
commit
c65a736714
17
README.md
17
README.md
@ -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+.
|
||||||
|
Loading…
Reference in New Issue
Block a user