The scenario is when a table component is used, after the table component is submitted with checkboxes, the selected rows are displayed after the page is refreshed

After I selected a few rows and submitted, when I mentioned the button to display the table again, the background would give me the value of the previously submitted table, which was in the same format as the table data provided by ELE, and then store it after I got it. The command output is as follows

toggleSelection(rows) { for (let i = 0; i < this.tableData1.length; i++) { for (let j = 0; j < rows.length; j++) { if (this.tableData1[i].ModuleID === rows[j].ModuleID) { this.$nextTick(() => { this.$refs.multipleTable.toggleRowSelection( this.tableData1[i], true ); }); }}}},Copy the code

ToggleRowSelection: toggleRowSelection: toggleRowSelection: toggleRowSelection: toggleRowSelection: toggleRowSelection: toggleRowSelection NextTick: $nextTick: $nextTick: $nextTick: $nextTick: $nextTick: $nextTick: $nextTick: $nextTick Echo have other scenarios and usage, but the general idea about the same, you can refer to link below: blog.csdn.net/lwx93144966…