896bac2cd7
- button-group: restore all 9 cn demos incl. merge dropdown menu copy, custom-styles merge dropdown, sizes variant=secondary, orientation icon groups, full-width second group and the disabled child override - toggle-button / toggle-button-group: restore cn copy, structure, button counts, theme custom-styles classes and aria-labels - accordion-custom-styles: restore the 3-item collectibles scenario with the original 3dicons images, surface variant, selectors and hover motion - disclosure-group-controlled: restore HeroUI Native / Expo copy and image semantics (Expo brand icon adapted to Tabler IconBrandReactNative) - button-basic / button-loading-state: converge to baseline (console report, no added status paragraph) keeping the duplicate-trigger guard - restore per-demo root gap/alignment/wrap classes instead of demo-row - icon semantics per task card: search glyph kept on 搜索 buttons, rotate-back glyph restored (IconRefresh), person-search glyph restored (IconUserSearch); accordion item icons sized to the baseline 16px
75 lines
2.5 KiB
Vue
75 lines
2.5 KiB
Vue
<script setup lang="ts">
|
|
import {
|
|
Accordion,
|
|
AccordionBody,
|
|
AccordionHeading,
|
|
AccordionIndicator,
|
|
AccordionItem,
|
|
AccordionPanel,
|
|
AccordionTrigger,
|
|
} from "@heroui-vue/components";
|
|
import { IconChevronDown } from "@tabler/icons-vue";
|
|
|
|
const items = [
|
|
{
|
|
content: "通过实时通知及时了解账户动态。",
|
|
iconUrl:
|
|
"https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/3dicons/bell-small.png",
|
|
subtitle: "接收账户活动更新",
|
|
title: "开启通知",
|
|
},
|
|
{
|
|
content: "安装我们的官方浏览器扩展,获得更顺畅的浏览体验。",
|
|
iconUrl:
|
|
"https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/3dicons/compass-small.png",
|
|
subtitle: "将浏览器连接到你的账户",
|
|
title: "安装浏览器扩展",
|
|
},
|
|
{
|
|
content: "创建你的第一件数字藏品,开启数字收藏之旅。",
|
|
iconUrl:
|
|
"https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/3dicons/mint-collective-small.png",
|
|
subtitle: "创建你的第一件收藏品",
|
|
title: "铸造收藏品",
|
|
},
|
|
];
|
|
</script>
|
|
|
|
<template>
|
|
<Accordion
|
|
class="bg-surface-1/10 w-full max-w-md rounded-2xl"
|
|
variant="surface"
|
|
>
|
|
<AccordionItem
|
|
v-for="(item, index) in items"
|
|
:key="index"
|
|
class="group/item first:**:data-[slot=accordion-trigger]:rounded-t-2xl last:[&:not(:has([data-slot=accordion-trigger][aria-expanded='true']))_[data-slot=accordion-trigger]]:rounded-b-2xl"
|
|
>
|
|
<AccordionHeading>
|
|
<AccordionTrigger
|
|
class="group flex items-center gap-2 transition-none hover:bg-surface"
|
|
>
|
|
<img
|
|
v-if="item.iconUrl"
|
|
:alt="item.title"
|
|
class="h-11 w-11 transition-[scale,rotate] duration-300 ease-out group-hover/item:scale-120 group-hover/item:-rotate-10 group-hover/item:drop-shadow-lg"
|
|
:src="item.iconUrl"
|
|
/>
|
|
<div class="flex flex-col gap-0">
|
|
<span class="leading-5 font-medium">{{ item.title }}</span>
|
|
<span class="leading-6 font-normal text-muted/80">
|
|
{{ item.subtitle }}
|
|
</span>
|
|
</div>
|
|
<AccordionIndicator class="text-muted/50 [&>svg]:size-4">
|
|
<IconChevronDown />
|
|
</AccordionIndicator>
|
|
</AccordionTrigger>
|
|
</AccordionHeading>
|
|
<AccordionPanel>
|
|
<AccordionBody class="text-muted/80">{{ item.content }}</AccordionBody>
|
|
</AccordionPanel>
|
|
</AccordionItem>
|
|
</Accordion>
|
|
</template>
|