From ff8fc28b2b7501b73296a09495fde43b9a939410 Mon Sep 17 00:00:00 2001 From: miaqiang Date: Wed, 6 Nov 2024 15:31:06 +0800 Subject: [PATCH] fix: v3Notify show error Signed-off-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); }; }, []);