Commit 9147e636f0f062bb96a12c0ebafd4be3493a4567
Committed by
GitHub

Merge pull request #2195 from yangdan8/patch-4
Update table.vue 解决tabs切换时,tab中的table调试时控制台报$el undefined的问题
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
src/components/table/table.vue
@@ -345,6 +345,7 @@ | @@ -345,6 +345,7 @@ | ||
345 | this.tableWidth = parseInt(getStyle(this.$el, 'width')) - 1; | 345 | this.tableWidth = parseInt(getStyle(this.$el, 'width')) - 1; |
346 | } | 346 | } |
347 | this.columnsWidth = {}; | 347 | this.columnsWidth = {}; |
348 | + if (!this.$refs.tbody) return; | ||
348 | this.$nextTick(() => { | 349 | this.$nextTick(() => { |
349 | let columnsWidth = {}; | 350 | let columnsWidth = {}; |
350 | let autoWidthIndex = -1; | 351 | let autoWidthIndex = -1; |