跳到主要内容

notice-dropdown

<ai-portal.notice-dropdown>

构件 ai-portal.notice-dropdown

消息通知下拉框构件,用于展示消息列表。支持自定义触发器、消息列表展示、空状态、以及交互事件。

Examples​

基础使用(带消息列表)​

Playground

空状态​

Playground

自定义触发器(使用 eo-button)​

Playground

Properties​

NameDescriptionTypeDefaultRequired
dataSource

消息数据列表

NoticeItem[]
popoverPlacement

弹窗位置

Placement
emptyText

空状态文案

string
notifyCenterUrl

通知中心URL

string
urlTemplate

详情链接

string
urlTarget

详情链接目标

Target
dropdownMaxWidth

下拉框最大宽度

string | number
dropdownContentStyle

下拉框内容样式

React.CSSProperties
hideNotifyCenterButton

是否隐藏进入消息中心按钮

boolean

Events​

NameDescriptionEvent Detail
notice.click

消息项点击事件

NoticeItem - 消息 ID
mark.all.read

全部已读点击事件

void

Type references​

NoticeItem​

NameDescriptionTypeDefaultRequired
idstring✅
typestring✅
isReadboolean✅
titlestring✅
descriptionstring
timenumber✅
url

单个消息详情链接,优先级高于 urlTemplate

string