fix(components): [scrollbar] compatibility with wrapRef does not exist (#18311)

This commit is contained in:
btea 2024-09-19 17:35:59 +08:00 committed by GitHub
parent 18a77d5829
commit f51162f559
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -167,8 +167,10 @@ provide(
)
onActivated(() => {
wrapRef.value!.scrollTop = wrapScrollTop
wrapRef.value!.scrollLeft = wrapScrollLeft
if (wrapRef.value) {
wrapRef.value.scrollTop = wrapScrollTop
wrapRef.value.scrollLeft = wrapScrollLeft
}
})
onMounted(() => {