diff --git a/src/pages/oj/components/CodeMirror.vue b/src/pages/oj/components/CodeMirror.vue index a6f885d27..770c71813 100644 --- a/src/pages/oj/components/CodeMirror.vue +++ b/src/pages/oj/components/CodeMirror.vue @@ -101,6 +101,7 @@ mode[lang.name] = lang.content_type }) this.mode = mode + this.editor.setOption('mode', this.mode[this.language]) }) this.editor.focus() },