cfel-base-components 2.5.28 → 2.5.30
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/.idea/base-components.iml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/package.json +1 -1
- package/src/.umi/core/EmptyRoute.tsx +9 -0
- package/src/.umi/core/defineApp.ts +16 -0
- package/src/.umi/core/history.ts +66 -0
- package/src/.umi/core/historyIntelli.ts +132 -0
- package/src/.umi/core/plugin.ts +40 -0
- package/src/.umi/core/pluginConfig.ts +281 -0
- package/src/.umi/core/pluginConfigJoi.d.ts +7 -0
- package/src/.umi/core/polyfill.ts +201 -0
- package/src/.umi/core/route.tsx +16 -0
- package/src/.umi/core/terminal.ts +37 -0
- package/src/.umi/exports.ts +15 -0
- package/src/.umi/testBrowser.tsx +87 -0
- package/src/.umi/tsconfig.json +43 -0
- package/src/.umi/typings.d.ts +136 -0
- package/src/.umi/umi.ts +76 -0
- package/src/components/layout/index.tsx +0 -1
- package/src/components/layout/user-card/index.tsx +86 -99
package/src/.umi/umi.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// This file is generated by Umi automatically
|
|
3
|
+
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
+
import './core/polyfill';
|
|
5
|
+
|
|
6
|
+
import { renderClient } from '/Users/lionaillen/Documents/work/cfel/base-components/node_modules/.pnpm/@umijs+renderer-react@4.0.72_react-dom@18.1.0_react@18.1.0__react@18.1.0/node_modules/@umijs/renderer-react';
|
|
7
|
+
import { getRoutes } from './core/route';
|
|
8
|
+
import { createPluginManager } from './core/plugin';
|
|
9
|
+
import { createHistory } from './core/history';
|
|
10
|
+
import { ApplyPluginsType } from 'umi';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const publicPath = "/";
|
|
14
|
+
const runtimePublicPath = false;
|
|
15
|
+
|
|
16
|
+
async function render() {
|
|
17
|
+
const pluginManager = createPluginManager();
|
|
18
|
+
const { routes, routeComponents } = await getRoutes(pluginManager);
|
|
19
|
+
|
|
20
|
+
// allow user to extend routes
|
|
21
|
+
await pluginManager.applyPlugins({
|
|
22
|
+
key: 'patchRoutes',
|
|
23
|
+
type: ApplyPluginsType.event,
|
|
24
|
+
args: {
|
|
25
|
+
routes,
|
|
26
|
+
routeComponents,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const contextOpts = pluginManager.applyPlugins({
|
|
31
|
+
key: 'modifyContextOpts',
|
|
32
|
+
type: ApplyPluginsType.modify,
|
|
33
|
+
initialValue: {},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const basename = contextOpts.basename || '/';
|
|
37
|
+
const historyType = contextOpts.historyType || 'browser';
|
|
38
|
+
|
|
39
|
+
const history = createHistory({
|
|
40
|
+
type: historyType,
|
|
41
|
+
basename,
|
|
42
|
+
...contextOpts.historyOpts,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return (pluginManager.applyPlugins({
|
|
46
|
+
key: 'render',
|
|
47
|
+
type: ApplyPluginsType.compose,
|
|
48
|
+
initialValue() {
|
|
49
|
+
const context = {
|
|
50
|
+
routes,
|
|
51
|
+
routeComponents,
|
|
52
|
+
pluginManager,
|
|
53
|
+
rootElement: contextOpts.rootElement || document.getElementById('root'),
|
|
54
|
+
publicPath,
|
|
55
|
+
runtimePublicPath,
|
|
56
|
+
history,
|
|
57
|
+
historyType,
|
|
58
|
+
basename,
|
|
59
|
+
callback: contextOpts.callback,
|
|
60
|
+
};
|
|
61
|
+
const modifiedContext = pluginManager.applyPlugins({
|
|
62
|
+
key: 'modifyClientRenderOpts',
|
|
63
|
+
type: ApplyPluginsType.modify,
|
|
64
|
+
initialValue: context,
|
|
65
|
+
});
|
|
66
|
+
return renderClient(modifiedContext);
|
|
67
|
+
},
|
|
68
|
+
}))();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
render();
|
|
73
|
+
|
|
74
|
+
window.g_umi = {
|
|
75
|
+
version: '4.0.72',
|
|
76
|
+
};
|
|
@@ -64,126 +64,113 @@ export default function UserCard({
|
|
|
64
64
|
|
|
65
65
|
const { isCompleted, isAudited }: CustomType = custom || {};
|
|
66
66
|
|
|
67
|
-
const { availableCashAmount, availableAmount, currency }: MyWalletInfoType =
|
|
68
|
-
myWalletInfo || {};
|
|
69
67
|
const { isAdmin }: MyLoginInfoType = MyLoginInfo || {};
|
|
70
68
|
|
|
71
69
|
const { residueNum, currencyCode }: AmountInfoType = amountInfo || {};
|
|
72
70
|
|
|
73
71
|
const UserCard = () => {
|
|
74
72
|
return (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
73
|
+
<div className="layout-user-card">
|
|
74
|
+
<div className="user-info">
|
|
75
|
+
<div className="user-avatarBox">
|
|
76
|
+
<img className="user-avatar" src={avatar}/>
|
|
77
|
+
<div className="user-mater">{isAdmin ? "主账号" : "子账号"}</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div className="user-info-right">
|
|
80
|
+
<span className="name">{name}</span>
|
|
81
|
+
<div className="role-list">
|
|
82
|
+
{roleInfo?.map((i) => (
|
|
83
|
+
<span className="role-item" key={i}>
|
|
86
84
|
{i}
|
|
87
85
|
</span>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
<div className="lios-userInfo">
|
|
93
|
-
<div className="lios-li li-flex">
|
|
94
|
-
<div className="lios-keyMare">账号ID</div>
|
|
95
|
-
<div className="lios-valueMare" title={id}>{id}</div>
|
|
96
|
-
<div
|
|
97
|
-
className={isCopied?.['id'] ? "lios-iconDone" : "lios-icon"}
|
|
98
|
-
onClick={() => {
|
|
99
|
-
copyTextToClipboard(id,'id');
|
|
100
|
-
}}
|
|
101
|
-
>
|
|
102
|
-
{isCopied?.['id'] ? "已复制" : <CopyOutlined />}
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
<div className="lios-li li-flex">
|
|
106
|
-
<div className="lios-keyMare">账号</div>
|
|
107
|
-
<div className="lios-valueMare" title={account}>
|
|
108
|
-
{account}
|
|
109
|
-
</div>
|
|
110
|
-
<div
|
|
111
|
-
className={isCopied?.['account'] ? "lios-iconDone" : "lios-icon"}
|
|
112
|
-
onClick={() => {
|
|
113
|
-
copyTextToClipboard(account,'account');
|
|
114
|
-
}}
|
|
115
|
-
>
|
|
116
|
-
{isCopied?.['account'] ? "已复制" : <CopyOutlined />}
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
|
|
120
|
-
<div className="lios-li li-flex">
|
|
121
|
-
<div className="lios-keyMare">租户ID</div>
|
|
122
|
-
<div className="lios-valueMare" title={tenant?.id}>{tenant?.id}</div>
|
|
123
|
-
<div
|
|
124
|
-
className={isCopied?.['tenantId'] ? "lios-iconDone" : "lios-icon"}
|
|
125
|
-
onClick={() => {
|
|
126
|
-
copyTextToClipboard(tenant?.id,'tenantId');
|
|
127
|
-
}}
|
|
128
|
-
>
|
|
129
|
-
{isCopied?.['tenantId'] ? "已复制" : <CopyOutlined />}
|
|
86
|
+
))}
|
|
87
|
+
</div>
|
|
130
88
|
</div>
|
|
131
89
|
</div>
|
|
132
|
-
<div className="lios-li li-flex">
|
|
133
|
-
<div className="lios-keyMare">租户</div>
|
|
134
|
-
<div className="lios-valueMare" title={tenant?.name}>{tenant?.name}</div>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
{ myWalletInfo && (
|
|
140
90
|
<div className="lios-userInfo">
|
|
141
|
-
<div className="lios-li">
|
|
142
|
-
<div className="lios-
|
|
143
|
-
<div className="lios-
|
|
144
|
-
|
|
145
|
-
|
|
91
|
+
<div className="lios-li li-flex">
|
|
92
|
+
<div className="lios-keyMare">账号ID</div>
|
|
93
|
+
<div className="lios-valueMare" title={id}>{id}</div>
|
|
94
|
+
<div
|
|
95
|
+
className={isCopied?.['id'] ? "lios-iconDone" : "lios-icon"}
|
|
96
|
+
onClick={() => {
|
|
97
|
+
copyTextToClipboard(id, 'id');
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
{isCopied?.['id'] ? "已复制" : <CopyOutlined/>}
|
|
146
101
|
</div>
|
|
147
102
|
</div>
|
|
148
|
-
<div className="lios-li">
|
|
149
|
-
<div className="lios-
|
|
150
|
-
<div className="lios-
|
|
151
|
-
|
|
152
|
-
|
|
103
|
+
<div className="lios-li li-flex">
|
|
104
|
+
<div className="lios-keyMare">账号</div>
|
|
105
|
+
<div className="lios-valueMare" title={account}>
|
|
106
|
+
{account}
|
|
107
|
+
</div>
|
|
108
|
+
<div
|
|
109
|
+
className={isCopied?.['account'] ? "lios-iconDone" : "lios-icon"}
|
|
110
|
+
onClick={() => {
|
|
111
|
+
copyTextToClipboard(account, 'account');
|
|
112
|
+
}}
|
|
113
|
+
>
|
|
114
|
+
{isCopied?.['account'] ? "已复制" : <CopyOutlined/>}
|
|
153
115
|
</div>
|
|
154
116
|
</div>
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
{
|
|
161
|
-
|
|
117
|
+
|
|
118
|
+
<div className="lios-li li-flex">
|
|
119
|
+
<div className="lios-keyMare">租户ID</div>
|
|
120
|
+
<div className="lios-valueMare" title={tenant?.id}>{tenant?.id}</div>
|
|
121
|
+
<div
|
|
122
|
+
className={isCopied?.['tenantId'] ? "lios-iconDone" : "lios-icon"}
|
|
123
|
+
onClick={() => {
|
|
124
|
+
copyTextToClipboard(tenant?.id, 'tenantId');
|
|
125
|
+
}}
|
|
126
|
+
>
|
|
127
|
+
{isCopied?.['tenantId'] ? "已复制" : <CopyOutlined/>}
|
|
162
128
|
</div>
|
|
163
|
-
|
|
129
|
+
</div>
|
|
130
|
+
<div className="lios-li li-flex">
|
|
131
|
+
<div className="lios-keyMare">租户</div>
|
|
132
|
+
<div className="lios-valueMare" title={tenant?.name}>{tenant?.name}</div>
|
|
133
|
+
</div>
|
|
164
134
|
</div>
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
<div
|
|
168
|
-
className="lios-logout"
|
|
169
|
-
onClick={() => {
|
|
170
|
-
location.href = switchTenantUrl;
|
|
171
|
-
}}
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
<div className='userInfo'
|
|
172
138
|
>
|
|
173
|
-
<
|
|
174
|
-
|
|
139
|
+
<div className='lios-li li-flex'>
|
|
140
|
+
<div className='lios-keyMare'>资金账户</div>
|
|
141
|
+
<div className='lios-valueMare'>
|
|
142
|
+
<a
|
|
143
|
+
onClick={() => {
|
|
144
|
+
location.href = '/web/capital-wallet'
|
|
145
|
+
}}
|
|
146
|
+
>
|
|
147
|
+
跳转
|
|
148
|
+
</a>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
175
151
|
</div>
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
152
|
+
|
|
153
|
+
<div className="lios-logoutBox">
|
|
154
|
+
<div
|
|
155
|
+
className="lios-logout"
|
|
156
|
+
onClick={() => {
|
|
157
|
+
location.href = switchTenantUrl;
|
|
158
|
+
}}
|
|
159
|
+
>
|
|
160
|
+
<SwapOutlined className="logout-icon"/>
|
|
161
|
+
切换租户
|
|
162
|
+
</div>
|
|
163
|
+
<div
|
|
164
|
+
className="lios-logout"
|
|
165
|
+
onClick={() => {
|
|
166
|
+
location.href = logoutUrl;
|
|
167
|
+
}}
|
|
168
|
+
>
|
|
169
|
+
<LogoutOutlined className="logout-icon"/>
|
|
170
|
+
退出登录
|
|
171
|
+
</div>
|
|
184
172
|
</div>
|
|
185
173
|
</div>
|
|
186
|
-
</div>
|
|
187
174
|
);
|
|
188
175
|
};
|
|
189
176
|
|