From ed06d57a31d19a23a9f978219c0f6e4d711ae6c0 Mon Sep 17 00:00:00 2001 From: jialin Date: Mon, 11 May 2026 14:26:10 +0800 Subject: [PATCH] feat: add slots --- src/layouts/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 2f7b699e..95ae85a1 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -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: 404 not found }; + const coreUISlots = useMemo(() => ({ ExtraContent }), []); + const handleToggleCollapse = (e: any) => { e.stopPropagation(); setUserSettings({ @@ -381,6 +384,7 @@ export default (props: any) => { readState, writeState }} + slots={coreUISlots} >