shineout 3.7.0-beta.1 → 3.7.0-beta.2

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
@@ -514,5 +514,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
514
514
  // 此文件由脚本自动生成,请勿直接修改。
515
515
  // This file was generated automatically by a script. Please do not modify it directly.
516
516
  var _default = exports.default = {
517
- version: '3.7.0-beta.1'
517
+ version: '3.7.0-beta.2'
518
518
  };
package/dist/shineout.js CHANGED
@@ -12142,7 +12142,7 @@ var handleStyle = function handleStyle(style) {
12142
12142
  };
12143
12143
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12144
12144
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12145
- /* harmony default export */ var version = ('3.7.0-beta.1');
12145
+ /* harmony default export */ var version = ('3.7.0-beta.2');
12146
12146
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12147
12147
 
12148
12148
 
@@ -61976,10 +61976,10 @@ var thead_toNum = toNum;
61976
61976
  };
61977
61977
  var getFixedStyle = function getFixedStyle(fixed, index, colSpan, level) {
61978
61978
  if (fixed === 'left') {
61979
- if (props.fixLeftNum !== undefined) {
61979
+ if (props.virtual) {
61980
61980
  // 这是virtual table场景下的th样式
61981
61981
  return {
61982
- transform: "translate3d(".concat(props.fixLeftNum, "px, 0, 0)")
61982
+ transform: "translate3d(var(--virtual-fixed-left, 0), 0, 0)"
61983
61983
  };
61984
61984
  }
61985
61985
  var left = colgroup.slice(0, index).reduce(function (a, b) {
@@ -61993,10 +61993,10 @@ var thead_toNum = toNum;
61993
61993
  };
61994
61994
  }
61995
61995
  if (fixed === 'right') {
61996
- if (props.fixRightNum !== undefined) {
61996
+ if (props.virtual) {
61997
61997
  // 这是virtual table场景下的th样式
61998
61998
  return {
61999
- transform: "translate3d(".concat(0 - props.fixRightNum, "px, 0, 0)")
61999
+ transform: "translate3d(var(--virtual-fixed-right, 0), 0, 0)"
62000
62000
  };
62001
62001
  }
62002
62002
  var right = colgroup.slice(index + colSpan).reduce(function (a, b) {
@@ -62369,9 +62369,9 @@ var Tr = function Tr(props) {
62369
62369
  var getFixedStyle = function getFixedStyle(fixed, index, colSpan) {
62370
62370
  if (!props.isScrollX) return;
62371
62371
  if (fixed === 'left') {
62372
- if (props.fixLeftNum !== undefined) {
62372
+ if (props.virtual) {
62373
62373
  return {
62374
- transform: "translate3d(".concat(props.fixLeftNum, "px, 0, 0)")
62374
+ transform: "translate3d(var(--virtual-fixed-left, 0), 0, 0)"
62375
62375
  };
62376
62376
  }
62377
62377
  var left = props.colgroup.slice(0, index).reduce(function (a, b) {
@@ -62383,9 +62383,9 @@ var Tr = function Tr(props) {
62383
62383
  };
62384
62384
  }
62385
62385
  if (fixed === 'right') {
62386
- if (props.fixRightNum !== undefined) {
62386
+ if (props.virtual) {
62387
62387
  return {
62388
- transform: "translate3d(".concat(0 - props.fixRightNum, "px, 0, 0)")
62388
+ transform: "translate3d(var(--virtual-fixed-right, 0), 0, 0)"
62389
62389
  };
62390
62390
  }
62391
62391
  var right = props.colgroup.slice(index + colSpan).reduce(function (a, b) {
@@ -62775,8 +62775,7 @@ var Tr = function Tr(props) {
62775
62775
  isEmptyTree: props.isEmptyTree,
62776
62776
  treeColumnsName: props.treeColumnsName,
62777
62777
  setRowHeight: props.setRowHeight,
62778
- fixLeftNum: props.fixLeftNum,
62779
- fixRightNum: props.fixRightNum,
62778
+ virtual: props.virtual,
62780
62779
  striped: props.striped,
62781
62780
  radio: props.radio,
62782
62781
  isCellHover: isCellHover,
@@ -62817,9 +62816,9 @@ var tfoot_isArray = isArray,
62817
62816
  var getFixedStyle = function getFixedStyle(fixed, index, colSpan) {
62818
62817
  var colgroup = props.colgroup;
62819
62818
  if (fixed === 'left') {
62820
- if (props.fixLeftNum !== undefined) {
62819
+ if (props.virtual) {
62821
62820
  return {
62822
- transform: "translate3d(".concat(props.fixLeftNum, "px, 0, 0)")
62821
+ transform: "translate3d(var(--virtual-fixed-left, 0), 0, 0)"
62823
62822
  };
62824
62823
  }
62825
62824
  var left = colgroup.slice(0, index).reduce(function (a, b) {
@@ -62831,9 +62830,9 @@ var tfoot_isArray = isArray,
62831
62830
  };
62832
62831
  }
62833
62832
  if (fixed === 'right') {
62834
- if (props.fixRightNum !== undefined) {
62833
+ if (props.virtual) {
62835
62834
  return {
62836
- transform: "translate3d(-".concat(props.fixRightNum, "px, 0, 0)")
62835
+ transform: "translate3d(var(--virtual-fixed-right, 0), 0, 0)"
62837
62836
  };
62838
62837
  }
62839
62838
  var right = colgroup.slice(index + colSpan).reduce(function (a, b) {
@@ -63327,19 +63326,22 @@ var emptyRef = {
63327
63326
  };
63328
63327
  if (isRenderVirtualTable) {
63329
63328
  var _props$data4;
63329
+ var virtualCssVar = {
63330
+ '--virtual-fixed-left': "".concat(virtualInfo.innerLeft, "px"),
63331
+ '--virtual-fixed-right': fixRightNum > 0 ? "-".concat(fixRightNum, "px") : "".concat(fixRightNum, "px")
63332
+ };
63330
63333
  return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
63331
63334
  children: [renderHeadMirrorScroller(), !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(StickyWrapper, objectSpread2_default()(objectSpread2_default()({}, props.sticky ? stickyProps : {}), {}, {
63332
63335
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
63333
63336
  className: headWrapperClass,
63334
63337
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
63335
- style: {
63338
+ style: objectSpread2_default()({
63336
63339
  width: width,
63337
- transform: "translate3d(".concat(0 - virtualInfo.innerLeft, "px, 0, 0)")
63338
- },
63340
+ transform: "translate3d(-".concat(virtualInfo.innerLeft, "px, 0, 0)")
63341
+ }, virtualCssVar),
63339
63342
  ref: theadRef,
63340
63343
  children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()(objectSpread2_default()({}, headCommonProps), {}, {
63341
- fixLeftNum: virtualInfo.innerLeft,
63342
- fixRightNum: fixRightNum
63344
+ virtual: true
63343
63345
  }))]
63344
63346
  })
63345
63347
  })
@@ -63353,30 +63355,28 @@ var emptyRef = {
63353
63355
  defaultHeight: context.emptyHeight,
63354
63356
  isScrollY: isScrollY,
63355
63357
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
63356
- style: {
63358
+ style: objectSpread2_default()({
63357
63359
  width: width,
63358
63360
  transform: virtualInfo.getTranslate()
63359
- },
63361
+ }, virtualCssVar),
63360
63362
  ref: tbodyRef,
63361
63363
  children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()(objectSpread2_default()({}, bodyCommonProps), {}, {
63362
63364
  currentIndex: virtualInfo.startIndex,
63363
63365
  data: virtualInfo.data,
63364
63366
  setRowHeight: virtualInfo.setRowHeight,
63365
- fixLeftNum: virtualInfo.innerLeft,
63366
- fixRightNum: fixRightNum
63367
+ virtual: true
63367
63368
  }))]
63368
63369
  })
63369
63370
  }), renderEmpty(), showFoot ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
63370
63371
  className: footWrapperClass,
63371
63372
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
63372
- style: {
63373
+ style: objectSpread2_default()({
63373
63374
  width: width,
63374
63375
  transform: "translate3d(-".concat(virtualInfo.innerLeft, "px, 0, 0)")
63375
- },
63376
+ }, virtualCssVar),
63376
63377
  ref: tfootRef,
63377
63378
  children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()(objectSpread2_default()({}, footCommonProps), {}, {
63378
- fixLeftNum: virtualInfo.innerLeft,
63379
- fixRightNum: fixRightNum
63379
+ virtual: true
63380
63380
  }))]
63381
63381
  })
63382
63382
  }) : null]
@@ -69812,7 +69812,7 @@ var upload_interface = __webpack_require__(8821);
69812
69812
 
69813
69813
 
69814
69814
  /* harmony default export */ var src_0 = ({
69815
- version: '3.7.0-beta.1'
69815
+ version: '3.7.0-beta.2'
69816
69816
  });
69817
69817
  }();
69818
69818
  /******/ return __webpack_exports__;