diff --git a/public/react/src/common/quillForEditor/index.js b/public/react/src/common/quillForEditor/index.js index 6e6c01886..8dcf995f4 100644 --- a/public/react/src/common/quillForEditor/index.js +++ b/public/react/src/common/quillForEditor/index.js @@ -4,8 +4,9 @@ * @Github: * @Date: 2019-12-18 08:49:30 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-19 16:58:50 + * @LastEditTime: 2019-12-20 16:07:37 */ +import './index.scss'; import 'quill/dist/quill.core.css'; // 核心样式 import 'quill/dist/quill.snow.css'; // 有工具栏 import 'quill/dist/quill.bubble.css'; // 无工具栏 @@ -70,6 +71,8 @@ function QuillForEditor ({ useEffect(() => { + const quillNode = document.createElement('div'); + editorRef.current.appendChild(quillNode); const _quill = new Quill(editorRef.current, quillOption); setQuill(_quill); @@ -157,9 +160,9 @@ function QuillForEditor ({ // 返回结果 return ( -
-
-
+
+
+
); } diff --git a/public/react/src/common/quillForEditor/index.scss b/public/react/src/common/quillForEditor/index.scss new file mode 100644 index 000000000..ca3071b58 --- /dev/null +++ b/public/react/src/common/quillForEditor/index.scss @@ -0,0 +1,5 @@ +.quill_editor_for_react_area{ + .ql-editing{ + left: 0 !important; + } +} \ No newline at end of file diff --git a/public/react/src/modules/developer/components/myMonacoEditor/index.js b/public/react/src/modules/developer/components/myMonacoEditor/index.js index 948d5a4f5..a7419899a 100644 --- a/public/react/src/modules/developer/components/myMonacoEditor/index.js +++ b/public/react/src/modules/developer/components/myMonacoEditor/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 15:02:52 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-19 19:36:24 + * @LastEditTime: 2019-12-20 17:33:21 */ import './index.scss'; import React, { useState, useRef, useEffect } from 'react'; @@ -137,7 +137,7 @@ function MyMonacoEditor (props, ref) {
{/* 未保存时 ? '学员初始代码文件' : main.x */} {identifier ? language ? maps[language.toLowerCase()] : '' : '学员初始代码文件'} - {identifier ? '已保存' : ''} + {hadCodeUpdate ? '已保存' : ''} { const genExtra = () => ( ) diff --git a/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js b/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js index b1bf28d55..01b78038b 100644 --- a/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js +++ b/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-20 10:35:40 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-19 20:16:32 + * @LastEditTime: 2019-12-20 16:53:55 */ import './index.scss'; // import 'katex/dist/katex.css'; @@ -24,17 +24,20 @@ const FormItem = Form.Item; const { Option } = Select; const maps = { language: [ + { title: (请选择), key: '' }, { title: 'C', key: 'C' }, { title: 'C++', key: 'C++' }, { title: 'Python', key: 'Python' }, { title: 'Java', key: 'Java' } ], difficult: [ + { title: (请选择), key: '' }, { title: '简单', key: '1' }, { title: '中等', key: '2'}, { title: '困难', key: '3' } ], category: [ + { title: (请选择), key: '' }, { title: '程序设计', key: '1' }, { title: '算法', key: '2'} ], @@ -310,7 +313,7 @@ class EditTab extends React.Component { >