elevo-sidebar
<ai-portal.elevo-sidebar>构件 ai-portal.elevo-sidebar
Examples
Basic
Properties
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
userInstanceId | string | |||
behavior | "default" | "drawer" | |||
logoUrl | string | |||
newChatUrl | string | |||
newChatLinkWhenCollapsed | boolean | |||
historyUrlTemplate | string | |||
historyActions | ActionType[] | |||
showProjects | boolean | |||
projectUrlTemplate | string | |||
projectActions | ActionType[] | |||
personalActions | ActionType[] | |||
links | SidebarLink[] | |||
canAddProject | boolean | true | ||
myLinks | SidebarLink[] | |||
scope | "default" | "space" | "default" | ||
spaceNav | SpaceNavProps |
Events
| Name | Description | Event Detail |
|---|---|---|
logout | void | |
action.click | 点击对话历史操作按钮时触发 | ActionClickDetail |
project.action.click | 点击项目操作按钮时触发 | ProjectActionClickDetail |
add.project | void | |
add.serviceflow | void | |
personal.action.click | 点击个人操作按钮时触发 | PersonalActionClickDetail |
Methods
| Name | Description | Params | Returns |
|---|---|---|---|
pullHistory | delay: number | ||
open | |||
close | |||
removeProject | projectId: string | ||
addProject | project: Project | ||
moveConversation | conversationId: string |
Type references
SidebarLink
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
title | string | ✅ | ||
url | string | ✅ | ||
icon | GeneralIconProps | |||
activeIncludes | string[] |
SpaceNavProps
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
returnUrl | string | ✅ | ||
introUrl | string | ✅ | ||
spaceDetail | { instanceId: string; name: string; icon?: GeneralIconProps & { color?: string } } | ✅ | ||
spaceObjects | SidebarLink[] | |||
spaceServiceflows | SidebarLink[] | |||
spaceLinks | SidebarLink[] |
ActionClickDetail
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
action | SimpleActionType & { project?: Project } | ✅ | ||
item | HistoryItem | ✅ | ||
project | Project |
Project
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
instanceId | 实例ID | string | ✅ | |
name | 项目名称 | string | ✅ | |
description | 项目描述 | string | ✅ | |
state | 状态 | "active" | "inactive" | ✅ | |
defaultAiEmployeeId | 默认数字人ID | string | ✅ | |
creator | 创建者 | string | ✅ | |
ctime | 创建时间 | string | ✅ | |
mtime | 修改时间 | string | ✅ | |
modifier | 修改者 | string | ✅ |
HistoryItem
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
conversationId | string | ✅ | ||
title | string | ✅ | ||
startTime | number | ✅ | ||
state | ConversationState |
ProjectActionClickDetail
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
action | SimpleActionType | ✅ | ||
project | Project | ✅ |
PersonalActionClickDetail
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
action | SimpleActionType | ✅ |