shineout 3.8.2-beta.4 → 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.4'
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.4');
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
 
@@ -41901,17 +41901,18 @@ var More = function More(props) {
41901
41901
  visible = _useState2[0],
41902
41902
  setVisible = _useState2[1];
41903
41903
  var styles = classes;
41904
- var shouldShowMore = showNum < 0 || showNum >= data.length;
41904
+ var shouldShowMore = !showNum || showNum < 0 || showNum >= data.length;
41905
41905
  var before = [];
41906
41906
  var after = [];
41907
41907
  var afterLength = 0;
41908
41908
  if (!shouldShowMore) {
41909
- before = new Array(showNum).fill(undefined).map(function (_item, index) {
41909
+ var validShowNum = showNum || 0;
41910
+ before = new Array(validShowNum).fill(undefined).map(function (_item, index) {
41910
41911
  return data[index];
41911
41912
  });
41912
- var afterCount = Math.max(0, data.length - showNum);
41913
+ var afterCount = Math.max(0, data.length - validShowNum);
41913
41914
  after = new Array(afterCount).fill(undefined).map(function (_item, index) {
41914
- return data[showNum + index];
41915
+ return data[validShowNum + index];
41915
41916
  });
41916
41917
  afterLength = after.length;
41917
41918
  }
@@ -66358,11 +66359,12 @@ var emptyRef = {
66358
66359
  }));
66359
66360
  };
66360
66361
  var renderBottomMirrorScroller = function renderBottomMirrorScroller() {
66361
- var _scrollRef$current5, _scrollRef$current6, _scrollRef$current7;
66362
+ var _scrollRef$current5, _scrollRef$current6, _scrollRef$current7, _scrollRef$current8, _scrollRef$current9;
66362
66363
  if (!props.showBottomScrollbar) return null;
66363
66364
  var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current5 = scrollRef.current) === null || _scrollRef$current5 === void 0 ? void 0 : _scrollRef$current5.clientWidth) || 0;
66364
66365
  var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current6 = scrollRef.current) === null || _scrollRef$current6 === void 0 ? void 0 : _scrollRef$current6.scrollWidth) || 0;
66365
- 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);
66366
66368
  var showScroll = scrollRefScrollWidth > scrollRefWidth;
66367
66369
  // 开启了双滚,但是没有滚动条,不显示
66368
66370
  if (!scrollRefWidth || !mirrorScrollRefWidth || !showScroll) return null;
@@ -66370,7 +66372,8 @@ var emptyRef = {
66370
66372
  var scrollerStickyProps = {
66371
66373
  bottom: options.bottom || 0,
66372
66374
  zIndex: options.zIndex || defaultZIndex + 1,
66373
- 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
66374
66377
  };
66375
66378
  return /*#__PURE__*/(0,jsx_runtime.jsx)(src_sticky_sticky, objectSpread2_default()(objectSpread2_default()({}, scrollerStickyProps), {}, {
66376
66379
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
@@ -66389,7 +66392,7 @@ var emptyRef = {
66389
66392
  ref: bottomMirrorScrollRef,
66390
66393
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
66391
66394
  style: {
66392
- 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,
66393
66396
  height: 1
66394
66397
  }
66395
66398
  })
@@ -66504,10 +66507,10 @@ var emptyRef = {
66504
66507
  theadRef.current.parentElement.scrollLeft = left;
66505
66508
  });
66506
66509
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
66507
- var _scrollRef$current8;
66510
+ var _scrollRef$current10;
66508
66511
  if (!props.sticky || !scrollRef.current || !isScrollX) return;
66509
66512
  // sticky场景下,从空数据到有数据切换时,同步一次滚动条的位置
66510
- 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);
66511
66514
  }, [isScrollX, props.sticky, $empty]);
66512
66515
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
66513
66516
  // 绑定 wheel 事件
@@ -73085,7 +73088,7 @@ var upload_interface = __webpack_require__(8821);
73085
73088
 
73086
73089
 
73087
73090
  /* harmony default export */ var src_0 = ({
73088
- version: '3.8.2-beta.4'
73091
+ version: '3.8.2-beta.6'
73089
73092
  });
73090
73093
  }();
73091
73094
  /******/ return __webpack_exports__;