vue element 學習里多選的空間行數據獲取
var g_ids=[]; var sRows=this.$refs.goodsTable.selection; console.log("批量1",sRows); if(sRows.length==0){ this.$message("請選擇要刪除的商品"); return; } sRows.forEach((r)=>{ if(!r.e_static)g_ids.push(r.e_id); console.log("判斷",g_ids); }); if(g_ids.length==0){ this.$message("沒有選中符合刪除條件的商品,注意,只有未上架的商品才可以刪除"); return; };