|
|
@@ -675,13 +675,14 @@ export default {
|
|
|
replaceFile(itemIndex) {
|
|
|
this.replaceIndex = itemIndex
|
|
|
|
|
|
- // 清空上传队列
|
|
|
- this.$refs.uploadRef.uploadFiles = []
|
|
|
-
|
|
|
- // 手动触发上传框选择文件
|
|
|
- const input = this.$refs.uploadRef.$el.querySelector('input[type=file]')
|
|
|
- input.click()
|
|
|
+ if (this.$refs.uploadRef) {
|
|
|
+ // 清空上传队列
|
|
|
+ this.$refs.uploadRef.uploadFiles = []
|
|
|
|
|
|
+ // 手动触发上传框选择文件
|
|
|
+ const input = this.$refs.uploadRef.$el.querySelector('input[type=file]')
|
|
|
+ input.click()
|
|
|
+ }
|
|
|
// 在 handleSuccess 中会替换对应文件
|
|
|
},
|
|
|
beforeUploadVideo(file) {
|