From 925a8f6ee5ff931f6a7b4e3e9b938cec7c306cb1 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Thu, 10 Nov 2022 11:40:11 +0800 Subject: [PATCH] fix: image delete error --- components/vc-image/src/Image.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/vc-image/src/Image.tsx b/components/vc-image/src/Image.tsx index 7c56c94f3..73d1e97cf 100644 --- a/components/vc-image/src/Image.tsx +++ b/components/vc-image/src/Image.tsx @@ -187,7 +187,9 @@ const ImageInternal = defineComponent({ { flush: 'post', immediate: true }, ); }); - onUnmounted(unRegister); + onUnmounted(() => { + unRegister(); + }); const toSizePx = (l: number | string) => { if (isNumber(l)) return l + 'px'; return l;