shineout 3.3.0-beta.12 → 3.3.0-beta.13

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
@@ -476,5 +476,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
476
476
  // 此文件由脚本自动生成,请勿直接修改。
477
477
  // This file was generated automatically by a script. Please do not modify it directly.
478
478
  var _default = exports.default = {
479
- version: '3.3.0-beta.12'
479
+ version: '3.3.0-beta.13'
480
480
  };
package/dist/shineout.js CHANGED
@@ -11968,7 +11968,7 @@ var handleStyle = function handleStyle(style) {
11968
11968
  };
11969
11969
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
11970
11970
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
11971
- /* harmony default export */ var version = ('3.3.0-beta.12');
11971
+ /* harmony default export */ var version = ('3.3.0-beta.13');
11972
11972
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11973
11973
 
11974
11974
 
@@ -28157,6 +28157,15 @@ var isFirefox = function isFirefox() {
28157
28157
  if (!is_isBrowser()) return false;
28158
28158
  return navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
28159
28159
  };
28160
+ var isChromeLowerThan = function isChromeLowerThan(version) {
28161
+ // 服务器端渲染时,不执行版本检查
28162
+ if (typeof window === 'undefined' || typeof navigator === 'undefined') {
28163
+ return false;
28164
+ }
28165
+ var ua = navigator.userAgent;
28166
+ var chrome = ua.match(/chrome\/(\d+)/i);
28167
+ return Boolean(chrome && chrome[1] && parseInt(chrome[1], 10) < version);
28168
+ };
28160
28169
  function isDomElement(element) {
28161
28170
  return (typeof HTMLElement === "undefined" ? "undefined" : typeof_default()(HTMLElement)) === 'object' ? element instanceof HTMLElement // DOM2
28162
28171
  : element && typeof_default()(element) === 'object' && element !== null && element.nodeType === 1 && typeof element.nodeName === 'string';
@@ -47820,7 +47829,8 @@ var Scroll = function Scroll(props) {
47820
47829
  var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
47821
47830
  var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
47822
47831
  timer: null,
47823
- isMouseDown: false
47832
+ isMouseDown: false,
47833
+ lastPaddingTop: 0
47824
47834
  }),
47825
47835
  context = _useRef.current;
47826
47836
  var _props$scrollHeight = props.scrollHeight,
@@ -47849,10 +47859,17 @@ var Scroll = function Scroll(props) {
47849
47859
  overflow: 'hidden',
47850
47860
  position: 'sticky'
47851
47861
  }, isRtl ? 'right' : 'left', 0), "top", 0);
47862
+ var pd = context.lastPaddingTop;
47863
+ if (height > 0 && scrollHeight > 0) {
47864
+ pd = Math.max(0, Math.floor(scrollHeight - height));
47865
+ context.lastPaddingTop = pd;
47866
+ }
47852
47867
  var placeStyle = {
47853
- paddingTop: height > 0 && scrollHeight > 0 ? Math.max(0, Math.floor(scrollHeight - height)) : 0,
47868
+ paddingTop: pd,
47854
47869
  width: scrollWidth,
47855
- overflow: 'hidden',
47870
+ overflow: props.isScrollY ? 'hidden' : 'auto hidden',
47871
+ height: props.isScrollY ? 0 : 1,
47872
+ marginTop: props.isScrollY ? 0 : -1,
47856
47873
  lineHeight: 0
47857
47874
  };
47858
47875
  var handleScroll = usePersistFn(function (e) {
@@ -55113,6 +55130,10 @@ var useTableLayout = function useTableLayout(props) {
55113
55130
  });
55114
55131
  };
55115
55132
  var changeColGroup = function changeColGroup(cols, adjust) {
55133
+ // 修改`Table`被display:none时,表格头样式错乱的问题
55134
+ if (cols && cols.every(function (v) {
55135
+ return v === 0;
55136
+ })) return;
55116
55137
  setColgroup(cols);
55117
55138
  setAdjust(adjust);
55118
55139
  if (!adjust) {
@@ -56039,9 +56060,10 @@ var Colgroup = function Colgroup(props) {
56039
56060
  return /*#__PURE__*/(0,jsx_runtime.jsx)("colgroup", {
56040
56061
  children: colgroup === null || colgroup === void 0 ? void 0 : colgroup.map(function (item, index) {
56041
56062
  var isLast = index === colgroup.length - 1;
56063
+ var width = isLast && props.shouldLastColAuto ? undefined : item;
56042
56064
  return /*#__PURE__*/(0,jsx_runtime.jsx)("col", {
56043
56065
  style: {
56044
- width: isLast && props.shouldLastColAuto ? undefined : item
56066
+ width: width
56045
56067
  }
56046
56068
  }, columns[index].key);
56047
56069
  })
@@ -57271,8 +57293,8 @@ var emptyRef = {
57271
57293
  parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
57272
57294
  };
57273
57295
  var isRenderBaseTable = !virtual && !isScrollY && !props.sticky && ((_props$data3 = props.data) === null || _props$data3 === void 0 ? void 0 : _props$data3.length);
57274
- var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper, (isScrollY && scrollBarWidth || isRenderBaseTable) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.scrollY));
57275
- var footWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.footWrapper, (isScrollY && scrollBarWidth || isRenderBaseTable) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.scrollY));
57296
+ var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper, isScrollY && scrollBarWidth && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.scrollY));
57297
+ var footWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.footWrapper, isScrollY && scrollBarWidth && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.scrollY));
57276
57298
  if (isRenderBaseTable) {
57277
57299
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
57278
57300
  ref: scrollRef,
@@ -57311,6 +57333,7 @@ var emptyRef = {
57311
57333
  scrollHeight: virtual ? virtualInfo.scrollHeight : tbodyHeight,
57312
57334
  onScroll: handleVirtualScroll,
57313
57335
  defaultHeight: context.emptyHeight,
57336
+ isScrollY: isScrollY,
57314
57337
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
57315
57338
  style: {
57316
57339
  width: width,
@@ -63519,7 +63542,7 @@ var upload_interface = __webpack_require__(8821);
63519
63542
 
63520
63543
 
63521
63544
  /* harmony default export */ var src_0 = ({
63522
- version: '3.3.0-beta.12'
63545
+ version: '3.3.0-beta.13'
63523
63546
  });
63524
63547
  }();
63525
63548
  /******/ return __webpack_exports__;