From 2618a58250a9deae7ff72951d4fbdbfd32c96cc2 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 19 Oct 2017 20:32:31 +0800 Subject: [PATCH] update notice style --- mock/notices.js | 4 ++-- src/components/NoticeIcon/NoticeList.js | 2 +- src/components/NoticeIcon/NoticeList.less | 7 +++---- src/components/NoticeIcon/demo/popover.md | 4 ++-- src/components/NoticeIcon/index.less | 2 +- src/layouts/BasicLayout.js | 7 ++++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/mock/notices.js b/mock/notices.js index 782fac4f..3788ae53 100644 --- a/mock/notices.js +++ b/mock/notices.js @@ -56,8 +56,8 @@ export default { id: '000000009', title: '任务名称', description: '任务需要在 2017-01-12 20:00 前启动', - extra: '马上到期', - status: 'urgent', + extra: '未开始', + status: 'todo', type: '待办', }, { id: '000000010', diff --git a/src/components/NoticeIcon/NoticeList.js b/src/components/NoticeIcon/NoticeList.js index ed6fa79d..2ffe72ad 100644 --- a/src/components/NoticeIcon/NoticeList.js +++ b/src/components/NoticeIcon/NoticeList.js @@ -29,7 +29,7 @@ export default function NoticeList({ className={styles.meta} avatar={item.avatar ? : null} title={ -
+
{item.title}
{item.extra}
diff --git a/src/components/NoticeIcon/NoticeList.less b/src/components/NoticeIcon/NoticeList.less index 1dcfad44..db2bc6d1 100644 --- a/src/components/NoticeIcon/NoticeList.less +++ b/src/components/NoticeIcon/NoticeList.less @@ -16,6 +16,7 @@ .avatar { background: #fff; + margin-top: 4px; } &.read { @@ -29,10 +30,7 @@ } .title { font-weight: normal; - color: @text-color; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + margin-bottom: 8px; } .description { font-size: 12px; @@ -48,6 +46,7 @@ color: @text-color-secondary; font-weight: normal; margin-right: 0; + margin-top: -1.5px; } } } diff --git a/src/components/NoticeIcon/demo/popover.md b/src/components/NoticeIcon/demo/popover.md index eff2edbf..1e1443a4 100644 --- a/src/components/NoticeIcon/demo/popover.md +++ b/src/components/NoticeIcon/demo/popover.md @@ -55,13 +55,13 @@ ReactDOM.render( list={noticeData['通知']} title="通知" emptyText="你已查看所有通知" - emptyImage="https://gw.alipayobjects.com/zos/rmsportal/sAuJeJzSKbUmHfBQRzmZ.svg" + emptyImage="https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg" /> {newNotice.extra}; } @@ -243,13 +244,13 @@ class BasicLayout extends React.PureComponent { list={noticeData['通知']} title="通知" emptyText="你已查看所有通知" - emptyImage="https://gw.alipayobjects.com/zos/rmsportal/sAuJeJzSKbUmHfBQRzmZ.svg" + emptyImage="https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg" />