Skip to content

Message Box 消息弹窗

Message Box 消息弹窗采用模态对话框形式展示消息,用于提示消息、确认消息和提交内容。

基本用法

询问

异常

提交内容

自定义用法

typescript
type MessageType = 'info' | 'warning' | 'success' | 'error' | 'prompt' | 'question';
type PromptEditorType = 'text-area' | 'number-spinner' | 'date-picker' | 'combo-list';

Message Box 属性

属性名类型默认值说明
typestring as MessageTypeinfo类型
titlestring''标题
detailstring''详细内容
okButtonTextstring确定确定按钮文案
cancelButtonTextstring取消取消按钮文案
exceptionInfoObject as ExceptionInfonull拓展信息
promptEditorTypestring as PromptEditorTypetext-area组件标识

ExceptionInfo属性

属性名类型默认值说明
datestring'日期
messagestring''消息内容
detailstring''具体信息

MessageService option属性

属性名类型默认值说明
typestring as MessageTypeinfo类型
titlestring''标题
detailstring''详细内容,存在exceptionInfo时失效
okButtonTextstring确定确定按钮文案
cancelButtonTextstring取消取消按钮文案
exceptionInfoExceptionInfonull拓展信息
acceptCallback() => void() => void点击确定时回调,仅询问模式下可用
rejectCallback() => void() => void点击取消是回调,仅询问模式下可用

插槽

TIP

暂无内容