iView components of the page

HTML //

<div class = "pageNation"> <Page : Total = TotalPages : Page-size = pageSize size = "Small" @ ON-Change = "changeSize" v-Model = "Page" Show-Total />
// changeSize event to change the value page,
// show-total total number display

// show-elevator of a jump to a specific page.
// show-sizer switching number per page.
// : Current = "2" of the current page, .sync support modifier
// the Simple easy mode. Switching the transport through the input page, the page number or click with the mouse switch, or using the keyboard arrow keys to switch. Simple pagination can not use the total number of lifts and the number of switches.

</ div>

api 

// 分页
    changeSize(page){
        let _this = this;
        _this.page = page;        //  通过在data中设置变量也可以拿到当前页,并在全局使用
        _this.postRequest('', {
              pageNum: page,
              pageSize: 32
            }, function(data) {
              _this.totalPages = data.total
              _this.pageSize = data.pageSize
              _this.lists = data.datas
              console.log(_this.lists)
            })
    },

 

Guess you like

Origin www.cnblogs.com/panax/p/10974419.html