for(let ii in this.listData){
        console.log("提交前数据",ii)
          try{
            this.listData[ii].forEach((el,ind) => {
              if(el.exceptionObj.isSave && el.itemName == ''){
                nullName = "";
                throw new Error(Toast("请输入名称"))
              }
            })
          }catch(err){
          }
      }
方法:
try{
 throw new Error(Toast("请输入名称"))
}catch(){
}

 

posted on 2022-01-06 15:41  菜菜小江升级打怪之路  阅读(122)  评论(0编辑  收藏  举报