mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
doc: update practical-project
This commit is contained in:
parent
50aae9408e
commit
411181e6ec
@ -64,9 +64,11 @@ $ npm install antd babel-plugin-import --save
|
||||
Edit `.webpackrc` to integrate `babel-plugin-import`.
|
||||
|
||||
```diff
|
||||
{
|
||||
+ "extraBabelPlugins": [
|
||||
+ ["import", { "libraryName": "antd", "libraryDirectory": "es", "style": "css" }]
|
||||
+ ],
|
||||
+ ]
|
||||
}
|
||||
```
|
||||
|
||||
> Notice: dva-cli's build and dev is based on roadhog, view [roadhog#Configuration](https://github.com/sorrycc/roadhog/blob/master/README_en-us.md#configuration) for more `.webpackrc` Configuration.
|
||||
@ -149,8 +151,6 @@ dva manages the domain model with `model`, with reducers for synchronous state u
|
||||
Let's create a model `models/products.js` by typing:
|
||||
|
||||
```javascript
|
||||
import dva from 'dva';
|
||||
|
||||
export default {
|
||||
namespace: 'products',
|
||||
state: [],
|
||||
|
@ -66,9 +66,11 @@ $ npm install antd babel-plugin-import --save
|
||||
编辑 `.webpackrc`,使 `babel-plugin-import` 插件生效。
|
||||
|
||||
```diff
|
||||
{
|
||||
+ "extraBabelPlugins": [
|
||||
+ ["import", { "libraryName": "antd", "libraryDirectory": "es", "style": "css" }]
|
||||
+ ],
|
||||
+ ]
|
||||
}
|
||||
```
|
||||
|
||||
> 注:dva-cli 基于 roadhog 实现 build 和 dev,更多 `.webpackrc` 的配置详见 [roadhog#配置](https://github.com/sorrycc/roadhog#配置)
|
||||
@ -151,8 +153,6 @@ dva 通过 model 的概念把一个领域的模型管理起来,包含同步更
|
||||
新建 model `models/products.js` :
|
||||
|
||||
```javascript
|
||||
import dva from 'dva';
|
||||
|
||||
export default {
|
||||
namespace: 'products',
|
||||
state: [],
|
||||
|
Loading…
Reference in New Issue
Block a user