From c7174735684528ab771c54167307d0bcf59db01d Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Tue, 16 Jan 2024 20:34:11 +0800 Subject: [PATCH] fix: hook warning, close #7281 #7273 #7274 --- components/vc-notification/useNotification.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/vc-notification/useNotification.tsx b/components/vc-notification/useNotification.tsx index c3fdc34ca..283a8b697 100644 --- a/components/vc-notification/useNotification.tsx +++ b/components/vc-notification/useNotification.tsx @@ -1,5 +1,5 @@ import type { CSSProperties } from 'vue'; -import { shallowRef, watch, computed } from 'vue'; +import { shallowRef, watch } from 'vue'; import HookNotification, { getUuid } from './HookNotification'; import type { NotificationInstance, OpenConfig, Placement } from './Notification'; import type { CSSMotionProps } from '../_util/transition'; @@ -116,7 +116,7 @@ export default function useNotification(rootConfig: NotificationConfig = {}) { notices.value = []; }; - const contextHolder = computed(() => ( + const contextHolder = () => ( - )); + ); const taskQueue = shallowRef([] as Task[]); // ========================= Refs ========================= @@ -178,5 +178,5 @@ export default function useNotification(rootConfig: NotificationConfig = {}) { }); // ======================== Return ======================== - return [api, () => contextHolder.value] as const; + return [api, contextHolder] as const; }