Notice 通知提醒

说明

在界面右上角显示可关闭的全局通知,常用于以下场景:

  • 通知内容带有描述信息
  • 系统主动推送

代码示例

>{}
<template>
  <Notice
    title="测试消息"
    :show="true"
    type="warning"
    style="top:2rem;right:2rem"
  >
    <div style="padding:0.4rem;padding-top:0">
      <Icon type="icon-star" /> 我是自动关闭的
    </div>
  </Notice>
</template>
1
2
3
4
5
6
7
8
9
10
11
12

API

Notice props

属性说明类型默认值
title通知提醒的标题String-
show通知提醒是否显示Booleanfalse
type通知提醒的类型,可选info,success,warning,errorStringinfo
style自定义样式String-
closable是否可以关闭Booleantrue
id组件启用订阅名,为空不订阅Stringon-notice-bar
timeout关闭时间Number30

Last Updated: