zhangjie 2 سال پیش
والد
کامیت
6175a99319

+ 11 - 10
src/components/selection/CourseSelect.vue

@@ -61,16 +61,17 @@ export default {
       this.optionList = res.data || [];
       this.loading = false;
 
-      if (
-        !this.disabled &&
-        this.selectOnlyOne &&
-        this.optionList.length === 1
-      ) {
-        this.selected = this.optionList[0].id;
-        this.$emit("input", this.selected);
-        this.$emit("change", this.optionList[0]);
-        this.$emit("select-default", this.optionList[0]);
-      }
+      // this.$nextTick(() => {
+      //   if (
+      //     !this.disabled &&
+      //     this.selectOnlyOne &&
+      //     this.optionList.length === 1
+      //   ) {
+      //     this.$emit("input", this.optionList[0].id);
+      //     this.$emit("change", this.optionList[0]);
+      //     this.$emit("select-default", this.optionList[0]);
+      //   }
+      // });
     },
     select() {
       this.$emit("input", this.selected);

+ 2 - 4
src/modules/question/components/FolderQuestionManageDialog.vue

@@ -82,14 +82,13 @@
               align="center"
             ></el-table-column>
             <el-table-column label="题干" min-width="200">
-              <template slot-scope="scope">
+              <div slot-scope="scope" @click="toViewQuestion(scope.row)">
                 <rich-text
                   class="row-question-body"
                   title="点击查看试题"
                   :text-json="scope.row.quesBody"
-                  @click="toViewQuestion(scope.row)"
                 ></rich-text>
-              </template>
+              </div>
             </el-table-column>
             <el-table-column label="课程" width="120">
               <template slot-scope="scope">
@@ -295,7 +294,6 @@ export default {
       this.toPage(1);
     },
     toViewQuestion(row) {
-      console.log(row);
       this.curQuestion = row;
       this.$refs.QuestionPreviewDialog.open();
     },

+ 1 - 2
src/modules/question/components/QuestionPreviewDialog.vue

@@ -9,9 +9,8 @@
     :close-on-click-modal="false"
     :close-on-press-escape="false"
     append-to-body
-    destroy-on-close
   >
-    <div class="edit-part">
+    <div v-if="modalIsShow" class="edit-part">
       <div class="edit-cont">
         <div class="edit-cont-title">
           <rich-text :text-json="question.quesBody"></rich-text>