From 1f6d13df55fd45766385327f3dfb6b3a3055796e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=9B=E6=B4=81?= Date: Wed, 14 Dec 2016 12:26:19 +0800 Subject: [PATCH] fix display of total items on md-table-pagination (#190) #181 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix : tablePagination md-total bug to display the right number , not always Numer.MAX_SAFE_INTEGER or “false” * fix : table pagination template part --- src/components/mdTable/mdTablePagination.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/mdTable/mdTablePagination.vue b/src/components/mdTable/mdTablePagination.vue index 205ba4f..9f0ee3b 100644 --- a/src/components/mdTable/mdTablePagination.vue +++ b/src/components/mdTable/mdTablePagination.vue @@ -6,7 +6,7 @@ {{ amount }} - {{ ((currentPage - 1) * currentSize) + 1 }}-{{ subTotal }} {{ mdSeparator }} {{ totalItems }} + {{ ((currentPage - 1) * currentSize) + 1 }}-{{ subTotal }} {{ mdSeparator }} {{ mdTotal }} keyboard_arrow_left @@ -48,7 +48,7 @@ subTotal: 0, currentSize: parseInt(this.mdSize, 10), currentPage: parseInt(this.mdPage, 10), - totalItems: !isNaN(this.mdTotal) && Number.MAX_SAFE_INTEGER + totalItems: isNaN(this.mdTotal)?Number.MAX_SAFE_INTEGER:parseInt(this.mdTotal, 10) }; }, computed: {