Просмотр исходного кода

fix 默认面板展开导致的展开部分题干不更新

ChengYuXuan 5 лет назад
Родитель
Сommit
dcd81683df
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      src/views/teacher/components/QuestionList.vue

+ 4 - 1
src/views/teacher/components/QuestionList.vue

@@ -170,7 +170,10 @@ export default Vue.extend({
           return { ...val, typeText: questionTypeToText(val.type), score: 5 }
         })
         this.totalNum = data.result.totalNum
-        this.expanded = this.questions
+        this.expanded = []
+        this.$nextTick(() => {
+          this.expanded = this.questions
+        })
         this.loading = false
       })
     },