shineout 3.9.0-beta.24 → 3.9.0-beta.26

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/cjs/index.js CHANGED
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.9.0-beta.24'
525
+ version: '3.9.0-beta.26'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12400,7 +12400,7 @@ var handleStyle = function handleStyle(style) {
12400
12400
  };
12401
12401
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12402
12402
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12403
- /* harmony default export */ var version = ('3.9.0-beta.24');
12403
+ /* harmony default export */ var version = ('3.9.0-beta.26');
12404
12404
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12405
12405
 
12406
12406
 
@@ -63961,6 +63961,25 @@ var scroll_table_Scroll = function Scroll(props) {
63961
63961
  }
63962
63962
  });
63963
63963
 
63964
+ // 组件元素隐藏时,设置定高,解决恢复显示时滚动条位置未保持住的问题
63965
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
63966
+ if (!props.tableRef.current) return;
63967
+ var isVisible = props.tableRef.current.offsetParent !== null;
63968
+ var wasHidden = props.tableRef.current.getAttribute('data-was-hidden') === 'true';
63969
+ var h = context.lastTableHeight || props.tableRef.current.clientHeight;
63970
+ if (h > 0) {
63971
+ context.lastTableHeight = h;
63972
+ }
63973
+ if (isVisible && wasHidden) {
63974
+ props.tableRef.current.style.height = '100%';
63975
+ props.tableRef.current.removeAttribute('data-was-hidden');
63976
+ } else if (!isVisible && props.tableRef.current.style.height === '100%') {
63977
+ // 加height === '100%'判断是因为:多层父级flex嵌套才有这个问题
63978
+ props.tableRef.current.style.height = "".concat(context.lastTableHeight, "px");
63979
+ props.tableRef.current.setAttribute('data-was-hidden', 'true');
63980
+ }
63981
+ }, [paddingTop]);
63982
+
63964
63983
  // 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
63965
63984
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
63966
63985
  if (!props.tableRef.current || !props.setFakeVirtual) return;
@@ -66108,7 +66127,7 @@ var thead_toNum = toNum;
66108
66127
  trs[level].push( /*#__PURE__*/(0,jsx_runtime.jsx)("th", {
66109
66128
  className: classnames_default()(cellClassName, tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellGroup, colTemp2 === null || colTemp2 === void 0 || (_colTemp2$groupProps2 = colTemp2.groupProps) === null || _colTemp2$groupProps2 === void 0 ? void 0 : _colTemp2$groupProps2.className),
66110
66129
  style: style,
66111
- colSpan: colTemp2.colSpan,
66130
+ colSpan: props.virtualColumn && typeof colTemp2.colSpan === 'function' ? undefined : colTemp2.colSpan,
66112
66131
  dir: config.direction,
66113
66132
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
66114
66133
  children: colTemp2.name
@@ -67386,7 +67405,8 @@ function Table(props) {
67386
67405
  renderSorter: props.renderSorter,
67387
67406
  radio: props.radio,
67388
67407
  treeColumnsName: treeColumnsName,
67389
- treeCheckAll: props.treeCheckAll
67408
+ treeCheckAll: props.treeCheckAll,
67409
+ virtualColumn: props.virtualColumn
67390
67410
  };
67391
67411
  var showFoot = (_props$summary = props.summary) === null || _props$summary === void 0 ? void 0 : _props$summary.length;
67392
67412
  var footCommonProps = {
@@ -74195,7 +74215,7 @@ var upload_interface = __webpack_require__(8821);
74195
74215
 
74196
74216
 
74197
74217
  /* harmony default export */ var src_0 = ({
74198
- version: '3.9.0-beta.24'
74218
+ version: '3.9.0-beta.26'
74199
74219
  });
74200
74220
  }();
74201
74221
  /******/ return __webpack_exports__;