Files
heroui-vue/apps/docs/demos/drawer-basic.vue
T

44 lines
1.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<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>