Skip to content

Notification 通知

类型

通过 type 来设置通知类型,可选值有 info success warning error

位置

通过 position 来设置通知位置,可选值有 top-start top-center top-end bottom-start bottom-end

关闭图标

通过 showCloseIcon 来设置是否显示关闭图标,默认值为 falseshowCloseIcon 设置为true时, autoClose必定为 true,即使给定值为 false 也不会生效

Vnode

message 参数也可为 Vnode

API

配置项

参数类型默认值说明
titlestring-通知标题
message[string,Vnode]-通知内容
typeNotificationType'info'通知类型
positionNotificationPosition'top-end'通知位置
durationnumber2000自动消失时间(毫秒),低于1000无效
autoClosebooleantrue是否自动关闭
showCloseIconbooleanfalse是否显示右上角关闭图标

git mv ./PinHeader.vue ./tempClose.vue git mv ./tempClose.vue ./pinHeader.vue