//第一步:在table里面加上on-selection-change <Table border :loading="loading" :columns="columns" ref="selection" :data="table.rows" @on-selection-change="changeSelect" //第二步:在columns加上selection columns: [ { type: 'selection', width: 60, align: 'center' }, //多选 changeSelect(e){ this.ids = []; if(e.length > 0){ this.isSele = false; for(let i = 0;i < e.length;i++){ this.ids.push(e[i].id) } }else{ this.isSele = true; } }, delAll(){ //this.ids = this.ids.join(","); this.$Modal.confirm({ title:'确认删除吗?', content:"您确认要删除所选的数据吗?", onOk:()=>{ sendRequest(deleAll,this.ids).then((res)=>{ if(res){ this.$Message.success('删除成功'); this.find(); } }) } }) },