@yeeyoon/library 3.0.2 → 3.0.6
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.
@@ -154,6 +154,7 @@ const Header = (props) => {
|
|
154
154
|
const { platforms, tenants, id, name } = data;
|
155
155
|
if (!platforms.length || !tenants.length) {
|
156
156
|
handleException && handleException();
|
157
|
+
return;
|
157
158
|
}
|
158
159
|
|
159
160
|
ls.set('X-Auth-Username', name);
|
@@ -182,9 +183,6 @@ const Header = (props) => {
|
|
182
183
|
allProduct = data;
|
183
184
|
leftProduct = _xorBy(allProduct, currentProduct, 'id');
|
184
185
|
}
|
185
|
-
if (!data.filter((item) => item.code === 200000728).length) {
|
186
|
-
handleException && handleException();
|
187
|
-
}
|
188
186
|
};
|
189
187
|
|
190
188
|
const doLogout = async (userId) => {
|
@@ -28,7 +28,7 @@ const TenantSelector = (props) => {
|
|
28
28
|
}
|
29
29
|
setTenantList(tenants);
|
30
30
|
setCurrentTenantId(id);
|
31
|
-
tenantIdChangeCb(id, name);
|
31
|
+
tenantIdChangeCb(id, name, tenants);
|
32
32
|
}
|
33
33
|
}, []);
|
34
34
|
|
@@ -44,7 +44,7 @@ const TenantSelector = (props) => {
|
|
44
44
|
const { children } = option;
|
45
45
|
setCurrentTenantId(value);
|
46
46
|
if (tenantIdChangeCb) {
|
47
|
-
tenantIdChangeCb(value, children);
|
47
|
+
tenantIdChangeCb(value, children, tenantList);
|
48
48
|
}
|
49
49
|
}}
|
50
50
|
>
|
package/package.json
CHANGED
package/src/pages/index.js
CHANGED
@@ -1,27 +1,7 @@
|
|
1
|
-
import React
|
2
|
-
import { notification } from 'antd';
|
1
|
+
import React from 'react';
|
3
2
|
import Header from '../../lib/components/Header/';
|
4
|
-
import TenantSelector from '../../lib/components/TenantSelector/';
|
5
|
-
import CustomDefaultFooter from '../../lib/components/DefaultFooter/';
|
6
|
-
import PageLoading from '../../lib/components/PageLoading/';
|
7
|
-
// import ModifyPassword from '../../lib/components/ModifyPassword/';
|
8
3
|
|
9
4
|
// eslint-disable-next-line react/display-name
|
10
5
|
export default function () {
|
11
|
-
|
12
|
-
notification.config({ maxCount: 1 });
|
13
|
-
notification.error({ message: '测试信息' });
|
14
|
-
}, []);
|
15
|
-
return (
|
16
|
-
<>
|
17
|
-
<Header productName="profile" slot={<div>nasa</div>} />
|
18
|
-
{/* <TenantSelector
|
19
|
-
tenantId="14bfb5d71d1011eca9820c42a1f6bf88"
|
20
|
-
tenantIdChangeCb={(id) => console.log(id)}
|
21
|
-
/> */}
|
22
|
-
{/* <CustomDefaultFooter /> */}
|
23
|
-
{/* <PageLoading /> */}
|
24
|
-
{/* {<ModifyPassword />} */}
|
25
|
-
</>
|
26
|
-
);
|
6
|
+
return <Header productName="bpm" slot={<div>nasa</div>} />;
|
27
7
|
}
|