当前位置: 首页 > 文档资料 > Pile.js 中文文档 >

Alert 警告框

优质
小牛编辑
122浏览
2023-12-01

定义

模拟警告框(alert)

图片展示

代码演示


import Dialog from 'pile/dist/components/dialog'
const  {Alert} = Dialog
<Alert
  show={true}
  type="success"
  title="我是pile"
  buttons={[
{
  label: '好的',
  onClick: function(){}
}
  ]}
/>

属性

参数描述数据类型默认值
show是否展示警告框bool
type类型,错误:warning,成功:successstringwarning
title警告框文字string
buttons按钮数组array
buttons.label标签名称string
buttons.onClick点击事件function
MaskClick点击蒙板回调function
width自定义宽度默认267pxstring