shineout 3.8.10-beta.7 → 3.8.10-beta.9

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.10-beta.7'
525
+ version: '3.8.10-beta.9'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12398,7 +12398,7 @@ var handleStyle = function handleStyle(style) {
12398
12398
  };
12399
12399
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12400
12400
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12401
- /* harmony default export */ var version = ('3.8.10-beta.7');
12401
+ /* harmony default export */ var version = ('3.8.10-beta.9');
12402
12402
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12403
12403
 
12404
12404
 
@@ -40521,7 +40521,9 @@ var Scroll = function Scroll(props) {
40521
40521
  _props$scrollWidth = props.scrollWidth,
40522
40522
  scrollWidth = _props$scrollWidth === void 0 ? 0 : _props$scrollWidth,
40523
40523
  _props$defaultHeight = props.defaultHeight,
40524
- defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight;
40524
+ defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight,
40525
+ _props$keepScrollTop = props.keepScrollTop,
40526
+ keepScrollTop = _props$keepScrollTop === void 0 ? false : _props$keepScrollTop;
40525
40527
  var _useResize = useResize({
40526
40528
  targetRef: containerRef,
40527
40529
  timer: 100
@@ -40546,7 +40548,9 @@ var Scroll = function Scroll(props) {
40546
40548
 
40547
40549
  // 当滚动容器的高度为 0 时,paddingTop 为 0,避免滚动条抖动现象
40548
40550
  var paddingTop = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
40549
- return height === 0 ? 0 : Math.max(0, Math.floor(scrollHeight - height));
40551
+ var maxHeight = Math.max(0, scrollHeight - height);
40552
+ if (keepScrollTop) return maxHeight;
40553
+ return height === 0 ? 0 : maxHeight;
40550
40554
  }, [scrollHeight, height]);
40551
40555
  var placeStyle = {
40552
40556
  paddingTop: paddingTop,
@@ -40835,6 +40839,7 @@ var VirtualList = function VirtualList(props) {
40835
40839
  wrapperRef: wrapperRef,
40836
40840
  onScroll: handleScroll,
40837
40841
  onMouseMove: handleMouseMove,
40842
+ keepScrollTop: keepScrollTop,
40838
40843
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(Tag, {
40839
40844
  className: tagClassName,
40840
40845
  style: innerStyle,
@@ -59276,7 +59281,8 @@ var list_list_List = function List(props) {
59276
59281
  minWidth: 0,
59277
59282
  overflow: 'auto'
59278
59283
  },
59279
- dynamicVirtual: props.dynamicHeight
59284
+ dynamicVirtual: props.dynamicHeight,
59285
+ keepScrollTop: !!props.scrollLoading
59280
59286
  }), renderFooter()]
59281
59287
  });
59282
59288
  }
@@ -73395,7 +73401,7 @@ var upload_interface = __webpack_require__(8821);
73395
73401
 
73396
73402
 
73397
73403
  /* harmony default export */ var src_0 = ({
73398
- version: '3.8.10-beta.7'
73404
+ version: '3.8.10-beta.9'
73399
73405
  });
73400
73406
  }();
73401
73407
  /******/ return __webpack_exports__;