沈丘营商办后台前端项目
王恒
8 天以前 cd95b584fe7da1ea63476871eabf512213a31e69
src/views/infomanger/banner/index.vue
@@ -163,6 +163,13 @@
function answerListField(rule: { field: string | number }, value: any, callback: any) {
  if(form.value.questionList[rule.field].answerList.length < 2) {
    callback(new Error('请至少添加两项'))
  } else if(form.value.questionList[rule.field].answerList) {
    const value = form.value.questionList[rule.field].answerList.every(item => item.answerName)
    if(!value) {
      callback(new Error('请完善选项内容'))
    } else {
      callback()
    }
  } else {
    callback()
  }