Commit 6e3d6d12 by 前端

视频上传优化

1 parent b7a89bd8
...@@ -197,10 +197,6 @@ export default { ...@@ -197,10 +197,6 @@ export default {
}, },
// 上传视频 // 上传视频
handleVideoChange(e) { handleVideoChange(e) {
this.$notify({
title: '提示',
message: '视频上传中,请稍后'
})
this.loading = true this.loading = true
let file = e.srcElement.files[0] let file = e.srcElement.files[0]
var reader = new FileReader() var reader = new FileReader()
...@@ -209,8 +205,13 @@ export default { ...@@ -209,8 +205,13 @@ export default {
const isLt = file.size / 1024 / 1024 < limitSize const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) { if (!isLt) {
this.$message.error('上传视频大小不能超过' + limitSize + 'MB!') this.$message.error('上传视频大小不能超过' + limitSize + 'MB!')
this.loading = false
return return
} }
this.$notify({
title: '提示',
message: '视频上传中,请稍后'
})
document.querySelector('.upload-video').value = '' document.querySelector('.upload-video').value = ''
reader.readAsDataURL(file) reader.readAsDataURL(file)
reader.onload = e => { reader.onload = e => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!