generator-mico-cli 0.2.33 → 1.0.0
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/README.md +6 -0
- package/generators/micro-react/README.md +1 -1
- package/generators/micro-react/index.js +9 -18
- package/generators/micro-react/templates/apps/layout/docs/feature-/344/270/273/351/242/230/350/211/262/345/210/207/346/215/242.md +1 -1
- package/generators/micro-react/templates/apps/layout/docs/feature-/345/276/256/345/211/215/347/253/257/346/250/241/345/274/217.md +1 -1
- package/generators/micro-react/templates/apps/layout/package.json +1 -0
- package/generators/micro-react/templates/apps/layout/src/app.tsx +5 -3
- package/generators/micro-react/templates/apps/layout/src/common/logger.ts +1 -1
- package/generators/micro-react/templates/apps/layout/src/components/AppTabs/index.less +4 -4
- package/generators/micro-react/templates/apps/layout/src/components/MicroAppLoader/index.tsx +7 -3
- package/generators/micro-react/templates/apps/layout/src/components/RightContent/avatar-dropdown.less +5 -5
- package/generators/micro-react/templates/apps/layout/src/components/RightContent/tenant-dropdown.less +4 -4
- package/generators/micro-react/templates/apps/layout/src/global.less +1 -2
- package/generators/micro-react/templates/apps/layout/src/layouts/components/header/index.less +17 -17
- package/generators/micro-react/templates/apps/layout/src/layouts/components/menu/index.less +15 -15
- package/generators/micro-react/templates/apps/layout/src/layouts/index.less +16 -16
- package/generators/micro-react/templates/apps/layout/src/layouts/index.tsx +3 -4
- package/generators/micro-react/templates/apps/layout/src/pages/Home/index.less +3 -3
- package/generators/micro-react/templates/apps/layout/src/pages/User/Login/index.less +46 -40
- package/generators/micro-react/templates/packages/common-intl/README.md +3 -2
- package/generators/subapp-react/index.js +10 -19
- package/generators/subapp-react/templates/homepage/config/config.dev.ts +1 -47
- package/generators/subapp-react/templates/homepage/package.json +1 -0
- package/generators/subapp-react/templates/homepage/src/app.tsx +10 -0
- package/generators/subapp-react/templates/homepage/src/common/logger.ts +1 -1
- package/generators/subapp-react/templates/homepage/src/global.less +1 -1
- package/generators/subapp-react/templates/homepage/src/pages/index.less +31 -31
- package/generators/subapp-react/templates/homepage/src/pages/index.tsx +2 -2
- package/generators/subapp-umd/index.js +6 -0
- package/generators/subapp-umd/templates/package.json +1 -1
- package/lib/utils.js +197 -0
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -117,6 +117,12 @@ mico setup multica-desktop
|
|
|
117
117
|
|
|
118
118
|
所有字段均为可选,未配置时使用默认值或交互式提示。
|
|
119
119
|
|
|
120
|
+
### 组件库版本(`micoPackages`)
|
|
121
|
+
|
|
122
|
+
CLI 根 `package.json` 的 `micoPackages` 是 `@mico-platform/ui` / `@mico-platform/theme` 的**唯一维护点**(semver range,如 `1.x`)。`mico create` 时在该 range 内 resolve 最新版本,写入生成项目为 `^x.y.z`;子应用独立开发时在 `app.tsx` 条件加载 npm CSS,嵌入主应用时由 layout 全局提供。
|
|
123
|
+
|
|
124
|
+
组件库发 patch(仍在 `0.x`)时通常无需发 CLI;切换到 `1.x` 等 major 策略时,修改 `micoPackages` 并发布新 CLI 即可。
|
|
125
|
+
|
|
120
126
|
## Monorepo 项目生成器 (micro-react)
|
|
121
127
|
|
|
122
128
|
创建基于 qiankun 微前端架构的完整 Monorepo 项目:
|
|
@@ -31,4 +31,4 @@ mico create micro-react
|
|
|
31
31
|
| `cdnPrefix` / `cdnPrefixPath` | string | prompt;`cdnPrefixPath` 为空或带尾斜杠 |
|
|
32
32
|
| `author` | string | prompt |
|
|
33
33
|
| `intlTag` | string | prompt |
|
|
34
|
-
| `micoUiVersion` / `themeVersion` | string |
|
|
34
|
+
| `micoUiVersion` / `themeVersion` | string | `^${micoPackages range 内 resolve 的最新版本}` |
|
|
@@ -9,7 +9,7 @@ const {
|
|
|
9
9
|
collectFiles,
|
|
10
10
|
transformDestPath,
|
|
11
11
|
isTemplateFile,
|
|
12
|
-
|
|
12
|
+
getMicoTemplateVersions,
|
|
13
13
|
setupErrorHandlers,
|
|
14
14
|
createLogger,
|
|
15
15
|
loadMicorc,
|
|
@@ -162,23 +162,14 @@ module.exports = class extends Generator {
|
|
|
162
162
|
|
|
163
163
|
// 在 mico_cli 根目录执行 npm view,以使用该目录 .npmrc 中的 Nexus 认证
|
|
164
164
|
const cliRoot = path.resolve(__dirname, '../..');
|
|
165
|
-
this.logger.verbose('Fetching
|
|
166
|
-
|
|
167
|
-
// 并行获取版本
|
|
168
|
-
const versions = await getPackageVersionsParallel(
|
|
169
|
-
[
|
|
170
|
-
{ name: '@mico-platform/ui', fallback: '1.0.0' },
|
|
171
|
-
{ name: '@mico-platform/theme', fallback: '1.0.0' },
|
|
172
|
-
],
|
|
173
|
-
8000,
|
|
174
|
-
cliRoot,
|
|
175
|
-
);
|
|
165
|
+
this.logger.verbose('Fetching mico package versions from manifest...');
|
|
176
166
|
|
|
177
|
-
const
|
|
178
|
-
const
|
|
167
|
+
const micoVersions = await getMicoTemplateVersions(cliRoot, 8000);
|
|
168
|
+
const ui = micoVersions['@mico-platform/ui'];
|
|
169
|
+
const theme = micoVersions['@mico-platform/theme'];
|
|
179
170
|
|
|
180
|
-
this.logger.verbose('@mico-platform/ui
|
|
181
|
-
this.logger.verbose('@mico-platform/theme
|
|
171
|
+
this.logger.verbose('@mico-platform/ui range:', ui.range, 'resolved:', ui.resolved);
|
|
172
|
+
this.logger.verbose('@mico-platform/theme range:', theme.range, 'resolved:', theme.resolved);
|
|
182
173
|
|
|
183
174
|
// 构建 CDN 路径片段:如果有 prefix 则加上斜杠前缀,否则为空
|
|
184
175
|
const cdnPrefixPath = this.cdnPrefix ? `${this.cdnPrefix}/` : '';
|
|
@@ -191,8 +182,8 @@ module.exports = class extends Generator {
|
|
|
191
182
|
appId: this.appId,
|
|
192
183
|
packageScope: this.packageScope,
|
|
193
184
|
author: this.author,
|
|
194
|
-
micoUiVersion: `^${
|
|
195
|
-
themeVersion: `^${
|
|
185
|
+
micoUiVersion: `^${ui.resolved}`,
|
|
186
|
+
themeVersion: `^${theme.resolved}`,
|
|
196
187
|
cdnPrefix: this.cdnPrefix,
|
|
197
188
|
cdnPrefixPath, // 用于拼接路径,已包含尾部斜杠
|
|
198
189
|
intlTag: this.intlTag,
|
|
@@ -4,7 +4,8 @@ import * as CommonWebSentry from '@common-web/sentry';
|
|
|
4
4
|
import { SentryErrorBoundary } from '@common-web/sentry';
|
|
5
5
|
import { errorConfig } from './requestErrorConfig';
|
|
6
6
|
// 将 @mico-platform/ui 暴露到 window,供子应用 externals 使用
|
|
7
|
-
import
|
|
7
|
+
import { Message } from '@mico-platform/ui';
|
|
8
|
+
import * as micoUI from '@mico-platform/ui/es';
|
|
8
9
|
import dayjs from 'dayjs';
|
|
9
10
|
import React from 'react';
|
|
10
11
|
import ReactDOM from 'react-dom';
|
|
@@ -42,6 +43,7 @@ import { initTheme } from './common/theme';
|
|
|
42
43
|
import MicroAppLoader from './components/MicroAppLoader';
|
|
43
44
|
import { isCommonIntlEnabled } from '@/common/intl';
|
|
44
45
|
import { isNoAuthRoute } from '@/constants';
|
|
46
|
+
import '@mico-platform/ui/dist/css/mico-ui.min.css';
|
|
45
47
|
import '@mico-platform/theme/dist/css/theme.css';
|
|
46
48
|
import './global.less';
|
|
47
49
|
import { getCurrentLocale, setLocaleToStorage } from './common/locale';
|
|
@@ -177,8 +179,8 @@ export function render(oldRender: () => void): void {
|
|
|
177
179
|
fetchMultilingualData({
|
|
178
180
|
requestInstance: commonRequest,
|
|
179
181
|
messageInstance: {
|
|
180
|
-
error:
|
|
181
|
-
warning:
|
|
182
|
+
error: Message.error,
|
|
183
|
+
warning: Message.warning,
|
|
182
184
|
},
|
|
183
185
|
lang: umiLocaleToILang(getCurrentLocale()) as ILang,
|
|
184
186
|
localeRequestUrl: process.env.LOCALE_REQUEST_URL,
|
|
@@ -23,7 +23,7 @@ function readVerboseDebugQueryOnce(): boolean {
|
|
|
23
23
|
}
|
|
24
24
|
try {
|
|
25
25
|
const v = new URLSearchParams(window.location.search).get(DEBUG_LOGS_QUERY_KEY);
|
|
26
|
-
if (v
|
|
26
|
+
if (v === null || v === '') {
|
|
27
27
|
return false;
|
|
28
28
|
}
|
|
29
29
|
const normalized = v.toLowerCase();
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
padding-left: 16px;
|
|
14
14
|
transition: left 0.2s ease;
|
|
15
15
|
z-index: 999;
|
|
16
|
-
background-color: @
|
|
16
|
+
background-color: @fill-1;
|
|
17
17
|
top: @header-height;
|
|
18
18
|
padding-top: 16px;
|
|
19
19
|
padding-bottom: 8px;
|
|
20
20
|
|
|
21
21
|
.arco-tabs-header-title {
|
|
22
22
|
border: none;
|
|
23
|
-
border-radius: @border-radius-
|
|
23
|
+
border-radius: @border-radius-md;
|
|
24
24
|
|
|
25
25
|
&-active {
|
|
26
26
|
border: none;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
&-active:hover {
|
|
31
|
-
background-color: @
|
|
31
|
+
background-color: @fill-3;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.arco-icon-hover:hover::before {
|
|
48
|
-
background-color: @
|
|
48
|
+
background-color: @fill-2 !important;
|
|
49
49
|
}
|
|
50
50
|
}
|
package/generators/micro-react/templates/apps/layout/src/components/MicroAppLoader/index.tsx
CHANGED
|
@@ -115,8 +115,12 @@ const MicroAppLoader: React.FC<MicroAppLoaderProps> = ({
|
|
|
115
115
|
current_tenant: currentUser?.current_tenant,
|
|
116
116
|
allowed_tenants: allowedTenants,
|
|
117
117
|
};
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
console.log('[MicroAppLoader] buildProps', {
|
|
119
|
+
appName,
|
|
120
|
+
...Object.fromEntries(
|
|
121
|
+
Object.entries(props).filter(([key]) => key !== 'request'),
|
|
122
|
+
),
|
|
123
|
+
});
|
|
120
124
|
return props;
|
|
121
125
|
}, [base, env, routePath, currentUser, appName]);
|
|
122
126
|
|
|
@@ -175,7 +179,7 @@ const MicroAppLoader: React.FC<MicroAppLoaderProps> = ({
|
|
|
175
179
|
)}
|
|
176
180
|
{state.loading && !state.error && (
|
|
177
181
|
<div className="micro-app-loading">
|
|
178
|
-
<Spin
|
|
182
|
+
<Spin tip={`正在加载 ${displayName || name}...`} />
|
|
179
183
|
</div>
|
|
180
184
|
)}
|
|
181
185
|
{/* qiankun 容器挂载点 */}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
@import '@mico-platform/theme/variables';
|
|
2
2
|
|
|
3
3
|
.avatar-dropdown-trigger {
|
|
4
|
-
background-color: @
|
|
4
|
+
background-color: @fill-2;
|
|
5
5
|
border-radius: @border-radius-button;
|
|
6
6
|
height: 32px;
|
|
7
7
|
padding: 1px 10px;
|
|
8
|
-
color: @
|
|
8
|
+
color: @text-1;
|
|
9
9
|
cursor: pointer;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.avatar-dropdown-trigger:hover {
|
|
13
|
-
background: @
|
|
13
|
+
background: @fill-3;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.avatar-dropdown-trigger.arco-dropdown-popup-visible .arco-icon-down {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.selected-label {
|
|
30
|
-
color: @
|
|
30
|
+
color: @brand1-6;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.label-name {
|
|
34
|
-
color: @
|
|
34
|
+
color: @text-3;
|
|
35
35
|
}
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
display: inline-flex;
|
|
7
7
|
justify-content: space-between;
|
|
8
8
|
width: @tenant-dropdown-width;
|
|
9
|
-
background-color: @
|
|
9
|
+
background-color: @fill-2;
|
|
10
10
|
border-radius: @border-radius-button;
|
|
11
11
|
height: 32px;
|
|
12
12
|
padding: 1px 10px;
|
|
13
|
-
color: @
|
|
13
|
+
color: @text-1;
|
|
14
14
|
cursor: pointer;
|
|
15
15
|
box-sizing: border-box;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.tenant-dropdown-trigger:hover {
|
|
19
|
-
background: @
|
|
19
|
+
background: @fill-3;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.tenant-dropdown-trigger .tenant-name {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.tenant-dropdown-menu .selected-label {
|
|
47
|
-
color: @
|
|
47
|
+
color: @brand1-6;
|
|
48
48
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
// 再导入 @mico-platform/theme 主题变量(CSS Variables + Less Variables)
|
|
3
2
|
// 这样项目的变量定义会在 UI 库之后,可以正确覆盖
|
|
4
3
|
@import '@mico-platform/theme/variables';
|
|
@@ -16,7 +15,7 @@ html {
|
|
|
16
15
|
body {
|
|
17
16
|
overscroll-behavior-x: none;
|
|
18
17
|
height: 100%;
|
|
19
|
-
background-color: @
|
|
18
|
+
background-color: @fill-1;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
#root {
|
package/generators/micro-react/templates/apps/layout/src/layouts/components/header/index.less
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// Common mixins
|
|
4
4
|
.header-gray-btn-mixin() {
|
|
5
|
-
background: @
|
|
5
|
+
background: @fill-2;
|
|
6
6
|
border-radius: @border-radius-button;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
display: flex;
|
|
29
29
|
align-items: center;
|
|
30
30
|
justify-content: space-between;
|
|
31
|
-
background: var(--
|
|
31
|
+
background: var(--fill-0);
|
|
32
32
|
box-shadow: 0 4px 4px 0 rgba(134, 144, 156, 8%);
|
|
33
33
|
flex-shrink: 0;
|
|
34
34
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
.logo-text {
|
|
47
47
|
font-size: @font-size-lg;
|
|
48
48
|
font-weight: @font-weight-bold;
|
|
49
|
-
color: @
|
|
49
|
+
color: @brand1-6;
|
|
50
50
|
letter-spacing: 1px;
|
|
51
51
|
overflow: hidden;
|
|
52
52
|
white-space: nowrap;
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
font-size: 14px;
|
|
88
88
|
line-height: 22px;
|
|
89
89
|
font-weight: 400;
|
|
90
|
-
color: @
|
|
90
|
+
color: @text-2;
|
|
91
91
|
border-radius: @border-radius-md;
|
|
92
92
|
transition: background-color @animation-duration-fast,
|
|
93
93
|
color @animation-duration-fast;
|
|
@@ -98,26 +98,26 @@
|
|
|
98
98
|
|
|
99
99
|
// 未选中 hover:仅加浅灰底(fill/2),文字保持灰色不变紫
|
|
100
100
|
&:hover {
|
|
101
|
-
color: @
|
|
102
|
-
background-color: @
|
|
101
|
+
color: @text-2;
|
|
102
|
+
background-color: @fill-2;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// 选中态:品牌紫 + Medium
|
|
106
106
|
&-active {
|
|
107
|
-
color: @
|
|
107
|
+
color: @brand1-6;
|
|
108
108
|
font-weight: 500;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// 选中 + hover:品牌紫文字 + 浅灰圆角底
|
|
112
112
|
&-active:hover {
|
|
113
|
-
color: @
|
|
114
|
-
background-color: @
|
|
113
|
+
color: @brand1-6;
|
|
114
|
+
background-color: @fill-2;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
// 激活下划线(ink bar):品牌紫
|
|
119
119
|
.arco-tabs-header-ink {
|
|
120
|
-
background-color: @
|
|
120
|
+
background-color: @brand1-6;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -138,12 +138,12 @@
|
|
|
138
138
|
transition: background-color @animation-duration-fast;
|
|
139
139
|
|
|
140
140
|
&:hover {
|
|
141
|
-
background: @
|
|
141
|
+
background: @fill-2;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
svg {
|
|
145
145
|
font-size: 18px;
|
|
146
|
-
color: @
|
|
146
|
+
color: @text-2;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
|
|
@@ -156,11 +156,11 @@
|
|
|
156
156
|
transition: background-color @animation-duration-fast;
|
|
157
157
|
|
|
158
158
|
&:hover {
|
|
159
|
-
background: @
|
|
159
|
+
background: @fill-2;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
.user-name {
|
|
163
|
-
color: @
|
|
163
|
+
color: @text-1;
|
|
164
164
|
font-size: @font-size-base;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
.split-line {
|
|
169
169
|
width: 1px;
|
|
170
170
|
height: 16px;
|
|
171
|
-
background: var(--
|
|
171
|
+
background: var(--line-2);
|
|
172
172
|
margin: 0 @spacing-xs;
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -176,9 +176,9 @@
|
|
|
176
176
|
.header-gray-btn-mixin();
|
|
177
177
|
.center-mixin();
|
|
178
178
|
|
|
179
|
-
color: @
|
|
179
|
+
color: @text-1;
|
|
180
180
|
|
|
181
181
|
.unread-count {
|
|
182
|
-
background-color: @
|
|
182
|
+
background-color: @danger-6;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
.layout-menu.arco-menu-dark,
|
|
13
13
|
.layout-menu.arco-menu {
|
|
14
14
|
font-size: @font-size-base;
|
|
15
|
-
background-color: @
|
|
15
|
+
background-color: @text-5;
|
|
16
16
|
|
|
17
17
|
// Base menu item styles
|
|
18
18
|
.arco-menu-item {
|
|
@@ -21,32 +21,32 @@
|
|
|
21
21
|
padding: 0 12px;
|
|
22
22
|
|
|
23
23
|
&:hover {
|
|
24
|
-
background-color: @
|
|
24
|
+
background-color: @brand1-1;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.arco-menu-inline-header {
|
|
29
29
|
&:hover {
|
|
30
|
-
background-color: @
|
|
30
|
+
background-color: @brand1-1;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.arco-menu-inline-header.arco-menu-selected {
|
|
35
35
|
&:hover {
|
|
36
|
-
background-color: @
|
|
36
|
+
background-color: @brand1-1;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.arco-menu-item.arco-menu-selected {
|
|
41
|
-
background-color: @
|
|
41
|
+
background-color: @brand1-1;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.arco-menu-pop-header.arco-menu-selected {
|
|
45
|
-
background-color: @
|
|
45
|
+
background-color: @brand1-1;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.arco-menu-pop-header:hover {
|
|
49
|
-
background-color: @
|
|
49
|
+
background-color: @brand1-1;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.arco-menu-indent {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
// Sider styles
|
|
138
138
|
.layout-web-sider {
|
|
139
139
|
box-shadow: none;
|
|
140
|
-
background-color: @
|
|
140
|
+
background-color: @text-5 !important;
|
|
141
141
|
position: fixed !important;
|
|
142
142
|
height: calc(100vh - @header-height) !important;
|
|
143
143
|
z-index: 999;
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
display: flex;
|
|
147
147
|
justify-content: flex-end;
|
|
148
148
|
// 使用主题变量适配亮/暗主题
|
|
149
|
-
background-color: @
|
|
149
|
+
background-color: @text-5;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
.click-trigger-btn {
|
|
@@ -159,13 +159,13 @@
|
|
|
159
159
|
|
|
160
160
|
// 图标颜色适配主题
|
|
161
161
|
.arco-icon {
|
|
162
|
-
color: @
|
|
162
|
+
color: @text-2;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
.click-trigger-btn:not(.collapsed) {
|
|
167
|
-
background-color: @
|
|
168
|
-
border-radius: @border-radius-
|
|
167
|
+
background-color: @fill-1;
|
|
168
|
+
border-radius: @border-radius-md;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
.click-trigger-btn.collapsed {
|
|
@@ -184,11 +184,11 @@
|
|
|
184
184
|
.arco-menu-dark .arco-menu-group-title,
|
|
185
185
|
.arco-menu-dark .arco-menu-pop-header,
|
|
186
186
|
.arco-menu-dark .arco-menu-inline-header {
|
|
187
|
-
background-color: @
|
|
188
|
-
color: @
|
|
187
|
+
background-color: @text-5;
|
|
188
|
+
color: @text-2;
|
|
189
189
|
|
|
190
190
|
&.arco-menu-selected {
|
|
191
|
-
color: @
|
|
191
|
+
color: @brand1-6;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import '@mico-platform/theme/variables';
|
|
2
2
|
|
|
3
3
|
.arco-tree-node:hover {
|
|
4
|
-
background-color: @
|
|
4
|
+
background-color: @fill-2;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
body {
|
|
@@ -11,7 +11,7 @@ body {
|
|
|
11
11
|
|
|
12
12
|
.layout-container {
|
|
13
13
|
min-width: @size-base * 128;
|
|
14
|
-
background: @
|
|
14
|
+
background: @fill-1;
|
|
15
15
|
// overflow-x: auto;s
|
|
16
16
|
// overflow-y: hidden;
|
|
17
17
|
display: flex;
|
|
@@ -48,7 +48,7 @@ body {
|
|
|
48
48
|
// overflow-y: scroll;
|
|
49
49
|
overflow: hidden;
|
|
50
50
|
background: none;
|
|
51
|
-
border-radius: @border-radius-
|
|
51
|
+
border-radius: @border-radius-md;
|
|
52
52
|
position: relative;
|
|
53
53
|
|
|
54
54
|
--layout-content-outlet-margin-top: 32px;
|
|
@@ -60,11 +60,11 @@ body {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.arco-spin-children::after {
|
|
63
|
-
background-color: color-mix(in srgb, var(--
|
|
63
|
+
background-color: color-mix(in srgb, var(--text-5) 60%, transparent);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.arco-layout-sider-trigger {
|
|
67
|
-
background-color: @
|
|
67
|
+
background-color: @text-5;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -81,7 +81,7 @@ body {
|
|
|
81
81
|
|
|
82
82
|
.layout-web-sider {
|
|
83
83
|
box-shadow: none;
|
|
84
|
-
background-color: @
|
|
84
|
+
background-color: @text-5;
|
|
85
85
|
z-index: 999;
|
|
86
86
|
|
|
87
87
|
.arco-layout-sider-trigger {
|
|
@@ -96,8 +96,8 @@ body {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.click-trigger-btn:not(.collapsed) {
|
|
99
|
-
background-color: @
|
|
100
|
-
border-radius: @border-radius-
|
|
99
|
+
background-color: @fill-1;
|
|
100
|
+
border-radius: @border-radius-md;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
.click-trigger-btn.collapsed {
|
|
@@ -106,37 +106,37 @@ body {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.arco-drawer-header {
|
|
109
|
-
border-bottom: 1px solid @
|
|
109
|
+
border-bottom: 1px solid @line-2;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.arco-drawer-footer {
|
|
113
|
-
border-top: 1px solid @
|
|
113
|
+
border-top: 1px solid @line-2;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
.arco-dropdown-menu {
|
|
117
|
-
border-color: @
|
|
117
|
+
border-color: @line-2;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
.arco-message-success,
|
|
121
121
|
.arco-message-error,
|
|
122
122
|
.arco-message-warning,
|
|
123
123
|
.arco-message-loading {
|
|
124
|
-
border-color: @
|
|
124
|
+
border-color: @line-2;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
// 按钮样式覆盖
|
|
128
128
|
.arco-btn-secondary:not(.arco-btn-disabled) {
|
|
129
|
-
background-color: @
|
|
129
|
+
background-color: @fill-2;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
.arco-btn-secondary:not(.arco-btn-disabled):not(.arco-btn-loading):hover {
|
|
133
|
-
background-color: @
|
|
133
|
+
background-color: @fill-3;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.arco-btn-secondary:not(.arco-btn-disabled):not(.arco-btn-loading):active {
|
|
137
|
-
background-color: @
|
|
137
|
+
background-color: @fill-4;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.arco-btn-secondary.arco-btn-disabled {
|
|
141
|
-
background-color: @
|
|
141
|
+
background-color: @fill-1;
|
|
142
142
|
}
|
|
@@ -229,7 +229,7 @@ const BasicLayout: React.FC = () => {
|
|
|
229
229
|
zIndex: 100,
|
|
230
230
|
}}
|
|
231
231
|
>
|
|
232
|
-
<Spin
|
|
232
|
+
<Spin />
|
|
233
233
|
</div>
|
|
234
234
|
)}
|
|
235
235
|
<MicroAppLoader
|
|
@@ -247,7 +247,6 @@ const BasicLayout: React.FC = () => {
|
|
|
247
247
|
if (isRefreshing) {
|
|
248
248
|
return (
|
|
249
249
|
<Spin
|
|
250
|
-
dot
|
|
251
250
|
style={{ width: '100%', marginTop: 100, textAlign: 'center' }}
|
|
252
251
|
/>
|
|
253
252
|
);
|
|
@@ -259,7 +258,7 @@ const BasicLayout: React.FC = () => {
|
|
|
259
258
|
if (!showLayout) {
|
|
260
259
|
return (
|
|
261
260
|
<Suspense
|
|
262
|
-
fallback={<Spin
|
|
261
|
+
fallback={<Spin style={{ width: '100%', marginTop: 100 }} />}
|
|
263
262
|
>
|
|
264
263
|
{isForbidden ? <ForbiddenPage /> : renderContent()}
|
|
265
264
|
</Suspense>
|
|
@@ -277,7 +276,7 @@ const BasicLayout: React.FC = () => {
|
|
|
277
276
|
<Content className="layout-content-outlet">
|
|
278
277
|
<Suspense
|
|
279
278
|
fallback={
|
|
280
|
-
<Spin
|
|
279
|
+
<Spin style={{ width: '100%', marginTop: 100 }} />
|
|
281
280
|
}
|
|
282
281
|
>
|
|
283
282
|
{renderContent()}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
.container {
|
|
4
4
|
padding-top: 30px;
|
|
5
|
-
color: @
|
|
5
|
+
color: @text-1;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.title {
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
margin: 0 0 8px;
|
|
16
16
|
font-size: 14px;
|
|
17
17
|
line-height: 1.6;
|
|
18
|
-
color: @
|
|
18
|
+
color: @text-2;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.meta {
|
|
22
22
|
margin: 0;
|
|
23
23
|
font-size: 12px;
|
|
24
24
|
font-family: ui-monospace, monospace;
|
|
25
|
-
color: @
|
|
25
|
+
color: @text-3;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.demoCard {
|