From 59f2bd30958c6e5adf7742877f0ef5ee7c2506d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E5=BC=BA?= <2997723368@qq.com> Date: Tue, 2 Jan 2024 10:25:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=8D=E7=99=BB=E5=BD=95=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.tsx | 22 ++++++++++++---------- src/components/KeepAliveTabs/index.tsx | 2 +- src/global.less | 5 +++++ src/pages/pdManer/pages/welcome/index.js | 2 +- 4 files changed, 19 insertions(+), 12 deletions(-) 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 ( -
+
{