Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the paging function in Vue background management system

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "how to achieve the paging function in the Vue background management system". In the daily operation, I believe that many people have doubts about how to achieve the paging function in the Vue background management system. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to achieve the paging function in the Vue background management system". Next, please follow the editor to study!

The details are as follows:

Effect picture:

Function description:

Display the total number of data

You can choose the number of display messages per day.

Click the page number to jump to the specified number of pages

Enter the page number to jump to the specified page

1. Function realization

1.1 structure

1.2 Logic

Data () {return {/ / request parameter queryInfo: {type: 3, / / current number of pages pagenum: 1, / / specify the number of current pages displayed pagesize: 5,}, goodsList: [], / / total data total: 0 }} methods: {/ / get commodity classification data async getGoodsCate () {const {data: res} = await this.$http.get ("categories", {params: this.queryInfo) }) if (res.meta.status! = = 200) {this.$message.error ("failed to get parameters")} this.total = res.data.total this.goodsList = res.data.result / / console.log (this.goodsList)} / / listen to the number of entries per page handleSizeChange (pagesize) {/ / console.log (`$ {val} per page `) this.queryInfo.pagesize = pagesize this.getGoodsCate ()}, / / monitor the current number of pages handleCurrentChange (pageNum) {this.queryInfo.pagenum = pageNum this.getGoodsCate ()},}

1.3 Parameter description

1.4 effect demonstration

At this point, on the "Vue background management system how to achieve paging function" on the end of the study, I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report