set back className in nextTick

This commit is contained in:
huanghong 2018-03-18 17:16:08 +08:00
parent f25f12527e
commit 224a79e7ca

View file

@ -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;