mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-30 05:13:43 +00:00
upgrade umi@3 partly
This commit is contained in:
+1
-1
@@ -5,5 +5,5 @@ Most asked
|
||||
## create new page
|
||||
|
||||
1. just copy a page in /src/pages (route here auto generated by [umi](https://umijs.org/guide/router.html#basic-routing))
|
||||
2. modify namespace/pathMatchRegexp in model.js
|
||||
2. modify namespace/pathToRegexp in model.js
|
||||
3. modify mock route.js to add a route
|
||||
+1
-1
@@ -3,5 +3,5 @@
|
||||
## 新建页面
|
||||
|
||||
1. 直接从/src/pages复制一个page (会自动创建路由[umi](https://umijs.org/zh/guide/router.html#%E7%BA%A6%E5%AE%9A%E5%BC%8F%E8%B7%AF%E7%94%B1))
|
||||
2. 修改 namespace/pathMatchRegexp 在 model.js
|
||||
2. 修改 namespace/pathToRegexp 在 model.js
|
||||
3. 修改 mock中route.js增加一条route
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
npm run add-locale ja
|
||||
```
|
||||
|
||||
2. 提取代码中需要翻译的字段,即 `<Trans>message</Trans>`、`` i18n.t`message `` 中 `message` 字段,运行下面命令后 `src/locales/ja/messages.json` 将会出现提取后的字段配置。
|
||||
2. 提取代码中需要翻译的字段,即 `<Trans>message</Trans>`、`` intl.formatMessage({ id: 'message `` 中 `message` 字段,运行下面命令后 `src/locales/ja/messages.json' }) 将会出现提取后的字段配置。
|
||||
|
||||
```bash
|
||||
npm run extract
|
||||
|
||||
Reference in New Issue
Block a user