cfel-base-components 2.5.1 → 2.5.2
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/package.json
CHANGED
|
@@ -5,8 +5,7 @@ import "./index.scss";
|
|
|
5
5
|
interface UserType {
|
|
6
6
|
name: string;
|
|
7
7
|
avatar: string;
|
|
8
|
-
|
|
9
|
-
role: any[];
|
|
8
|
+
roleInfo: any[];
|
|
10
9
|
}
|
|
11
10
|
interface CustomType {
|
|
12
11
|
type: string;
|
|
@@ -44,10 +43,10 @@ export default function UserCard({
|
|
|
44
43
|
amountInfo,
|
|
45
44
|
customAction,
|
|
46
45
|
}: any) {
|
|
47
|
-
const { user, custom, switchTenantUrl, logoutUrl } = (window as any)
|
|
46
|
+
const { user, tenant, custom, switchTenantUrl, logoutUrl } = (window as any)
|
|
48
47
|
?.g_config;
|
|
49
48
|
|
|
50
|
-
const { name, avatar,
|
|
49
|
+
const { name, avatar, roleInfo }: UserType = user || {};
|
|
51
50
|
|
|
52
51
|
const { isCompleted, isAudited }: CustomType = custom || {};
|
|
53
52
|
|
|
@@ -63,7 +62,7 @@ export default function UserCard({
|
|
|
63
62
|
<div className="user-info-right">
|
|
64
63
|
<span className="name">{name}</span>
|
|
65
64
|
<div className="role-list">
|
|
66
|
-
{
|
|
65
|
+
{roleInfo?.map((i) => (
|
|
67
66
|
<span className="role-item" key={i}>
|
|
68
67
|
{i}
|
|
69
68
|
</span>
|
|
@@ -125,11 +124,11 @@ export default function UserCard({
|
|
|
125
124
|
</div>
|
|
126
125
|
)}
|
|
127
126
|
|
|
128
|
-
{
|
|
127
|
+
{tenant?.name && (
|
|
129
128
|
<div className="lios-tenant">
|
|
130
129
|
<div className="tenant-label">租户</div>
|
|
131
130
|
<div className="tenant-switch">
|
|
132
|
-
<div className="tenant-value">{
|
|
131
|
+
<div className="tenant-value">{tenant?.name}</div>
|
|
133
132
|
{switchTenantUrl && (
|
|
134
133
|
<div
|
|
135
134
|
className="tenant-icon"
|