From e3dee45ea4e9050c8108509f765dd8c615502772 Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Tue, 8 Oct 2024 21:50:11 +0800 Subject: [PATCH] fix(subpage): fix the problem of invalid tab deletion (#5362) --- .../src/schema-component/antd/page/PagePopups.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/page/PagePopups.tsx b/packages/core/client/src/schema-component/antd/page/PagePopups.tsx index e9c52d4161..78a3c1086b 100644 --- a/packages/core/client/src/schema-component/antd/page/PagePopups.tsx +++ b/packages/core/client/src/schema-component/antd/page/PagePopups.tsx @@ -232,9 +232,13 @@ export const PagePopups = (props: { paramsList?: PopupParams[] }) => { useEffect(() => { const run = async () => { - const waitList = popupParams.map( - (params) => getStoredPopupContext(params.popupuid)?.schema || requestSchema(params.popupuid), - ); + const waitList = popupParams.map((params) => { + return ( + getStoredPopupContext(params.popupuid)?.schema || + findSchemaByUid(params.popupuid, fieldSchema.root) || + requestSchema(params.popupuid) + ); + }); const schemas = await Promise.all(waitList); const clonedSchemas = schemas.map((schema, index) => { if (_.isEmpty(schema)) {