소스 검색

fix: the width prop of el-table-column is invalid when it is 0 (#8861)

* fix: the width prop of el-table-column is invalid when it is 0

* Update table-column.js
xifeiwu 7 년 전
부모
커밋
13855f6c65
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/table/src/table-column.js

+ 1 - 1
packages/table/src/table-column.js

@@ -99,7 +99,7 @@ const getDefaultColumn = function(type, options) {
     column.minWidth = 80;
   }
 
-  column.realWidth = column.width || column.minWidth;
+  column.realWidth = column.width === undefined ? column.minWidth : column.width;
 
   return column;
 };