This commit is contained in:
曹辉 2023-04-27 11:30:02 +08:00
parent c539c2a3e4
commit 474b3a6c33

View File

@ -114,7 +114,10 @@
></el-button> ></el-button>
</el-col>--> </el-col>-->
<el-col :lg="{ span: 2, offset: 20 }" :md="2"> <el-col :lg="{ span: 2, offset: 20 }" :md="2">
<el-button type="primary" size="small" @click="uploadImg()"> </el-button> <el-button :loading="!uploadbtn" type="primary" size="small" @click="uploadImg()">
<span v-if="uploadbtn"> </span>
<span v-else> 中...</span>
</el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-dialog> </el-dialog>
@ -138,6 +141,7 @@ export default {
props: ["img", "type", "item", "tovideo"], props: ["img", "type", "item", "tovideo"],
data() { data() {
return { return {
uploadbtn: true, //
imageUrl: "", imageUrl: "",
types: "", types: "",
// //
@ -272,12 +276,13 @@ export default {
formData.append("type", this.types); formData.append("type", this.types);
if (this.types == "itemDirectoryUrl") { if (this.types == "itemDirectoryUrl") {
this.$modal.msgSuccess("上传视频中,请耐心等待"); this.$modal.msgSuccess("上传视频中,请耐心等待");
this.uploadbtn = false;
uploadVideoUrl(formData).then(response => { uploadVideoUrl(formData).then(response => {
this.video.VideoPath = baseurl + response.imgUrl; this.video.VideoPath = baseurl + response.imgUrl;
this.$emit("imgUrl", response.imgUrl); this.$emit("imgUrl", response.imgUrl);
this.items.itemDirectoryUrl = response.imgUrl; this.items.itemDirectoryUrl = response.imgUrl;
this.$emit("item", JSON.stringify(this.items)); this.$emit("item", JSON.stringify(this.items));
console.log(this.video, this.options); this.uploadbtn = true;
this.openimg = false; this.openimg = false;
}); });
} else if ( } else if (