Commit a18ffad6cba9457452dff14b463685ad38dc0a64

Authored by Haven
Committed by GitHub
1 parent ece49d80

fix(table): TableHeader get wrong width, when column width props is String type

keep same type(String/Number) with Table width props
Showing 1 changed file with 1 additions and 0 deletions   Show diff stats
src/components/table/table.vue
@@ -834,6 +834,7 @@ @@ -834,6 +834,7 @@
834 columns.forEach((column, index) => { 834 columns.forEach((column, index) => {
835 column._index = index; 835 column._index = index;
836 column._columnKey = columnKey++; 836 column._columnKey = columnKey++;
  837 + column.width = parseInt(column.width);
837 column._width = column.width ? column.width : ''; // update in handleResize() 838 column._width = column.width ? column.width : ''; // update in handleResize()
838 column._sortType = 'normal'; 839 column._sortType = 'normal';
839 column._filterVisible = false; 840 column._filterVisible = false;