outaozhen 4 роки тому
батько
коміт
ff6b4590af

+ 1 - 1
package.json

@@ -72,7 +72,7 @@
     "react-helmet-async": "^1.0.4",
     "react-infinite-scroll-component": "^6.1.0",
     "react-markdown": "^7.0.1",
-    "react-simplemde-editor": "5.0.2",
+    "react-simplemde-editor": "^5.0.2",
     "umi": "3.5.4"
   },
   "devDependencies": {

+ 0 - 1
src/pages/Hr/Notification/components/AddMessage.jsx

@@ -58,7 +58,6 @@ const AddMessage = props => {
           try {
             const nValues = handleFormValues(values)
             await onConfirm(nValues)
-            console.log(fsfsf)
             message.success('添加成功')
             return true
           } catch (error) {

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

@@ -16,7 +16,7 @@ const RighEditor = ({ value, onChange }) => {
     //   renderHTML={text => mdParser.render(text)}
     //   onChange={handleEditorChange}
     // />
-    <SimpleMDE value={cValue} onChange={handleEditorChange} style={{ height: '300px' }} />
+    <SimpleMDE value={cValue} onChange={handleEditorChange} style={{ height: '350px' }} />
   )
 }
 

+ 5 - 4
src/pages/Hr/Notification/index.jsx

@@ -5,7 +5,7 @@ import { queryMessageList, sendMessage } from '@/services/staff'
 import AddMessage from './components/AddMessage'
 import consts from '@/consts'
 import { useRequest } from 'umi'
-import MarkDown from 'react-markdown'
+// import MarkDown from 'react-markdown'
 
 const Notification = () => {
   const tRef = useRef(null)
@@ -23,6 +23,7 @@ const Notification = () => {
     total: 0,
     msgType: 'notification'
   })
+
   const initData = async params => {
     setState({ ...state, loading: true })
     const {
@@ -40,6 +41,7 @@ const Notification = () => {
       })
     }
   }
+
   useEffect(() => {
     initData({ current: 1 })
   }, [])
@@ -71,8 +73,7 @@ const Notification = () => {
           hasMore={state.hasMore}
           loader={<Skeleton avatar paragraph={{ rows: 1 }} active />}
           endMessage={<Divider plain>别再滚啦,已是尽头</Divider>}
-          scrollableTarget="scrollableDiv"
-        >
+          scrollableTarget="scrollableDiv">
           <List
             itemLayout="horizontal"
             // pagination={{ pageSize: 5 }}
@@ -89,7 +90,7 @@ const Notification = () => {
                     </div>
                   }
                 />
-                <MarkDown>{item.content}</MarkDown>
+                {/* <MarkDown>{item.content}</MarkDown> */}
                 <div className="mt-1 text-hex-aaa">{item.createTime}</div>
               </List.Item>
             )}