本帖最后由 Ellia.Duan 于 2023-12-13 18:27 编辑
您好,可以参考附件中的demo
主要代码如下:- if (sheet.getViewportBottomRow(1) == rowCount - 1) {
- const spreadDomHeight = document.getElementById('ss').offsetHeight
- const headerHeight = sheet.getRowHeight(0, GC.Spread.Sheets.SheetArea.colHeader)
- const {y, height} = sheet.getCellRect(rowCount - 1, 1, 1, 1)
- if ((y + height < spreadDomHeight - headerHeight)){
- spread.options.showVerticalScrollbar = false;
- }
- }
- if (sheet.getViewportRightColumn(1) == colCount - 1) {
- const spreadDomWidth = document.getElementById('ss').offsetWidth
- const headerWidth= sheet.getColumnWidth(0, GC.Spread.Sheets.SheetArea.rowHeader)
- const {x, width} = sheet.getCellRect(1, colCount-1, 1, 1)
- if ((x + width < spreadDomWidth - headerWidth)){
- spread.options.showHorizontalScrollbar = false;
- }
- }
复制代码
|
|