fix pagination
parent
89edb61027
commit
2a49572a38
|
@ -16,9 +16,6 @@ export default {
|
|||
active: Boolean,
|
||||
showTitle: Boolean,
|
||||
},
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
classes () {
|
||||
const prefixCls = `${this.rootPrefixCls}-item`
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<pagination :simple="simple" :current="current" :total="total"></pagination>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -35,6 +35,9 @@ export default {
|
|||
showTotal (total) {
|
||||
return `共 ${total} 条`
|
||||
},
|
||||
onchange (page) {
|
||||
alert(page)
|
||||
},
|
||||
},
|
||||
components: {
|
||||
Pagination,
|
||||
|
|
|
@ -23,10 +23,6 @@ export default {
|
|||
type: Number,
|
||||
default: 10,
|
||||
},
|
||||
onChange: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
showSizeChanger: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
|
@ -35,10 +31,6 @@ export default {
|
|||
type: Array,
|
||||
default: () => ['10', '20', '30', '40'],
|
||||
},
|
||||
onShowSizeChange: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
showQuickJumper: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
|
@ -136,7 +128,7 @@ export default {
|
|||
}
|
||||
this.stateCurrent = page
|
||||
this.$emit('input', page)
|
||||
this.$emit('onChange', page, this.pageSize)
|
||||
this.$emit('change', page, this.pageSize)
|
||||
return page
|
||||
}
|
||||
return this.stateCurrent
|
||||
|
|
Loading…
Reference in New Issue