From 436b52186129e60ba72c20e43d2845bc3f899901 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 22 八月 2024 11:16:56 +0800 Subject: [PATCH] 取消暂停svg更新 --- 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