含有border的表格滚动条显示问题
This commit is contained in:
parent
91cb2e1297
commit
d5b6f8072a
|
@ -408,8 +408,8 @@
|
|||
top: 3px;
|
||||
right: 18px;
|
||||
width: 22px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
z-index: 2;
|
||||
background: #f7f7f7; }
|
||||
.u-table-filter-column-filter-iconi.uf {
|
||||
|
|
|
@ -275,6 +275,7 @@ var Table = function (_Component) {
|
|||
};
|
||||
|
||||
Table.prototype.computeTableWidth = function computeTableWidth() {
|
||||
|
||||
//如果用户传了scroll.x按用户传的为主
|
||||
var setWidthParam = this.props.scroll.x;
|
||||
if (typeof setWidthParam == 'number') {
|
||||
|
@ -295,6 +296,10 @@ var Table = function (_Component) {
|
|||
this.computeWidth = computeObj.computeWidth;
|
||||
if (this.computeWidth < this.contentWidth) {
|
||||
var contentWidthDiff = this.scrollbarWidth ? this.contentWidth - this.computeWidth - this.scrollbarWidth : this.contentWidth - this.computeWidth;
|
||||
//bordered的表格需要减去边框的差值1
|
||||
if (this.props.bordered) {
|
||||
contentWidthDiff = contentWidthDiff - 1;
|
||||
}
|
||||
this.setState({ contentWidthDiff: contentWidthDiff, lastShowIndex: lastShowIndex });
|
||||
} else {
|
||||
this.contentWidth = this.computeWidth;
|
||||
|
|
|
@ -8481,7 +8481,7 @@ ul {
|
|||
height: 100%;
|
||||
overflow: scroll; }
|
||||
.u-table-fixed-header .u-table-scroll .u-table-header {
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: -20px;
|
||||
overflow-y: scroll;
|
||||
|
@ -8667,8 +8667,8 @@ ul {
|
|||
top: 3px;
|
||||
right: 18px;
|
||||
width: 22px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
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
|
@ -200,6 +200,7 @@ class Table extends Component {
|
|||
}
|
||||
|
||||
computeTableWidth() {
|
||||
|
||||
//如果用户传了scroll.x按用户传的为主
|
||||
let setWidthParam = this.props.scroll.x
|
||||
if (typeof (setWidthParam) == 'number') {
|
||||
|
@ -220,6 +221,10 @@ class Table extends Component {
|
|||
this.computeWidth = computeObj.computeWidth;
|
||||
if (this.computeWidth < this.contentWidth) {
|
||||
let contentWidthDiff = this.scrollbarWidth?this.contentWidth - this.computeWidth-this.scrollbarWidth:this.contentWidth - this.computeWidth;
|
||||
//bordered的表格需要减去边框的差值1
|
||||
if(this.props.bordered){
|
||||
contentWidthDiff = contentWidthDiff-1;
|
||||
}
|
||||
this.setState({ contentWidthDiff, lastShowIndex });
|
||||
} else {
|
||||
this.contentWidth = this.computeWidth;
|
||||
|
|
|
@ -123,7 +123,7 @@ $table-move-in-color: $bg-color-base;
|
|||
|
||||
|
||||
&-fixed-header &-scroll &-header {
|
||||
overflow-x: scroll;
|
||||
overflow-x: auto;
|
||||
padding-bottom: 20px;
|
||||
margin-bottom: -20px;
|
||||
overflow-y: scroll;
|
||||
|
@ -408,8 +408,8 @@ $table-move-in-color: $bg-color-base;
|
|||
top: 3px;
|
||||
right: 18px;
|
||||
width: 22px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
z-index: 2;
|
||||
background: #f7f7f7;
|
||||
&i.uf{
|
||||
|
|
Loading…
Reference in New Issue