mirror of https://github.com/ElemeFE/element
Table: Fixed wrong height. (#3539)
parent
57b04d7e80
commit
c31f19a4e8
|
@ -59,6 +59,9 @@ class TableLayout {
|
||||||
|
|
||||||
this.updateHeight();
|
this.updateHeight();
|
||||||
} else if (typeof value === 'string') {
|
} else if (typeof value === 'string') {
|
||||||
|
if (value === '') {
|
||||||
|
el.style[prop] = '';
|
||||||
|
}
|
||||||
this.updateHeight();
|
this.updateHeight();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
'el-table--enable-row-hover': !store.states.isComplex,
|
'el-table--enable-row-hover': !store.states.isComplex,
|
||||||
'el-table--enable-row-transition': true || (store.states.data || []).length !== 0 && (store.states.data || []).length < 100
|
'el-table--enable-row-transition': true || (store.states.data || []).length !== 0 && (store.states.data || []).length < 100
|
||||||
}"
|
}"
|
||||||
@mouseleave="handleMouseLeave($event)"
|
@mouseleave="handleMouseLeave($event)">
|
||||||
:style="[tableHeight]">
|
|
||||||
<div class="hidden-columns" ref="hiddenColumns"><slot></slot></div>
|
<div class="hidden-columns" ref="hiddenColumns"><slot></slot></div>
|
||||||
<div class="el-table__header-wrapper" ref="headerWrapper" v-if="showHeader">
|
<div class="el-table__header-wrapper" ref="headerWrapper" v-if="showHeader">
|
||||||
<table-header
|
<table-header
|
||||||
|
@ -295,24 +294,6 @@
|
||||||
return style;
|
return style;
|
||||||
},
|
},
|
||||||
|
|
||||||
tableHeight() {
|
|
||||||
let style = {};
|
|
||||||
|
|
||||||
const height = this.layout.tableHeight ? this.layout.tableHeight + 'px' : '';
|
|
||||||
|
|
||||||
if (this.height) {
|
|
||||||
style = {
|
|
||||||
height
|
|
||||||
};
|
|
||||||
} else if (this.maxHeight) {
|
|
||||||
style = {
|
|
||||||
'max-height': height
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return style;
|
|
||||||
},
|
|
||||||
|
|
||||||
bodyWidth() {
|
bodyWidth() {
|
||||||
const { bodyWidth, scrollY, gutterWidth } = this.layout;
|
const { bodyWidth, scrollY, gutterWidth } = this.layout;
|
||||||
return bodyWidth ? bodyWidth - (scrollY ? gutterWidth : 0) + 'px' : '';
|
return bodyWidth ? bodyWidth - (scrollY ? gutterWidth : 0) + 'px' : '';
|
||||||
|
|
Loading…
Reference in New Issue