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
+43
View File
@@ -0,0 +1,43 @@
<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>
<DrawerContent placement="right">
<DrawerDialog>
<DrawerHeader>
<DrawerHeading>抽屉标题</DrawerHeading>
</DrawerHeader>
<DrawerBody>
<p>
这是一个从屏幕边缘滑入的抽屉,并通过流畅的 CSS
过渡呈现动画效果。可拖动标题或页脚区域关闭。
</p>
</DrawerBody>
<DrawerFooter>
<DrawerClose as-child>
<Button variant="secondary">取消</Button>
</DrawerClose>
<DrawerClose as-child>
<Button>确认</Button>
</DrawerClose>
</DrawerFooter>
</DrawerDialog>
</DrawerContent>
</DrawerBackdrop>
</Drawer>
</template>