上传文件中不可保存
This commit is contained in:
parent
e0519a475b
commit
9007f9204f
|
@ -2,7 +2,7 @@
|
|||
<a-card :bordered="false" :title="pageName">
|
||||
<template slot="extra">
|
||||
<a-button @click="goback">返回</a-button>
|
||||
<a-button type="primary" @click="save">保存</a-button>
|
||||
<a-button type="primary" @click="save" :disabled="save">保存</a-button>
|
||||
</template>
|
||||
<a-tabs type="card" :default-active-key="parentTabKey" @change="parentcallback">
|
||||
<a-tab-pane key="1" tab="文件上传">
|
||||
|
@ -157,6 +157,7 @@ import { dictionaryDropDown } from '@/api/sys/dictionaryItem';
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
save:false,
|
||||
pageName: '',
|
||||
// treeData: [],
|
||||
ifResources: this.$route.query.ifResources,
|
||||
|
@ -286,6 +287,9 @@ export default {
|
|||
this.uploadLoading = true;
|
||||
this.uploadButtonText = '上传中...';
|
||||
|
||||
//不让他保存
|
||||
this.save= true;
|
||||
|
||||
//处理视频上传
|
||||
const data = new FormData();
|
||||
data.append('file', file);
|
||||
|
@ -299,6 +303,7 @@ export default {
|
|||
axios
|
||||
.post(ossUpload(), data, { headers: header })
|
||||
.then(res => {
|
||||
this.save = false;
|
||||
this.uploadLoading = false;
|
||||
this.uploadButtonText = '选择文件';
|
||||
if (res.data.code === 200) {
|
||||
|
|
Loading…
Reference in New Issue