瀏覽代碼

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

FuryBean 8 年之前
父節點
當前提交
e2870f72f0
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      packages/table/src/table-layout.js

+ 1 - 2
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;
     }
   }