Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
968 views
in Technique[技术] by (71.8m points)

el-upload from表单中多张图片 怎么进行必填验证

el-upload from表单中多张图片 怎么进行必填验证,增加验证后正常生效
我增加校验后,我上传了图片依然判断为空,无法提交表单

<div class="cq_center">
        <el-form-item label="品牌LOGO" prop="brandLogo">
          <el-upload
            class="avatar-uploader"
            action="#"
            :http-request="advertiserUpload1"
            :show-file-list="false"
          >
            <img v-if="brandLogoUrl" :src="brandLogoUrl" class="avatar">
            <i v-else class="el-icon-plus avatar-uploader-icon" />
          </el-upload>
        </el-form-item>
      </div>
      <div class="cq_center">
        <el-form-item label="广告头像" prop="adAvatar">
          <el-upload
            class="avatar-uploader"
            action="#"
            :http-request="advertiserUpload2"
            :show-file-list="false"
          >
            <img v-if="adAvatarUrl" :src="adAvatarUrl" class="avatar">
            <i v-else class="el-icon-plus avatar-uploader-icon" />
          </el-upload>
        </el-form-item>
      </div>
 brandLogo: [
          { required: true, message: ' ', trigger: 'blur' }
        ],
        adAvatar: [
          { required: true, message: ' ', trigger: 'blur' }
        ],

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

有没有写上传成功后的回调


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...