From cc47bb66eaee0d8700b95919948405effb40b9c9 Mon Sep 17 00:00:00 2001 From: ysex <59272678+cnysex@users.noreply.github.com> Date: Sat, 19 Mar 2022 10:19:37 +0800 Subject: [PATCH] fix: Update useDestroyed.ts (#5361) destroyed should be true not false --- components/_util/hooks/useDestroyed.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/_util/hooks/useDestroyed.ts b/components/_util/hooks/useDestroyed.ts index d5cd6b0f4..57cc17230 100644 --- a/components/_util/hooks/useDestroyed.ts +++ b/components/_util/hooks/useDestroyed.ts @@ -1,12 +1,12 @@ import { onBeforeUnmount, ref } from 'vue'; const useDestroyed = () => { - const mounted = ref(true); + const destroyed = ref(false); onBeforeUnmount(() => { - mounted.value = false; + destroyed.value = true; }); - return mounted; + return destroyed; }; export default useDestroyed;