perf: table filter perf
parent
59da3e54e3
commit
9e88a997c9
|
@ -157,6 +157,7 @@ export default {
|
||||||
sPagination: this.getDefaultPagination(this.$props),
|
sPagination: this.getDefaultPagination(this.$props),
|
||||||
pivot: undefined,
|
pivot: undefined,
|
||||||
sComponents: createComponents(this.components),
|
sComponents: createComponents(this.components),
|
||||||
|
filterDataCnt: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -375,6 +376,7 @@ export default {
|
||||||
|
|
||||||
getCurrentPageData() {
|
getCurrentPageData() {
|
||||||
let data = this.getLocalData();
|
let data = this.getLocalData();
|
||||||
|
this.filterDataCnt = data.length;
|
||||||
let current;
|
let current;
|
||||||
let pageSize;
|
let pageSize;
|
||||||
const sPagination = this.sPagination;
|
const sPagination = this.sPagination;
|
||||||
|
@ -934,7 +936,7 @@ export default {
|
||||||
size = 'small';
|
size = 'small';
|
||||||
}
|
}
|
||||||
const position = pagination.position || 'bottom';
|
const position = pagination.position || 'bottom';
|
||||||
const total = pagination.total || this.getLocalData().length;
|
const total = pagination.total || this.filterDataCnt;
|
||||||
const { class: cls, style, onChange, onShowSizeChange, ...restProps } = pagination; // eslint-disable-line
|
const { class: cls, style, onChange, onShowSizeChange, ...restProps } = pagination; // eslint-disable-line
|
||||||
const paginationProps = mergeProps({
|
const paginationProps = mergeProps({
|
||||||
key: `pagination-${paginationPosition}`,
|
key: `pagination-${paginationPosition}`,
|
||||||
|
|
Loading…
Reference in New Issue