Skip to content

Commit ad0ef45

Browse files
authored
chore: add procomponent path for chat docs path (#762)
* chore: fix chat docs path * chore: fix 文档路径 * chore: 修改 生成 props.ts type.ts的路径 * chore: 文档更新
1 parent f78f4d6 commit ad0ef45

File tree

17 files changed

+35
-25
lines changed

17 files changed

+35
-25
lines changed

packages/products/tdesign-miniprogram/packages/pro-components/chat/attachments/README.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ style | Object | - | CSS(Cascading Style Sheets) | N
1010
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
1111
addable | Boolean | true | \- | N
1212
image-viewer | Boolean | true | \- | N
13-
items | Array | [] | Typescript: `FileItem[]` `interface FileItem { fileType: 'image'\|'video'\|'audio'\|'pdf'\|'doc'\|'ppt'\|'txt'; name: string; url: string; size: number; status?: 'success'\|'fail'\|'pending'\|'error'; progress?: number; errorMessage?: string; fileIcon?: string; width?: number; height?: number; mode?: 'aspectFit' \| 'aspectFill' \| 'widthFix' \| 'heightFix' \| 'scaleToFill'}`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/attachments/type.ts) | N
13+
items | Array | [] | Typescript: `FileItem[]` `interface FileItem { fileType: 'image'\|'video'\|'audio'\|'pdf'\|'doc'\|'ppt'\|'txt'; name: string; url: string; size: number; status?: 'success'\|'fail'\|'pending'\|'error'; progress?: number; errorMessage?: string; fileIcon?: string; width?: number; height?: number; mode?: 'aspectFit' \| 'aspectFill' \| 'widthFix' \| 'heightFix' \| 'scaleToFill'}`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/attachments/type.ts) | N
1414
removable | Boolean | true | \- | N
1515

1616
### Attachments Events

packages/products/tdesign-miniprogram/packages/pro-components/chat/attachments/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ style | Object | - | 样式 | N
1010
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
1111
addable | Boolean | true | 【讨论中】是否显示添加按钮 | N
1212
image-viewer | Boolean | true | 是否启用图片预览功能 | N
13-
items | Array | [] | 【实验】附件列表。TS 类型:`FileItem[]` `interface FileItem { fileType: 'image'\|'video'\|'audio'\|'pdf'\|'doc'\|'ppt'\|'txt'; name: string; url: string; size: number; status?: 'success'\|'fail'\|'pending'\|'error'; progress?: number; errorMessage?: string; fileIcon?: string; width?: number; height?: number; mode?: 'aspectFit' \| 'aspectFill' \| 'widthFix' \| 'heightFix' \| 'scaleToFill'}`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/attachments/type.ts) | N
13+
items | Array | [] | 【实验】附件列表。TS 类型:`FileItem[]` `interface FileItem { fileType: 'image'\|'video'\|'audio'\|'pdf'\|'doc'\|'ppt'\|'txt'; name: string; url: string; size: number; status?: 'success'\|'fail'\|'pending'\|'error'; progress?: number; errorMessage?: string; fileIcon?: string; width?: number; height?: number; mode?: 'aspectFit' \| 'aspectFill' \| 'widthFix' \| 'heightFix' \| 'scaleToFill'}`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/attachments/type.ts) | N
1414
removable | Boolean | true | 是否显示删除按钮 | N
1515

1616
### Attachments Events

packages/products/tdesign-miniprogram/packages/pro-components/chat/chat-content/README.en-US.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name | type | default | description | required
88
-- | -- | -- | -- | --
99
style | Object | - | CSS(Cascading Style Sheets) | N
1010
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
11-
content | Object | - | required。Typescript: `TdChatContentType ` `interface TdChatContentType { type: 'text' \| 'markdown'; data: string; }`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/chat-content/type.ts) | Y
12-
markdown-props | Object | - | Typescript: `ChatMarkdownProps`[ChatMarkdown API Documents](./chat-markdown?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/chat-content/type.ts) | N
11+
content | Object | - | required。Typescript: `TdChatContentType ` `interface TdChatContentType { type: 'text' \| 'markdown'; data: string; }`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/chat-content/type.ts) | Y
12+
markdown-props | Object | - | Typescript: `ChatMarkdownProps`[ChatMarkdown API Documents](./chat-markdown?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/chat-content/type.ts) | N
1313
role | String | - | required。options: user/assistant/system | Y
1414
status | String | - | options: error / '' | N

