Commit 224a79e7ca7d3472c11b6a05b659cc0438499f1c
1 parent
f25f1252
set back className in nextTick
Showing
1 changed file
with
1 additions
and
2 deletions
Show diff stats
src/components/table/table.vue
@@ -380,11 +380,10 @@ | @@ -380,11 +380,10 @@ | ||
380 | if (this.$refs.tbody) { | 380 | if (this.$refs.tbody) { |
381 | let bodyContentEl = this.$refs.tbody.$el; | 381 | let bodyContentEl = this.$refs.tbody.$el; |
382 | let bodyEl = bodyContentEl.parentElement; | 382 | let bodyEl = bodyContentEl.parentElement; |
383 | - let className = bodyEl.className; | ||
384 | bodyEl.className = ''; | 383 | bodyEl.className = ''; |
384 | + this.$nextTick(() => { bodyEl.className = this.prefixCls + '-body'; }); | ||
385 | let bodyContentHeight = bodyContentEl.offsetHeight; | 385 | let bodyContentHeight = bodyContentEl.offsetHeight; |
386 | let bodyContentWidth = bodyContentEl.offsetWidth; | 386 | let bodyContentWidth = bodyContentEl.offsetWidth; |
387 | - bodyEl.className = className; | ||
388 | let bodyWidth = bodyEl.offsetWidth; | 387 | let bodyWidth = bodyEl.offsetWidth; |
389 | let bodyHeight = bodyEl.offsetHeight; | 388 | let bodyHeight = bodyEl.offsetHeight; |
390 | let scrollBarWidth = 0; | 389 | let scrollBarWidth = 0; |