|
|
@@ -3,9 +3,8 @@
|
|
|
<el-pagination
|
|
|
:current-page.sync="currentPage"
|
|
|
:page-size="limit"
|
|
|
- :pager-count="5"
|
|
|
:total="Number(total)"
|
|
|
- layout="total,prev,pager,next,jumper"
|
|
|
+ :layout="layout"
|
|
|
background
|
|
|
hide-on-single-page
|
|
|
v-bind="$attrs"
|
|
|
@@ -24,11 +23,15 @@ export default {
|
|
|
},
|
|
|
page: {
|
|
|
type: Number,
|
|
|
- default: 1
|
|
|
+ default: 10
|
|
|
},
|
|
|
limit: {
|
|
|
type: Number,
|
|
|
default: 20
|
|
|
+ },
|
|
|
+ layout: {
|
|
|
+ type: String,
|
|
|
+ default: 'total,prev,pager,next,jumper'
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -41,6 +44,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ created () {
|
|
|
+ console.log(this.$attrs)
|
|
|
+ },
|
|
|
methods: {
|
|
|
onCurrentChange (val) {
|
|
|
this.$emit('pagination', { page: val, limit: this.limit })
|