mirror of https://github.com/ElemeFE/element
Table: fix table header height after filter (#17348)
parent
5480fb1dda
commit
90c5d74fd3
|
@ -51,7 +51,7 @@ export default {
|
|||
updateCurrentRowData() {
|
||||
const { states, table } = this;
|
||||
const { rowKey, _currentRowKey } = states;
|
||||
// data 为 null 时,结构时的默认值会被忽略
|
||||
// data 为 null 时,解构时的默认值会被忽略
|
||||
const data = states.data || [];
|
||||
const oldCurrentRow = states.currentRow;
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ export default Vue.extend({
|
|||
updateAllSelected() {
|
||||
const states = this.states;
|
||||
const { selection, rowKey, selectable } = states;
|
||||
// data 为 null 时,结构时的默认值会被忽略
|
||||
// data 为 null 时,解构时的默认值会被忽略
|
||||
const data = states.data || [];
|
||||
if (data.length === 0) {
|
||||
states.isAllSelected = false;
|
||||
|
|
|
@ -111,7 +111,7 @@ class TableLayout {
|
|||
}
|
||||
this.fixedBodyHeight = this.scrollX ? (this.bodyHeight - this.gutterWidth) : this.bodyHeight;
|
||||
|
||||
const noData = !this.table.data || this.table.data.length === 0;
|
||||
const noData = !(this.store.states.data && this.store.states.data.length);
|
||||
this.viewportHeight = this.scrollX ? tableHeight - (noData ? 0 : this.gutterWidth) : tableHeight;
|
||||
|
||||
this.updateScrollY();
|
||||
|
|
Loading…
Reference in New Issue