Преглед на файлове

fix: 调整编辑器全屏的层级

outaozhen преди 4 години
родител
ревизия
128be35ffe
променени са 2 файла, в които са добавени 8 реда и са изтрити 1 реда
  1. 2 1
      src/pages/Hr/Notification/components/RighEditor.jsx
  2. 6 0
      src/pages/Hr/Notification/index.less

+ 2 - 1
src/pages/Hr/Notification/components/RighEditor.jsx

@@ -1,6 +1,7 @@
 import React, { useState } from 'react'
 import SimpleMDE from 'react-simplemde-editor'
 import 'easymde/dist/easymde.min.css'
+import styles from '@/pages/Hr/Notification/index.less'
 
 const RighEditor = ({ value, onChange }) => {
   const [cValue, setValue] = useState(value)
@@ -16,7 +17,7 @@ const RighEditor = ({ value, onChange }) => {
     //   renderHTML={text => mdParser.render(text)}
     //   onChange={handleEditorChange}
     // />
-    <SimpleMDE value={cValue} onChange={handleEditorChange} />
+    <SimpleMDE className={styles.SimpleCont} value={cValue} onChange={handleEditorChange} />
   )
 }
 

+ 6 - 0
src/pages/Hr/Notification/index.less

@@ -5,3 +5,9 @@
     list-style: decimal;
   }
 }
+
+.SimpleCont {
+  :global(.EasyMDEContainer .CodeMirror-fullscreen) {
+    z-index: 10;
+  }
+}