mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
docs: update Practical Projects for dva@2 (#7505)
This commit is contained in:
parent
421feb1c84
commit
e1efb82dcb
@ -13,12 +13,12 @@ Include the following:
|
||||
|
||||
## Install dva-cli
|
||||
|
||||
Install dva-cli with npm, and make sure the version is larger than `0.7.0`.
|
||||
Install dva-cli with npm, and make sure the version is larger than `0.8.1`.
|
||||
|
||||
```bash
|
||||
$ npm install dva-cli -g
|
||||
$ dva -v
|
||||
0.7.0
|
||||
0.8.1
|
||||
```
|
||||
|
||||
## Create New App
|
||||
@ -94,7 +94,7 @@ Add routing information to router, edit `router.js`:
|
||||
```diff
|
||||
+ import Products from './routes/Products';
|
||||
...
|
||||
+ <Route path="/products" component={Products} />
|
||||
+ <Route path="/products" exact component={Products} />
|
||||
```
|
||||
|
||||
Then open http://localhost:8000/#/products in your browser, you should be able to see the `<h2>` tag defined before.
|
||||
|
@ -13,12 +13,12 @@ title: 项目实战
|
||||
|
||||
## 安装 dva-cli
|
||||
|
||||
通过 npm 安装 dva-cli 并确保版本是 `0.7.0` 或以上。
|
||||
通过 npm 安装 dva-cli 并确保版本是 `0.8.1` 或以上。
|
||||
|
||||
```bash
|
||||
$ npm install dva-cli -g
|
||||
$ dva -v
|
||||
0.7.0
|
||||
0.8.1
|
||||
```
|
||||
|
||||
## 创建新应用
|
||||
@ -94,7 +94,7 @@ export default Products;
|
||||
```diff
|
||||
+ import Products from './routes/Products';
|
||||
...
|
||||
+ <Route path="/products" component={Products} />
|
||||
+ <Route path="/products" exact component={Products} />
|
||||
```
|
||||
|
||||
然后在浏览器里打开 http://localhost:8000/#/products ,你应该能看到前面定义的 `<h2>` 标签。
|
||||
|
Loading…
Reference in New Issue
Block a user