重量级的信息反馈组件,在屏幕中间显示,显示少量内容,给予提示,需要用户确认。
默认只有确认按钮。
alert模式只有确认按钮,confirm模式有确认和取消按钮。
传入配置对象,可以配置标题、内容、按钮文字
标题和内容支持传入html
通过直接在vue实例里面调用以下方法来使用组件
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
title | 标题 | String | null |
template | 提示内容 | String | null |
buttons | 配置按钮的数据,最多两个,多余的不显示 | Array | [] |
buttons.text | 按钮文字 | String | null |
buttons.show | 按钮是否显示 | Boolean | true |
buttons.class | 按钮的样式 | String | null |