فهرست منبع

fix: 通知中心调整

outaozhen 4 سال پیش
والد
کامیت
8a4485b776
2فایلهای تغییر یافته به همراه16 افزوده شده و 6 حذف شده
  1. 11 5
      src/pages/Hr/Notification/components/MessageDrawer.jsx
  2. 5 1
      src/pages/Hr/Notification/index.less

+ 11 - 5
src/pages/Hr/Notification/components/MessageDrawer.jsx

@@ -2,19 +2,25 @@ import React from 'react'
 import MarkDown from 'react-markdown'
 import styles from '@/pages/Hr/Notification/index.less'
 import 'vditor/src/assets/scss/index.scss'
+import { Tag } from 'antd'
+import { useIntl } from 'umi'
 
 const MessageDrawer = props => {
   const {
-    item: { title, createTime, content }
+    item: { title, createTime, content, msgType }
   } = props
+  const intl = useIntl()
   return (
     <div className="px-5 vditor-reset">
-      <h1 className="pt-4 text-xl pr-6">{title}</h1>
-      <div className="text-blueGray-500 py-1">{createTime}</div>
+      <span className="pt-5 block">
+        <Tag color="purple">{intl.formatMessage({ id: `component.globalHeader.${msgType}` })}</Tag>
+      </span>
+      <h1 className={['text-xl pr-6 mt-3', styles.NotificationCont].join(' ')}>{title}</h1>
+      <span className="text-hex-aaa">{createTime}</span>
+      <div className="w-22 h-[1px] bg-hex-ddd mt-3" />
       <div
         className={['py-3', styles.NotificationCont].join(' ')}
-        style={{ height: 'calc(100vh - 120px)', overflowY: 'auto' }}
-      >
+        style={{ height: 'calc(100vh - 160px)', overflowY: 'auto' }}>
         <MarkDown>{content}</MarkDown>
       </div>
     </div>

+ 5 - 1
src/pages/Hr/Notification/index.less

@@ -1,9 +1,13 @@
 .NotificationCont {
   ul,
   ol {
-    padding-left: 1rem;
+    padding-left: 2rem;
     list-style: decimal;
   }
+  ,
+  .mt-3 {
+    margin-top: 10px !important;
+  }
 }
 
 .SimpleCont {