fix pagination

pull/9/head
wangxueliang 2017-11-13 18:49:03 +08:00
parent 89edb61027
commit 2a49572a38
3 changed files with 5 additions and 13 deletions

View File

@ -16,9 +16,6 @@ export default {
active: Boolean, active: Boolean,
showTitle: Boolean, showTitle: Boolean,
}, },
data () {
return {}
},
computed: { computed: {
classes () { classes () {
const prefixCls = `${this.rootPrefixCls}-item` const prefixCls = `${this.rootPrefixCls}-item`

View File

@ -4,7 +4,7 @@
<pagination :simple="simple" :current="current" :total="total"></pagination> <pagination :simple="simple" :current="current" :total="total"></pagination>
</div> </div>
<div style="margin-bottom:10px"> <div style="margin-bottom:10px">
<pagination :current="current" :total="total"></pagination> <pagination :current="current" :total="total" @change="onchange"></pagination>
<vc-button @click="changeValue"></vc-button> <vc-button @click="changeValue"></vc-button>
</div> </div>
<div> <div>
@ -35,6 +35,9 @@ export default {
showTotal (total) { showTotal (total) {
return `${total}` return `${total}`
}, },
onchange (page) {
alert(page)
},
}, },
components: { components: {
Pagination, Pagination,

View File

@ -23,10 +23,6 @@ export default {
type: Number, type: Number,
default: 10, default: 10,
}, },
onChange: {
type: Function,
default: () => {},
},
showSizeChanger: { showSizeChanger: {
type: Boolean, type: Boolean,
default: false, default: false,
@ -35,10 +31,6 @@ export default {
type: Array, type: Array,
default: () => ['10', '20', '30', '40'], default: () => ['10', '20', '30', '40'],
}, },
onShowSizeChange: {
type: Function,
default: () => {},
},
showQuickJumper: { showQuickJumper: {
type: Boolean, type: Boolean,
default: false, default: false,
@ -136,7 +128,7 @@ export default {
} }
this.stateCurrent = page this.stateCurrent = page
this.$emit('input', page) this.$emit('input', page)
this.$emit('onChange', page, this.pageSize) this.$emit('change', page, this.pageSize)
return page return page
} }
return this.stateCurrent return this.stateCurrent