Vanessa 2025-08-03 11:32:37 +08:00
parent a717029b84
commit ca6088ac36
2 changed files with 8 additions and 2 deletions

View file

@ -143,7 +143,10 @@ const afterRenderGallery = (options: ITableOptions) => {
(options.blockElement.querySelector(".av__body") as HTMLElement).dataset.pageSize = options.resetData.pageSizes[groupId]; (options.blockElement.querySelector(".av__body") as HTMLElement).dataset.pageSize = options.resetData.pageSizes[groupId];
return; return;
} }
(options.blockElement.querySelector(`.av__body[data-group-id="${groupId}"]`) as HTMLElement).dataset.pageSize = options.resetData.pageSizes[groupId]; const bodyElement = options.blockElement.querySelector(`.av__body[data-group-id="${groupId}"]`) as HTMLElement
if (bodyElement) {
bodyElement.dataset.pageSize = options.resetData.pageSizes[groupId];
}
}); });
if (getSelection().rangeCount > 0) { if (getSelection().rangeCount > 0) {
// 修改表头后光标重新定位 // 修改表头后光标重新定位

View file

@ -327,7 +327,10 @@ const afterRenderTable = (options: ITableOptions) => {
(options.blockElement.querySelector(".av__body") as HTMLElement).dataset.pageSize = options.resetData.pageSizes[groupId]; (options.blockElement.querySelector(".av__body") as HTMLElement).dataset.pageSize = options.resetData.pageSizes[groupId];
return; return;
} }
(options.blockElement.querySelector(`.av__body[data-group-id="${groupId}"]`) as HTMLElement).dataset.pageSize = options.resetData.pageSizes[groupId]; const bodyElement = options.blockElement.querySelector(`.av__body[data-group-id="${groupId}"]`) as HTMLElement;
if (bodyElement) {
bodyElement.dataset.pageSize = options.resetData.pageSizes[groupId];
}
}); });
if (options.resetData.dragFillId) { if (options.resetData.dragFillId) {
addDragFill(options.blockElement.querySelector(`.av__row[data-id="${options.resetData.dragFillId.split(Constants.ZWSP)[0]}"] .av__cell[data-col-id="${options.resetData.dragFillId.split(Constants.ZWSP)[1]}"]`)); addDragFill(options.blockElement.querySelector(`.av__row[data-id="${options.resetData.dragFillId.split(Constants.ZWSP)[0]}"] .av__cell[data-col-id="${options.resetData.dragFillId.split(Constants.ZWSP)[1]}"]`));