cg-message-box

this is a components used for message prompt,confirmation messages,and submission content.
456
Install
npm install cg-message-box
Latest Version:1.0.19
Vue:3
License:ISC
Last Updated:Apr 19, 2023
Links: npm
Maintainer: rain_anderson

MessageBox

用于消息提示、确认消息和提交内容

组件样式

// main.ts
import 'cg-message-box/css/index';

API

成员 说明
alert 消息提示
confirm 确认消息
prompt 提交内容
alert
成员 说明 是否必传 类型
title 标题 true string
message 内容,支持VNode(暂不支持HTML字符串) true string
confirm 确认按钮文字 true string
onConfirm 确定事件 true () => void
onDestroy 销毁前的回调 false ( ) => void
confirm
成员 说明 是否必传 类型
title 标题 true string
message 内容,支持VNode(暂不支持HTML字符串) true string | VNode | (()=>VNode)
confirm 确认按钮文字 true string
cancel 取消按钮文字,不传则为提示框 false string
onConfirm 确定事件 true () => void
onDestroy 销毁前的回调 false ( ) => void
onCancel 取消事件 false ( ) => void
beforeClose 关闭前的函数,action 字符串区分关闭的事件,done函数放行 false (action: string, done: () => void) => void
prompt
成员 说明 是否必传 类型
title 标题 true string
message 传入描述 true string
confirm 确认按钮文字 true string
cancel 取消按钮文字 true string
onConfirm 确定事件,参数为输入框内的字符 true (value: string) => void
onCancel 取消事件 false ( ) => void
onDestroy 销毁前的回调 false ( ) => void
validate value为输入框传入的字段,callback为校验通行函数 false (value:string,callback?: (message?:Error) => void) => void

Version History

Version Released Vue License
1.0.19 3.2 ISC
1.0.18 3.2 ISC
1.0.17 3.2 ISC
1.0.16 3.2 ISC
1.0.15 3.2 ISC