Use Vuex to store data

Same thing, state: {SelecteRowKeys: [], // The selected object's primary key selectionRows: [], // The selected object's allRows: New Map // global object}, mutations: {// Clear ClearSelections (state) {state. SelectedRowKeys = [] state. SelectionRows = [] state. AllRows = new Map}, // new SelecteRowKeys updateRecord (state, state) VuexData) {state. SelecteRowKeys = vuexData.SelecteRowKeys // Add AllRows to re-use the SelecteRowKey as the key let tempRows = vuexData.selectionRows tempRows.forEach(val => { state.allRows.set(val.id, Val)}) / / according to selectedRowKeys save from allRows RMS to selectionRows state. SelectionRows = [] vuexData. SelectedRowKeys. ForEach (val = >  { state.selectionRows.push(state.allRows.get(val)) }) } } }

Overwrite the table onChange event

onSelectChangePlus(selectedRowKeys, selectionRows) { let vuexData = {selectedRowKeys,selectionRows} this.$store.commit('table/updateRecords',vuexData); this.selectedRowKeys = selectedRowKeys; Enclosing selectionRows = this. $store. State. Table. SelectionRows / / sent to the parent components selected case enclosing $emit (" receive ", enclosing selectionRows); }

Pay attention to cleaning up Vuex

this.$store.commit('table/clearSelections')