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