diff --git a/src/lazy-component.ts b/src/lazy-component.ts index 7c94223..0fcb3b2 100644 --- a/src/lazy-component.ts +++ b/src/lazy-component.ts @@ -2,7 +2,7 @@ import Lazy from './lazy' import { defineComponent, onMounted, - onUnmounted, + onBeforeUnmount, ref, reactive, computed, @@ -47,8 +47,8 @@ export default (lazy: Lazy) => { lazy.addLazyBox(vm.value) lazy.lazyLoadHandler() }) - - onUnmounted(() => { + + onBeforeUnmount(() => { lazy.removeComponent(vm.value) }) @@ -61,4 +61,4 @@ export default (lazy: Lazy) => { ) } }) -} \ No newline at end of file +}