packages/products/tdesign-miniprogram/packages/pro-components/chat/chat-content/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-- | -- | -- | -- | --
99
style | Object | - | 样式 | N
1010
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
11-
content | Object | - | 必需。聊天内容对象。TS 类型:`TdChatContentType ` `interface TdChatContentType { type: 'text' \| 'markdown'; data: string; }`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/chat-content/type.ts) | Y
12-
markdown-props | Object | - | marked 解析器的配置选项。TS 类型:`ChatMarkdownProps`[ChatMarkdown API Documents](./chat-markdown?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/chat-content/type.ts) | N
11+
content | Object | - | 必需。聊天内容对象。TS 类型:`TdChatContentType ` `interface TdChatContentType { type: 'text' \| 'markdown'; data: string; }`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/chat-content/type.ts) | Y
12+
markdown-props | Object | - | marked 解析器的配置选项。TS 类型:`ChatMarkdownProps`[ChatMarkdown API Documents](./chat-markdown?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/chat-content/type.ts) | N
1313
role | String | - | 必需。消息角色,用于区分用户和助手的消息样式 。可选项:user/assistant/system | Y
1414
status | String | - | 正文状态。可选项:error / '' | N

packages/products/tdesign-miniprogram/packages/pro-components/chat/chat-list/README.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name | type | default | description | required
99
style | Object | - | CSS(Cascading Style Sheets) | N
1010
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
1111
animation | String | skeleton | options: skeleton/moving/gradient | N
12-
data | Array | - | Typescript: `Array<TdChatItemMeta>` ` interface TdChatItemMeta { avatar?: string; name?:string; role?:string; datetime?: string; content?: string; reasoning?: string }`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/chat-list/type.ts) | N
12+
data | Array | - | Typescript: `Array<TdChatItemMeta>` ` interface TdChatItemMeta { avatar?: string; name?:string; role?:string; datetime?: string; content?: string; reasoning?: string }`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/chat-list/type.ts) | N
1313
layout | String | both | options: both/single | N
1414
reverse | Boolean | true | \- | N
1515

packages/products/tdesign-miniprogram/packages/pro-components/chat/chat-list/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
style | Object | - | 样式 | N
1010
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
1111
animation | String | skeleton | 动画效果,支持「渐变加载动画」,「闪烁加载动画」, 「骨架屏」三种。可选项:skeleton/moving/gradient | N
12-
data | Array | - | 对话列表的数据。TS 类型:`Array<TdChatItemMeta>` ` interface TdChatItemMeta { avatar?: string; name?:string; role?:string; datetime?: string; content?: string; reasoning?: string }`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/chat-list/type.ts) | N
12+
data | Array | - | 对话列表的数据。TS 类型:`Array<TdChatItemMeta>` ` interface TdChatItemMeta { avatar?: string; name?:string; role?:string; datetime?: string; content?: string; reasoning?: string }`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/chat-list/type.ts) | N
1313
layout | String | both | 对话布局形式,支持两侧对齐与左对齐。使用插槽自定义对话内容时不生效,得用`t-chat-message``placement`属性。。可选项:both/single | N
1414
reverse | Boolean | true | 是否表现为倒序 | N
1515

packages/products/tdesign-miniprogram/packages/pro-components/chat/chat-markdown/README.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name | type | default | description | required
99
style | Object | - | CSS(Cascading Style Sheets) | N
1010
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
1111
content | String | - | required | Y
12-
options | Object | { gfm: true, pedantic: false, breaks: true } | Typescript: `TdChatContentMDOptions ` `interface TdChatContentMDOptions {gfm?: boolean; pedantic?: boolean; smartLists?: boolean; breaks?: boolean}`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/chat-markdown/type.ts) | N
12+
options | Object | { gfm: true, pedantic: false, breaks: true } | Typescript: `TdChatContentMDOptions ` `interface TdChatContentMDOptions {gfm?: boolean; pedantic?: boolean; smartLists?: boolean; breaks?: boolean}`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/chat-markdown/type.ts) | N
1313

1414
### ChatMarkdown Events
1515

packages/products/tdesign-miniprogram/packages/pro-components/chat/chat-markdown/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
style | Object | - | 样式 | N
1010
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
1111
content | String | - | 必需。markdown 内容文本 | Y
12-
options | Object | { gfm: true, pedantic: false, breaks: true } | Markdown 解析器基础配置。TS 类型:`TdChatContentMDOptions ` `interface TdChatContentMDOptions {gfm?: boolean; pedantic?: boolean; smartLists?: boolean; breaks?: boolean}`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/chat-markdown/type.ts) | N
12+
options | Object | { gfm: true, pedantic: false, breaks: true } | Markdown 解析器基础配置。TS 类型:`TdChatContentMDOptions ` `interface TdChatContentMDOptions {gfm?: boolean; pedantic?: boolean; smartLists?: boolean; breaks?: boolean}`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/chat-markdown/type.ts) | N
1313

1414
### ChatMarkdown Events
1515

