fix: css update

This commit is contained in:
gx-mac 2021-03-04 10:19:18 +08:00
parent 43193e089b
commit 290ba7aed8
2 changed files with 6 additions and 2 deletions

View File

@ -514,7 +514,7 @@ var Table = function (_Component) {
this.isShowScrollY();
if (this.bodyTable) {
var currentOverflowX = window.getComputedStyle(this.bodyTable).overflowX;
if ((!this.props.scroll.x || this.props.scroll.x === '100%') && currentOverflowX === 'scroll') {
if ((!this.props.scroll.x || this.props.scroll.x === '100%') && currentOverflowX !== 'hidden') {
this.bodyTable.style.overflowX = 'hidden';
}
if (this.props.scroll.x && this.props.scroll.x !== '100%' && currentOverflowX !== 'scroll') {
@ -1229,6 +1229,8 @@ var Table = function (_Component) {
innerBodyStyle.overflowY = bodyStyle.overflowY || 'scroll';
if (scroll.x && scroll.x !== '100%') {
innerBodyStyle.overflowX = 'scroll';
} else {
innerBodyStyle.overflowX = 'hidden';
}
} else {
bodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y;

View File

@ -298,7 +298,7 @@ class Table extends Component {
this.isShowScrollY();
if (this.bodyTable) {
const currentOverflowX = window.getComputedStyle(this.bodyTable).overflowX
if ((!this.props.scroll.x || this.props.scroll.x === '100%') && currentOverflowX === 'scroll') {
if ((!this.props.scroll.x || this.props.scroll.x === '100%') && currentOverflowX !== 'hidden') {
this.bodyTable.style.overflowX = 'hidden';
}
if ((this.props.scroll.x && this.props.scroll.x !== '100%') && currentOverflowX !== 'scroll') {
@ -1038,6 +1038,8 @@ class Table extends Component {
innerBodyStyle.overflowY = bodyStyle.overflowY || 'scroll';
if (scroll.x && scroll.x !== '100%') {
innerBodyStyle.overflowX = 'scroll';
} else {
innerBodyStyle.overflowX = 'hidden';
}
} else {
bodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y;