zhangjie 2 years ago
parent
commit
f44c124431

+ 7 - 4
src/components/vEditor/components/VMenu.vue

@@ -121,11 +121,14 @@ export default {
     setDocMode(type) {
       setDocMode(type, this.$parent.$refs.editor);
     },
+    editorFocus() {
+      this.$parent.$el.querySelector(".v-editor-body").focus();
+    },
     execCommand(command, event) {
       event.preventDefault();
       if (!this.checkEditorFocus()) {
         window.getSelection().removeAllRanges();
-        this.$el.nextSibling.focus();
+        this.editorFocus();
       } else {
         document.execCommand(command);
       }
@@ -145,7 +148,7 @@ export default {
       event.preventDefault();
       if (!this.checkEditorFocus()) {
         window.getSelection().removeAllRanges();
-        this.$el.nextSibling.focus();
+        this.editorFocus();
       } else {
         // console.log(event, event.target.files[0]);
         this.$refs.ImageInput.click();
@@ -162,7 +165,7 @@ export default {
       event.preventDefault();
       if (!this.checkEditorFocus()) {
         window.getSelection().removeAllRanges();
-        this.$el.nextSibling.focus();
+        this.editorFocus();
       } else {
         answerPointHandle.bind(this.$parent)(event);
       }
@@ -178,7 +181,7 @@ export default {
       event.preventDefault();
       if (!this.checkEditorFocus()) {
         window.getSelection().removeAllRanges();
-        this.$el.nextSibling.focus();
+        this.editorFocus();
       }
       this.curEditFocusRange = window.getSelection().getRangeAt(0);
       this.$refs.FormulaDialog.open();

+ 0 - 8
src/modules/questions/views/GenPaper.vue

@@ -80,14 +80,6 @@
             @click="openBatchExportPaperDialog"
             >下载成卷</el-button
           >
-          <el-button
-            type="primary"
-            plain
-            icon="icon icon-edit"
-            :disabled="noBatchSelected"
-            @click="openQuesPro"
-            >试卷属性</el-button
-          >
           <el-button
             type="danger"
             plain