<el-upload class="ry-uploader"
action=""
:show-file-list="false"
:on-success="handleImgUploadSuccess"
:before-upload="(res) => {return beforeImgUpload(res,'B1')}"
:http-request="uploadImgRequest"
>
<img v-if="imageUrlObject.B1" :src="imageUrlObject.B1" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
主要就是利用自定义函数进行传参
:before-upload="(res) => {return beforeImgUpload(res,'B1')}"