fix: version update

This commit is contained in:
gx-mac 2021-03-03 22:09:20 +08:00
parent 3c0aa855a7
commit 43193e089b
2 changed files with 8 additions and 5 deletions

View File

@ -514,10 +514,10 @@ var Table = function (_Component) {
this.isShowScrollY();
if (this.bodyTable) {
var currentOverflowX = window.getComputedStyle(this.bodyTable).overflowX;
if (!this.props.scroll.x && currentOverflowX === 'scroll') {
if ((!this.props.scroll.x || this.props.scroll.x === '100%') && currentOverflowX === 'scroll') {
this.bodyTable.style.overflowX = 'hidden';
}
if (this.props.scroll.x && currentOverflowX !== 'scroll') {
if (this.props.scroll.x && this.props.scroll.x !== '100%' && currentOverflowX !== 'scroll') {
this.bodyTable.style.overflowX = 'scroll';
}
}
@ -1215,7 +1215,7 @@ var Table = function (_Component) {
if (this.props.data.length == 0 && this.props.headerScroll) {
bodyStyle.overflowX = 'hidden';
}
if (!footerScroll) {
if (!footerScroll && scroll.x !== '100%') {
bodyStyle.overflowX = bodyStyle.overflowX || 'auto';
}
}
@ -1227,7 +1227,7 @@ var Table = function (_Component) {
// bodyStyle.height = bodyStyle.height || scroll.y;
innerBodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y;
innerBodyStyle.overflowY = bodyStyle.overflowY || 'scroll';
if (scroll.x) {
if (scroll.x && scroll.x !== '100%') {
innerBodyStyle.overflowX = 'scroll';
}
} else {
@ -1362,6 +1362,9 @@ var Table = function (_Component) {
}
delete bodyStyle.overflowX;
delete bodyStyle.overflowY;
if (scroll.x === '100%') {
delete bodyStyle.marginBottom;
}
BodyTable = _react2["default"].createElement(
'div',
{

View File

@ -1,6 +1,6 @@
{
"name": "bee-table",
"version": "2.3.15-beta.3",
"version": "2.3.15-beta.4",
"description": "Table ui component for react",
"keywords": [
"react",