From 7449f269a6d8c2015ea9f68e0ddee35b7dd63313 Mon Sep 17 00:00:00 2001 From: BarZu <1419328765@qq.com> Date: Fri, 22 Sep 2017 11:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtable=E9=87=8C=E5=B5=8C?= =?UTF-8?q?=E5=A5=97table=E6=8A=A5=20Cannot=20read=20property=20'width'=20?= =?UTF-8?q?of=20undefined"=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/table/table.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/table/table.vue b/src/components/table/table.vue index c0fcb935..83bf9fe6 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -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];