本文向您介绍elementui中table表格翻页内存检查状态elementui表格记忆,主要包括elementui中table表格翻页内存检查状态的使用案例、应用方法、基础知识点总结以及需要注意的事项。 具有一定的参考价值elementui表格记忆,需要的同学可以参考。
//初始化列表数据 init(currentPage, pageSize) { let _this = this; let parmas = { currentPage: currentPage, pageSize: pageSize, communityId: this.form.communityId, companyId: this.form.companyId }; // this.Utils.exeuhttpResquestGet(this.apiUrls.communityManagement.getTableData, {}, result => { _this.Utils.exeuhttpResquestPost(this.apiUrls.rate.selectHouseInfoRate, parmas, result => { _this.datalist = result.data.data.dataList; _this.total = result.data.data.totalCount; _this.$nextTick(function () { _this.memoryChecked(); }) }); }, //行选中函数 若有删除,若无添加 handleselectRow(selection, row) { if (this.selectObj[row.houseId]) { delete this.selectObj[row.houseId] } else { this.selectObj[row.houseId] = row.houseId } }, //全选函数 点击全选遍历当页数据若无添加,若是反选则删除(判断是否是全选还是反选) handleselectAll(selection) { this.datalist.forEach((row, index) => { if (this.selectObj.hasOwnProperty(row.houseId)) { selection.length ? null : delete this.selectObj[row.houseId] } else { this.selectObj[row.houseId] = row.houseId } }); }, //记忆函数 memoryChecked(){ this.datalist.forEach((row, index) => { if (this.selectObj.hasOwnProperty(row.houseId)) { this.$refs.multipleTable.toggleRowSelection(row, true); } else { this.$refs.multipleTable.toggleRowSelection(row, false); } }); },