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,48 @@
<script setup lang="ts">
import {
Button,
Drawer,
DrawerBackdrop,
DrawerBody,
DrawerClose,
DrawerCloseTrigger,
DrawerContent,
DrawerDialog,
DrawerFooter,
DrawerHandle,
DrawerHeader,
DrawerHeading,
} from "@heroui-vue/components";
</script>
<template>
<Drawer>
<Button variant="secondary">条款与条件</Button>
<DrawerBackdrop>
<DrawerContent>
<DrawerDialog>
<DrawerHandle />
<DrawerCloseTrigger />
<DrawerHeader>
<DrawerHeading>条款与条件</DrawerHeading>
</DrawerHeader>
<DrawerBody>
<p v-for="i in 20" :key="i" class="mb-3">
段落 {{ i }}:Lorem ipsum dolor sit amet, consectetur adipiscing
elit. Nullam pulvinar risus non risus hendrerit venenatis.
Pellentesque sit amet hendrerit risus, sed porttitor quam.
</p>
</DrawerBody>
<DrawerFooter>
<DrawerClose as-child>
<Button variant="secondary">拒绝</Button>
</DrawerClose>
<DrawerClose as-child>
<Button>接受</Button>
</DrawerClose>
</DrawerFooter>
</DrawerDialog>
</DrawerContent>
</DrawerBackdrop>
</Drawer>
</template>