跳到主要内容

Message 消息提示

全局展示操作反馈信息。

何时使用​

  • 可提供成功、警告和错误等反馈信息。
  • 顶部居中显示并自动消失,是一种不打断用户操作的轻量级提示方式。

代码示例​

基本用法​

不同状态​

API​

参数说明类型默认值
type消息类型,有success、info、warning、error四种stringinfo
msg消息内容string-
position消息位MessagePositiontop-right
autoClose消息显示时间,单位秒number3

MessagePosition​

type MessagePosition =
| "top-left"
| "top-right"
| "top-center"
| "bottom-left"
| "bottom-right"
| "bottom-center";