mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
update doc
This commit is contained in:
parent
915f343de3
commit
831533d139
@ -49,7 +49,7 @@ Open http://localhost:8989 in your browser, you will see dva welcome page.
|
||||
|
||||
## Integrate antd
|
||||
|
||||
Install `antd` and `babel-plugin-import` with npm. `babel-plugin-import` is used to automatically import scripts and stylesheets from antd. See [repo](https://github.com/ant-design/babel-plugin-import) 。
|
||||
Install `antd` and `babel-plugin-import` with npm. `babel-plugin-import` is used to automatically import scripts and stylesheets from antd in demand. See [repo](https://github.com/ant-design/babel-plugin-import) 。
|
||||
|
||||
```bash
|
||||
$ npm install antd babel-plugin-import --save
|
||||
@ -176,7 +176,7 @@ Then don't forget to require it in `index.js`:
|
||||
|
||||
## Connect
|
||||
|
||||
So far, wee have completed a seperate model and component. Then how to connect these together?
|
||||
So far, wee have completed a seperate model and component. Then how to connect these together?
|
||||
|
||||
dva provides a `connect` method. If you are familar with redux, this `connect` is from react-router.
|
||||
|
||||
|
@ -49,7 +49,7 @@ webpack: bundle build is now finished.
|
||||
|
||||
## 使用 antd
|
||||
|
||||
通过 npm 安装 `antd` 和 `babel-plugin-import` 。`babel-plugin-import` 是用来自动引入 antd 的脚本和样式的,详见 [repo](https://github.com/ant-design/babel-plugin-import) 。
|
||||
通过 npm 安装 `antd` 和 `babel-plugin-import` 。`babel-plugin-import` 是用来按需加载 antd 的脚本和样式的,详见 [repo](https://github.com/ant-design/babel-plugin-import) 。
|
||||
|
||||
```bash
|
||||
$ npm install antd babel-plugin-import --save
|
||||
@ -176,7 +176,7 @@ export default {
|
||||
|
||||
## connect 起来
|
||||
|
||||
到这里,我们已经单独完成了 model 和 component,那么他们如何串联起来呢?
|
||||
到这里,我们已经单独完成了 model 和 component,那么他们如何串联起来呢?
|
||||
|
||||
dva 提供了 connect 方法。如果你熟悉 redux,这个 connect 就是 react-redux 的 connect 。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user