<uni-tr v-for="(value, index) in currentList" :key="index">
<uni-td align="center">{{value.storeTags.tagCode }}</uni-td>
<uni-td align="center">{{value.storeTags.consumableName}}</uni-td>
<uni-td align="center">{{value.storeTags.standards}}</uni-td>
<uni-td align="center">{{value.storeTags.model}}</uni-td>
<uni-td align="center">{{value.storeTags.counts}}</uni-td>
<uni-td align="center">{{value.changeType}}</uni-td>
</uni-tr>
<uni-pagination :current="current" :total="cabinetTagCodeList.length" @change="pageChanged" :pageSize="pageSzie" />
totalPages:0,//总页数
current:1,//当前页码
pageSzie:5,//每页显示的条数
computed: {
currentList() {
const startIndex = (this.current - 1) * this.pageSzie;
const endIndex = startIndex + this.pageSzie;
if(this.cabinetTagCodeList!=null){
return this.cabinetTagCodeList.slice(startIndex, endIndex);
}
},
totalPages() {
if(this.cabinetTagCodeList!=null){
return Math.ceil(this.cabinetTagCodeList.length / this.pageSzie);
}
}
},
pageChanged(e) {
console.log(e.current);
this.current = e.current;
this.getPandian(e.current)
},