update document for style import, #567

This commit is contained in:
afc163
2015-12-08 18:05:01 +08:00
parent 3016ef052a
commit f3d5607f13
3 changed files with 33 additions and 2 deletions
+12 -1
View File
@@ -33,11 +33,22 @@ npm install antd
- 按需使用
```jsx
import 'antd/lib/index.css'; // 只需在页面入口模块引用一次
import Datepicker from 'antd/lib/datepicker';
ReactDOM.render(<Datepicker />, mountNode);
```
引入样式:
```jsx
// only need to import once in entry module
import 'antd/lib/index.css';
```
```jsx
// or less for modifyVars
import 'antd/style/index.less';
```
## 浏览器支持
现代浏览器和 IE8 及以上。
+12 -1
View File
@@ -32,11 +32,22 @@ npm install antd
- Use on demand
```jsx
import 'antd/lib/index.css'; // only need to import once in entry module
import Datepicker from 'antd/lib/datepicker';
ReactDOM.render(<Datepicker />, mountNode);
```
Import style:
```jsx
// only need to import once in entry module
import 'antd/lib/index.css';
```
```jsx
// or less for modifyVars
import 'antd/style/index.less';
```
## Browser Support
Normal browsers and Internet Explorer 8+.
+9
View File
@@ -46,10 +46,19 @@ import Datepicker from 'antd/lib/datepicker';
ReactDOM.render(<Datepicker />, mountNode);
```
引入样式:
```jsx
import 'antd/lib/index.css'; // 样式需要在入口处引用一次
```
或者引入 less 文件,可用于主题配置:
```jsx
// or less for modifyVars
import 'antd/style/index.less';
```
## 版本
- 稳定版:[![npm package](http://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd)