This commit is contained in:
Marvin Zhang
2019-05-30 12:21:01 +08:00
parent 43d9c72f4c
commit 4752efe11d
3 changed files with 18 additions and 10 deletions

View File

@@ -58,18 +58,18 @@ export default {
computed: {
filteredData () {
return this.data
.map(d => d)
.filter((d, index) => {
// pagination
const pageNum = this.pageNum
const pageSize = this.pageSize
return (pageSize * (pageNum - 1) <= index) && (index < pageSize * pageNum)
})
// .map(d => d)
// .filter((d, index) => {
// // pagination
// const pageNum = this.pageNum
// const pageSize = this.pageSize
// return (pageSize * (pageNum - 1) <= index) && (index < pageSize * pageNum)
// })
}
},
methods: {
onPageChange () {
this.$emit('page-change')
this.$emit('page-change', { pageNum: this.pageNum, pageSize: this.pageSize })
}
}
}