Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
991 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 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...