feat: add Typography EmptyState and Breadcrumbs
This commit is contained in:
@@ -0,0 +1,176 @@
|
||||
---
|
||||
title: Breadcrumbs 面包屑
|
||||
description: 导航面包屑,显示当前页面在层级结构中的位置
|
||||
component: breadcrumbs
|
||||
group: 组件
|
||||
---
|
||||
|
||||
## 用法
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
import { Breadcrumbs, BreadcrumbsItem } from "@heroui-vue/components";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Breadcrumbs>
|
||||
<BreadcrumbsItem href="#">首页</BreadcrumbsItem>
|
||||
<BreadcrumbsItem href="#">产品</BreadcrumbsItem>
|
||||
<BreadcrumbsItem>笔记本电脑</BreadcrumbsItem>
|
||||
</Breadcrumbs>
|
||||
</template>
|
||||
```
|
||||
|
||||
<ComponentPreview name="breadcrumbs-basic" />
|
||||
|
||||
## 组件结构
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
import { Breadcrumbs, BreadcrumbsItem } from "@heroui-vue/components";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Breadcrumbs>
|
||||
<BreadcrumbsItem href="#">首页</BreadcrumbsItem>
|
||||
<BreadcrumbsItem href="#">分类</BreadcrumbsItem>
|
||||
<BreadcrumbsItem>当前页面</BreadcrumbsItem>
|
||||
</Breadcrumbs>
|
||||
</template>
|
||||
```
|
||||
|
||||
`Breadcrumbs` 渲染为带可访问名称的 `ol`,`BreadcrumbsItem` 渲染为 `li`。最后一项自动成为当前页:附加 `aria-current="page"`,并作为不可导航的当前项处理。
|
||||
|
||||
## 示例
|
||||
|
||||
### 导航层级
|
||||
|
||||
<ComponentPreview name="breadcrumbs-level-2" />
|
||||
|
||||
<ComponentPreview name="breadcrumbs-level-3" />
|
||||
|
||||
### 禁用状态
|
||||
|
||||
<ComponentPreview name="breadcrumbs-disabled" />
|
||||
|
||||
`isDisabled` 禁用所有链接,并保留项目文本与分隔符。
|
||||
|
||||
### 自定义分隔符
|
||||
|
||||
<ComponentPreview name="breadcrumbs-custom-separator" />
|
||||
|
||||
上游通过 `separator` 属性接收自定义分隔符节点;Vue 版使用 `#separator` 具名插槽。自定义元素会获得分隔符尺寸类与 `data-slot="breadcrumbs-separator"`。
|
||||
|
||||
### 渲染函数
|
||||
|
||||
<ComponentPreview name="breadcrumbs-render-function" />
|
||||
|
||||
上游 `render` 用于替换根元素或传递额外属性;Vue 版通过 `as` 更换元素类型,普通属性与 `data-*` 直接透传到对应根元素。示例把 `data-custom` 放在 `ol` 与 `li` 上。
|
||||
|
||||
## 自定义样式
|
||||
|
||||
### Tailwind CSS
|
||||
|
||||
<ComponentPreview name="breadcrumbs-custom-styles" />
|
||||
|
||||
`BreadcrumbsItem` 的 `class` 同时合并到 `li` 与内部链接,便于定制当前项和悬停颜色;其他属性落在 `li` 根节点。
|
||||
|
||||
### 全局 CSS
|
||||
|
||||
可使用 `@layer components` 指令自定义 Breadcrumbs 组件类。
|
||||
|
||||
```css
|
||||
@layer components {
|
||||
.hv-breadcrumbs {
|
||||
@apply gap-4 text-lg;
|
||||
}
|
||||
|
||||
.hv-breadcrumbs__link {
|
||||
@apply font-semibold;
|
||||
}
|
||||
|
||||
.hv-breadcrumbs__separator {
|
||||
@apply text-blue-500;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 样式参考
|
||||
|
||||
HeroUI 遵循 [BEM](https://getbem.com/) 方法论,确保组件变体与状态可复用且易于自定义。类名前缀为 `hv-`。
|
||||
|
||||
### CSS 类
|
||||
|
||||
Breadcrumbs 组件使用以下 CSS 类([查看源码样式](https://github.com/heroui-inc/heroui/blob/v3/packages/styles/components/breadcrumbs.css)):
|
||||
|
||||
#### 基础类 [!toc]
|
||||
|
||||
- `.hv-breadcrumbs` - 面包屑根容器
|
||||
- `.hv-breadcrumbs__item` - 单个面包屑项包装器
|
||||
- `.hv-breadcrumbs__link` - 面包屑链接元素
|
||||
- `.hv-breadcrumbs__separator` - 项之间的分隔符图标
|
||||
|
||||
#### 状态类 [!toc]
|
||||
|
||||
- `.hv-breadcrumbs__link[data-current="true"]` - 当前页指示(不可导航)
|
||||
- `.hv-breadcrumbs__link[aria-disabled="true"]` - 禁用链接
|
||||
|
||||
### 交互状态
|
||||
|
||||
- **Current**:最后一项的链接带有 `data-current="true"`、`aria-current="page"` 与 `aria-disabled="true"`。
|
||||
- **Hover**:链接支持标准 hover 与 `data-hovered` 状态。
|
||||
- **Disabled**:根级 `isDisabled` 或单项 `isDisabled` 以 `span[role="link"]` 呈现,带 `aria-disabled="true"`、`tabindex="-1"`,不保留 `href` 并阻止点击激活;元素类型与 React Aria Link 一致。共享 Vue Link 为禁用项保留 `tabindex="-1"` 以支持程序化聚焦,RAC 则省略 `tabindex`;两者都不能通过 Tab 聚焦。未提供 `href` 的非当前项同样渲染为 `span[role="link"]`,未禁用时 `tabindex="0"`。
|
||||
|
||||
固定基线没有自动折叠、省略号或“展开更多”状态机;本实现不额外添加。
|
||||
|
||||
## API 参考
|
||||
|
||||
### Breadcrumbs
|
||||
|
||||
| 属性 | 类型 | 默认值 | 描述 |
|
||||
| ------------ | --------------------------- | --------------- | ------------------------------------------------ |
|
||||
| `aria-label` | `string` | `'Breadcrumbs'` | 面包屑列表的可访问名称。 |
|
||||
| `isDisabled` | `boolean` | `false` | 是否禁用所有面包屑链接。 |
|
||||
| `as` | `string` | `'ol'` | 自定义根元素标签;对应上游 `render` 的元素替换。 |
|
||||
| `class` | `string \| Array \| Object` | - | 附加 CSS 类(Vue class 绑定)。 |
|
||||
| 默认插槽 | - | - | `BreadcrumbsItem` 列表。 |
|
||||
| `#separator` | - | 默认右箭头图标 | 自定义各项之间的分隔符。 |
|
||||
|
||||
根元素同时接收其余 `$attrs`(`data-*`、`id`、`style`、事件等);`aria-label` 为空字符串时回退为 `Breadcrumbs`。`isDisabled` 通过既有禁用作用域传给内部 `Link`,不复制禁用逻辑。
|
||||
|
||||
### BreadcrumbsItem
|
||||
|
||||
| 属性 | 类型 | 默认值 | 描述 |
|
||||
| ------------ | --------------------------- | --------- | -------------------------------------------------------------------------------- |
|
||||
| `href` | `string` | - | 链接 URL;未提供时渲染不可导航的 `span[role="link"]`,当前项与禁用项也不可导航。 |
|
||||
| `target` | `string` | `'_self'` | 链接目标;仅在带 `href` 的可导航项输出。 |
|
||||
| `rel` | `string` | - | 链接关系。 |
|
||||
| `download` | `boolean \| string` | - | 原生下载属性。 |
|
||||
| `isDisabled` | `boolean` | `false` | 禁用当前项链接。 |
|
||||
| `as` | `string` | `'li'` | 自定义项元素标签;对应上游 `render` 的元素替换。 |
|
||||
| `class` | `string \| Array \| Object` | - | 附加 CSS 类;同时合并到 `li` 与内部链接。 |
|
||||
| 默认插槽 | `{ isCurrent, isDisabled }` | - | 项内容;可用作用域状态渲染条件内容。 |
|
||||
|
||||
`li` 根节点接收除事件处理器外的 `$attrs`;`onClick`、`onKeydown`、`onFocus` 等事件绑定到真实链接,从而复用 `Link` 的禁用拦截与事件顺序。`isLast` 和 `separatorSlot` 由 `Breadcrumbs` 自动注入,不列入公开 `BreadcrumbsItemProps` 类型或 API 表,调用方无需设置。
|
||||
|
||||
### 上游差异
|
||||
|
||||
| 上游 React 能力 | Vue 实现 |
|
||||
| ----------------------------- | ------------------------------------------ |
|
||||
| `Breadcrumbs.Item` 对象子部件 | 独立具名导出 `BreadcrumbsItem` |
|
||||
| `separator: ReactNode` | `#separator` 插槽,默认图标从基线 SVG 移植 |
|
||||
| `render` 函数 | `as` 更换元素,属性直接透传 |
|
||||
| `className` / `children` | `class` / 默认插槽 |
|
||||
| `onAction` | 未提供;使用链接原生行为或 `@click` |
|
||||
|
||||
## 无障碍
|
||||
|
||||
- 根元素是 `ol`,默认带 `aria-label="Breadcrumbs"`。固定基线的 React Aria Components `Breadcrumbs` 实际渲染 `ol` 而不是 `nav`;中文文档中的“导航地标”描述与源码 DOM 不完全一致,本实现以固定提交源码为准。需要独立导航地标时,可由应用在外层使用 `<nav>`。
|
||||
- 默认名称是英文常量,不随 locale 自动本地化;需要本地化时显式传入 `aria-label`。
|
||||
- 最后一项自动附加 `aria-current="page"`,并以 `role="link"`、`aria-disabled="true"`、`tabindex="-1"` 的 `span` 呈现,不可 Tab 聚焦或激活。
|
||||
- 带 `href` 的可导航非当前项使用原生 `a`,支持标准 Tab、Enter 与浏览器链接行为;未提供 `href` 的非当前项、禁用的非当前项与当前项均以 `span[role="link"]` 呈现。禁用/当前项带 `aria-disabled="true"`、`tabindex="-1"`,不保留 `href`,点击被拦截;未禁用的无 `href` 项保留 `tabindex="0"`。RAC 的禁用 span 省略 `tabindex`,Vue Link 保留 `-1` 供程序化聚焦,两者都不能通过 Tab 聚焦。
|
||||
- 分隔符默认标记为 `aria-hidden="true"` 与 `role="presentation"`,不进入可访问名称。
|
||||
|
||||
## 相关组件
|
||||
|
||||
[Link 链接](./link) · [Separator 分隔符](./separator)
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: EmptyState 空状态
|
||||
description: 在列表、搜索结果或集合为空时展示占位提示。
|
||||
component: empty-state
|
||||
group: 组件
|
||||
---
|
||||
|
||||
## 用法
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
import { EmptyState } from "@heroui-vue/components";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<EmptyState />
|
||||
</template>
|
||||
```
|
||||
|
||||
<ComponentPreview name="empty-state-default" />
|
||||
|
||||
> 基线说明:固定上游提交提供 `EmptyState` 源码与样式,但没有独立中文组件页或官方演示。本页与以下示例由本项目依据真实源码(默认文案 `No results found`)和现有空状态消费场景编写,不是上游官方文档内容。
|
||||
|
||||
## 组件结构
|
||||
|
||||
`EmptyState` 是单根展示组件,默认渲染 `div`,样式为基线 `.empty-state` 的 `hv-` 命名空间版本。
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<EmptyState>
|
||||
<span>没有找到匹配的搜索结果。</span>
|
||||
</EmptyState>
|
||||
</template>
|
||||
```
|
||||
|
||||
默认插槽为空、仅包含注释或空白文本时,回退到源码默认文案 `No results found`。只要存在有效内容(文本、数字或元素),就渲染调用方内容,不额外包裹结构。
|
||||
|
||||
## 示例
|
||||
|
||||
### 默认回退
|
||||
|
||||
不提供内容时展示源码默认文案。
|
||||
|
||||
<ComponentPreview name="empty-state-default" />
|
||||
|
||||
### 自定义文案
|
||||
|
||||
<ComponentPreview name="empty-state-custom-content" />
|
||||
|
||||
### 条件内容
|
||||
|
||||
插槽内容由 `v-if` 切换;内容为空时自动回退到默认文案。
|
||||
|
||||
<ComponentPreview name="empty-state-conditional" />
|
||||
|
||||
### 自定义样式
|
||||
|
||||
`class` 与 `$attrs` 合并到根元素,可叠加边框、背景、间距与对齐工具类。
|
||||
|
||||
<ComponentPreview name="empty-state-custom-styles" />
|
||||
|
||||
## 自定义样式
|
||||
|
||||
### Tailwind CSS
|
||||
|
||||
<ComponentPreview name="empty-state-custom-styles" />
|
||||
|
||||
### 全局 CSS
|
||||
|
||||
```css
|
||||
@layer components {
|
||||
.hv-empty-state {
|
||||
@apply py-8 text-center text-base;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 样式参考
|
||||
|
||||
EmptyState 组件使用以下 CSS 类([查看源码样式](https://github.com/heroui-inc/heroui/blob/v3/packages/styles/components/empty-state.css)):
|
||||
|
||||
- `.hv-empty-state` - 基础空状态文本样式(`p-2 text-sm text-muted`)
|
||||
|
||||
基线没有尺寸、颜色、变体或图标插槽等额外 CSS 变体;需要更丰富的空状态布局时,由调用方组合内容与工具类。
|
||||
|
||||
## API 参考
|
||||
|
||||
### EmptyState
|
||||
|
||||
| 属性 | 类型 | 默认值 | 描述 |
|
||||
| -------- | --------------------------- | ------- | ------------------------------------------------ |
|
||||
| `as` | `string` | `'div'` | 自定义根元素标签;对应上游 `render` 的元素替换。 |
|
||||
| `class` | `string \| Array \| Object` | - | 附加 CSS 类(Vue class 绑定)。 |
|
||||
| 默认插槽 | - | - | 空状态内容;无有效内容时回退默认文案。 |
|
||||
|
||||
`$attrs`(`aria-*`、`data-*`、`id`、`style`、事件等)透传至根元素。组件没有受控值、内部状态、事件或暴露方法。
|
||||
|
||||
## 相关组件
|
||||
|
||||
[Typography 排版](./typography) · [SearchField 搜索框](./search-field)
|
||||
@@ -0,0 +1,193 @@
|
||||
---
|
||||
title: Typography 排版
|
||||
description: 面向标题、正文与行内代码的语义化排版原语。
|
||||
component: typography
|
||||
group: 组件
|
||||
---
|
||||
|
||||
## 用法
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
import { Typography } from "@heroui-vue/components";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Typography type="h1">Heading</Typography>
|
||||
</template>
|
||||
```
|
||||
|
||||
<ComponentPreview name="typography-default" />
|
||||
|
||||
> 示例中的 `pnpm add @heroui/react` 沿用固定基线文案;本 Vue 项目的实际包名与安装命令以[安装指南](../guide)为准。
|
||||
|
||||
## 组件结构
|
||||
|
||||
默认情况下,`Typography` 会将视觉上的 `type` 映射到对应的语义化元素。
|
||||
|
||||
```vue
|
||||
<script setup lang="ts">
|
||||
import { Typography } from "@heroui-vue/components";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Typography type="h1">Heading</Typography>
|
||||
</template>
|
||||
```
|
||||
|
||||
| `type` | 默认元素 |
|
||||
| ---------------------------- | ----------- |
|
||||
| `h1` – `h6` | `h1` – `h6` |
|
||||
| `body`、`body-sm`、`body-xs` | `p` |
|
||||
| `code` | `code` |
|
||||
|
||||
需要保留视觉类型但更换语义元素时,使用 `as`。它对应上游的 `render` 自定义渲染能力。
|
||||
|
||||
```vue
|
||||
<Typography type="h1" as="h2">H1 视觉样式,h2 语义元素</Typography>
|
||||
```
|
||||
|
||||
## 示例
|
||||
|
||||
### 层级
|
||||
|
||||
<ComponentPreview name="typography-typography-scale" />
|
||||
|
||||
### 原语
|
||||
|
||||
<ComponentPreview name="typography-primitives" />
|
||||
|
||||
- `TypographyHeading` 将 `level`(1–6)映射为 `type="h1"` 至 `type="h6"`。
|
||||
- `TypographyParagraph` 将 `size="base" | "sm" | "xs"` 映射为正文样式。
|
||||
- `TypographyCode` 映射为行内代码样式。
|
||||
- `TypographyProse` 为以常规 HTML 子节点传入的富文本内容提供排版样式。
|
||||
|
||||
上游以 `Typography.Heading`、`Typography.Paragraph`、`Typography.Code` 和
|
||||
`Typography.Prose` 对象属性提供这些原语;Vue 版按本库约定改为独立具名导出。
|
||||
|
||||
### 富文本排版
|
||||
|
||||
<ComponentPreview name="typography-prose" />
|
||||
|
||||
### 渲染属性
|
||||
|
||||
<ComponentPreview name="typography-render-props" />
|
||||
|
||||
React 的 `render` 由 Vue 的 `as` 属性替代,只更换实际渲染元素,不改变
|
||||
`type` 对应的视觉样式与 `data-type`。
|
||||
|
||||
## 自定义样式
|
||||
|
||||
### Tailwind CSS
|
||||
|
||||
<ComponentPreview name="typography-custom-styles" />
|
||||
|
||||
### 全局 CSS
|
||||
|
||||
若要自定义 Typography 组件类,可使用 `@layer components` 指令。
|
||||
|
||||
```css
|
||||
@layer components {
|
||||
.hv-typography--h1 {
|
||||
@apply font-extrabold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography--code {
|
||||
@apply rounded-md bg-default-100 font-mono dark:bg-default-50/20;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 样式参考
|
||||
|
||||
HeroUI 遵循 [BEM](https://getbem.com/) 方法论,确保组件变体与状态可复用且易于自定义。类名前缀为 `hv-`。
|
||||
|
||||
### CSS 类
|
||||
|
||||
Typography 组件使用以下 CSS 类([查看源码样式](https://github.com/heroui-inc/heroui/blob/v3/packages/styles/components/typography.css)):
|
||||
|
||||
#### 基础类 [!toc]
|
||||
|
||||
- `.hv-typography` - 排版基础原语
|
||||
- `.hv-typography-prose` - 富文本文章体容器
|
||||
|
||||
#### 类型类 [!toc]
|
||||
|
||||
- `.hv-typography--h1` 至 `.hv-typography--h6`
|
||||
- `.hv-typography--body`、`.hv-typography--body-sm`、`.hv-typography--body-xs`
|
||||
- `.hv-typography--code`
|
||||
|
||||
#### 修饰类 [!toc]
|
||||
|
||||
- `.hv-typography--align-start`、`.hv-typography--align-center`、`.hv-typography--align-end`、`.hv-typography--align-justify`
|
||||
- `.hv-typography--color-default`、`.hv-typography--color-muted`
|
||||
- `.hv-typography--truncate`
|
||||
- `.hv-typography--weight-normal`、`.hv-typography--weight-medium`、`.hv-typography--weight-semibold`、`.hv-typography--weight-bold`
|
||||
|
||||
## API 参考
|
||||
|
||||
### Typography
|
||||
|
||||
| 属性 | 类型 | 默认值 | 说明 |
|
||||
| ---------- | -------------------------------------------------------------------------------------------- | -------------- | ----------------------------------------- |
|
||||
| `type` | `'h1' \| 'h2' \| 'h3' \| 'h4' \| 'h5' \| 'h6' \| 'body' \| 'body-sm' \| 'body-xs' \| 'code'` | `'body'` | 语义化排版样式与默认元素。 |
|
||||
| `align` | `'start' \| 'center' \| 'end' \| 'justify'` | `'start'` | 文本对齐。 |
|
||||
| `color` | `'default' \| 'muted'` | `'default'` | 文本颜色。 |
|
||||
| `weight` | `'normal' \| 'medium' \| 'semibold' \| 'bold'` | - | 字重覆盖。 |
|
||||
| `truncate` | `boolean` | `false` | 将文本截断为单行并显示省略号。 |
|
||||
| `as` | `string` | 由 `type` 决定 | 自定义实际渲染的元素;替代上游 `render`。 |
|
||||
| `class` | `string \| Array \| Object` | - | 附加 CSS 类(Vue class 绑定)。 |
|
||||
| 默认插槽 | - | - | 文本内容。 |
|
||||
|
||||
`$attrs`(`aria-*`、`data-*`、`id`、`style`、事件等)透传至实际根元素。组件不修改传入内容,也没有内部值或事件。
|
||||
|
||||
### TypographyHeading
|
||||
|
||||
| 属性 | 类型 | 默认值 | 说明 |
|
||||
| ---------- | ---------------------------------------------- | --------------- | ----------------------------------- |
|
||||
| `level` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `1` | 映射到 `h1` – `h6` 与对应视觉样式。 |
|
||||
| `align` | `'start' \| 'center' \| 'end' \| 'justify'` | `'start'` | 文本对齐。 |
|
||||
| `color` | `'default' \| 'muted'` | `'default'` | 文本颜色。 |
|
||||
| `weight` | `'normal' \| 'medium' \| 'semibold' \| 'bold'` | - | 字重覆盖。 |
|
||||
| `truncate` | `boolean` | `false` | 单行截断。 |
|
||||
| `as` | `string` | 由 `level` 决定 | 自定义实际渲染的元素。 |
|
||||
| `class` | `string \| Array \| Object` | - | 附加 CSS 类。 |
|
||||
| 默认插槽 | - | - | 标题内容。 |
|
||||
|
||||
### TypographyParagraph
|
||||
|
||||
| 属性 | 类型 | 默认值 | 说明 |
|
||||
| ---------- | ---------------------------------------------- | ----------- | ------------------------------------- |
|
||||
| `size` | `'base' \| 'sm' \| 'xs'` | `'base'` | 映射到 `body`、`body-sm`、`body-xs`。 |
|
||||
| `align` | `'start' \| 'center' \| 'end' \| 'justify'` | `'start'` | 文本对齐。 |
|
||||
| `color` | `'default' \| 'muted'` | `'default'` | 文本颜色。 |
|
||||
| `weight` | `'normal' \| 'medium' \| 'semibold' \| 'bold'` | - | 字重覆盖。 |
|
||||
| `truncate` | `boolean` | `false` | 单行截断。 |
|
||||
| `as` | `string` | `'p'` | 自定义实际渲染的元素。 |
|
||||
| `class` | `string \| Array \| Object` | - | 附加 CSS 类。 |
|
||||
| 默认插槽 | - | - | 正文内容。 |
|
||||
|
||||
### TypographyCode
|
||||
|
||||
| 属性 | 类型 | 默认值 | 说明 |
|
||||
| ---------- | ---------------------------------------------- | ----------- | ---------------------- |
|
||||
| `align` | `'start' \| 'center' \| 'end' \| 'justify'` | `'start'` | 文本对齐。 |
|
||||
| `color` | `'default' \| 'muted'` | `'default'` | 文本颜色。 |
|
||||
| `weight` | `'normal' \| 'medium' \| 'semibold' \| 'bold'` | - | 字重覆盖。 |
|
||||
| `truncate` | `boolean` | `false` | 单行截断。 |
|
||||
| `as` | `string` | `'code'` | 自定义实际渲染的元素。 |
|
||||
| `class` | `string \| Array \| Object` | - | 附加 CSS 类。 |
|
||||
| 默认插槽 | - | - | 行内代码内容。 |
|
||||
|
||||
### TypographyProse
|
||||
|
||||
| 属性 | 类型 | 默认值 | 说明 |
|
||||
| -------- | --------------------------- | ------ | ---------------------- |
|
||||
| `class` | `string \| Array \| Object` | - | 附加 CSS 类。 |
|
||||
| 默认插槽 | - | - | 常规 HTML 富文本内容。 |
|
||||
|
||||
`TypographyProse` 固定渲染 `div`,内部标题、段落、列表、引用、代码块、链接、图片等使用基线排版规则。`$attrs` 透传至该 `div`。
|
||||
|
||||
## 相关组件
|
||||
|
||||
[Card 卡片](./card) · [Kbd 键盘按键](./kbd)
|
||||
Reference in New Issue
Block a user