From d0dcbbaecd66c09643eb0f09eaf61149d4cd5252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=BD=E7=99=BD?= Date: Fri, 15 Jul 2022 17:54:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0RunTimeLayoutConfig?= =?UTF-8?q?=E5=AF=BC=E5=87=BAts=E7=B1=BB=E5=9E=8Blogout=E5=8F=8ArightConte?= =?UTF-8?q?ntRender=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/plugin-layout/src/layoutExports.ts.tpl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/plugin-layout/src/layoutExports.ts.tpl b/packages/plugin-layout/src/layoutExports.ts.tpl index f2b66423..94bc2cdc 100644 --- a/packages/plugin-layout/src/layoutExports.ts.tpl +++ b/packages/plugin-layout/src/layoutExports.ts.tpl @@ -1,12 +1,19 @@ -import { BasicLayoutProps } from '@ant-design/pro-layout'; +import { BasicLayoutProps, HeaderViewProps } from '@ant-design/pro-layout'; import { Models } from '@@/plugin-model/useModel'; export type RunTimeLayoutConfig = ( initData: Models<'@@initialState'>, -) => BasicLayoutProps & { +) => Omit & { childrenRender?: (dom: JSX.Element, props: BasicLayoutProps) => React.ReactNode, unAccessible?: JSX.Element, noFound?: JSX.Element, + logout?: (initData) => Promise | void, + rightContentRender?: (props: HeaderViewProps, dom: JSX.Element, props: { + userConfig: RunTimeLayoutConfig, + loading: boolean, + initialState, + setInitialState, + }) => JSX.Element, }; // avoid `export *` error