diff --git a/packages/table/src/table.vue b/packages/table/src/table.vue index b06769752..7385e8ed4 100644 --- a/packages/table/src/table.vue +++ b/packages/table/src/table.vue @@ -31,9 +31,9 @@ :row-class-name="rowClassName" :row-style="rowStyle" :highlight="highlightCurrentRow" - :style="{ width: layout.bodyWidth ? layout.bodyWidth - (layout.scrollY ? layout.gutterWidth : 0 ) + 'px' : '' }"> + :style="{ width: bodyWidth }"> -
+
{{ emptyText || t('el.table.emptyText') }}
@@ -297,6 +297,11 @@ return style; }, + bodyWidth() { + const { bodyWidth, scrollY, gutterWidth } = this.layout; + return bodyWidth ? bodyWidth - (scrollY ? gutterWidth : 0) + 'px' : ''; + }, + fixedBodyHeight() { let style = {};