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; };