Commit 783612fb authored by suntao's avatar suntao

分页查询

parent fa8cd988
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
}, },
limit: { limit: {
type: Number, type: Number,
default: 20 default: 10
}, },
pageSizes: { pageSizes: {
type: Array, type: Array,
...@@ -55,32 +55,36 @@ export default { ...@@ -55,32 +55,36 @@ export default {
} }
}, },
computed: { computed: {
currentPage: { pageSize: {
get() { get() {
return this.page return this.limit
}, },
set(val) { // set(val) {
this.$emit('update:page', val) // console.log("update:limit=="+val)
} // this.$emit('update:limit', val)
// }
}, },
pageSize: { currentPage: {
get() { get() {
return this.limit return this.page
}, },
set(val) { // set(val) {
this.$emit('update:limit', val) // console.log("update:page=="+val)
} // this.$emit('update:page', val)
} // }
},
}, },
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
this.$emit('pagination', { page: this.currentPage, limit: val }) this.$emit('update:limit', val)
this.$emit('pagination')
if (this.autoScroll) { if (this.autoScroll) {
scrollTo(0, 800) scrollTo(0, 800)
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.$emit('pagination', { page: val, limit: this.pageSize }) this.$emit('update:page', val)
this.$emit('pagination')
if (this.autoScroll) { if (this.autoScroll) {
scrollTo(0, 800) scrollTo(0, 800)
} }
......
...@@ -278,6 +278,7 @@ ...@@ -278,6 +278,7 @@
}, },
count: 1, count: 1,
page: 1, page: 1,
psize:10,
roles: undefined, roles: undefined,
isEdit: true, isEdit: true,
checkedItemsResultVO: { point : [], value:[]}, checkedItemsResultVO: { point : [], value:[]},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment