chutingting 1 рік тому
джерело
коміт
41041fdcab
1 змінених файлів з 6 додано та 3 видалено
  1. +6
    -3
      src/components/uploadFile/index.vue

+ 6
- 3
src/components/uploadFile/index.vue Переглянути файл

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


Завантаження…
Відмінити
Зберегти