Commit 2c75c881697c64bb79c71ec4e804564fe0d6d7c4
Committed by
GitHub
Merge pull request #1737 from SergioCrisostomo/fix-broken-reduce
Add counter start to reduce
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/components/table/table.vue
... | ... | @@ -331,7 +331,7 @@ |
331 | 331 | this.$nextTick(() => { |
332 | 332 | const allWidth = !this.columns.some(cell => !cell.width); // each column set a width |
333 | 333 | if (allWidth) { |
334 | - this.tableWidth = this.columns.map(cell => cell.width).reduce((a, b) => a + b); | |
334 | + this.tableWidth = this.columns.map(cell => cell.width).reduce((a, b) => a + b, 0); | |
335 | 335 | } else { |
336 | 336 | this.tableWidth = parseInt(getStyle(this.$el, 'width')) - 1; |
337 | 337 | } |
... | ... | @@ -438,7 +438,7 @@ |
438 | 438 | // }else{ |
439 | 439 | // this.objData[data._index]._isChecked = status; |
440 | 440 | // } |
441 | - | |
441 | + | |
442 | 442 | // }); |
443 | 443 | for(const data of this.rebuildData){ |
444 | 444 | if(this.objData[data._index]._isDisabled){ | ... | ... |