feat: migrate AlertDialog and Drawer with reviewed overlay lifecycles
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
Button,
|
||||
Drawer,
|
||||
DrawerBackdrop,
|
||||
DrawerBody,
|
||||
DrawerClose,
|
||||
DrawerCloseTrigger,
|
||||
DrawerContent,
|
||||
DrawerDialog,
|
||||
DrawerFooter,
|
||||
DrawerHeader,
|
||||
DrawerHeading,
|
||||
Input,
|
||||
Label,
|
||||
TextField,
|
||||
} from "@heroui-vue/components";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Drawer>
|
||||
<Button variant="secondary">编辑资料</Button>
|
||||
<DrawerBackdrop>
|
||||
<DrawerContent placement="right">
|
||||
<DrawerDialog>
|
||||
<DrawerCloseTrigger />
|
||||
<DrawerHeader>
|
||||
<DrawerHeading>编辑资料</DrawerHeading>
|
||||
</DrawerHeader>
|
||||
<DrawerBody>
|
||||
<form class="flex flex-col gap-4">
|
||||
<TextField class="w-full" name="name" type="text">
|
||||
<Label>姓名</Label>
|
||||
<Input placeholder="输入你的姓名" variant="secondary" />
|
||||
</TextField>
|
||||
<TextField class="w-full" name="email" type="email">
|
||||
<Label>邮箱</Label>
|
||||
<Input placeholder="输入你的邮箱" variant="secondary" />
|
||||
</TextField>
|
||||
<TextField class="w-full" name="bio">
|
||||
<Label>简介</Label>
|
||||
<Input placeholder="介绍一下你自己" variant="secondary" />
|
||||
</TextField>
|
||||
</form>
|
||||
</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