shineout 3.9.6-beta.2 → 3.9.6-beta.3

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.6-beta.2'
525
+ version: '3.9.6-beta.3'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12401,7 +12401,7 @@ var handleStyle = function handleStyle(style) {
12401
12401
  };
12402
12402
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12403
12403
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12404
- /* harmony default export */ var version = ('3.9.6-beta.2');
12404
+ /* harmony default export */ var version = ('3.9.6-beta.3');
12405
12405
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12406
12406
 
12407
12407
 
@@ -67872,8 +67872,11 @@ function Table(props) {
67872
67872
  if (props.onScroll && typeof props.onScroll === 'function') {
67873
67873
  var maxWidth = target.scrollWidth - target.clientWidth;
67874
67874
  var maxHeight = target.scrollHeight - target.clientHeight;
67875
- var x = Math.min(target.scrollLeft / maxWidth, 1);
67876
- var y = Math.min(target.scrollTop / maxHeight, 1);
67875
+ // 浏览器缩放时,scrollHeight/clientHeight 的取整方式不同,导致 scrollTop 最大值可能无法达到 maxHeight
67876
+ // 例如:缩放到 80% 时,scrollTop 可能是 1981.25,而 maxHeight 是 1982
67877
+ // 因此需要容错 1px 误差,当 scrollTop >= maxHeight - 1 时认为已滚动到底
67878
+ var x = maxWidth > 0 ? maxWidth - target.scrollLeft < 1 ? 1 : Math.min(target.scrollLeft / maxWidth, 1) : 0;
67879
+ var y = maxHeight > 0 ? maxHeight - target.scrollTop < 1 ? 1 : Math.min(target.scrollTop / maxHeight, 1) : 0;
67877
67880
  props.onScroll(x, y, target.scrollLeft, target.scrollTop);
67878
67881
  }
67879
67882
  syncHeaderScroll(target.scrollLeft);
@@ -74818,7 +74821,7 @@ var upload_interface = __webpack_require__(8821);
74818
74821
 
74819
74822
 
74820
74823
  /* harmony default export */ var src_0 = ({
74821
- version: '3.9.6-beta.2'
74824
+ version: '3.9.6-beta.3'
74822
74825
  });
74823
74826
  }();
74824
74827
  /******/ return __webpack_exports__;