add on-page-size-change event
This commit is contained in:
梁灏 2016-12-19 17:01:05 +08:00
parent 472b4ff150
commit 07f400e572
3 changed files with 8 additions and 4 deletions

View file

@ -186,8 +186,6 @@
const cell = this.cells[parseInt(event.target.getAttribute('index'))];
if (cell.disabled) return;
const newDate = this.getDateOfCell(cell);
if (this.selectionMode === 'range') {

View file

@ -224,6 +224,7 @@
onSize (pageSize) {
this.pageSize = pageSize;
this.changePage(1);
this.$emit('on-page-size-change', pageSize);
},
onPage (page) {
this.changePage(page);

View file

@ -1,5 +1,5 @@
<template>
<Page :total="1000" show-sizer show-elevator show-total class="classr" :style="{float: 'right'}"></Page>
<Page :total="1000" show-sizer show-elevator show-total class="classr" :style="{float: 'right'}" @on-page-size-change="pc"></Page>
<br><br>
<Page :total="1000" show-sizer show-elevator show-total size="small" class="classr2"></Page>
<br><br>
@ -8,6 +8,11 @@
<script>
import { Page } from 'iview';
export default {
components: { Page }
components: { Page },
methods: {
pc (page) {
console.log(page)
}
}
}
</script>