fix(components): [table] replace pageX with clientX (#19881)

Co-authored-by: chengang <chengang@lianantech.com>
This commit is contained in:
Jason 2025-02-27 22:21:53 +08:00 committed by GitHub
parent 87e3d1d400
commit 3079a4789d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -130,7 +130,7 @@ function useEvent<T>(props: TableHeaderProps<T>, emit) {
const bodyStyle = document.body.style
const isLastTh = target.parentNode?.lastElementChild === target
const allowDarg = props.allowDragLastColumn || !isLastTh
if (rect.width > 12 && rect.right - event.pageX < 8 && allowDarg) {
if (rect.width > 12 && rect.right - event.clientX < 8 && allowDarg) {
bodyStyle.cursor = 'col-resize'
if (hasClass(target, 'is-sortable')) {
target.style.cursor = 'col-resize'