scroll y为true时横向滚动条计算有问题
This commit is contained in:
parent
02f26141a5
commit
2ecdcf74e4
|
@ -8665,10 +8665,10 @@ ul {
|
|||
.u-table-filter-column-filter-icon {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 2px;
|
||||
width: 25px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
right: 18px;
|
||||
width: 22px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
z-index: 2;
|
||||
background: #f7f7f7; }
|
||||
.u-table-filter-column-filter-iconi.uf {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -129,6 +129,10 @@ class Table extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
setTimeout(this.resetScrollY, 300);
|
||||
//含有纵向滚动条
|
||||
if(this.props.scroll.y){
|
||||
this.scrollbarWidth = measureScrollbar();
|
||||
}
|
||||
//后续也放在recevice里面
|
||||
if (!this.props.originWidth) {
|
||||
this.computeTableWidth();
|
||||
|
@ -215,7 +219,7 @@ class Table extends Component {
|
|||
let lastShowIndex = computeObj.lastShowIndex;
|
||||
this.computeWidth = computeObj.computeWidth;
|
||||
if (this.computeWidth < this.contentWidth) {
|
||||
let contentWidthDiff = this.contentWidth - this.computeWidth;
|
||||
let contentWidthDiff = this.scrollbarWidth?this.contentWidth - this.computeWidth-this.scrollbarWidth:this.contentWidth - this.computeWidth;
|
||||
this.setState({ contentWidthDiff, lastShowIndex });
|
||||
} else {
|
||||
this.contentWidth = this.computeWidth;
|
||||
|
@ -645,7 +649,7 @@ class Table extends Component {
|
|||
useFixedHeader = true;
|
||||
|
||||
// Add negative margin bottom for scroll bar overflow bug
|
||||
const scrollbarWidth = measureScrollbar();
|
||||
const scrollbarWidth = this.scrollbarWidth;
|
||||
if (scrollbarWidth >= 0) {
|
||||
(fixed ? bodyStyle : headStyle).paddingBottom = '0px';
|
||||
//显示表头滚动条
|
||||
|
|
Loading…
Reference in New Issue