diff --git a/src/components/NoticeIcon/NoticeList.js b/src/components/NoticeIcon/NoticeList.js
index a6a56354..ed6fa79d 100644
--- a/src/components/NoticeIcon/NoticeList.js
+++ b/src/components/NoticeIcon/NoticeList.js
@@ -1,14 +1,18 @@
import React from 'react';
-import { Avatar, Icon, List } from 'antd';
+import { Avatar, List } from 'antd';
import classNames from 'classnames';
import styles from './NoticeList.less';
-export default function NoticeList({ data = [], onClick, onClear, title, locale }) {
+export default function NoticeList({
+ data = [], onClick, onClear, title, locale, emptyText, emptyImage,
+}) {
if (data.length === 0) {
return (
-
- {locale.emptyText}
+ {emptyImage ? (
+

+ ) : null}
+
{emptyText || locale.emptyText}
);
}
diff --git a/src/components/NoticeIcon/NoticeList.less b/src/components/NoticeIcon/NoticeList.less
index a6be1d67..1dcfad44 100644
--- a/src/components/NoticeIcon/NoticeList.less
+++ b/src/components/NoticeIcon/NoticeList.less
@@ -54,15 +54,12 @@
.notFound {
text-align: center;
- height: 120px;
- line-height: 120px;
- font-size: 14px;
+ padding: 73px 0 88px 0;
color: @text-color-secondary;
- > i {
- font-size: 16px;
- margin-right: 8px;
- vertical-align: middle;
- margin-top: -1px;
+ img {
+ display: inline-block;
+ margin-bottom: 16px;
+ height: 76px;
}
}
diff --git a/src/components/NoticeIcon/demo/popover.md b/src/components/NoticeIcon/demo/popover.md
index 379e59c7..eff2edbf 100644
--- a/src/components/NoticeIcon/demo/popover.md
+++ b/src/components/NoticeIcon/demo/popover.md
@@ -51,9 +51,24 @@ ReactDOM.render(
}}
>
-
-
-
+
+
+
, mountNode);
diff --git a/src/components/NoticeIcon/index.js b/src/components/NoticeIcon/index.js
index ac7a51bd..80ac2c16 100644
--- a/src/components/NoticeIcon/index.js
+++ b/src/components/NoticeIcon/index.js
@@ -17,6 +17,7 @@ export default class NoticeIcon extends PureComponent {
emptyText: '暂无数据',
clear: '清空',
},
+ emptyImage: 'https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg',
};
static Tab = TabPane;
constructor(props) {
@@ -45,6 +46,7 @@ export default class NoticeIcon extends PureComponent {
return (
this.onItemClick(item, child.props)}
onClear={() => this.props.onClear(child.props.title)}
diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js
index f560947f..c8d9e79a 100644
--- a/src/layouts/BasicLayout.js
+++ b/src/layouts/BasicLayout.js
@@ -239,9 +239,24 @@ class BasicLayout extends React.PureComponent {
loading={fetchingNotices}
popupAlign={{ offset: [20, -16] }}
>
-
-
-
+
+
+
{currentUser.name ? (
diff --git a/src/layouts/BasicLayout.less b/src/layouts/BasicLayout.less
index 6c19f16c..1921e73b 100644
--- a/src/layouts/BasicLayout.less
+++ b/src/layouts/BasicLayout.less
@@ -45,7 +45,7 @@
transition: all .3s;
padding: 0 24px;
&:hover {
- background: rgba(0, 0, 0, .04);
+ background: @primary-1;
}
}