From 38de134161f6467ffc0d13eace8c6b127ec03fda Mon Sep 17 00:00:00 2001 From: brightzhli <864345220@qq.com> Date: Tue, 18 Feb 2025 18:21:35 +0800 Subject: [PATCH] =?UTF-8?q?test(aigc):=20=E6=96=B0=E5=A2=9Eaigc=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/sidebar.config.ts | 14 ++++++ src/aigc/README.md | 44 +++++++++++++++++ src/aigc/_example/base.tsx | 73 +++++++++++++++++++++++++++ src/aigc/_example/bubble.tsx | 19 ++++++++ src/aigc/_example/sender.tsx | 26 ++++++++++ src/aigc/bubble.tsx | 79 ++++++++++++++++++++++++++++++ src/aigc/chat.tsx | 82 +++++++++++++++++++++++++++++++ src/aigc/index.ts | 12 +++++ src/aigc/sender.tsx | 95 ++++++++++++++++++++++++++++++++++++ src/index.ts | 1 + 10 files changed, 445 insertions(+) create mode 100644 src/aigc/README.md create mode 100644 src/aigc/_example/base.tsx create mode 100644 src/aigc/_example/bubble.tsx create mode 100644 src/aigc/_example/sender.tsx create mode 100644 src/aigc/bubble.tsx create mode 100644 src/aigc/chat.tsx create mode 100644 src/aigc/index.ts create mode 100644 src/aigc/sender.tsx diff --git a/site/sidebar.config.ts b/site/sidebar.config.ts index 4b86a17..0b6f968 100644 --- a/site/sidebar.config.ts +++ b/site/sidebar.config.ts @@ -60,6 +60,20 @@ export default [ }, ], }, + { + title: 'aigc测试', + name: 'aigc', + type: 'component', // 组件文档 + children: [ + { + title: 'aigc组件', + name: 'aigc', + path: '/webcomponents/components/aigc', + component: () => import('tdesign-web-components/aigc/README.md'), + }, + ], + tag: '', + }, { title: '基础', name: 'base', diff --git a/src/aigc/README.md b/src/aigc/README.md new file mode 100644 index 0000000..5996e2b --- /dev/null +++ b/src/aigc/README.md @@ -0,0 +1,44 @@ +--- +title: 测试aigc组件 +description: checklist https://doc.weixin.qq.com/sheet/e3_AXAAewbeAO8xD7yb5SGThe8S115hM?scode=AJEAIQdfAAoxc1ymeqAXAAewbeAO8&tab=BB08J2 +isComponent: true +usage: { title: '', description: '' } +spline: base +--- + +### 基础测试 + +{{ base }} + +### 输入框 + +{{ sender }} + +### 消息 + +{{ bubble }} + +## API + +### Button Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +className | String | - | 类名 | N +style | Object | - | 样式 | N +block | Boolean | false | 是否为块级元素 | N +children | TNode | - | 按钮内容,TS 类型:`string \| TNode`。[通用类型定义](https://github.com/TDesignOteam/tdesign-web-components/tree/main/src/common.ts) | N +disabled | Boolean | false | 禁用状态 | N +ghost | Boolean | false | 是否为幽灵按钮(镂空按钮) | N +href | String | - | 跳转地址。href 存在时,按钮标签默认使用 `` 渲染;如果指定了 `tag` 则使用指定的标签渲染 | N +icon | TElement | - | 按钮内部图标,可完全自定义。TS 类型:`TNode`。[通用类型定义](https://github.com/TDesignOteam/tdesign-web-components/tree/main/src/common.ts) | N +loading | Boolean | false | 是否显示为加载状态 | N +shape | String | rectangle | 按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形。可选项:rectangle/square/round/circle | N +size | String | medium | 组件尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/TDesignOteam/tdesign-web-components/tree/main/src/common.ts) | N +tag | String | - | 渲染按钮的 HTML 标签,默认使用标签 `