Components

AlertDialog 警示对话框

破坏性操作的强确认流:无法点击遮罩关闭,取消 / 确认双按钮。

终止实例

destructive 将确认按钮转为红色。

<AlertDialog
  title="终止实例 hkg-edge-07?"
  description="该操作不可撤销,实例上的所有活跃连接将立即断开。"
  action-text="确认终止"
  cancel-text="再想想"
  destructive
>
  <template #trigger>
    <Button variant="soft" color="error">危险确认 (Alert Dialog)</Button>
  </template>
</AlertDialog>

API 参考

属性类型默认值说明
openboolean—v-model:open。
title / descriptionstring—确认文案。
action-text / cancel-textstring确认 / 取消按钮文案。
destructivebooleanfalse危险操作红色样式。