用于展示提示或状态信息
该页面由 AI 迁移生成,请谨慎使用
内容已迁移完成,但仍建议结合源码和人工评审结果使用。
用于展示提示或状态信息,强调当前状态的可见性。
信息 / 成功 / 警告 / 错误。
复制<template> <TxAlert title="提示" message="检查一下配置项。" type="info" /> <TxAlert title="成功" message="已保存。" type="success" /> <TxAlert title="注意" message="有需要处理的内容。" type="warning" /> <TxAlert title="失败" message="保存失败。" type="error" /> </template>
<template> <TxAlert title="提示" message="检查一下配置项。" type="info" /> <TxAlert title="成功" message="已保存。" type="success" /> <TxAlert title="注意" message="有需要处理的内容。" type="warning" /> <TxAlert title="失败" message="保存失败。" type="error" /> </template>
Alert 会渲染 role="alert",语义图标统一走共享 TxIcon 渲染器,并且只在点击关闭按钮时触发 close。需要常驻提示时设置 closable=false;需要纯文本提示时设置 showIcon=false。
role="alert"
TxIcon
close
closable=false
showIcon=false