Commit dd075fff by 前端

文件上传覆盖问题

1 parent c8663000
...@@ -376,6 +376,7 @@ export default { ...@@ -376,6 +376,7 @@ export default {
}, },
data() { data() {
return { return {
uploadInfo: null,
textNum: 0, textNum: 0,
maxNum: 1000, maxNum: 1000,
myArr: [{ name: 888 }, { name: 888 }], myArr: [{ name: 888 }, { name: 888 }],
...@@ -395,21 +396,6 @@ export default { ...@@ -395,21 +396,6 @@ export default {
} }
}, },
mounted() { mounted() {
const that = this
this.uploadInfo = new upload({
showprocess: true,
success: function (res) {
that.$notify({
title: '提示',
message: '视频上传成功',
type: 'success',
})
that.previewList.push({
materialType: that.ATT_TYPE.VEDIO,
materialContent: res,
})
},
})
console.log(this.linkStatus, 999) console.log(this.linkStatus, 999)
if (this.previewList.length) { if (this.previewList.length) {
console.log(this.previewList, 999) console.log(this.previewList, 999)
...@@ -633,6 +619,24 @@ export default { ...@@ -633,6 +619,24 @@ export default {
}, },
// 上传视频 // 上传视频
async handleVideoChange(e) { async handleVideoChange(e) {
await this.uploadFileVideo(e)
const that = this
if (!this.uploadInfo) {
this.uploadInfo = new upload({
showprocess: true,
success: function (res) {
that.$notify({
title: '提示',
message: '视频上传成功',
type: 'success',
})
that.previewList.push({
materialType: that.ATT_TYPE.VEDIO,
materialContent: res,
})
},
})
}
this.$notify({ this.$notify({
title: '提示', title: '提示',
message: '视频上传中,请稍后', message: '视频上传中,请稍后',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!