组件
AI 回复 AI Response
AI Markdown 渲染:内容渲染通过 `@tanstack/markdown` 完成;默认配置让原始 HTML 和可执行链接保持不可执行,因此在结构上就是流式安全的。可选高亮器会重新着色围栏代码块,组件不关心由哪个引擎提供。
#基础用法
The paper-and-ink system
Interfaces are warm paper; content is ink. A hairline divides, light elevates, and nothing pops.
- Ground in ambient shade
- Ink carries hierarchy
- Pigment only where it means
<script setup lang="ts">
import { AiResponse } from "@bysages/vue";
</script>
<template>
<div class="w-full">
<AiResponse
content="## The paper-and-ink system
Interfaces are warm paper; content is ink. A `hairline` divides, light elevates, and nothing pops.
1. Ground in ambient shade
2. Ink carries hierarchy
3. Pigment only where it means"
/>
</div>
</template>
#属性
#AiResponse
AI Markdown 渲染:内容渲染通过 @tanstack/markdown 完成;默认配置让原始 HTML 和可执行链接保持不可执行,因此在结构上就是流式安全的。可选高亮器会重新着色围栏代码块,组件不关心由哪个引擎提供。
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
content | String | 显示在内容区的 markdown 文本,可自由流式传入;原始 HTML 和可执行链接不会生效 | |
highlighter | Function as PropType<(code: string, lang?: string) => string> | undefined | 可选的代码高亮函数,用于重绘围栏代码块;组件不关心高亮引擎 |
copyLabel | String | "Copy code" | 复制前复制按钮的无障碍名称 |
copiedLabel | String | "Copied" | 复制完成后复制按钮的无障碍名称 |