cfel-base-components 2.0.6 → 2.0.7
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/demo/src/index.jsx
CHANGED
|
@@ -2,6 +2,7 @@ import React from "react"
|
|
|
2
2
|
import { createRoot } from 'react-dom/client';
|
|
3
3
|
import style from './index.module.less';
|
|
4
4
|
import { SwapOutlined, } from '@ant-design/icons';
|
|
5
|
+
import { history } from 'umi';
|
|
5
6
|
|
|
6
7
|
import './index.scss';
|
|
7
8
|
import PageContainer from '../../src/components/base-component/PageContainer';
|
|
@@ -41,7 +42,8 @@ const App = () => {
|
|
|
41
42
|
type:(window)?.g_config?.custom?.type,
|
|
42
43
|
isCompleted:(window)?.g_config?.custom?.isCompleted,
|
|
43
44
|
isAudited:(window)?.g_config?.custom?.isAudited,
|
|
44
|
-
hrefUrl='/web/user-info'
|
|
45
|
+
hrefUrl='/web/user-info',
|
|
46
|
+
historyAction:history
|
|
45
47
|
}}
|
|
46
48
|
logoutUrl={(window)?.g_config?.logoutUrl}
|
|
47
49
|
switchTenantUrl={(window)?.g_config?.switchTenantUrl}
|
package/package.json
CHANGED
|
@@ -21,7 +21,8 @@ export interface LiosLayoutlProps {
|
|
|
21
21
|
type: string,
|
|
22
22
|
isCompleted: number,
|
|
23
23
|
isAudited: number,
|
|
24
|
-
hrefUrl:string
|
|
24
|
+
hrefUrl:string,
|
|
25
|
+
historyAction?: any;
|
|
25
26
|
}
|
|
26
27
|
logoutUrl?: string,
|
|
27
28
|
switchTenantUrl?: string,
|
|
@@ -58,7 +59,8 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
58
59
|
const {
|
|
59
60
|
isCompleted,
|
|
60
61
|
isAudited,
|
|
61
|
-
hrefUrl
|
|
62
|
+
hrefUrl,
|
|
63
|
+
historyAction
|
|
62
64
|
} = custom || {}
|
|
63
65
|
const [openKeys, setOpenKeys] = useState<any>(defaultOpenKeys || []);
|
|
64
66
|
const [currentProduct, setCurrentProduct] = useState<any>({});
|
|
@@ -78,7 +80,14 @@ export default function LiosLayout(props: LiosLayoutlProps) {
|
|
|
78
80
|
};
|
|
79
81
|
const editUserInfo = () => {
|
|
80
82
|
const { origin } = window.location
|
|
81
|
-
|
|
83
|
+
if(historyAction){
|
|
84
|
+
historyAction?.push({
|
|
85
|
+
pathname: hrefUrl
|
|
86
|
+
});
|
|
87
|
+
}else{
|
|
88
|
+
window.location.href = origin + hrefUrl
|
|
89
|
+
}
|
|
90
|
+
|
|
82
91
|
}
|
|
83
92
|
const UserCard = () => {
|
|
84
93
|
return <div className='lios-user-card'>
|