Skip to content

Commit 01264e9

Browse files
committed
docs: adjust doc
1 parent 4549e1e commit 01264e9

File tree

6 files changed

+52
-64
lines changed

6 files changed

+52
-64
lines changed

.dumirc.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ export default defineConfig({
5757
link: '/components/overview',
5858
},
5959
{
60-
title: 'Copilot系列组件',
61-
link: '/copilots/copilot-overview',
60+
title: 'Copilot',
61+
link: '/copilots/conversations',
6262
},
6363
{
6464
title: '资源',
@@ -83,8 +83,8 @@ export default defineConfig({
8383
link: '/components/overview-en',
8484
},
8585
{
86-
title: 'Copilot Components',
87-
link: '/copilots/copilot-overview-en',
86+
title: 'Copilot',
87+
link: '/copilots/conversations-en',
8888
},
8989
{
9090
title: 'Resources',

copilot/Conversations/index.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
nav:
33
path: /copilot
44
group:
5-
title: 通用
5+
title: Copilot
66
order: 1
77
toc: 'content'
88
---
@@ -16,10 +16,10 @@ toc: 'content'
1616
```json
1717
"usingComponents": {
1818
#if ALIPAY
19-
"ant-prompts": "antd-mini/es/Conversations/index"
19+
"ant-conversations": "antd-mini/es/Conversations/index"
2020
#endif
2121
#if WECHAT
22-
"ant-prompts": "antd-mini/Conversations/index"
22+
"ant-conversations": "antd-mini/Conversations/index"
2323
#endif
2424
}
2525
```
@@ -29,18 +29,18 @@ toc: 'content'
2929
### 基本使用
3030

3131
```xml
32-
<ant-conversations
33-
items="{{items}}"
34-
menus="{{menus}}"
32+
<ant-conversations
33+
items="{{items}}"
34+
menus="{{menus}}"
3535
#if ALIPAY
36-
onItemTap="handleItemTap"
37-
onMenuItemTap="handleMenuItemTap"
36+
onItemTap="handleItemTap"
37+
onMenuItemTap="handleMenuItemTap"
3838
#endif
3939
#if WECHAT
40-
binditemtap="handleItemTap"
41-
bindmenuitemtap="handleMenuItemTap"
40+
binditemtap="handleItemTap"
41+
bindmenuitemtap="handleMenuItemTap"
4242
#endif
43-
/>
43+
/>
4444
```
4545

4646
```js

copilot/Prompts/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
nav:
33
path: /copilot
44
group:
5-
title: 通用
5+
title: Copilot
66
order: 1
77
toc: 'content'
88
---
99

10-
# Copilot Prompts 提示列表
10+
# Prompts 提示列表
1111

1212
用于让首次接触 AI 产品的用户快速理解 AI 能做什么,可以清晰传达给用户 AI 可实现的意图范围和预期功能。使用合适的欢迎推荐组件,可以有效降低用户学习成本,让用户快速了解并顺利开始。
1313

copilot/ThoughtChain/index.md

+35-31
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
nav:
33
path: /copilot
44
group:
5-
title: 通用
5+
title: Copilot
66
order: 2
77
toc: 'content'
88
---
99

10-
# Copilot ThoughtChain 思考链
10+
# ThoughtChain 思考链
1111

12-
用于可视化展示AI处理请求、生成内容或执行任务的进程与状态。这是一个与动画相关的组件,需要提供各节点动画的props和API和使用方进行交互
12+
用于可视化展示 AI 处理请求、生成内容或执行任务的进程与状态。这是一个与动画相关的组件,需要提供各节点动画的 props 和 API 和使用方进行交互
1313

1414
## 引入
1515

@@ -18,22 +18,24 @@ toc: 'content'
1818
```json
1919
"usingComponents": {
2020
#if ALIPAY
21-
"thought-chain": "antd-mini/es/ThoughtChain/index"
21+
"ant-thought-chain": "antd-mini/es/ThoughtChain/index"
2222
#endif
2323
#if WECHAT
24-
"thought-chain": "antd-mini/ThoughtChain/index"
24+
"ant-thought-chain": "antd-mini/ThoughtChain/index"
2525
#endif
2626
}
2727
```
2828

2929
## 代码示例
3030

3131
### 基本使用
32-
这个示例渲染了一级节点,支持```loading``` ```fail``` ```success``` 三种节点状态
32+
33+
这个示例渲染了一级节点,支持`loading` `fail` `success` 三种节点状态
3334

3435
```xml
3536
<thought-chain list="{{basicList}}" onContentItemTap="onContentItemTap" />
3637
```
38+
3739
```javascript
3840
Page({
3941
data: {
@@ -50,20 +52,21 @@ Page({
5052
status: 'loading',
5153
title: '在互联网上搜索问题',
5254
},
53-
]
55+
],
5456
},
5557
onContentItemTap(e) {
5658
const { content } = e.target.dataset || {};
5759
my.alert({
5860
content: `点击了内容「${content}`,
5961
});
6062
},
61-
})
63+
});
6264
```
6365

6466
### 二级节点
65-
节点的内容默认支持3种形态(contentType),文字类型:```text```,链接类型:```link```,标签类型:```tag```
66-
一级节点支持配置list,设置子节点(二级节点)。
67+
68+
节点的内容默认支持 3 种形态(contentType),文字类型:`text`,链接类型:`link`,标签类型:`tag`
69+
一级节点支持配置 list,设置子节点(二级节点)。
6770

6871
```javascript
6972
Page({
@@ -105,13 +108,14 @@ Page({
105108
},
106109
],
107110
},
108-
]
109-
}
110-
})
111+
],
112+
},
113+
});
111114
```
112115

113116
### 自定义节点内容
114-
支持通过slot自定义节点内容
117+
118+
支持通过 slot 自定义节点内容
115119

116120
```xml
117121
<thought-chain list="{{customList}}" onContentItemTap="onContentItemTap">
@@ -122,6 +126,7 @@ Page({
122126
</view>
123127
</thought-chain>
124128
```
129+
125130
```javascript
126131
Page({
127132
data: {
@@ -138,8 +143,7 @@ Page({
138143
list: [
139144
{
140145
status: 'success',
141-
title:
142-
'搜索中',
146+
title: '搜索中',
143147
content: '子节点中的自定义内容',
144148
contentType: 'customType',
145149
},
@@ -153,7 +157,7 @@ Page({
153157
content: `点击了内容「${content}`,
154158
});
155159
},
156-
})
160+
});
157161
```
158162

159163
### Demo 代码
@@ -166,22 +170,22 @@ Page({
166170

167171
以下表格介绍了 ThoughtChain 组件的 API 属性:
168172

169-
| 属性 | 说明 | 类型 | 默认值 |
170-
| ------------ | -------- | -------------- | ------ |
171-
| className | 类名 | string | - |
172-
| list | 提示列表 | IThoughtChainItemProps[] | - |
173+
| 属性 | 说明 | 类型 | 默认值 |
174+
| --------- | -------- | ------------------------ | ------ |
175+
| className | 类名 | string | - |
176+
| list | 提示列表 | IThoughtChainItemProps[] | - |
173177

174178
IThoughtChainItemProps 属性
175-
| 属性 | 说明 | 类型 | 默认值 |
179+
| 属性 | 说明 | 类型 | 默认值 |
176180
| --------- | ------------ | ------- | ------ |
177-
| status | 节点状态 | ```loading``` ```success``` ```fail``` | - |
178-
| title | 节点标题 | string | - |
179-
| content | 节点内容 | string \| string[] |
180-
| contentType | 节点内容类型,默认类型有```text``` ```link``` ```tag``` | string |
181-
| list | 子节点,仅一级节点支持子节点 | IThoughtChainItemProps[] |
181+
| status | 节点状态 | `loading` `success` `fail` | - |
182+
| title | 节点标题 | string | - |
183+
| content | 节点内容 | string \| string[] |
184+
| contentType | 节点内容类型,默认类型有`text` `link` `tag` | string |
185+
| list | 子节点,仅一级节点支持子节点 | IThoughtChainItemProps[] |
182186

183-
插槽 slot
187+
插槽 slot
184188

185-
| 插槽名称 | 说明 |
186-
| ------------- | -------------- |
187-
| content | 自定义节点内容 | |
189+
| 插槽名称 | 说明 |
190+
| -------- | -------------- | --- |
191+
| content | 自定义节点内容 | |

docs/copilots/copilot-overview-en.md

-8
This file was deleted.

docs/copilots/copilot-overview.md

-8
This file was deleted.

0 commit comments

Comments
 (0)