Skip to content

Commit 2e0e797

Browse files
committed
fix: vue3.5兼容 (hilongjw#518)
1 parent aac9a84 commit 2e0e797

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lazy-component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Lazy from './lazy'
22
import {
33
defineComponent,
44
onMounted,
5-
onUnmounted,
5+
onBeforeUnmount,
66
ref,
77
reactive,
88
computed,
@@ -47,8 +47,8 @@ export default (lazy: Lazy) => {
4747
lazy.addLazyBox(vm.value)
4848
lazy.lazyLoadHandler()
4949
})
50-
51-
onUnmounted(() => {
50+
51+
onBeforeUnmount(() => {
5252
lazy.removeComponent(vm.value)
5353
})
5454

@@ -61,4 +61,4 @@ export default (lazy: Lazy) => {
6161
)
6262
}
6363
})
64-
}
64+
}

0 commit comments

Comments
 (0)