Files
heroui-vue/apps/docs/demos/disclosure-basic.vue
T
2026-10-22 18:25:08 +08:00

51 lines
1.5 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 { 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>