有時候需要動態建立上傳框,這樣就要求上傳成功後資料要根據地方去賦值
<el-upload class="avatar-uploader" :headers="config" :action="upLoadUrl" :show-file-list="false" :data="item" :on-success="(response, file, fileList) => { return handleUploadSuccess(response, file, fileList, item) }" :before-upload="beforePicUpload" > <img v-if="item.bill_url" :src="coverUrl(item.bill_url)" class="avatar"> <i v-else class="el-icon-plus avatar-uploader-icon"></i> </el-upload>