Commit deccafe6 authored by jim's avatar jim Committed by 陈帅

change hideClear to showClear

parent 89b3d2ee
...@@ -14,7 +14,7 @@ export interface INoticeIconTabProps { ...@@ -14,7 +14,7 @@ export interface INoticeIconTabProps {
emptyText?: React.ReactNode; emptyText?: React.ReactNode;
emptyImage?: string; emptyImage?: string;
style?: React.CSSProperties; style?: React.CSSProperties;
hideClear?: boolean; showClear?: boolean;
} }
export default class NoticeIconTab extends React.Component<INoticeIconTabProps, any> {} export default class NoticeIconTab extends React.Component<INoticeIconTabProps, any> {}
...@@ -11,7 +11,7 @@ export default function NoticeList({ ...@@ -11,7 +11,7 @@ export default function NoticeList({
locale, locale,
emptyText, emptyText,
emptyImage, emptyImage,
hideClear, showClear = true,
}) { }) {
if (data.length === 0) { if (data.length === 0) {
return ( return (
...@@ -52,12 +52,12 @@ export default function NoticeList({ ...@@ -52,12 +52,12 @@ export default function NoticeList({
); );
})} })}
</List> </List>
{hideClear ? null : ( {showClear ? (
<div className={styles.clear} onClick={onClear}> <div className={styles.clear} onClick={onClear}>
{locale.clear} {locale.clear}
{title} {title}
</div> </div>
)} ) : null}
</div> </div>
); );
} }
...@@ -9,7 +9,7 @@ order: 9 ...@@ -9,7 +9,7 @@ order: 9
## API ## API
参数 | 说明 | 类型 | 默认值 Property | Description | Type | Default
----|------|-----|------ ----|------|-----|------
count | Total number of messages | number | - count | Total number of messages | number | -
loading | Popup card loading status | boolean | false loading | Popup card loading status | boolean | false
...@@ -23,18 +23,18 @@ locale | Default message text | Object | `{ emptyText: '暂无数据', clear: ' ...@@ -23,18 +23,18 @@ locale | Default message text | Object | `{ emptyText: '暂无数据', clear: '
### NoticeIcon.Tab ### NoticeIcon.Tab
参数 | 说明 | 类型 | 默认值 Property | Description | Type | Default
----|------|-----|------ ----|------|-----|------
title | header for message Tab | string | - title | header for message Tab | string | -
list | List data, format refer to the following table | Array | `[]` list | List data, format refer to the following table | Array | `[]`
hideClear | Clear button display status | boolean | false showClear | Clear button display status | boolean | true
emptyText | message text when list is empty | ReactNode | - emptyText | message text when list is empty | ReactNode | -
emptyImage | image when list is empty | string | - emptyImage | image when list is empty | string | -
### Tab data ### Tab data
参数 | 说明 | 类型 | 默认值 Property | Description | Type | Default
----|------|-----|------ ----|------|-----|------
avatar | avatar img url | string | - avatar | avatar img url | string | -
title | title | ReactNode | - title | title | ReactNode | -
......
...@@ -27,7 +27,7 @@ locale | 默认文案 | Object | `{ emptyText: '暂无数据', clear: '清空' } ...@@ -27,7 +27,7 @@ locale | 默认文案 | Object | `{ emptyText: '暂无数据', clear: '清空' }
----|------|-----|------ ----|------|-----|------
title | 消息分类的页签标题 | string | - title | 消息分类的页签标题 | string | -
list | 列表数据,格式参照下表 | Array | `[]` list | 列表数据,格式参照下表 | Array | `[]`
hideClear | 是否显示清空按钮 | boolean | false showClear | 是否显示清空按钮 | boolean | true
emptyText | 针对每个 Tab 定制空数据文案 | ReactNode | - emptyText | 针对每个 Tab 定制空数据文案 | ReactNode | -
emptyImage | 针对每个 Tab 定制空数据图片 | string | - emptyImage | 针对每个 Tab 定制空数据图片 | string | -
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment