警告 展示/交互

组件 ID: alert

这是一个标准的 SunForm 展示/交互组件,支持可视化配置与低代码生成。

JSON 配置示例

直接复制以下 JSON 到配置文件中即可使用。

{
  "type": "alert",
  "props": {
    "label": "这是一条警告信息",
    "hide": false,
    "remark": "",
    "style": "{}",
    "status": "primary",
    "icon": "",
    "iconSize": "28",
    "closeIcon": "close-line",
    "showClose": true,
    "showIcon": true,
    "fontSize": "28",
    "color": "",
    "fontColor": "",
    "skin": "thin",
    "round": "16",
    "margin": [
      "24",
      "0",
      "24",
      "24"
    ]
  }
}

属性配置 (Props)

属性名 类型 默认值 说明
hide boolean false 是否隐藏该组件
remark string - 组件备注/说明
style object {} 自定义内联样式 CSS
label string 这是一条警告信息 标签文本/标题
status string primary 暂无描述
icon string - 图标名称
iconSize string 28 图标
closeIcon string close-line 图标
showClose boolean true 暂无描述
showIcon boolean true 图标
fontSize string 28 暂无描述
color string - 组件主色调
fontColor string - 颜色值
skin string thin 暂无描述
round string 16 暂无描述
margin object ['24', '0', '24', '24'] 暂无描述
padding object ['28', '20'] 暂无描述
height string auto 高度
width string auto 宽度
onCreated any null 组件创建时触发的事件
onMounted any null 组件挂载后触发的事件
onHandle any null 事件回调
onClick any null 点击组件触发的事件
onClose any null 事件回调