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

This commit is contained in:
BarZu 2017-09-22 11:32:39 +08:00
parent ca13135480
commit 7449f269a6

View file

@ -351,7 +351,7 @@
if (allWidth) autoWidthIndex = this.cloneColumns.findIndex(cell => !cell.width);//todo
if (this.data.length) {
const $td = this.$refs.tbody.$el.querySelectorAll('tbody tr')[0].querySelectorAll('td');
const $td = this.$refs.tbody.$el.querySelectorAll('tbody tr')[0].childNodes;
for (let i = 0; i < $td.length; i++) { // can not use forEach in Firefox
const column = this.cloneColumns[i];