mirror of
https://github.com/wahyd4/ant-design.git
synced 2026-08-22 19:28:47 +10:00
update document for style import, #567
This commit is contained in:
+12
-1
@@ -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 及以上。
|
||||
|
||||
@@ -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+.
|
||||
|
||||
@@ -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';
|
||||
```
|
||||
|
||||
## 版本
|
||||
|
||||
- 稳定版:[](https://www.npmjs.org/package/antd)
|
||||
|
||||
Reference in New Issue
Block a user