要结束函数, 这样写是错位的, 它只是.map 的返回值
check(){
if(this.type === "3"){
//校验不填
this.dataList.map((item, index, arr)=>{
if(!item.num){
this.$message.error(`请填写【${item.name}】素材的权重值`)
return false
}
})
}
}
应该这么写
check(){
let flg = true
if(this.type === "3"){
let flg = true
for(let item of this.computeModelData){
if(!item.num){
this.$message.error(`请填写【${item.name}】素材的轮播次数`)
flg = false
break
}
}
if(!flg){
return false
}
}
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。