element-ui的分页,添加首页、尾页,跳转按钮
生活随笔
收集整理的這篇文章主要介紹了
element-ui的分页,添加首页、尾页,跳转按钮
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
要實(shí)現(xiàn)這要一個分頁的效果
HTML分頁代碼
element-ui默認(rèn)跳轉(zhuǎn)方法
handleCurrentChange(cpage) {this.currentPage= cpage; },添加首頁、尾頁跳轉(zhuǎn)方法直接復(fù)制即可用:
jumpFirstPage () {this.$refs.pagination.handleCurrentChange(1);this.$emit('handleCurrentChange', 1); }, jumpLastPage () {let font = this.$refs.paginationlet cpage = Math.ceil(font.total / font.pageSize);font.handleCurrentChange(cpage); }具體的樣式問題根據(jù)自己的需求進(jìn)行改寫就可以了
總結(jié)
以上是生活随笔為你收集整理的element-ui的分页,添加首页、尾页,跳转按钮的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【练习---日志文件的恢复】-----多
- 下一篇: hdu 1800