mfe.css
1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* 子应用加载占位:盖在常驻宿主之上,不替换宿主节点。
只由 shell 注入;子应用构建产物里不应出现任何裸 .uj-* 全局类。 */
.uj-mfe-loading {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: var(--uj-bg, #f4f6fa);
}
/* 加载态单独成组加间距:错误态里 Empty / 说明 / 按钮各自带 margin-top,
若把 gap 挂在 .uj-mfe-loading 上会叠加成双倍间距。 */
.uj-mfe-loading__spinner {
display: flex;
flex-direction: column;
align-items: center;
gap: 14px;
}
.uj-mfe-loading__label {
color: var(--uj-text-3);
font-size: 12px;
letter-spacing: 0.5px;
}
/* 失败态:错误信息必须可读、可操作,不能退化成无限 loading。 */
.uj-mfe-loading--error {
gap: 0;
padding: var(--uj-space-6);
text-align: center;
}
.uj-mfe-loading__error-message {
max-width: 640px;
margin-top: var(--uj-space-4);
padding: var(--uj-space-3) var(--uj-space-4);
border: 1px solid var(--uj-error-border, #f8cfd1);
border-radius: var(--uj-radius-md, 6px);
background: var(--uj-error-soft, #fdedee);
color: var(--uj-error, #e5484d);
font-size: var(--uj-font-md, 14px);
line-height: 1.6;
overflow-wrap: anywhere;
}
.uj-mfe-loading__hint {
margin-top: var(--uj-space-3);
color: var(--uj-text-3);
font-size: var(--uj-font-sm, 13px);
line-height: 1.6;
}
.uj-mfe-loading__actions {
display: flex;
gap: var(--uj-space-2);
margin-top: var(--uj-space-5);
}