fix(components): [dialog] fix scroll bar not resetting to top on reopen (#19471)

* fix(components): [dialog] Fix scroll bar not resetting to top on reopen

closed #19420

* fix(components): update

* fix(components): [dialog] update

---------

Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>
This commit is contained in:
Meet you 2025-01-09 16:47:22 +08:00 committed by GitHub
parent 6316898909
commit 062ac99aec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -167,6 +167,8 @@ export const useDialog = (
nextTick(() => {
emit('open')
if (targetRef.value) {
targetRef.value.parentElement!.scrollTop = 0
targetRef.value.parentElement!.scrollLeft = 0
targetRef.value.scrollTop = 0
}
})