diff --git a/packages/components/table/src/table/style-helper.ts b/packages/components/table/src/table/style-helper.ts index 38abcfd13d..cc7fe1fc0a 100644 --- a/packages/components/table/src/table/style-helper.ts +++ b/packages/components/table/src/table/style-helper.ts @@ -112,7 +112,7 @@ function useStyle( layout.updateElsHeight() } layout.updateColumnsWidth() - requestAnimationFrame(syncPostion) + requestAnimationFrame(syncPosition) } onMounted(async () => { await nextTick() @@ -163,7 +163,7 @@ function useStyle( const { tableWrapper } = table.refs return !!(tableWrapper && tableWrapper.classList.contains(className)) } - const syncPostion = function () { + const syncPosition = function () { if (!table.refs.scrollBarRef) return if (!layout.scrollX.value) { const scrollingNoneClass = 'is-scrolling-none' @@ -191,7 +191,7 @@ function useStyle( const bindEvents = () => { if (!table.refs.scrollBarRef) return if (table.refs.scrollBarRef.wrap$) { - useEventListener(table.refs.scrollBarRef.wrap$, 'scroll', syncPostion, { + useEventListener(table.refs.scrollBarRef.wrap$, 'scroll', syncPosition, { passive: true, }) }