From 224a79e7ca7d3472c11b6a05b659cc0438499f1c Mon Sep 17 00:00:00 2001 From: huanghong Date: Sun, 18 Mar 2018 17:16:08 +0800 Subject: [PATCH] set back className in nextTick --- src/components/table/table.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/table/table.vue b/src/components/table/table.vue index 5b13f018..3957b68b 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -380,11 +380,10 @@ if (this.$refs.tbody) { let bodyContentEl = this.$refs.tbody.$el; let bodyEl = bodyContentEl.parentElement; - let className = bodyEl.className; bodyEl.className = ''; + this.$nextTick(() => { bodyEl.className = this.prefixCls + '-body'; }); let bodyContentHeight = bodyContentEl.offsetHeight; let bodyContentWidth = bodyContentEl.offsetWidth; - bodyEl.className = className; let bodyWidth = bodyEl.offsetWidth; let bodyHeight = bodyEl.offsetHeight; let scrollBarWidth = 0;