构件 ai-portal.chat-input
Examples
Basic
Properties
| Name | Description | Type | Default | Required |
|---|
placeholder | | string | | |
autoFocus | | boolean | | |
submitDisabled | | boolean | | |
supportsTerminate | | boolean | | |
terminating | | boolean | | |
autoFade | | boolean | | |
uploadOptions | | UploadOptions | | |
aiEmployees | | AIEmployee[] | | |
commands | | Command[] | | |
suggestionsPlacement | | "top" | "bottom" | "bottom" | |
Events
| Name | Description | Event Detail |
|---|
message.submit | | string |
chat.submit | | ChatPayload |
terminate | | void |
Methods
| Name | Description | Params | Returns |
|---|
setValue | | value: string | |
Type references
UploadOptions
| Name | Description | Type | Default | Required |
|---|
enabled | | boolean | | |
dragDisabled | | boolean | | |
dragTips | | string | | |
accept | | string | | |
maxFiles | | number | | |
maxSize | In bytes | number | | |
readableAccept | | string | | |
readableMaxSize | | string | | |
AIEmployee
| Name | Description | Type | Default | Required |
|---|
employeeId | | string | | ✅ |
name | | string | | ✅ |
Command
| Name | Description | Type | Default | Required |
|---|
label | | string | | ✅ |
value | | string | | ✅ |
groupKey | | string | | |
groupLabel | | string | | |
subCommands | | Command[] | | |
payload | | CommandPayload | | |
ChatPayload
extends ExtraChatPayload
| Name | Description | Type | Default | Required |
|---|
content | | string | | ✅ |
| Name | Description | Type | Default | Required |
|---|
files | | UploadFileInfo[] | | |
cmd | | CommandPayload | null | | |
aiEmployeeId | | string | null | | |
UploadFileInfo
| Name | Description | Type | Default | Required |
|---|
fileId | | string | | ✅ |