Commit e2870f72 authored by FuryBean's avatar FuryBean Committed by cinwell.li

Table: fix update scrolly not working bug (#1519)

parent e56f52ff
...@@ -43,11 +43,10 @@ class TableLayout { ...@@ -43,11 +43,10 @@ class TableLayout {
updateScrollY() { updateScrollY() {
const height = this.height; const height = this.height;
if (typeof height !== 'string' || typeof height !== 'number') return; if (typeof height !== 'string' && typeof height !== 'number') return;
const bodyWrapper = this.table.$refs.bodyWrapper; const bodyWrapper = this.table.$refs.bodyWrapper;
if (this.table.$el && bodyWrapper) { if (this.table.$el && bodyWrapper) {
const body = bodyWrapper.querySelector('.el-table__body'); const body = bodyWrapper.querySelector('.el-table__body');
this.scrollY = body.offsetHeight > bodyWrapper.offsetHeight; this.scrollY = body.offsetHeight > bodyWrapper.offsetHeight;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment