fix: 表格固定高度 getVxePopupContainer

This commit is contained in:
dap 2025-04-07 18:41:23 +08:00
parent 7463df053a
commit 5e1de6fc79

View File

@ -52,11 +52,13 @@ export function getVxePopupContainer(
return tableContainer as HTMLElement;
}
// 非固定列情况下,为了保证滚动跟随,找到最近的单元格或行
const cell =
node.closest('.vxe-cell') || node.closest('td') || node.closest('tr');
if (cell) {
return cell as HTMLElement;
/**
*
*/
const fixedHeightElement = node.closest('td.col--cs-height');
if (fixedHeightElement) {
// 默认为hidden 显示异常
(fixedHeightElement as HTMLTableCellElement).style.overflow = 'visible';
}
// 兜底方案:使用元素的父节点或文档体