diff --git a/packages/components/table/src/table/style-helper.ts b/packages/components/table/src/table/style-helper.ts index 5fdf52647e..5e101edf62 100644 --- a/packages/components/table/src/table/style-helper.ts +++ b/packages/components/table/src/table/style-helper.ts @@ -151,10 +151,7 @@ function useStyle( } 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