Welcome 欢迎页
用于 AI 对话空状态或开屏引导,支持图标、标题、描述及推荐词插槽组合。
基础用法
你好,我是 Bobo AI 助手
支持代码生成、对话问答、工具调用与参考来源溯源。
<script setup>
import Welcome from '@/vue/components/Welcome.vue'
import Prompts from '@/vue/components/Prompts.vue'
const items = [
{ key: '1', label: '帮我重构这段代码', description: '提升可读性与类型安全', icon: 'code' },
{ key: '2', label: '总结文档要点', description: '提取关键结论与行动项', icon: 'file-lines' }
]
</script>
<template>
<Welcome
title="你好,我是 Bobo AI 助手"
description="支持代码生成、对话问答、工具调用与参考来源溯源。"
variant="filled"
>
<Prompts :items="items" layout="grid" />
</Welcome>
</template>API
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| title | 欢迎标题 | string | — |
| description | 欢迎描述 | string | — |
| icon | 图标名称 | string | 'sparkles' |
| variant | 外观样式 | 'borderless' | 'filled' | 'borderless' |
| align | 对齐方式 | 'left' | 'center' | 'left' |