packages/products/tdesign-miniprogram/packages/pro-components/chat/chat-message/README.en-US.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on v
1111
allow-content-segment-custom | Boolean | false | \- | N
1212
animation | String | skeleton | options: skeleton/moving/gradient/dots | N
1313
avatar | String | - | \- | N
14-
chat-content-props | Object | - | Typescript: `ChatContentProps`[ChatContent API Documents](./chat-content?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/chat-message/type.ts) | N
14+
chat-content-props | Object | - | Typescript: `ChatContentProps`[ChatContent API Documents](./chat-content?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/chat-message/type.ts) | N
1515
chat-id | String | - | \- | N
16-
content | Array | - | Typescript: `ChatMessageContent[] ` `type ChatMessageContent = TextContent \| MarkdownContent \| ThinkingContent \| AttachmentContent` ` type AttachmentContent = ChatBaseContent<'attachment', FileItem[]>` `type ThinkingContent = ChatBaseContent<'thinking', ThinkingContentData>` `type MarkdownContent = ChatBaseContent<'markdown', string>` `type TextContent = ChatBaseContent<'text', string>` `interface ThinkingContentData {title?: string; text: string}` `interface ChatBaseContent<T extends ChatContentType, TData> {type: T; data: TData}` `type ChatMessageStatus = 'pending' \| 'streaming' \| 'complete' \| 'stop' \| 'error'` `type ChatContentType = \| 'text' \| 'markdown' \| 'thinking' \| 'attachment'`[Attachments API Documents](./attachments?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/chat-message/type.ts) | N
16+
content | Array | - | Typescript: `ChatMessageContent[] ` `type ChatMessageContent = TextContent \| MarkdownContent \| ThinkingContent \| AttachmentContent` ` type AttachmentContent = ChatBaseContent<'attachment', FileItem[]>` `type ThinkingContent = ChatBaseContent<'thinking', ThinkingContentData>` `type MarkdownContent = ChatBaseContent<'markdown', string>` `type TextContent = ChatBaseContent<'text', string>` `interface ThinkingContentData {title?: string; text: string}` `interface ChatBaseContent<T extends ChatContentType, TData> {type: T; data: TData}` `type ChatMessageStatus = 'pending' \| 'streaming' \| 'complete' \| 'stop' \| 'error'` `type ChatContentType = \| 'text' \| 'markdown' \| 'thinking' \| 'attachment'`[Attachments API Documents](./attachments?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/chat-message/type.ts) | N
1717
datetime | String | - | \- | N
1818
name | String | - | \- | N
1919
placement | String | - | options: left/right | N

packages/products/tdesign-miniprogram/packages/pro-components/chat/chat-message/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场
1111
allow-content-segment-custom | Boolean | false | 【实验】 是否允许自定义局部消息内容,其他消息内容实用默认样式 | N
1212
animation | String | skeleton | 动画效果。可选项:skeleton/moving/gradient/dots | N
1313
avatar | String | - | 自定义的头像配置 | N
14-
chat-content-props | Object | - | 聊天内容组件的属性。TS 类型:`ChatContentProps`[ChatContent API Documents](./chat-content?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/chat-message/type.ts) | N
14+
chat-content-props | Object | - | 聊天内容组件的属性。TS 类型:`ChatContentProps`[ChatContent API Documents](./chat-content?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/chat-message/type.ts) | N
1515
chat-id | String | - | 聊天消息的唯一标识 | N
16-
content | Array | - | 消息内容,数组中的每一项为一个消息内容对象。TS 类型:`ChatMessageContent[] ` `type ChatMessageContent = TextContent \| MarkdownContent \| ThinkingContent \| AttachmentContent` ` type AttachmentContent = ChatBaseContent<'attachment', FileItem[]>` `type ThinkingContent = ChatBaseContent<'thinking', ThinkingContentData>` `type MarkdownContent = ChatBaseContent<'markdown', string>` `type TextContent = ChatBaseContent<'text', string>` `interface ThinkingContentData {title?: string; text: string}` `interface ChatBaseContent<T extends ChatContentType, TData> {type: T; data: TData}` `type ChatMessageStatus = 'pending' \| 'streaming' \| 'complete' \| 'stop' \| 'error'` `type ChatContentType = \| 'text' \| 'markdown' \| 'thinking' \| 'attachment'`[Attachments API Documents](./attachments?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/chat-message/type.ts) | N
16+
content | Array | - | 消息内容,数组中的每一项为一个消息内容对象。TS 类型:`ChatMessageContent[] ` `type ChatMessageContent = TextContent \| MarkdownContent \| ThinkingContent \| AttachmentContent` ` type AttachmentContent = ChatBaseContent<'attachment', FileItem[]>` `type ThinkingContent = ChatBaseContent<'thinking', ThinkingContentData>` `type MarkdownContent = ChatBaseContent<'markdown', string>` `type TextContent = ChatBaseContent<'text', string>` `interface ThinkingContentData {title?: string; text: string}` `interface ChatBaseContent<T extends ChatContentType, TData> {type: T; data: TData}` `type ChatMessageStatus = 'pending' \| 'streaming' \| 'complete' \| 'stop' \| 'error'` `type ChatContentType = \| 'text' \| 'markdown' \| 'thinking' \| 'attachment'`[Attachments API Documents](./attachments?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/pro-components/chat/chat-message/type.ts) | N
1717
datetime | String | - | 对话单元的时间配置 | N
1818
name | String | - | 自定义的昵称 | N
1919
placement | String | - | 消息显示位置。可选项:left/right | N

0 commit comments

Comments
 (0)