Commit 7fec1fa5 by chenyu

update: 批量上传

parent 8dc4690b
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<div class="dialog-img"></div> <div class="dialog-img"></div>
</div> </div>
</draggable> </draggable>
<el-upload :action="uploadAction" :headers="headersUpload" list-type="picture-card" :on-preview="handlePictureCardPreview" :before-upload="beforeUpload" :on-success="uploadSuccess" with-credentials :show-file-list="false" v-show="uploadStatus" style="display: inline-block;vertical-align: top;"> <el-upload :limit="5" multiple :file-list="giftForm.images" :action="uploadAction" :headers="headersUpload" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-exceed="handlePictrueExceed" :before-upload="beforeUpload" :on-success="uploadSuccess" with-credentials :show-file-list="false" v-show="uploadStatus" style="display: inline-block;vertical-align: top;">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
</div> </div>
...@@ -1509,7 +1509,10 @@ export default { ...@@ -1509,7 +1509,10 @@ export default {
storeIds: val.storeIds || [] storeIds: val.storeIds || []
}; };
}, },
// 图片上传 // 图片上传超出数量限制
handlePictrueExceed(files, fileList) {
this.$message.warning('最多上传5张商品主图');
},
// 上传图片前 // 上传图片前
beforeUpload(file) { beforeUpload(file) {
if (this.giftForm.images === null) { if (this.giftForm.images === null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment