|
|
@@ -232,6 +232,12 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
afterRead(file) { |
|
|
|
|
|
|
|
this.$toast.loading({ |
|
|
|
message: "上传中...", |
|
|
|
forbidClick: true, |
|
|
|
duration: 0, |
|
|
|
}); |
|
|
|
console.log(file instanceof Array) |
|
|
|
if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false |
|
|
|
file.map(res=>{ |
|
|
@@ -260,6 +266,11 @@ |
|
|
|
// this.form.openPic.splice(index,1); |
|
|
|
}, |
|
|
|
afterReadVideo(file){ |
|
|
|
this.$toast.loading({ |
|
|
|
message: "上传中...", |
|
|
|
forbidClick: true, |
|
|
|
duration: 0, |
|
|
|
}); |
|
|
|
const that = this; |
|
|
|
let formData = new FormData(); // 为上传文件定义一个formData对象 |
|
|
|
formData.append("file", file.file); |
|
|
|