rapid-spreadjs 1.0.163 → 1.0.164
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/dist/index.cjs.js +22 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +22 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/utils/business.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1414,13 +1414,14 @@ const BusinessUtils = {
|
|
|
1414
1414
|
* @param dynamicLoadRangeJson 动态加载的“试验结果”JSON数组范围,格式如:[{row: 1, col: 1, rowCount: 1, colCount: 1}]
|
|
1415
1415
|
* @param headerRangeHeight 表头区域总高度
|
|
1416
1416
|
* @param footerRangeHeight 表尾区域总高度
|
|
1417
|
+
* @param isEnable 是否启用动态加载行,默认为:true(true:启用动态加载行,false:不启用动态加载行)
|
|
1417
1418
|
* @param ended 绘制完成后的回调函数,返回一个参数rowIndex,格式如:{hasValueIndex: [1, 2, 3], noValueIndex: [4, 5, 6]},hasValueIndex代表所有显示的行索引,noValueIndex代表所有隐藏的行索引
|
|
1418
1419
|
* @param remainingHeight 剩余高度(针对纵表情况,工作表总高度-表头和表尾总高度>=remainingHeight,空白行不显示;<remainingHeight,空白行显示)
|
|
1419
1420
|
* @param pageDir 页面方向(1:纵向、2:横向)
|
|
1420
1421
|
* @param blankRowCellValue 空白行单元格值,默认为:空白
|
|
1421
1422
|
* @returns 返回所有需要显示和隐藏的行索引结果对象,格式如:{hasValueIndex: [1, 2, 3], noValueIndex: [4, 5, 6]},hasValueIndex代表所有显示的行索引,noValueIndex代表所有隐藏的行索引
|
|
1422
1423
|
*/
|
|
1423
|
-
dynamicLoadRows: (GC, spread, dynamicLoadRangeJson, headerRangeHeight, footerRangeHeight, ended = null, remainingHeight = 500, pageDir = 1, blankRowCellValue = '空白') => {
|
|
1424
|
+
dynamicLoadRows: (GC, spread, dynamicLoadRangeJson, headerRangeHeight, footerRangeHeight, isEnable = true, ended = null, remainingHeight = 500, pageDir = 1, blankRowCellValue = '空白') => {
|
|
1424
1425
|
const sheet = spread.getActiveSheet();
|
|
1425
1426
|
// 暂停绘制
|
|
1426
1427
|
sheet.suspendPaint();
|
|
@@ -1567,7 +1568,7 @@ const BusinessUtils = {
|
|
|
1567
1568
|
}
|
|
1568
1569
|
if (!isShowBlankRow) {
|
|
1569
1570
|
// 设置行不可见
|
|
1570
|
-
if (createBlackRowIndex != -1) {
|
|
1571
|
+
if (!isEnable && createBlackRowIndex != -1) {
|
|
1571
1572
|
sheet.setRowVisible(createBlackRowIndex, false);
|
|
1572
1573
|
}
|
|
1573
1574
|
return;
|
|
@@ -1605,15 +1606,20 @@ const BusinessUtils = {
|
|
|
1605
1606
|
else {
|
|
1606
1607
|
// 设置添加这一行的行高
|
|
1607
1608
|
sheet.setRowHeight(lastRowIndex + 1, sheetTotalHeight - allRowHeight);
|
|
1608
|
-
|
|
1609
|
-
|
|
1609
|
+
if (!isEnable) {
|
|
1610
|
+
sheet.setRowVisible(lastRowIndex + 1, false);
|
|
1611
|
+
}
|
|
1612
|
+
else {
|
|
1613
|
+
// 显示空白行单元格
|
|
1614
|
+
sheet.setRowVisible(lastRowIndex + 1, true);
|
|
1615
|
+
}
|
|
1610
1616
|
}
|
|
1611
1617
|
}
|
|
1612
1618
|
// 隐藏空白行单元格
|
|
1613
1619
|
else {
|
|
1614
1620
|
const blankRowCell = sheet.getTag(lastRowIndex + 1, 1);
|
|
1615
1621
|
// 如果空白行单元格标签存在,则隐藏
|
|
1616
|
-
if (blankRowCell && blankRowCell == 'BlankCell') {
|
|
1622
|
+
if (!isEnable && blankRowCell && blankRowCell == 'BlankCell') {
|
|
1617
1623
|
sheet.setRowVisible(lastRowIndex + 1, false);
|
|
1618
1624
|
}
|
|
1619
1625
|
}
|
|
@@ -1629,6 +1635,17 @@ const BusinessUtils = {
|
|
|
1629
1635
|
// top: false,
|
|
1630
1636
|
// bottom: false,
|
|
1631
1637
|
// });
|
|
1638
|
+
// 没有启用动态加载行的时候,将所有的行都显示出来
|
|
1639
|
+
if (!isEnable) {
|
|
1640
|
+
hasValueRows.forEach((rowIndex, index) => {
|
|
1641
|
+
// 设置行可见
|
|
1642
|
+
sheet.setRowVisible(rowIndex, true);
|
|
1643
|
+
});
|
|
1644
|
+
noValueRows.forEach((rowIndex) => {
|
|
1645
|
+
// 设置行可见
|
|
1646
|
+
sheet.setRowVisible(rowIndex, true);
|
|
1647
|
+
});
|
|
1648
|
+
}
|
|
1632
1649
|
// 恢复绘制
|
|
1633
1650
|
sheet.resumePaint();
|
|
1634
1651
|
// 执行绘制完成后的回调函数
|