From 398d59d78a5388af3cd06e1f66ad947b52a5f971 Mon Sep 17 00:00:00 2001 From: Pan Date: Wed, 7 Feb 2018 11:06:28 +0800 Subject: [PATCH] perf[pagination]: Avoid repeating trigger requests --- src/views/example/table/complexTable.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/views/example/table/complexTable.vue b/src/views/example/table/complexTable.vue index b96b8f9c..6999353b 100644 --- a/src/views/example/table/complexTable.vue +++ b/src/views/example/table/complexTable.vue @@ -230,10 +230,16 @@ export default { this.getList() }, handleSizeChange(val) { + if (this.listQuery.limit === val) { + return + } this.listQuery.limit = val this.getList() }, handleCurrentChange(val) { + if (this.listQuery.page === val) { + return + } this.listQuery.page = val this.getList() },