@kdcloudjs/table 1.2.0-canary.7 → 1.2.0-canary.8

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @kdcloudjs/table v1.2.0-canary.6
3
+ * @kdcloudjs/table v1.2.0-canary.7
4
4
  *
5
5
  * Copyright 2020-present, Kingdee, Inc.
6
6
  * All rights reserved.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @kdcloudjs/table v1.2.0-canary.6
3
+ * @kdcloudjs/table v1.2.0-canary.7
4
4
  *
5
5
  * Copyright 2020-present, Kingdee, Inc.
6
6
  * All rights reserved.
@@ -5054,7 +5054,8 @@ var autoFillTableWidth = function autoFillTableWidth() {
5054
5054
  // 保存剩余的flex总和和剩余宽度总和宽度
5055
5055
  var residualFlexCount = flexCount;
5056
5056
  var residualFlexWidth = remainingWidth;
5057
- var columnSize = pipeline.getFeatureOptions(_columnResizeWidth__WEBPACK_IMPORTED_MODULE_17__["COLUMN_SIZE_KEY"]) || {};
5057
+ var columnSize = pipeline.getFeatureOptions(_columnResizeWidth__WEBPACK_IMPORTED_MODULE_17__["COLUMN_SIZE_KEY"]);
5058
+ var enableColumnResizeWidthFeature = !!columnSize;
5058
5059
  pipeline.mapColumns(Object(_utils__WEBPACK_IMPORTED_MODULE_15__["makeRecursiveMapper"])(function (col, recursiveFlatMapInfo) {
5059
5060
  var isLeaf = recursiveFlatMapInfo.isLeaf;
5060
5061
 
@@ -5073,12 +5074,15 @@ var autoFillTableWidth = function autoFillTableWidth() {
5073
5074
  col.width = clamp(minWidth, preColWidth + (residualFlexCount === flex ? residualFlexWidth : usedRemainingWidth), maxWidth);
5074
5075
  residualFlexCount -= flex;
5075
5076
  residualFlexWidth -= col.width - preColWidth;
5076
- columnSize[code] = col.width;
5077
+
5078
+ if (enableColumnResizeWidthFeature) {
5079
+ columnSize[code] = col.width;
5080
+ }
5077
5081
  }
5078
5082
 
5079
5083
  return col;
5080
5084
  }));
5081
- pipeline.setFeatureOptions(_columnResizeWidth__WEBPACK_IMPORTED_MODULE_17__["COLUMN_SIZE_KEY"], columnSize);
5085
+ enableColumnResizeWidthFeature && pipeline.setFeatureOptions(_columnResizeWidth__WEBPACK_IMPORTED_MODULE_17__["COLUMN_SIZE_KEY"], columnSize);
5082
5086
  }
5083
5087
  } else {
5084
5088
  // 未设置了flex宽度,创建占位列