style(components): [table] clean code (#7309)

Co-authored-by: hezhaoshun <hezhaoshun@cmcm.com>
This commit is contained in:
joson
2022-04-22 10:50:11 +08:00
committed by GitHub
parent b03cccab71
commit b0e62faf79

View File

@@ -151,10 +151,7 @@ function useStyle<T>(
}
const hasScrollClass = (className: string) => {
const { tableWrapper } = table.refs
if (tableWrapper && tableWrapper.classList.contains(className)) {
return true
}
return false
return !!(tableWrapper && tableWrapper.classList.contains(className))
}
const syncPostion = function () {
if (!table.refs.scrollBarRef) return