Browse Source

edit loading

master
chutingting 1 year ago
parent
commit
41041fdcab
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      src/components/uploadFile/index.vue

+ 6
- 3
src/components/uploadFile/index.vue View File

@@ -47,7 +47,7 @@ export default {
data() {
return {
loading: false,
loadingText: '上传中'
loadingText: '上传中,请稍后...'
}
},
methods: {
@@ -84,7 +84,7 @@ export default {
})
this.loading = false
} else {
this.loadingText = '上传中'
this.loadingText = '上传中,请稍后...'
this.getVideo(videoId)
}
})
@@ -96,9 +96,12 @@ export default {
height: this.height
}
let api = this.type === 'video' ? videoUpload(_data) : upload(_data)
if (this.type === 'video') {
this.loading = true
this.loadingText = '上传中,请稍后...'
}
api.then(res => {
if (this.type === 'video' && res) {
this.loading = true
this.getVideo(res.videoId)
} else if (res) {
this.$emit('update:url', res.url)


Loading…
Cancel
Save