el-table分页时选择框不显示的问题。比如在第一页选中数据,点击进入第二页,再返回第一页,第一页选中的数据就丢失了。我想和它相处。以下方法,请高手指教。核心方法://TableradioeventselectRole(selection,row){//因为selection在翻页点击后会显示为未定义元素,所以需要判断是否存在if(selection&&selection.find(item=>item&&item.permissionId===row.permissionId)){//选择一个新行this.addRows([row]);}else{//取消删除一行this.removeRows([row]);}},//表全选事件selectRoleAll(selection){//如果有则全选,否则全部取消if(selection.length>0){this.addRows(this.tableList);}否则{这个。removeRows(this.tableList);}},//添加选中行addRows(rows){for(constitemofrows){//如果选中数据中没有item,则添加if(!this.selectedRow.find(i=>i.id===item.id)){this.selectedRow.push(项目);}}},//取消选择行removeRows(rows){if(this.selectedRow&&this.selectedRow.length){for(constitemofrows){this.selectedRow=this.selectedRow.filter(i=>i.id!==项目.id);}}},//前端实现分页和翻页内存检查setPagination(no,size,data){//this.tableList=data;this.toggleSelection(this.selectedRow);},//选择表中已有的数据toggleSelection(rows){if(rows&&rows.length){rows.forEach(row=>{this.$nextTick(()=>{constchecked=this.tableList.find(tableRow=>tableRow.id===row.id);this.$refs.roleData.toggleRowSelection(checked);});});}else{if(this.$refs.roleData!==unde罚款){this.$refs.roleData.clearSelection();}}},完整代码:{{scope.row[scope.column.property]}}