Files
heroui-vue/apps/docs/demos/modal-default.vue
T

47 lines
1.2 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,
Modal,
ModalBackdrop,
ModalBody,
ModalClose,
ModalCloseTrigger,
ModalContainer,
ModalDialog,
ModalFooter,
ModalHeader,
ModalHeading,
ModalIcon,
} from "@heroui-vue/components";
import { IconRocket as Rocket } from "@tabler/icons-vue";
</script>
<template>
<Modal>
<Button variant="secondary">打开模态框</Button>
<ModalBackdrop>
<ModalContainer>
<ModalDialog class="sm:max-w-[360px]">
<ModalCloseTrigger></ModalCloseTrigger>
<ModalHeader>
<ModalIcon class="bg-default text-foreground">
<Rocket aria-hidden="true" class="size-5"></Rocket>
</ModalIcon>
<ModalHeading>欢迎使用 HeroUI</ModalHeading>
</ModalHeader>
<ModalBody>
<p>
一套美观、快速、现代的 Vue UI 库,可轻松构建无障碍且高度可定制的
Web 应用。
</p>
</ModalBody>
<ModalFooter>
<ModalClose as-child>
<Button class="w-full">继续</Button>
</ModalClose>
</ModalFooter>
</ModalDialog>
</ModalContainer>
</ModalBackdrop>
</Modal>
</template>