fix display of total items on md-table-pagination (#190) #181

* fix : tablePagination md-total bug

to display the right number , not always Numer.MAX_SAFE_INTEGER or
“false”

* fix : table pagination template part
This commit is contained in:
盛洁 2016-12-14 12:26:19 +08:00 committed by Marcos Moura
parent f9c3d0036d
commit 1f6d13df55

View file

@ -6,7 +6,7 @@
<md-option v-for="amount in mdPageOptions" :value="amount">{{ amount }}</md-option>
</md-select>
<span>{{ ((currentPage - 1) * currentSize) + 1 }}-{{ subTotal }} {{ mdSeparator }} {{ totalItems }}</span>
<span>{{ ((currentPage - 1) * currentSize) + 1 }}-{{ subTotal }} {{ mdSeparator }} {{ mdTotal }}</span>
<md-button class="md-icon-button md-table-pagination-previous" @click="previousPage" :disabled="currentPage === 1">
<md-icon>keyboard_arrow_left</md-icon>
@ -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: {