feat: add slots

This commit is contained in:
jialin
2026-05-11 14:27:49 +08:00
committed by jialin
parent 168c55990f
commit ed06d57a31
+4
View File
@@ -48,6 +48,7 @@ import Exception from './Exception';
import './Layout.css';
import { LogoIcon, SLogoIcon } from './Logo';
import ErrorBoundary from './error-boundary';
import { ExtraContent } from './extraRender';
import { patchRoutes } from './runtime';
import SiderMenu from './sider-menu';
@@ -194,6 +195,8 @@ export default (props: any) => {
notFound: <span>404 not found</span>
};
const coreUISlots = useMemo(() => ({ ExtraContent }), []);
const handleToggleCollapse = (e: any) => {
e.stopPropagation();
setUserSettings({
@@ -381,6 +384,7 @@ export default (props: any) => {
readState,
writeState
}}
slots={coreUISlots}
>
<DarkMask></DarkMask>
<ProLayout