From 9daaebfca7f9f9da1eefe902ad98526afefde372 Mon Sep 17 00:00:00 2001 From: miaqiang Date: Thu, 7 Nov 2024 09:40:15 +0800 Subject: [PATCH] fix: v3Notify show error (#4337) Signed-off-by: miaqiang Co-authored-by: miaqiang --- packages/core/src/components/Layouts/BaseLayout/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/src/components/Layouts/BaseLayout/index.tsx b/packages/core/src/components/Layouts/BaseLayout/index.tsx index 19648788dba..e56f1eb5850 100644 --- a/packages/core/src/components/Layouts/BaseLayout/index.tsx +++ b/packages/core/src/components/Layouts/BaseLayout/index.tsx @@ -13,6 +13,7 @@ import { StylesConstants, useGlobalStyles } from '@ks-console/shared'; import Toolbox from '../../../containers/Toolbox'; import Header from '../Header'; import { Main } from './styles'; +import v3Notify from './v3Notify'; const GlobalStyle = createGlobalStyle<{ $navbarHeight?: number; $licenseTipHeight?: number }>` :root { @@ -55,7 +56,9 @@ export default function BaseLayout() { window.history.pushState('', '', url); } }); + bus.$on('notify', v3Notify); return () => { + bus.$off('notify', v3Notify); document.removeEventListener('click', eventer); }; }, []);