feat: migrate AlertDialog and Drawer with reviewed overlay lifecycles
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user