修复版本管理编辑保存报错问题
This commit is contained in:
parent
ac11e23df5
commit
b8a08eea4f
|
|
@ -58,6 +58,7 @@
|
|||
<script>
|
||||
import uploadFile from "./upload-file";
|
||||
import { $uploadVersionFile, $version } from "@/api/version";
|
||||
import { cancelToken, clearAllToken } from '@/utils/globalCancelToken.js'
|
||||
|
||||
const form = {
|
||||
source: "PC",
|
||||
|
|
@ -105,10 +106,12 @@ export default {
|
|||
this.form = { ...form };
|
||||
this.loadingText=''
|
||||
this.loading=false
|
||||
this.$refs.uploadFile.clearFiles();
|
||||
},
|
||||
diaClose() {
|
||||
this.$refs.uploadFile.clearFiles();
|
||||
this.restForm();
|
||||
cancelToken()
|
||||
|
||||
},
|
||||
uploadSuccess(res) {
|
||||
this.form.img = res[0];
|
||||
|
|
@ -126,7 +129,8 @@ export default {
|
|||
const { version } = this.form;
|
||||
let fileRes=''
|
||||
const file = this.$refs.uploadFile.getFileList();
|
||||
if(!this.hasUpload&&file){
|
||||
console.log(file);
|
||||
if(!this.hasUpload&&file&&file.status!='finished'){
|
||||
this.loadingText='文件上传中,请耐心等待...'
|
||||
this.loading = true;
|
||||
fileRes = await $uploadVersionFile(file, { name:version });
|
||||
|
|
@ -178,6 +182,7 @@ export default {
|
|||
this.$refs.uploadFile.fileList = [{
|
||||
url: obj.url,
|
||||
name: obj.url,
|
||||
status: 'finished',
|
||||
}]
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue