解决左侧固定列滚动到底不对齐

This commit is contained in:
cw 2019-08-13 20:01:30 +08:00
parent e65f4cec38
commit 0613edbc05
7 changed files with 177247 additions and 172357 deletions

View File

@ -462,7 +462,7 @@ var Table = function (_Component) {
this.domWidthDiff = this.contentDomWidth - this.contentWidth;
}
if (this.computeWidth < this.contentWidth) {
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) {

File diff suppressed because one or more lines are too long

4
dist/demo.css vendored
View File

@ -430,8 +430,8 @@
background-clip: padding-box;
-moz-user-select: -moz-none;
-webkit-user-select: none;
/*
Introduced in IE 10.
/*
Introduced in IE 10.
*/
-ms-user-select: none;
user-select: none; }

2
dist/demo.css.map vendored

File diff suppressed because one or more lines are too long

349586
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -298,7 +298,7 @@ class Table extends Component {
this.domWidthDiff = this.contentDomWidth - this.contentWidth;
}
if (this.computeWidth < this.contentWidth) {
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){
@ -594,7 +594,7 @@ class Table extends Component {
*/
onDragRow = (currentKey,targetKey)=>{
let {data} = this.state,currentIndex,targetIndex,record;
data.forEach((da,i)=>{
data.forEach((da,i)=>{
// tr 的唯一标识通过 data.key 或 rowKey 两种方式传进来
let trKey = da.key ? da.key : this.getRowKey(da, i);
if(trKey == currentKey){
@ -628,7 +628,7 @@ class Table extends Component {
console.log('向上拖')
arr.splice(index2+1,0,value1)
}
return arr;
}