build
This commit is contained in:
parent
39610f5853
commit
8aea29060a
|
@ -169,14 +169,16 @@ var TableHeader = function (_Component) {
|
||||||
// const newTableWidth = this.drag.tableWidth + diff;// +'px';
|
// const newTableWidth = this.drag.tableWidth + diff;// +'px';
|
||||||
// this.table.table.style.width = newTableWidth+'px';;//改变table的width
|
// this.table.table.style.width = newTableWidth+'px';;//改变table的width
|
||||||
// if(this.table.innerTableBody){//TODO 后续需要处理此处
|
// if(this.table.innerTableBody){//TODO 后续需要处理此处
|
||||||
// this.table.innerTableBody.style.width = newTableWidth+'px'; ;
|
// this.table.innerTableBody.style.width = newTableWidth+'px';
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
var newDiff = parseInt(currentCols.style.minWidth) - parseInt(currentCols.style.width);
|
var newDiff = parseInt(currentCols.style.minWidth) - parseInt(currentCols.style.width);
|
||||||
if (newDiff > 0) {
|
if (newDiff > 0) {
|
||||||
//缩小
|
//缩小
|
||||||
var lastWidth = _this.lastColumWidth + newDiff;
|
var lastWidth = _this.lastColumWidth + newDiff;
|
||||||
_this.table.cols[lastShowIndex].style.width = lastWidth + "px";
|
_this.table.cols[lastShowIndex].style.width = lastWidth + "px"; //同步表头
|
||||||
|
_this.table.tableBodyCols[lastShowIndex].style.width = lastWidth + "px"; //同步表体
|
||||||
}
|
}
|
||||||
|
|
||||||
var showScroll = contentDomWidth - (_this.drag.tableWidth + diff) - scrollbarWidth;
|
var showScroll = contentDomWidth - (_this.drag.tableWidth + diff) - scrollbarWidth;
|
||||||
|
@ -512,6 +514,7 @@ var TableHeader = function (_Component) {
|
||||||
table.cols = tableDome.getElementsByTagName("col");
|
table.cols = tableDome.getElementsByTagName("col");
|
||||||
table.ths = tableDome.getElementsByTagName("th");
|
table.ths = tableDome.getElementsByTagName("th");
|
||||||
table.tr = tableDome.getElementsByTagName("tr");
|
table.tr = tableDome.getElementsByTagName("tr");
|
||||||
|
table.tableBodyCols = contentTable.querySelector('.u-table-scroll .u-table-body').getElementsByTagName("col");
|
||||||
}
|
}
|
||||||
|
|
||||||
table.fixedLeftHeaderTable = contentTable.querySelector('.u-table-fixed-left .u-table-header');
|
table.fixedLeftHeaderTable = contentTable.querySelector('.u-table-fixed-left .u-table-header');
|
||||||
|
|
|
@ -76,6 +76,7 @@ class TableHeader extends Component {
|
||||||
table.cols = tableDome.getElementsByTagName("col");
|
table.cols = tableDome.getElementsByTagName("col");
|
||||||
table.ths = tableDome.getElementsByTagName("th");
|
table.ths = tableDome.getElementsByTagName("th");
|
||||||
table.tr = tableDome.getElementsByTagName("tr");
|
table.tr = tableDome.getElementsByTagName("tr");
|
||||||
|
table.tableBodyCols = contentTable.querySelector('.u-table-scroll .u-table-body').getElementsByTagName("col");
|
||||||
}
|
}
|
||||||
|
|
||||||
table.fixedLeftHeaderTable = contentTable.querySelector('.u-table-fixed-left .u-table-header') ;
|
table.fixedLeftHeaderTable = contentTable.querySelector('.u-table-fixed-left .u-table-header') ;
|
||||||
|
@ -274,13 +275,15 @@ class TableHeader extends Component {
|
||||||
// const newTableWidth = this.drag.tableWidth + diff;// +'px';
|
// const newTableWidth = this.drag.tableWidth + diff;// +'px';
|
||||||
// this.table.table.style.width = newTableWidth+'px';;//改变table的width
|
// this.table.table.style.width = newTableWidth+'px';;//改变table的width
|
||||||
// if(this.table.innerTableBody){//TODO 后续需要处理此处
|
// if(this.table.innerTableBody){//TODO 后续需要处理此处
|
||||||
// this.table.innerTableBody.style.width = newTableWidth+'px'; ;
|
// this.table.innerTableBody.style.width = newTableWidth+'px';
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
let newDiff = (parseInt(currentCols.style.minWidth) - parseInt(currentCols.style.width));
|
let newDiff = (parseInt(currentCols.style.minWidth) - parseInt(currentCols.style.width));
|
||||||
if(newDiff > 0){//缩小
|
if(newDiff > 0){//缩小
|
||||||
let lastWidth = this.lastColumWidth + newDiff;
|
let lastWidth = this.lastColumWidth + newDiff;
|
||||||
this.table.cols[lastShowIndex].style.width = lastWidth +"px";
|
this.table.cols[lastShowIndex].style.width = lastWidth +"px";//同步表头
|
||||||
|
this.table.tableBodyCols[lastShowIndex].style.width = lastWidth + "px";//同步表体
|
||||||
}
|
}
|
||||||
|
|
||||||
let showScroll = contentDomWidth - (this.drag.tableWidth + diff) - scrollbarWidth ;
|
let showScroll = contentDomWidth - (this.drag.tableWidth + diff) - scrollbarWidth ;
|
||||||
|
|
Loading…
Reference in New Issue