diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx index 5cde19e2e4203f56705fd16130d9edd0af576fd4..a28d8348ba2555f3b2111082eb184acd6afe9d4d 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -23,7 +23,7 @@ export type BasicLayoutContext = { [K in 'location']: BasicLayoutProps[K] } & { }; const BasicLayout: React.FC = props => { - const { dispatch, children, route } = props; + const { dispatch, children, route, settings } = props; const { routes, authority } = route!; /** * constructor @@ -38,7 +38,6 @@ const BasicLayout: React.FC = props => { */ const handleMenuCollapse = (payload: boolean) => dispatch!({ type: 'global/changeLayoutCollapsed', payload }); - return ( <> = props => { onCollapse={handleMenuCollapse} rightContentRender={RightProps => } {...props} + {...settings} > {children} + settings={settings} + onSettingChange={config => dispatch!({ type: 'settings/changeSetting', - payload: settings, + payload: config, }) } />