Open killer-wu opened 8 months ago
import { KeepAliveContainer } from '@/components/KeepAliveWrapper'; import { Outlet, useLocation } from '@umijs/max'; import { FC } from 'react';
import
const KeepAliveWrapper: FC = () => { const location = useLocation();
return ( <> \ \<Outlet /> \</KeepAliveContainer> \<\/> ); };
export default KeepAliveWrapper;
export const KeepAliveContainer = (props: any) => { return ( \<> \{props.children}\</KeepAlive> \<\/> ); };
import
{ KeepAliveContainer } from '@/components/KeepAliveWrapper'; import { Outlet, useLocation } from '@umijs/max'; import { FC } from 'react';const KeepAliveWrapper: FC = () => { const location = useLocation();
return ( <> \
\<Outlet />
\</KeepAliveContainer>
\<\/>
);
};
export default KeepAliveWrapper;
export const KeepAliveContainer = (props: any) => { return ( \<> \{props.children}\</KeepAlive>
\<\/>
);
};