generator-mico-cli 0.2.16 → 0.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/generators/micro-react/templates/apps/layout/src/components/MicroAppLoader/index.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getAuthInfo } from '@/common/auth/auth-manager';
|
|
2
2
|
import { EEnv, getEnv } from '@/common/env';
|
|
3
|
+
import { getUmiLocale } from '@/common/locale';
|
|
3
4
|
import { request } from '@/common/request';
|
|
4
5
|
import { isAuthDisabled, isNoPermissionRoute } from '@/constants';
|
|
5
6
|
import { Spin } from '@mico-platform/ui';
|
|
@@ -79,6 +80,8 @@ const MicroAppLoader: React.FC<MicroAppLoaderProps> = ({
|
|
|
79
80
|
routePath,
|
|
80
81
|
// 传递主应用的 request 实例,子应用可直接使用
|
|
81
82
|
request,
|
|
83
|
+
// 传递当前多语言类型给子应用(umi 格式:zh-CN, en-US 等)
|
|
84
|
+
locale: getUmiLocale(),
|
|
82
85
|
};
|
|
83
86
|
}, [env, routePath]);
|
|
84
87
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "generator-mico-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.17",
|
|
4
4
|
"description": "Yeoman generator for Mico CLI projects",
|
|
5
5
|
"keywords": ["yeoman-generator", "generator", "cli"],
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"format": "biome format --write .",
|
|
14
14
|
"format:check": "biome format .",
|
|
15
|
-
"sync:subapp-react-template": "node scripts/sync-subapp-react-template.js"
|
|
15
|
+
"sync:subapp-react-template": "node scripts/sync-subapp-react-template.js",
|
|
16
|
+
"verify:micro-react": "node scripts/verify-micro-react.js"
|
|
16
17
|
},
|
|
17
18
|
"devDependencies": {
|
|
18
19
|
"@biomejs/biome": "^1.9.4"
|