Reference Source
public class | source

Notification

通知类

Example:

var notification = KQ.Control.Notification.getInstance();
notification.showSuccess('success!');
notification.showInfo('info!');
notification.showError('error!');

Static Method Summary

Static Public Methods
public static

获取通知实例

Constructor Summary

Public Constructor
public

constructor(option: Object)

构造函数

Method Summary

Public Methods
public

setOptions(options: Object): Null

设置参数

public

showError(msg: String, delay: Number): Null

使用错误模式显示消息

public

showInfo(msg: String, delay: Number): Null

使用信息模式显示消息

public

showSuccess(msg: String, delay: Number): Null

使用成功模式显示消息

Static Public Methods

public static getInstance(): Notification source

获取通知实例

Return:

Notification

Public Constructors

public constructor(option: Object) source

构造函数

Params:

NameTypeAttributeDescription
option Object

设置参数

option.right Number

距离右边界的留白

option.bottom Number

距离下边界的留白

Public Methods

public setOptions(options: Object): Null source

设置参数

Params:

NameTypeAttributeDescription
options Object

设置参数

options.right Number

距离右边界的留白

options.bottom Number

距离下边界的留白

Return:

Null

public showError(msg: String, delay: Number): Null source

使用错误模式显示消息

Params:

NameTypeAttributeDescription
msg String

消息

delay Number

延迟一定时间显示消息,单位是毫秒

Return:

Null

public showInfo(msg: String, delay: Number): Null source

使用信息模式显示消息

Params:

NameTypeAttributeDescription
msg String

消息

delay Number

延迟一定时间显示消息,单位是毫秒

Return:

Null

public showSuccess(msg: String, delay: Number): Null source

使用成功模式显示消息

Params:

NameTypeAttributeDescription
msg String

消息

delay Number

延迟一定时间显示消息,单位是毫秒

Return:

Null