Skip to content

Commit 958458b

Browse files
committed
docs: update api docs
1 parent 4e237ce commit 958458b

File tree

17 files changed

+19
-34
lines changed

17 files changed

+19
-34
lines changed

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/pro-components/chat/attachments/type.ts) | N
13+
items | Array | [] | required。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) | Y
1414
removable | Boolean | true | \- | N
1515

1616
### Attachments Events

packages/pro-components/chat/attachments/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ style | Object | - | 样式 | N
5454
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
5555
addable | Boolean | true | 【讨论中】是否显示添加按钮 | N
5656
image-viewer | Boolean | true | 是否启用图片预览功能 | N
57-
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
57+
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) | Y
5858
removable | Boolean | true | 是否显示删除按钮 | N
5959

6060
### Attachments Events

packages/pro-components/chat/attachments/props.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ const props: TdAttachmentsProps = {
1616
type: Boolean,
1717
value: true,
1818
},
19-
/** 【实验】附件列表 */
19+
/** 附件列表 */
2020
items: {
2121
type: Array,
2222
value: [],
23+
required: true,
2324
},
2425
/** 是否显示删除按钮 */
2526
removable: {

packages/pro-components/chat/attachments/type.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ export interface TdAttachmentsProps {
2222
value?: boolean;
2323
};
2424
/**
25-
* 【实验】附件列表
25+
* 附件列表
2626
* @default []
2727
*/
28-
items?: {
28+
items: {
2929
type: ArrayConstructor;
3030
value?: FileItem[];
31+
required?: boolean;
3132
};
3233
/**
3334
* 是否显示删除按钮

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ 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-
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/pro-components/chat/chat-list/type.ts) | N
11+
animation | String | skeleton | options: skeleton/moving/gradient/dot | N
12+
data | Array | - | Typescript: `Array<TdChatItemMeta>` ` interface TdChatItemMeta { avatar?: string; name?:string; role?:string; datetime?: string; content?: string; status?: 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/pro-components/chat/chat-list/README.md

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

6969
### ChatList Events

packages/pro-components/chat/chat-list/props.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const props: TdChatListProps = {
1515
data: {
1616
type: Array,
1717
},
18-
/** 对话布局形式,支持两侧对齐与左对齐。使用插槽自定义对话内容时不生效,得用`t-chat-message`的`placement`属性 */
18+
/** 对话布局形式,支持两侧对齐与左对齐。使用插槽自定义对话内容时不生效,得用`t-chat-message`的`placement`属性 */
1919
layout: {
2020
type: String,
2121
value: 'both',

packages/pro-components/chat/chat-list/type.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface TdChatListProps {
1111
*/
1212
animation?: {
1313
type: StringConstructor;
14-
value?: 'skeleton' | 'moving' | 'gradient';
14+
value?: 'skeleton' | 'moving' | 'gradient' | 'dot';
1515
};
1616
/**
1717
* 对话列表的数据
@@ -21,7 +21,7 @@ export interface TdChatListProps {
2121
value?: Array<TdChatItemMeta>;
2222
};
2323
/**
24-
* 对话布局形式,支持两侧对齐与左对齐。使用插槽自定义对话内容时不生效,得用`t-chat-message`的`placement`属性
24+
* 对话布局形式,支持两侧对齐与左对齐。使用插槽自定义对话内容时不生效,得用`t-chat-message`的`placement`属性
2525
* @default both
2626
*/
2727
layout?: {
@@ -44,5 +44,5 @@ export interface TdChatItemMeta {
4444
role?: string;
4545
datetime?: string;
4646
content?: string;
47-
reasoning?: string;
47+
status?: string;
4848
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ name | type | default | description | required
77
-- | -- | -- | -- | --
88
style | Object | - | CSS(Cascading Style Sheets) | N
99
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
10-
allow-content-segment-custom | Boolean | false | \- | N
1110
animation | String | skeleton | options: skeleton/moving/gradient/dots | N
1211
avatar | String | - | \- | N
1312
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

packages/pro-components/chat/chat-message/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ isComponent: true
6363
-- | -- | -- | -- | --
6464
style | Object | - | 样式 | N
6565
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
66-
allow-content-segment-custom | Boolean | false | 【实验】 是否允许自定义局部消息内容,其他消息内容实用默认样式 | N
6766
animation | String | skeleton | 动画效果。可选项:skeleton/moving/gradient/dots | N
6867
avatar | String | - | 自定义的头像配置 | N
6968
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

0 commit comments

Comments
 (0)