diff --git a/src/layout/components/AppMain/AppMain.tsx b/src/layout/components/AppMain/AppMain.tsx index f0fcfc7..4b5dee0 100644 --- a/src/layout/components/AppMain/AppMain.tsx +++ b/src/layout/components/AppMain/AppMain.tsx @@ -10,12 +10,13 @@ const { Content } = Layout; const AppMain = memo(() => { const isKeepAlive = true; + const maxLen = 10; return ( - +
{isKeepAlive ? ( - + ) : ( }> diff --git a/src/layout/components/AppMain/KeepAlive/index.tsx b/src/layout/components/AppMain/KeepAlive/index.tsx index b01e739..808a8cd 100644 --- a/src/layout/components/AppMain/KeepAlive/index.tsx +++ b/src/layout/components/AppMain/KeepAlive/index.tsx @@ -6,7 +6,6 @@ import { useAppSelector } from '@/store/hooks'; import LayoutSpin from '@/components/LayoutSpin'; interface Props extends ComponentReactElement { - include?: Array; maxLen?: number; } export const KeepAlive = memo(({ maxLen = 10 }: Props) => { diff --git a/src/layout/components/AppMain/TabsPage/index.tsx b/src/layout/components/AppMain/TabsPage/index.tsx index 7e83791..6c80356 100644 --- a/src/layout/components/AppMain/TabsPage/index.tsx +++ b/src/layout/components/AppMain/TabsPage/index.tsx @@ -6,7 +6,11 @@ import { findRouteByPath, routeListToMenu } from '@/router/utils'; import { setStoreMultiTabs } from '@/store/modules/route'; import defaultRoute from '@/router/modules'; -const TabsPage = memo(() => { +interface Props { + maxLen?: number; +} + +const TabsPage = memo((_props: Props) => { const location = useLocation(); const navigate = useNavigate(); const dispatch = useAppDispatch(); @@ -67,6 +71,7 @@ const TabsPage = memo(() => { return ( 1 ? 'editable-card' : 'card'} onChange={(key) => navigate(key)}