From e2870f72f0833b95d666ae10e55cdffbb2d3d74a Mon Sep 17 00:00:00 2001 From: FuryBean Date: Fri, 2 Dec 2016 17:36:19 +0800 Subject: [PATCH] Table: fix update scrolly not working bug (#1519) --- packages/table/src/table-layout.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/table/src/table-layout.js b/packages/table/src/table-layout.js index de917133c..0542e7b54 100644 --- a/packages/table/src/table-layout.js +++ b/packages/table/src/table-layout.js @@ -43,11 +43,10 @@ class TableLayout { updateScrollY() { 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; if (this.table.$el && bodyWrapper) { const body = bodyWrapper.querySelector('.el-table__body'); - this.scrollY = body.offsetHeight > bodyWrapper.offsetHeight; } }