Appearance
Welcome 欢迎页 / 空状态
AI 对话的空状态 / 欢迎页,展示标题、描述和引导提示词。
在线演示
Props
| Prop | 类型 | 默认值 | 说明 |
|---|---|---|---|
title | string | '你好!' | 欢迎标题 |
description | string | '' | 欢迎描述 |
icon | string | undefined | 欢迎图标 URL |
prompts | PromptItem[] | [] | 引导提示词 |
Slots:default(完全自定义欢迎内容)/ icon / prompts
用法
vue
<Welcome
title="你好,我是 AI 助手"
description="我可以帮你写作、总结、解答问题"
:prompts="[
{ key: '1', label: '写一首诗', icon: '📜' },
{ key: '2', label: '总结文档', icon: '📄' },
]"
/>结合场景
Welcome 通常作为对话的空状态:当 BubbleList / Conversations 的 list 为空时展示,用户点击引导提示词后进入对话。
vue
<template>
<Welcome v-if="!messages.length" :prompts="prompts" />
<BubbleList v-else :list="messages" />
</template>