Select a table of data deletion function

deleteData() {
                if (! this.selection.length) this $ Message.warning ( "Please select the rows to be deleted!");
                let _arr = [];
                this.tableData.forEach((ele, index) => {
                    if (this.selection.indexOf(index) < 0) _arr.push(ele);
                });
                this.tableData = _arr;
                this.selection = [];
            }

Guess you like

Origin www.cnblogs.com/wssdx/p/11647043.html