shineout 3.8.2-beta.6 → 3.8.2-beta.7

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.8.2-beta.6'
525
+ version: '3.8.2-beta.7'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12386,7 +12386,7 @@ var handleStyle = function handleStyle(style) {
12386
12386
  };
12387
12387
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12388
12388
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12389
- /* harmony default export */ var version = ('3.8.2-beta.6');
12389
+ /* harmony default export */ var version = ('3.8.2-beta.7');
12390
12390
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12391
12391
 
12392
12392
 
@@ -62913,8 +62913,7 @@ var scroll_table_Scroll = function Scroll(props) {
62913
62913
  var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
62914
62914
  var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
62915
62915
  isMouseDown: false,
62916
- lastTableHeight: 0,
62917
- unmounted: false
62916
+ lastTableHeight: 0
62918
62917
  }),
62919
62918
  context = _useRef.current;
62920
62919
  var _props$scrollHeight = props.scrollHeight,
@@ -63023,9 +63022,12 @@ var scroll_table_Scroll = function Scroll(props) {
63023
63022
 
63024
63023
  // 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
63025
63024
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
63026
- if (!props.tableRef.current || context.unmounted) return;
63025
+ if (!props.tableRef.current) return;
63027
63026
  var rootTableHeight = props.tableRef.current.clientHeight;
63028
63027
  var container = containerRef.current;
63028
+ var isContainerVisible = (container === null || container === void 0 ? void 0 : container.offsetParent) !== null;
63029
+ if (!isContainerVisible) return;
63030
+
63029
63031
  // 判断内容滚动高度是否真的超过了容器高度
63030
63032
  var isRealScroll = (container === null || container === void 0 ? void 0 : container.scrollHeight) !== undefined && container.scrollHeight > rootTableHeight;
63031
63033
  // 判断Table的根节点dom高度是否发生变化,如果变化了,则是因为不定高,被内部元素撑高了导致的
@@ -63035,9 +63037,6 @@ var scroll_table_Scroll = function Scroll(props) {
63035
63037
  } else {
63036
63038
  context.lastTableHeight = rootTableHeight;
63037
63039
  }
63038
- return function () {
63039
- context.unmounted = true;
63040
- };
63041
63040
  }, [paddingTop]);
63042
63041
  if (props.isEmpty) {
63043
63042
  return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
@@ -73088,7 +73087,7 @@ var upload_interface = __webpack_require__(8821);
73088
73087
 
73089
73088
 
73090
73089
  /* harmony default export */ var src_0 = ({
73091
- version: '3.8.2-beta.6'
73090
+ version: '3.8.2-beta.7'
73092
73091
  });
73093
73092
  }();
73094
73093
  /******/ return __webpack_exports__;