forked from JavaScript/bee-table
fix: scrollbar issue
This commit is contained in:
parent
abf567d6da
commit
6b8ad2414e
|
@ -497,9 +497,13 @@ var Table = function (_Component) {
|
|||
// 是否传入 scroll中的y属性,如果传入判断是否是整数,如果是则进行比较 。bodyTable 的clientHeight进行判断
|
||||
this.isShowScrollY();
|
||||
if (this.bodyTable) {
|
||||
if (!this.props.scroll.x && window.getComputedStyle(this.bodyTable).overflowX !== 'hidden') {
|
||||
var currentOverflowX = window.getComputedStyle(this.bodyTable).overflowX;
|
||||
if (!this.props.scroll.x && currentOverflowX === 'scroll') {
|
||||
this.bodyTable.style.overflowX = 'hidden';
|
||||
}
|
||||
if (this.props.scroll.x && currentOverflowX !== 'scroll') {
|
||||
this.bodyTable.style.overflowX = 'scroll';
|
||||
}
|
||||
}
|
||||
if (this.bodyTableOuter) {
|
||||
// 隐藏几个不需要真正滚动的父元素的滚动条
|
||||
|
@ -1207,6 +1211,9 @@ var Table = function (_Component) {
|
|||
// bodyStyle.height = bodyStyle.height || scroll.y;
|
||||
innerBodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y;
|
||||
innerBodyStyle.overflowY = bodyStyle.overflowY || 'scroll';
|
||||
if (scroll.x) {
|
||||
innerBodyStyle.overflowX = 'scroll';
|
||||
}
|
||||
} else {
|
||||
bodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bee-table",
|
||||
"version": "2.3.15-beta.1",
|
||||
"version": "2.3.15-beta.2",
|
||||
"description": "Table ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
|
Loading…
Reference in New Issue