Files
heroui-vue/apps/docs/demos/search-field-custom-icons.vue
T
maoyingjie 896bac2cd7 fix(docs): restore button, toggle and nav demos to the pinned cn baseline
- 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
2026-10-28 09:42:17 +08:00

32 lines
981 B
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 {
SearchFieldClearButton,
SearchFieldSearchIcon,
SearchFieldGroup,
SearchFieldInput,
SearchField,
Label,
Description,
} from "@heroui-vue/components";
// 上游自定义 SVG 为“人形搜索”字形;IconFilter 语义无关,按任务卡通过条件改用搜索人形字形
import { IconUserSearch, IconCircleX } from "@tabler/icons-vue";
</script>
<template>
<div class="flex flex-col gap-4">
<SearchField name="search-custom">
<Label>搜索(自定义图标)</Label>
<SearchFieldGroup>
<SearchFieldSearchIcon>
<IconUserSearch aria-hidden="true" />
</SearchFieldSearchIcon>
<SearchFieldInput class="w-[280px]" placeholder="搜索…" />
<SearchFieldClearButton>
<IconCircleX aria-hidden="true" />
</SearchFieldClearButton>
</SearchFieldGroup>
<Description>自定义图标子元素</Description>
</SearchField>
</div>
</template>