feat: add Disclosure DisclosureGroup and Accordion

This commit is contained in:
maoyingjie
2026-10-22 18:25:08 +08:00
parent 73bd7da5fa
commit b086d7f30d
63 changed files with 5597 additions and 4 deletions
+50
View File
@@ -0,0 +1,50 @@
<script setup lang="ts">
import { ref } from "vue";
import {
Button,
Disclosure,
DisclosureBody,
DisclosureContent,
DisclosureHeading,
DisclosureIndicator,
DisclosureTrigger,
} from "@heroui-vue/components";
import { IconQrcode, IconBrandAppleFilled } from "@tabler/icons-vue";
const isExpanded = ref(true);
</script>
<template>
<div class="w-full max-w-md text-center">
<Disclosure v-model:expanded="isExpanded">
<DisclosureHeading>
<DisclosureTrigger as-child>
<Button variant="secondary">
<IconQrcode aria-hidden="true" />
预览 HeroUI Native
<DisclosureIndicator />
</Button>
</DisclosureTrigger>
</DisclosureHeading>
<DisclosureContent>
<DisclosureBody
class="shadow-panel flex flex-col items-center rounded-3xl bg-surface p-4 text-center"
>
<p class="text-sm text-muted">
使用手机相机扫描此二维码,即可预览 HeroUI Native 组件。
</p>
<img
alt="Expo Go 二维码"
class="aspect-square w-full max-w-54 object-cover"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/images/qr-code-native.png"
/>
<p class="text-sm text-muted">设备需已安装 Expo。</p>
<Button class="mt-4" variant="primary">
<IconBrandAppleFilled aria-hidden="true" />
在 App Store 下载
</Button>
</DisclosureBody>
</DisclosureContent>
</Disclosure>
</div>
</template>