Commit 07f400e572cd8c66bbf63ca98d98f828064f92d7
1 parent
472b4ff1
fixed #136
add on-page-size-change event
Showing
3 changed files
with
8 additions
and
4 deletions
Show diff stats
src/components/date-picker/base/date-table.vue
@@ -186,8 +186,6 @@ | @@ -186,8 +186,6 @@ | ||
186 | const cell = this.cells[parseInt(event.target.getAttribute('index'))]; | 186 | const cell = this.cells[parseInt(event.target.getAttribute('index'))]; |
187 | if (cell.disabled) return; | 187 | if (cell.disabled) return; |
188 | 188 | ||
189 | - | ||
190 | - | ||
191 | const newDate = this.getDateOfCell(cell); | 189 | const newDate = this.getDateOfCell(cell); |
192 | 190 | ||
193 | if (this.selectionMode === 'range') { | 191 | if (this.selectionMode === 'range') { |
src/components/page/page.vue
@@ -224,6 +224,7 @@ | @@ -224,6 +224,7 @@ | ||
224 | onSize (pageSize) { | 224 | onSize (pageSize) { |
225 | this.pageSize = pageSize; | 225 | this.pageSize = pageSize; |
226 | this.changePage(1); | 226 | this.changePage(1); |
227 | + this.$emit('on-page-size-change', pageSize); | ||
227 | }, | 228 | }, |
228 | onPage (page) { | 229 | onPage (page) { |
229 | this.changePage(page); | 230 | this.changePage(page); |
test/routers/page.vue
1 | <template> | 1 | <template> |
2 | - <Page :total="1000" show-sizer show-elevator show-total class="classr" :style="{float: 'right'}"></Page> | 2 | + <Page :total="1000" show-sizer show-elevator show-total class="classr" :style="{float: 'right'}" @on-page-size-change="pc"></Page> |
3 | <br><br> | 3 | <br><br> |
4 | <Page :total="1000" show-sizer show-elevator show-total size="small" class="classr2"></Page> | 4 | <Page :total="1000" show-sizer show-elevator show-total size="small" class="classr2"></Page> |
5 | <br><br> | 5 | <br><br> |
@@ -8,6 +8,11 @@ | @@ -8,6 +8,11 @@ | ||
8 | <script> | 8 | <script> |
9 | import { Page } from 'iview'; | 9 | import { Page } from 'iview'; |
10 | export default { | 10 | export default { |
11 | - components: { Page } | 11 | + components: { Page }, |
12 | + methods: { | ||
13 | + pc (page) { | ||
14 | + console.log(page) | ||
15 | + } | ||
16 | + } | ||
12 | } | 17 | } |
13 | </script> | 18 | </script> |