From f96d4ed77603ca1f908dcdc4a51bd2ce2178d10c Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期三, 19 六月 2024 10:10:58 +0800
Subject: [PATCH] 登录logo,其他

---
 src/components/Loading/src/useLoading.ts |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/components/Loading/src/useLoading.ts b/src/components/Loading/src/useLoading.ts
index 356df7d..97e7c71 100644
--- a/src/components/Loading/src/useLoading.ts
+++ b/src/components/Loading/src/useLoading.ts
@@ -1,7 +1,8 @@
+import type { Ref } from 'vue';
 import { unref } from 'vue';
+import { tryOnUnmounted } from '@vueuse/core';
 import { createLoading } from './createLoading';
 import type { LoadingProps } from './typing';
-import type { Ref } from 'vue';
 
 export interface UseLoadingOptions {
   target?: any;
@@ -45,5 +46,9 @@
     instance.setTip(tip);
   };
 
+  tryOnUnmounted(() => {
+    instance.destroy();
+  });
+
   return [open, close, setTip];
 }

--
Gitblit v1.9.3