fix(components): [collapse-transition] remove redundant code (#13715)

fix(components): [collapse-transition]
This commit is contained in:
A pessimistic guide to living 2023-07-26 09:41:13 +08:00 committed by GitHub
parent f93a9eb6cd
commit 0697a036f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,14 +36,11 @@ const on = {
el.dataset.oldOverflow = el.style.overflow
if (el.scrollHeight !== 0) {
el.style.maxHeight = `${el.scrollHeight}px`
el.style.paddingTop = el.dataset.oldPaddingTop
el.style.paddingBottom = el.dataset.oldPaddingBottom
} else {
el.style.maxHeight = 0
el.style.paddingTop = el.dataset.oldPaddingTop
el.style.paddingBottom = el.dataset.oldPaddingBottom
}
el.style.paddingTop = el.dataset.oldPaddingTop
el.style.paddingBottom = el.dataset.oldPaddingBottom
el.style.overflow = 'hidden'
},