notice-dropdown
<ai-portal.notice-dropdown>构件 ai-portal.notice-dropdown
消息通知下拉框构件,用于展示消息列表。支持自定义触发器、消息列表展示、空状态、以及交互事件。
Examples
基础使用(带消息列表)
空状态
自定义触发器(使用 eo-button)
Properties
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
dataSource | 消息数据列表 | NoticeItem[] | ||
popoverPlacement | 弹窗位置 | Placement | ||
emptyText | 空状态文案 | string | ||
notifyCenterUrl | 通知中心URL | string | ||
urlTemplate | 详情链接 | string | ||
urlTarget | 详情链接目标 | Target | ||
dropdownMaxWidth | 下拉框最大宽度 | string | number | ||
dropdownContentStyle | 下拉框内容样式 | React.CSSProperties | ||
hideNotifyCenterButton | 是否隐藏进入消息中心按钮 | boolean |
Events
| Name | Description | Event Detail |
|---|---|---|
notice.click | 消息项点击事件 | NoticeItem - 消息 ID |
mark.all.read | 全部已读点击事件 | void |
Type references
NoticeItem
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
id | string | ✅ | ||
type | string | ✅ | ||
isRead | boolean | ✅ | ||
title | string | ✅ | ||
description | string | |||
time | number | ✅ |