feat: migrate AlertDialog and Drawer with reviewed overlay lifecycles

This commit is contained in:
maoyingjie
2026-10-23 18:34:07 +08:00
parent 9f44ffb310
commit 0ec20aaa6a
83 changed files with 5871 additions and 3 deletions
@@ -0,0 +1,42 @@
<script setup lang="ts">
import {
Button,
Drawer,
DrawerBackdrop,
DrawerBody,
DrawerClose,
DrawerContent,
DrawerDialog,
DrawerFooter,
DrawerHeader,
DrawerHeading,
} from "@heroui-vue/components";
</script>
<template>
<Drawer>
<Button variant="secondary">重要操作</Button>
<DrawerBackdrop :is-dismissable="false">
<DrawerContent>
<DrawerDialog>
<DrawerHeader>
<DrawerHeading>确认操作</DrawerHeading>
</DrawerHeader>
<DrawerBody>
<p>
此抽屉无法通过点击外部或拖拽关闭。你必须使用下方按钮之一来完成操作。
</p>
</DrawerBody>
<DrawerFooter>
<DrawerClose as-child>
<Button variant="secondary">取消</Button>
</DrawerClose>
<DrawerClose as-child>
<Button>确认</Button>
</DrawerClose>
</DrawerFooter>
</DrawerDialog>
</DrawerContent>
</DrawerBackdrop>
</Drawer>
</template>