let BreakException= {};
try {
this.flowGroupbyData.juHeShuJu.forEach((item,index)=>{
if(this.common.isEmpty(item.name)){
this.$message.error("请填写名称")
throw BreakException;
}
if(this.common.isEmptyObject(item.fieldData)){
this.$message.error("请选择字段")
throw BreakException;
}
if(this.common.isEmpty(item.aggregateType)){
this.$message.error("请选择统计类型")
throw BreakException;
}
})
}catch (e) {
return true
if (e!==BreakException) {
throw e;
}
}
foreach 跳出循环
最新推荐文章于 2024-06-20 15:56:02 发布