cfel-base-components 2.5.28 → 2.5.29
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 +85 -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,112 @@ 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
|
-
|
|
86
|
+
))}
|
|
87
|
+
</div>
|
|
89
88
|
</div>
|
|
90
89
|
</div>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
90
|
+
<div className="lios-userInfo">
|
|
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/>}
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
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/>}
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
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/>}
|
|
128
|
+
</div>
|
|
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>
|
|
103
133
|
</div>
|
|
104
134
|
</div>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
<div className={'userInfo'}>
|
|
138
|
+
<div className={'lios-li'}>
|
|
139
|
+
<div className={'lios-key'}>资金账户</div>
|
|
140
|
+
<div className={'lios-value'}>
|
|
141
|
+
<a
|
|
142
|
+
onClick={() => {
|
|
143
|
+
location.href = '/web/capital-wallet'
|
|
144
|
+
}}
|
|
145
|
+
>
|
|
146
|
+
跳转
|
|
147
|
+
</a>
|
|
148
|
+
</div>
|
|
109
149
|
</div>
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
<div className="lios-logoutBox">
|
|
110
153
|
<div
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
154
|
+
className="lios-logout"
|
|
155
|
+
onClick={() => {
|
|
156
|
+
location.href = switchTenantUrl;
|
|
157
|
+
}}
|
|
115
158
|
>
|
|
116
|
-
|
|
159
|
+
<SwapOutlined className="logout-icon"/>
|
|
160
|
+
切换租户
|
|
117
161
|
</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
162
|
<div
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
163
|
+
className="lios-logout"
|
|
164
|
+
onClick={() => {
|
|
165
|
+
location.href = logoutUrl;
|
|
166
|
+
}}
|
|
128
167
|
>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</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
|
-
<div className="lios-userInfo">
|
|
141
|
-
<div className="lios-li">
|
|
142
|
-
<div className="lios-key">现金余额</div>
|
|
143
|
-
<div className="lios-value">
|
|
144
|
-
<span>{renderCurrency(currency)}</span>
|
|
145
|
-
{availableCashAmount || "加载中..."}
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
<div className="lios-li">
|
|
149
|
-
<div className="lios-key">可用额度</div>
|
|
150
|
-
<div className="lios-value">
|
|
151
|
-
<span>{renderCurrency(currency)}</span>
|
|
152
|
-
{availableAmount || "加载中..."}
|
|
153
|
-
</div>
|
|
168
|
+
<LogoutOutlined className="logout-icon"/>
|
|
169
|
+
退出登录
|
|
154
170
|
</div>
|
|
155
|
-
{amountInfo && (
|
|
156
|
-
<div className="lios-li">
|
|
157
|
-
<div className="lios-key">抵用金余额</div>
|
|
158
|
-
<div className="lios-value">
|
|
159
|
-
<span>{renderCurrency(currencyCode)}</span>
|
|
160
|
-
{residueNum || "加载中..."}
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
)}
|
|
164
|
-
</div>
|
|
165
|
-
)}
|
|
166
|
-
<div className="lios-logoutBox">
|
|
167
|
-
<div
|
|
168
|
-
className="lios-logout"
|
|
169
|
-
onClick={() => {
|
|
170
|
-
location.href = switchTenantUrl;
|
|
171
|
-
}}
|
|
172
|
-
>
|
|
173
|
-
<SwapOutlined className="logout-icon" />
|
|
174
|
-
切换租户
|
|
175
|
-
</div>
|
|
176
|
-
<div
|
|
177
|
-
className="lios-logout"
|
|
178
|
-
onClick={() => {
|
|
179
|
-
location.href = logoutUrl;
|
|
180
|
-
}}
|
|
181
|
-
>
|
|
182
|
-
<LogoutOutlined className="logout-icon" />
|
|
183
|
-
退出登录
|
|
184
171
|
</div>
|
|
185
172
|
</div>
|
|
186
|
-
</div>
|
|
187
173
|
);
|
|
188
174
|
};
|
|
189
175
|
|