vxe-table 3.9.8 → 3.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/style.css +1 -1
- package/es/table/src/util.js +6 -5
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +9 -8
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/util.js +6 -5
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/table/src/util.ts +6 -5
- /package/es/{iconfont.1729047519382.ttf → iconfont.1729060343798.ttf} +0 -0
- /package/es/{iconfont.1729047519382.woff → iconfont.1729060343798.woff} +0 -0
- /package/es/{iconfont.1729047519382.woff2 → iconfont.1729060343798.woff2} +0 -0
- /package/lib/{iconfont.1729047519382.ttf → iconfont.1729060343798.ttf} +0 -0
- /package/lib/{iconfont.1729047519382.woff → iconfont.1729060343798.woff} +0 -0
- /package/lib/{iconfont.1729047519382.woff2 → iconfont.1729060343798.woff2} +0 -0
|
@@ -393,17 +393,18 @@ export function colToVisible ($xeTable: any, column: any) {
|
|
|
393
393
|
const tdElem = bodyElem.querySelector(`.${column.id}`)
|
|
394
394
|
if (tdElem) {
|
|
395
395
|
const tdOffsetLeft = tdElem.offsetLeft + (tdElem.offsetParent ? tdElem.offsetParent.offsetLeft : 0)
|
|
396
|
-
const
|
|
397
|
-
//
|
|
396
|
+
const cellWidth = tdElem.clientWidth
|
|
397
|
+
// 检测是否在可视区中
|
|
398
398
|
if (tdOffsetLeft < (bodySrcollLeft + offsetFixedLeft)) {
|
|
399
399
|
return $xeTable.scrollTo(tdOffsetLeft - offsetFixedLeft - 1)
|
|
400
|
-
} else if ((tdOffsetLeft +
|
|
401
|
-
return $xeTable.scrollTo(tdOffsetLeft -
|
|
400
|
+
} else if ((tdOffsetLeft + cellWidth - bodySrcollLeft) > (bodyWidth - offsetFixedRight)) {
|
|
401
|
+
return $xeTable.scrollTo((tdOffsetLeft + cellWidth) - (bodyWidth - offsetFixedRight - 1))
|
|
402
402
|
}
|
|
403
403
|
} else {
|
|
404
404
|
// 检测是否在虚拟渲染可视区中
|
|
405
405
|
if (scrollXLoad) {
|
|
406
406
|
let scrollLeft = 0
|
|
407
|
+
const cellWidth = column.renderWidth
|
|
407
408
|
for (let index = 0; index < visibleColumn.length; index++) {
|
|
408
409
|
if (visibleColumn[index] === column) {
|
|
409
410
|
break
|
|
@@ -413,7 +414,7 @@ export function colToVisible ($xeTable: any, column: any) {
|
|
|
413
414
|
if (scrollLeft < bodySrcollLeft) {
|
|
414
415
|
return $xeTable.scrollTo(scrollLeft - offsetFixedLeft - 1)
|
|
415
416
|
}
|
|
416
|
-
return $xeTable.scrollTo(scrollLeft -
|
|
417
|
+
return $xeTable.scrollTo((scrollLeft + cellWidth) - (bodyWidth - offsetFixedRight - 1))
|
|
417
418
|
}
|
|
418
419
|
}
|
|
419
420
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|