shineout 3.8.2-beta.5 → 3.8.2-beta.6

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.5'
525
+ version: '3.8.2-beta.6'
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.5');
12389
+ /* harmony default export */ var version = ('3.8.2-beta.6');
12390
12390
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12391
12391
 
12392
12392
 
@@ -66359,11 +66359,12 @@ var emptyRef = {
66359
66359
  }));
66360
66360
  };
66361
66361
  var renderBottomMirrorScroller = function renderBottomMirrorScroller() {
66362
- var _scrollRef$current5, _scrollRef$current6, _scrollRef$current7;
66362
+ var _scrollRef$current5, _scrollRef$current6, _scrollRef$current7, _scrollRef$current8, _scrollRef$current9;
66363
66363
  if (!props.showBottomScrollbar) return null;
66364
66364
  var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current5 = scrollRef.current) === null || _scrollRef$current5 === void 0 ? void 0 : _scrollRef$current5.clientWidth) || 0;
66365
66365
  var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current6 = scrollRef.current) === null || _scrollRef$current6 === void 0 ? void 0 : _scrollRef$current6.scrollWidth) || 0;
66366
- var mirrorScrollRefWidth = scrollRefWidth + scrollBarWidth;
66366
+ var hasVerticalScroll = ((scrollRef === null || scrollRef === void 0 || (_scrollRef$current7 = scrollRef.current) === null || _scrollRef$current7 === void 0 ? void 0 : _scrollRef$current7.scrollHeight) || 0) > ((scrollRef === null || scrollRef === void 0 || (_scrollRef$current8 = scrollRef.current) === null || _scrollRef$current8 === void 0 ? void 0 : _scrollRef$current8.clientHeight) || 0);
66367
+ var mirrorScrollRefWidth = scrollRefWidth + (hasVerticalScroll ? 0 : scrollBarWidth);
66367
66368
  var showScroll = scrollRefScrollWidth > scrollRefWidth;
66368
66369
  // 开启了双滚,但是没有滚动条,不显示
66369
66370
  if (!scrollRefWidth || !mirrorScrollRefWidth || !showScroll) return null;
@@ -66371,7 +66372,8 @@ var emptyRef = {
66371
66372
  var scrollerStickyProps = {
66372
66373
  bottom: options.bottom || 0,
66373
66374
  zIndex: options.zIndex || defaultZIndex + 1,
66374
- parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
66375
+ parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current,
66376
+ scrollContainer: options.scrollContainer
66375
66377
  };
66376
66378
  return /*#__PURE__*/(0,jsx_runtime.jsx)(src_sticky_sticky, objectSpread2_default()(objectSpread2_default()({}, scrollerStickyProps), {}, {
66377
66379
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
@@ -66390,7 +66392,7 @@ var emptyRef = {
66390
66392
  ref: bottomMirrorScrollRef,
66391
66393
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
66392
66394
  style: {
66393
- width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current7 = scrollRef.current) === null || _scrollRef$current7 === void 0 ? void 0 : _scrollRef$current7.scrollWidth,
66395
+ width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current9 = scrollRef.current) === null || _scrollRef$current9 === void 0 ? void 0 : _scrollRef$current9.scrollWidth,
66394
66396
  height: 1
66395
66397
  }
66396
66398
  })
@@ -66505,10 +66507,10 @@ var emptyRef = {
66505
66507
  theadRef.current.parentElement.scrollLeft = left;
66506
66508
  });
66507
66509
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
66508
- var _scrollRef$current8;
66510
+ var _scrollRef$current10;
66509
66511
  if (!props.sticky || !scrollRef.current || !isScrollX) return;
66510
66512
  // sticky场景下,从空数据到有数据切换时,同步一次滚动条的位置
66511
- syncHeaderScroll(((_scrollRef$current8 = scrollRef.current) === null || _scrollRef$current8 === void 0 ? void 0 : _scrollRef$current8.scrollLeft) || 0);
66513
+ syncHeaderScroll(((_scrollRef$current10 = scrollRef.current) === null || _scrollRef$current10 === void 0 ? void 0 : _scrollRef$current10.scrollLeft) || 0);
66512
66514
  }, [isScrollX, props.sticky, $empty]);
66513
66515
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
66514
66516
  // 绑定 wheel 事件
@@ -73086,7 +73088,7 @@ var upload_interface = __webpack_require__(8821);
73086
73088
 
73087
73089
 
73088
73090
  /* harmony default export */ var src_0 = ({
73089
- version: '3.8.2-beta.5'
73091
+ version: '3.8.2-beta.6'
73090
73092
  });
73091
73093
  }();
73092
73094
  /******/ return __webpack_exports__;