@kdcloudjs/kdesign 1.5.9 → 1.5.10

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/kdesign.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @kdcloudjs/kdesign v1.5.8
3
+ * @kdcloudjs/kdesign v1.5.9
4
4
  *
5
5
  * Copyright 2020-present, Kingdee, Inc.
6
6
  * All rights reserved.
@@ -42962,7 +42962,12 @@ var BaseTable = /*#__PURE__*/function (_React$Component) {
42962
42962
  offsetY: offsetY
42963
42963
  };
42964
42964
  }), rxjs_operators__WEBPACK_IMPORTED_MODULE_18__["distinctUntilChanged"](function (x, y) {
42965
- // 因为 overscan 的存在,滚动较小的距离时不需要触发组件重渲染
42965
+ // 如果表格区域被隐藏, 不需要触发组件重渲染
42966
+ if (y.maxRenderHeight === 0 && y.maxRenderWidth === 0) {
42967
+ return true;
42968
+ } // 因为 overscan 的存在,滚动较小的距离时不需要触发组件重渲染
42969
+
42970
+
42966
42971
  return Math.abs(x.maxRenderWidth - y.maxRenderWidth) < _utils__WEBPACK_IMPORTED_MODULE_28__["OVERSCAN_SIZE"] / 2 && Math.abs(x.maxRenderHeight - y.maxRenderHeight) < _utils__WEBPACK_IMPORTED_MODULE_28__["OVERSCAN_SIZE"] / 2 && Math.abs(x.offsetY - y.offsetY) < _utils__WEBPACK_IMPORTED_MODULE_28__["OVERSCAN_SIZE"] / 2;
42967
42972
  })).subscribe(function (sizeAndOffset) {
42968
42973
  _this2.setState(sizeAndOffset);
@@ -43054,10 +43059,12 @@ var BaseTable = /*#__PURE__*/function (_React$Component) {
43054
43059
 
43055
43060
  if (size === 0) {
43056
43061
  zeroHeightRowCount += 1;
43062
+ } else {
43063
+ // 渲染出来的行高度为0,说明是display=none情况,行高不存在该种异常情况,不保存当前的高度
43064
+ this.rowHeightManager.updateRow(rowIndex, offset, size);
43057
43065
  }
43058
43066
 
43059
43067
  maxTrBottom = Math.max(maxTrBottom, offset + size);
43060
- this.rowHeightManager.updateRow(rowIndex, offset, size);
43061
43068
  } // 当 estimatedRowHeight 过大时,可能出现「渲染行数过少,无法覆盖可视范围」的情况
43062
43069
  // 出现这种情况时,我们判断「下一次渲染能够渲染更多行」是否满足,满足的话就直接调用 forceUpdate
43063
43070
  // zeroHeightRowCount === 0 用于确保当前没有 display=none 的情况