fix(docs): restore related showcases and correct CSS customization examples

This commit is contained in:
maoyingjie
2026-10-28 23:06:08 +08:00
parent cfbcb38ec3
commit f9938eea8c
9 changed files with 180 additions and 5 deletions
+6
View File
@@ -187,3 +187,9 @@ Vue 使用 `@click` 和默认作用域插槽。插槽提供 `isPending`、`isPre
## 相关组件
[Popover 弹出框](./popover) · [Tooltip 工具提示](./tooltip) · [Form 表单](./form)
## 相关案例
以下卡片链接至上游 React 案例(新窗口)。
<DocsRelatedShowcases component="Button" />
+6
View File
@@ -112,3 +112,9 @@ import { Disclosure, DisclosureGroup } from "@heroui-vue/components";
## 相关组件
[Accordion 手风琴](./accordion) · [Disclosure 折叠面板](./disclosure) · [Button 按钮](./button)
## 相关案例
以下卡片链接至上游 React 案例(新窗口)。
<DocsRelatedShowcases component="DisclosureGroup" />
+6
View File
@@ -171,3 +171,9 @@ Body 提供基线内边距与内层包装。Indicator 默认为基线 Chevron
## 相关组件
[Accordion 手风琴](./accordion) · [DisclosureGroup 折叠面板组](./disclosure-group) · [Button 按钮](./button)
## 相关案例
以下卡片链接至上游 React 案例(新窗口)。
<DocsRelatedShowcases component="Disclosure" />
+1 -1
View File
@@ -127,7 +127,7 @@ InputOTP 组件支持两种视觉变体:
}
.hv-input-otp__separator {
@apply h-1 w-2 rounded-full bg-border-strong;
@apply h-1 w-2 rounded-full bg-separator;
}
}
```
+5 -4
View File
@@ -132,11 +132,12 @@ Vue 使用 `asChild` 合并根容器属性,默认插槽必须只有一个自
```css
@layer components {
.hv-switch {
@apply inline-flex items-center gap-3;
--switch-control-bg: var(--default);
--switch-control-bg-checked: var(--accent);
}
.hv-switch__control {
@apply h-5 w-8 bg-gray-400 data-[selected=true]:bg-blue-500;
@apply h-5 w-8;
}
.hv-switch__thumb {
@@ -144,7 +145,7 @@ Vue 使用 `asChild` 合并根容器属性,默认插槽必须只有一个自
}
.hv-switch__content {
@apply flex flex-col gap-1;
@apply inline-flex items-center gap-3;
}
.hv-switch__icon {
@@ -164,7 +165,7 @@ HeroUI 遵循 [BEM](https://getbem.com/) 方法论,确保组件变体与状态
Switch 组件使用以下 CSS 类([查看源码样式](https://github.com/heroui-inc/heroui/blob/v3/packages/styles/components/switch.css)):
- `.hv-switch` - Switch 根容器(字段)
- `.hv-switch__content` - 包裹控件与标签文本的可点击 label
- `.hv-switch__content` - 包裹控件与标签文本的 `button[role="switch"]`
- `.hv-switch__control` - Switch 轨道
- `.hv-switch__thumb` - 可移动的滑块
- `.hv-switch__icon` - 滑块内可选图标
+6
View File
@@ -246,3 +246,9 @@ RAC 的集合 render-prop API 不作逐字复制,列表用 v-for,DOM render
## 相关组件
[Breadcrumbs 面包屑](./breadcrumbs)
## 相关案例
以下卡片链接至上游 React 案例(新窗口)。
<DocsRelatedShowcases component="Tabs" />