ADP-Chat-Client
组件介绍/基础组件/布局组件

MainLayout

主内容区布局组件

MainLayout

聊天主内容区布局,包含头部、聊天区域和底部警告。

vue中使用

<template>
  <MainLayout
    :current-application-name="appName"
    :current-application-avatar="appAvatar"
    :chat-id="chatId"
    :chat-list="chatList"
    :is-chatting="isChatting"
    @send="handleSend"
    @toggle-sidebar="handleToggleSidebar"
  />
</template>

html/react或其他框架中使用

<div id="containerId"></div>
<script>
ADPChatComponent.MainLayout.mount('#containerId', { })
</script>

API

Props

属性名类型默认值说明
currentApplicationAvatarstring''当前应用头像
currentApplicationNamestring''当前应用名称
currentApplicationGreetingstring''当前应用欢迎语
currentApplicationOpeningQuestionsstring[][]当前应用推荐问题列表
currentApplicationIdstring''当前应用ID
chatIdstring''当前会话ID
chatListRecord[][]聊天消息列表
isChattingbooleanfalse是否正在聊天中
modelOptionsany[][]模型选项列表
selectModelany-当前选中的模型
isDeepThinkingbooleantrue是否启用深度思考模式
isMobilebooleanfalse是否为移动端
theme'light' | 'dark''light'主题模式
showSidebarTogglebooleantrue是否显示侧边栏切换按钮
aiWarningTextstring'内容由AI生成,仅供参考'AI警告文本
i18nobject-国际化文本
chatItemI18nobject-ChatItem 国际化文本
senderI18nobject-Sender 国际化文本

Slots

插槽名说明
header-close-content头部关闭按钮区域
empty-content空内容区域

On this page