瀏覽代碼

edit loading

master
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() {
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…
取消
儲存