fix pagination
parent
89edb61027
commit
2a49572a38
|
@ -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`
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue