diff --git a/src/views/course/question/QuestionList.vue b/src/views/course/question/QuestionList.vue index 12f99bd..ea80d85 100644 --- a/src/views/course/question/QuestionList.vue +++ b/src/views/course/question/QuestionList.vue @@ -211,21 +211,20 @@ export default { axios .post(ossUpload(), data, { headers: header }) .then((res) => { + this.$refs.inputFile.value = '' if (res.data.code === 200) { let params = { fileUrl: res.data.url, courseId: this.$route.query.id } importTemplate(params).then((res1) => { - this.$refs.inputFile.value = '' this.$message.success('题目导入成功!') this.getQuestion() }) } else { this.$message.error(res.data.msg) - this.$refs.inputFile.value = '' } }) .catch((err) => { - this.$message.error(res) this.$refs.inputFile.value = '' + this.$message.error(res) }) },