Vue獲取特定多選的行數據(element)


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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM