@@ -1556,32 +1556,34 @@ return /******/ (function(modules) { // webpackBootstrap
1556
1556
1557
1557
var scrollBarWidth = isScroll ? _util2.default.getScrollBarWidth() : 0;
1558
1558
if (firstRow && this.store.getDataNum()) {
1559
- var cells = firstRow.childNodes;
1560
- for (var i = 0; i < cells.length; i++) {
1561
- var cell = cells[i];
1562
- var computedStyle = window.getComputedStyle(cell);
1563
- var width = parseFloat(computedStyle.width.replace('px', ''));
1564
- if (this.isIE) {
1565
- var paddingLeftWidth = parseFloat(computedStyle.paddingLeft.replace('px', ''));
1566
- var paddingRightWidth = parseFloat(computedStyle.paddingRight.replace('px', ''));
1567
- var borderRightWidth = parseFloat(computedStyle.borderRightWidth.replace('px', ''));
1568
- var borderLeftWidth = parseFloat(computedStyle.borderLeftWidth.replace('px', ''));
1569
- width = width + paddingLeftWidth + paddingRightWidth + borderRightWidth + borderLeftWidth;
1570
- }
1571
- var lastPadding = cells.length - 1 === i ? scrollBarWidth : 0;
1572
- if (width <= 0) {
1573
- width = 120;
1574
- cell.width = width + lastPadding + 'px';
1575
- }
1576
- var result = width + lastPadding + 'px';
1577
- header[i].style.width = result;
1578
- header[i].style.minWidth = result;
1579
- if (cells.length - 1 === i) {
1580
- bodyHeader[i].style.width = width + 'px';
1581
- bodyHeader[i].style.minWidth = width + 'px';
1582
- } else {
1583
- bodyHeader[i].style.width = result;
1584
- bodyHeader[i].style.minWidth = result;
1559
+ if (isScroll) {
1560
+ var cells = firstRow.childNodes;
1561
+ for (var i = 0; i < cells.length; i++) {
1562
+ var cell = cells[i];
1563
+ var computedStyle = window.getComputedStyle(cell);
1564
+ var width = parseFloat(computedStyle.width.replace('px', ''));
1565
+ if (this.isIE) {
1566
+ var paddingLeftWidth = parseFloat(computedStyle.paddingLeft.replace('px', ''));
1567
+ var paddingRightWidth = parseFloat(computedStyle.paddingRight.replace('px', ''));
1568
+ var borderRightWidth = parseFloat(computedStyle.borderRightWidth.replace('px', ''));
1569
+ var borderLeftWidth = parseFloat(computedStyle.borderLeftWidth.replace('px', ''));
1570
+ width = width + paddingLeftWidth + paddingRightWidth + borderRightWidth + borderLeftWidth;
1571
+ }
1572
+ var lastPadding = cells.length - 1 === i ? scrollBarWidth : 0;
1573
+ if (width <= 0) {
1574
+ width = 120;
1575
+ cell.width = width + lastPadding + 'px';
1576
+ }
1577
+ var result = width + lastPadding + 'px';
1578
+ header[i].style.width = result;
1579
+ header[i].style.minWidth = result;
1580
+ if (cells.length - 1 === i) {
1581
+ bodyHeader[i].style.width = width + 'px';
1582
+ bodyHeader[i].style.minWidth = width + 'px';
1583
+ } else {
1584
+ bodyHeader[i].style.width = result;
1585
+ bodyHeader[i].style.minWidth = result;
1586
+ }
1585
1587
}
1586
1588
}
1587
1589
} else {
0 commit comments