feat: migrate Modal Popover and Tooltip with shared overlay foundation

This commit is contained in:
maoyingjie
2026-10-22 23:39:51 +08:00
parent b086d7f30d
commit 2b4ac04df1
108 changed files with 6888 additions and 100 deletions
+46
View File
@@ -0,0 +1,46 @@
<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>