Преглед изворни кода

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

ChengYuXuan пре 5 година
родитељ
комит
38ed65e2ad
1 измењених фајлова са 5 додато и 2 уклоњено
  1. 5 2
      src/views/teacher/components/QuestionList.vue

+ 5 - 2
src/views/teacher/components/QuestionList.vue

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