继承
LocaleBase
属性
名称 | 类型 | 描述 | 默认 |
---|---|---|---|
title | string | 消息窗口标题。 | |
msg | string | 消息窗口中显示的消息。 | |
icon | string | 消息窗口上显示的图标类。 | |
content | function | 呈现内容的函数。 |
方法
名称 | 参数 | 返回值 | 描述 |
---|---|---|---|
alert | options | void |
显示警告消息对话框。
代码实例: this.messager.alert({ title: "Info", icon: "info", msg: "Here is a info message!" }); |
confirm | options | void |
显示一个确定消息窗口
代码实例: this.messager.confirm({ title: "Confirm", msg: "Are you confirm this?", result: r => { if (r) { alert("confirmed: " + r); } } }); |
prompt | options | void |
显示提示消息窗口
代码实例: this.messager.prompt({ title: "Prompt", msg: "Please type something", result: r => { if (r) { alert("you type: " + r); } } }); |