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
This commit is contained in:
maoyingjie
2026-10-28 09:42:17 +08:00
parent df954aface
commit 896bac2cd7
41 changed files with 830 additions and 412 deletions
+10 -26
View File
@@ -2,41 +2,25 @@
import { IconPaperclip } from "@tabler/icons-vue";
import { ref, onBeforeUnmount } from "vue";
import { Button, Spinner } from "@heroui-vue/components";
const isLoading = ref(false),
message = ref("");
const isLoading = ref(false);
let timer: ReturnType<typeof setTimeout> | undefined;
function upload() {
if (isLoading.value) return;
isLoading.value = true;
message.value = "";
timer = setTimeout(() => {
isLoading.value = false;
message.value = "上传完成,可以再次上传。";
}, 2000);
}
onBeforeUnmount(() => clearTimeout(timer));
</script>
<template>
<div class="upload-demo">
<Button :is-pending="isLoading" @click="upload">
<Spinner v-if="isLoading" color="current" size="sm" />
<IconPaperclip v-else aria-hidden="true" />
{{ isLoading ? "上传中…" : "上传文件" }}
</Button>
<p class="upload-status" role="status">{{ message }}</p>
</div>
<Button :is-pending="isLoading" @click="upload">
<Spinner v-if="isLoading" color="current" size="sm" />
<IconPaperclip v-else aria-hidden="true" />
{{ isLoading ? "上传中…" : "上传文件" }}
</Button>
</template>
<style scoped>
.upload-demo {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
}
.upload-status {
font-size: 12px;
color: var(--muted);
min-height: 20px;
margin: 0;
}
</style>