diff --git a/src/app.tsx b/src/app.tsx index fc6f598..2c8b9b5 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -95,6 +95,8 @@ export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) = fetchUserInfo?.(setInitialState); } }, + pure: !!new URLSearchParams(window.location.search), // 删除自带页面 + // pure:true, links: isDev ? [ @@ -123,17 +125,17 @@ export const layout: RunTimeLayoutConfig = ({ initialState, setInitialState }) = return []; } // initialState.currentUser 中包含了所有用户信息 - let menus = await getRoutersInfo(); + const menus = await getRoutersInfo(); const urlParams = new URLSearchParams(window.location.search); - const hideInMenu = urlParams.get('hideInMenu'); // 替换 'hideInMenu' 为你要获取的参数名 - if (hideInMenu) { - menus = menus.map((item) => { - return { - ...item, - hideInMenu: true, - }; - }); - } + // const hideInMenu = urlParams.get('hideInMenu'); // 替换 'hideInMenu' 为你要获取的参数名 + // if (hideInMenu) { + // menus = menus.map((item) => { + // return { + // ...item, + // hideInMenu: true, + // }; + // }); + // } setInitialState((preInitialState: any) => ({ ...preInitialState, menus, diff --git a/src/components/KeepAliveTabs/index.tsx b/src/components/KeepAliveTabs/index.tsx index 388cd9e..ee87873 100644 --- a/src/components/KeepAliveTabs/index.tsx +++ b/src/components/KeepAliveTabs/index.tsx @@ -222,7 +222,7 @@ const KeepAliveTabs = () => { return ( //
-
+
{tabList.length > 0 && }
= showTabs && styles.boxShadow}`}> {tabList.length > showTabs && ( diff --git a/src/global.less b/src/global.less index f59b1a5..d054f36 100644 --- a/src/global.less +++ b/src/global.less @@ -27,6 +27,11 @@ body { -moz-osx-font-smoothing: grayscale; } + +.hideContent{ + display: none; +} + ul, ol { list-style: none; diff --git a/src/pages/pdManer/pages/welcome/index.js b/src/pages/pdManer/pages/welcome/index.js index 0b5ac2b..aa269e9 100644 --- a/src/pages/pdManer/pages/welcome/index.js +++ b/src/pages/pdManer/pages/welcome/index.js @@ -25,7 +25,7 @@ import './style/index.less'; const Welcome = React.memo(({ prefix, getUserData, config, ...restProps }) => { const currentPrefix = getPrefix(prefix); return ( -
+
{