Files
heroui-vue/apps/docs/demos/drawer-non-dismissable.vue
T

43 lines
1.0 KiB
Vue

<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>