js calculate how many pages there are

js calculate how many pages there are

this.total = Math.ceil(res.total / this.pageSize)
// res.total 总数量  this.pageSize // 每页几条
// Math.ceil()函数,进1法取整

 

Guess you like

Origin blog.csdn.net/qq706352062/article/details/109647173