mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-06-02 12:39:50 +08:00
🐛 fix(data-grid): 修复右键菜单被窗口裁剪和全选checkbox未对齐
- 单元格右键菜单增加视口边界检测,底部/右侧空间不足时自动偏移 - 菜单容器添加 maxHeight + overflowY auto,确保所有选项可滚动访问 - 修复表头选择列 TH 无 class(虚拟模式),用 :first-child 统一 padding 和对齐 - 行右键菜单 Dropdown 挂载到 document.body 并启用 autoAdjustOverflow
This commit is contained in:
@@ -1373,6 +1373,25 @@ const DataGrid: React.FC<DataGridProps> = ({
|
||||
.${gridId} .ant-table-tbody > tr > td,
|
||||
.${gridId} .ant-table-tbody .ant-table-row > .ant-table-cell { background: transparent !important; border-bottom: 1px solid ${darkMode ? 'rgba(255,255,255,0.05)' : 'rgba(0,0,0,0.05)'} !important; border-inline-end: 1px solid transparent !important; }
|
||||
.${gridId} .ant-table-thead > tr > th { background: transparent !important; border-bottom: 1px solid ${darkMode ? 'rgba(255,255,255,0.05)' : 'rgba(0,0,0,0.05)'} !important; border-inline-end: 1px solid transparent !important; }
|
||||
/* 选择列对齐:header TH 无 class(Ant Design 虚拟模式),需用 :first-child 匹配 */
|
||||
.${gridId} .ant-table-selection-col,
|
||||
.${gridId} .ant-table-bordered .ant-table-selection-col,
|
||||
.${gridId} .ant-table-selection-col.ant-table-selection-col-with-dropdown {
|
||||
width: ${selectionColumnWidth}px !important;
|
||||
}
|
||||
.${gridId} .ant-table-header th:first-child,
|
||||
.${gridId} .ant-table-thead > tr > th:first-child {
|
||||
text-align: center !important;
|
||||
padding-inline-start: 0 !important;
|
||||
padding-inline-end: 0 !important;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
.${gridId} .ant-table-selection-column {
|
||||
text-align: center !important;
|
||||
padding-inline-start: 0 !important;
|
||||
padding-inline-end: 0 !important;
|
||||
}
|
||||
.${gridId} .ant-table-thead > tr:first-child > th:first-child,
|
||||
.${gridId} .ant-table-header table > thead > tr:first-child > th:first-child {
|
||||
border-top-left-radius: ${panelRadius}px !important;
|
||||
|
||||
Reference in New Issue
Block a user