update customize docs

This commit is contained in:
afc163 2017-03-21 15:55:14 +08:00 committed by Benjy Cui
parent 10ad3a0fbd
commit b25a4671ee
2 changed files with 6 additions and 2 deletions

View File

@ -39,8 +39,9 @@ This approach is available only when using [antd-init](https://github.com/ant-de
Note:
- Importing style from less files is necessary. Here's an example if you're using the `antd-demo` from [getting started](/docs/react/getting-started): in `index.js`, replace `import './index.css'` with `import 'antd/dist/antd.less'`
- Please specify the `style` option of `babel-plugin-import` to be `true`, instead of `css`. This is required for importing the `less` version of antd. This can be done in `webpack.config.js`.
- Importing style from less files is necessary.
- If you import styles by specifying the `style` option of [babel-plugin-import](https://github.com/ant-design/babel-plugin-import), change it from `'css'` to `true`, which will importing the `less` version of antd.
- If you import styles from `'antd/dist/antd.css'`, change it to `antd/dist/antd.less`.
- When using `dva-cli@0.7.0+`, you should add the `theme` block to [.roadhogrc](https://github.com/dvajs/dva-example-user-dashboard/commit/d6da33b3a6e18eb7f003752a4b00b5a660747c31) instead of `package.json`.
- If you want to override `@icon-url`, the quotes must be contained in value like `"@icon-url": "'your-icon-font-path'"` ([A fix sample](https://github.com/visvadw/dvajs-user-dashboard/pull/2)).

View File

@ -42,6 +42,9 @@ antd 的样式使用了 [Less](http://lesscss.org/) 作为开发语言,并定
注意:
- 样式必须加载 less 格式。
- 如果你在使用 babel-plugin-import 的 `style` 配置来引入样式,需要将配置值从 `'css'` 改为 `true`,这样会引入 less 文件。
- 如果你是通过 `'antd/dist/antd.css'` 引入样式的,改为 `antd/dist/antd.less`
- 样式必须加载 less 格式。如果您使用了 `babel-plugin-import`,请将 style 属性配置为 `true`
- `dva-cli@0.7.0+``theme` 属性需要写在 [.roadhogrc](https://github.com/dvajs/dva-example-user-dashboard/commit/d6da33b3a6e18eb7f003752a4b00b5a660747c31) 文件里。
- 如果要覆盖 `@icon-url` 变量,内容需要包括引号 `"@icon-url": "'your-icon-font-path'"`[修正示例](https://github.com/visvadw/dvajs-user-dashboard/pull/2))。