API
Component

Notification ($UI/comp/antd/components/Notification/Notification)

使用范围:WX

Contents

component Notification ($UI/comp/antd/components/Notification/Notification) extends AntdComponent

<b>使用场景</b>:在系统四个角显示通知提醒信息。 <b>使用方法</b>:在操作中配置提醒的内容和类型。

Constructor Top

  Notification ()

Methods Top

void open (JSON config)

Operations Top

void open (String message, String description, String type, Number duration, String placement)

Constructor details Top

public Notification ()

<b>使用场景</b>:在系统四个角显示通知提醒信息。 <b>使用方法</b>:在操作中配置提醒的内容和类型。

Methods Detail Top

public void open (JSON config)

显示

Parameters

JSON config

配置

Return Value

void

{ "message": "", //标题 "description": "", //内容 "type": "", //类型, 取值范围success,info,error,warn "duration": 4.5, //显示时间, 默认4.5s, 0表示不自动关闭, "placement": "", //弹出位置, 取值范围topLeft,topRight,bottomLeft,bottomRight "icon": "", //标题图标 "closeIcon": "", //关闭图标 "onClose": null, //通知关闭回调 "onClick": null, //点击通知回调, "top": 24, //消息从顶部弹出时,距离顶部的位置,单位像素,默认24 "bottom": 24, //消息从底部弹出时,距离底部的位置,单位像素, 默认24, "key": "", //通知唯一标识 }

Operations Detail Top

public void open (String message, String description, String type, Number duration, String placement)

显示

Parameters

String message

标题

String description

内容

String type

类型, 取值范围success,info,error,warn

Number duration

显示时间, 默认4.5s, 0表示不自动关闭

String placement

弹出位置, 取值范围topLeft,topRight,bottomLeft,bottomRight

Return Value

void