diff --git a/packages/table/src/table-layout.js b/packages/table/src/table-layout.js index d4509721b..b53e32780 100644 --- a/packages/table/src/table-layout.js +++ b/packages/table/src/table-layout.js @@ -59,6 +59,9 @@ class TableLayout { this.updateHeight(); } else if (typeof value === 'string') { + if (value === '') { + el.style[prop] = ''; + } this.updateHeight(); } } diff --git a/packages/table/src/table.vue b/packages/table/src/table.vue index 0d4f538e9..a4eea3982 100644 --- a/packages/table/src/table.vue +++ b/packages/table/src/table.vue @@ -8,8 +8,7 @@ 'el-table--enable-row-hover': !store.states.isComplex, 'el-table--enable-row-transition': true || (store.states.data || []).length !== 0 && (store.states.data || []).length < 100 }" - @mouseleave="handleMouseLeave($event)" - :style="[tableHeight]"> + @mouseleave="handleMouseLeave($event)">