We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
messageBox组件
title
message
dangerouslyUseHTMLString
type
iconClass
customClass
callback
showClose
beforeClose
distinguishCancelAndClose
lockScroll
showCancelButton
showConfirmButton
cancelButtonText
confirmButtonText
cancelButtonClass
confirmButtonClass
closeOnClickModal
closeOnPressEscape
closeOnHashChange
showInput
inputPlaceholder
inputType
inputValue
inputPattern
inputValidator
inputErrorMessage
center
roundButton
The text was updated successfully, but these errors were encountered:
Merge pull request #8 from wulinsheng123/refactor
3c0e57b
Refactor(messagebox):finish refactor messagebox component hug-sun#479
No branches or pull requests
重构组件规范
Tasking
messageBox组件
title
控制messageBox的标题,不传默认为Nullmessage
控制messageBox的内容,支持VNode和string,dangerouslyUseHTMLString
是否将 message 属性作为 HTML 片段处理,默认为falsetype
控制messageBox的消息类型,用于显示图标,默认值[success|info|warning|error]iconClass
自定义messageBox图标的类名,会覆盖 type属性customClass
MessageBox 的自定义类名callback
messageBox若不使用 Promise,可以使用此参数指定 MessageBox 关闭后的回调,回单函数参数,(action:confirm|cancel|close,instance:messageBox)=>{},当前的实例,showClose
是否展示messageBox又上角的关闭按钮,默认为truebeforeClose
messageBox关闭前的回调,会暂停实例的关闭,(action:confirm|cancel|close,instance:messageBox,done)=>{} done用于关闭messageBox的实例distinguishCancelAndClose
是否将取消(点击取消按钮)与关闭(点击关闭按钮或遮罩层、按下 ESC 键)进行区分 默认值为falselockScroll
是否在 MessageBox 出现时将 body 滚动锁定默认为trueshowCancelButton
是否显示取消按钮,默认为false,以 confirm 和 prompt 方式调用时为 trueshowConfirmButton
是否显示确定按钮,默认为truecancelButtonText
取消按钮的文本内容, 默认为取消confirmButtonText
确定按钮的文本内容, 默认为确定cancelButtonClass
取消按钮的自定义类名confirmButtonClass
确定按钮的自定义类名closeOnClickModal
是否可通过点击遮罩关闭 MessageBox, 默认为true,以 alert 方式调用时为 false)closeOnPressEscape
是否可通过按下 ESC 键关闭 MessageBox,默认为true,以 alert 方式调用时为 falsecloseOnHashChange
是否在 hashchange 时关闭 MessageBox 默认为trueshowInput
是否显示输入框,默认为false,以 prompt 方式调用时为 trueinputPlaceholder
输入框的占位符inputType
输入框的类型,默认为textinputValue
输入框的初始文本inputPattern
输入框的校验表达式inputValidator
输入框的校验函数。可以返回布尔值或字符串,若返回一个字符串, 则返回结果会被赋值给 inputErrorMessageinputErrorMessage
校验未通过时的提示文本,默认为"输入的数据不合法!"center
是否居中布局,默认为falseroundButton
是否使用圆角按钮The text was updated successfully, but these errors were encountered: