Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:: BASE_DOC ::

## API

### Attachments Props

name | type | default | description | required
-- | -- | -- | -- | --
style | Object | - | CSS(Cascading Style Sheets) | N
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
addable | Boolean | true | \- | N
image-viewer | Boolean | true | \- | N
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
removable | Boolean | true | \- | N

### Attachments Events

name | params | description
-- | -- | --
add | \- | \-
file-click | `(item: FileItem)` | \-
remove | `(item: FileItem, index: number)` | \-
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:: BASE_DOC ::

## API

### Attachments Props

名称 | 类型 | 默认值 | 描述 | 必传
-- | -- | -- | -- | --
style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
addable | Boolean | true | 【讨论中】是否显示添加按钮 | N
image-viewer | Boolean | true | 是否启用图片预览功能 | N
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
removable | Boolean | true | 是否显示删除按钮 | N

### Attachments Events

名称 | 参数 | 描述
-- | -- | --
add | \- | 点击添加按钮时触发
file-click | `(item: FileItem)` | 点击文件时触发
remove | `(item: FileItem, index: number)` | 点击删除按钮时触发
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* eslint-disable */

/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { TdAttachmentsProps } from './type';
const props: TdAttachmentsProps = {
/** 【讨论中】是否显示添加按钮 */
addable: {
type: Boolean,
value: true,
},
/** 是否启用图片预览功能 */
imageViewer: {
type: Boolean,
value: true,
},
/** 【实验】附件列表 */
items: {
type: Array,
value: [],
},
/** 是否显示删除按钮 */
removable: {
type: Boolean,
value: true,
},
};

export default props;
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/* eslint-disable */

/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

export interface TdAttachmentsProps {
/**
* 【讨论中】是否显示添加按钮
* @default true
*/
addable?: {
type: BooleanConstructor;
value?: boolean;
};
/**
* 是否启用图片预览功能
* @default true
*/
imageViewer?: {
type: BooleanConstructor;
value?: boolean;
};
/**
* 【实验】附件列表
* @default []
*/
items?: {
type: ArrayConstructor;
value?: FileItem[];
};
/**
* 是否显示删除按钮
* @default true
*/
removable?: {
type: BooleanConstructor;
value?: boolean;
};
}

export 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';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
:: BASE_DOC ::

## API

### ChatActionbar Props

name | type | default | description | required
-- | -- | -- | -- | --
style | Object | - | CSS(Cascading Style Sheets) | N
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
action-bar | Array | ['replay', 'copy', 'good', 'bad', 'share'] | Typescript: `Array<'replay'\|'copy'\|'good'\|'bad'\|'share'>` | N
chat-id | String | - | \- | N
comment | String | - | \- | N
content | String | - | \- | N
copy-mode | String | markdown | options: markdown/text | N
disabled | Boolean | false | \- | N
placement | String | start | options: start/end/space-around/space-between | N

### ChatActionbar Events

name | params | description
-- | -- | --
actions | `(detail: {name: string, active: boolean})` | \-
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
:: BASE_DOC ::

## API

### ChatActionbar Props

名称 | 类型 | 默认值 | 描述 | 必传
-- | -- | -- | -- | --
style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
action-bar | Array | ['replay', 'copy', 'good', 'bad', 'share'] | 操作栏配置。TS 类型:`Array<'replay'\|'copy'\|'good'\|'bad'\|'share'>` | N
chat-id | String | - | 【实验】聊天消息的唯一标识 | N
comment | String | - | 评价内容 | N
content | String | - | 被复制的内容 | N
copy-mode | String | markdown | 【实验】复制内容的模式,可选 'markdown'(复制markdown原文)或 'text'(复制纯文本)。可选项:markdown/text | N
disabled | Boolean | false | 【讨论中】操作按钮是否可点击 | N
placement | String | start | 【实验】操作栏位置。可选项:start/end/space-around/space-between | N

### ChatActionbar Events

名称 | 参数 | 描述
-- | -- | --
actions | `(detail: {name: string, active: boolean})` | 点击点赞,点踩,复制,分享,重新生成按钮时触发发
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* eslint-disable */

/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { TdChatActionbarProps } from './type';
const props: TdChatActionbarProps = {
/** 操作栏配置 */
actionBar: {
type: Array,
value: ['replay', 'copy', 'good', 'bad', 'share'],
},
/** 【实验】聊天消息的唯一标识 */
chatId: {
type: String,
value: '',
},
/** 评价内容 */
comment: {
type: String,
value: '',
},
/** 被复制的内容 */
content: {
type: String,
value: '',
},
/** 【实验】复制内容的模式,可选 'markdown'(复制markdown原文)或 'text'(复制纯文本) */
copyMode: {
type: String,
value: 'markdown',
},
/** 【讨论中】操作按钮是否可点击 */
disabled: {
type: Boolean,
value: false,
},
/** 【实验】操作栏位置 */
placement: {
type: String,
value: 'start',
},
};

export default props;
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/* eslint-disable */

/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

export interface TdChatActionbarProps {
/**
* 操作栏配置
* @default ['replay', 'copy', 'good', 'bad', 'share']
*/
actionBar?: {
type: ArrayConstructor;
value?: Array<'replay' | 'copy' | 'good' | 'bad' | 'share'>;
};
/**
* 【实验】聊天消息的唯一标识
* @default ''
*/
chatId?: {
type: StringConstructor;
value?: string;
};
/**
* 评价内容
* @default ''
*/
comment?: {
type: StringConstructor;
value?: string;
};
/**
* 被复制的内容
* @default ''
*/
content?: {
type: StringConstructor;
value?: string;
};
/**
* 【实验】复制内容的模式,可选 'markdown'(复制markdown原文)或 'text'(复制纯文本)
* @default markdown
*/
copyMode?: {
type: StringConstructor;
value?: 'markdown' | 'text';
};
/**
* 【讨论中】操作按钮是否可点击
* @default false
*/
disabled?: {
type: BooleanConstructor;
value?: boolean;
};
/**
* 【实验】操作栏位置
* @default start
*/
placement?: {
type: StringConstructor;
value?: 'start' | 'end' | 'space-around' | 'space-between';
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:: BASE_DOC ::

## API

### ChatContent Props

name | type | default | description | required
-- | -- | -- | -- | --
style | Object | - | CSS(Cascading Style Sheets) | N
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
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
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
role | String | - | required。options: user/assistant/system | Y
status | String | - | options: error / '' | N
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:: BASE_DOC ::

## API

### ChatContent Props

名称 | 类型 | 默认值 | 描述 | 必传
-- | -- | -- | -- | --
style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
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
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
role | String | - | 必需。消息角色,用于区分用户和助手的消息样式 。可选项:user/assistant/system | Y
status | String | - | 正文状态。可选项:error / '' | N
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* eslint-disable */

/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { TdChatContentProps } from './type';
const props: TdChatContentProps = {
/** 聊天内容对象 */
content: {
type: Object,
required: true,
},
/** marked 解析器的配置选项 */
markdownProps: {
type: Object,
},
/** 消息角色,用于区分用户和助手的消息样式 */
role: {
type: String,
required: true,
},
/** 正文状态 */
status: {
type: String,
},
};

export default props;
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* eslint-disable */

/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { ChatMarkdownProps } from '../chat-markdown/index';

export interface TdChatContentProps {
/**
* 聊天内容对象
*/
content: {
type: ObjectConstructor;
value?: TdChatContentType;
required?: boolean;
};
/**
* marked 解析器的配置选项
*/
markdownProps?: {
type: ObjectConstructor;
value?: ChatMarkdownProps;
};
/**
* 消息角色,用于区分用户和助手的消息样式
*/
role: {
type: StringConstructor;
value?: 'user' | 'assistant' | 'system';
required?: boolean;
};
/**
* 正文状态
*/
status?: {
type: StringConstructor;
value?: 'error' | '';
};
}

export interface TdChatContentType {
type: 'text' | 'markdown';
data: string;
}
Loading