Files
heroui-vue/apps/docs/demos/alert-dialog-default.vue
T

49 lines
1.4 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
import {
AlertDialog,
AlertDialogBackdrop,
AlertDialogBody,
AlertDialogClose,
AlertDialogCloseTrigger,
AlertDialogContainer,
AlertDialogDialog,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogHeading,
AlertDialogIcon,
Button,
} from "@heroui-vue/components";
</script>
<template>
<AlertDialog>
<Button variant="danger">删除项目</Button>
<AlertDialogBackdrop>
<AlertDialogContainer>
<AlertDialogDialog class="sm:max-w-[400px]">
<AlertDialogCloseTrigger />
<AlertDialogHeader>
<AlertDialogIcon status="danger" />
<AlertDialogHeading>要永久删除项目吗?</AlertDialogHeading>
</AlertDialogHeader>
<AlertDialogBody>
<p>
此操作将永久删除
<strong>我的精彩项目</strong>
及其全部数据,且无法撤销。
</p>
</AlertDialogBody>
<AlertDialogFooter>
<AlertDialogClose as-child>
<Button variant="tertiary">取消</Button>
</AlertDialogClose>
<AlertDialogClose as-child>
<Button variant="danger">删除项目</Button>
</AlertDialogClose>
</AlertDialogFooter>
</AlertDialogDialog>
</AlertDialogContainer>
</AlertDialogBackdrop>
</AlertDialog>
</template>