Table: fix table header height after filter (#17348)

pull/17373/head
hetech 2019-09-06 12:17:05 +08:00 committed by GitHub
parent 5480fb1dda
commit 90c5d74fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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();