Commit 7449f269a6d8c2015ea9f68e0ddee35b7dd63313

Authored by BarZu
1 parent ca131354

修复table里嵌套table报 Cannot read property 'width' of undefined"的错误

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/components/table/table.vue
... ... @@ -351,7 +351,7 @@
351 351 if (allWidth) autoWidthIndex = this.cloneColumns.findIndex(cell => !cell.width);//todo 这行可能有问题
352 352  
353 353 if (this.data.length) {
354   - const $td = this.$refs.tbody.$el.querySelectorAll('tbody tr')[0].querySelectorAll('td');
  354 + const $td = this.$refs.tbody.$el.querySelectorAll('tbody tr')[0].childNodes;
355 355 for (let i = 0; i < $td.length; i++) { // can not use forEach in Firefox
356 356 const column = this.cloneColumns[i];
357 357  
... ...