Skip to content

Commit 0854dde

Browse files
authored
Feat: Add tinyvue knowledge base (opentiny#272)
* feat/Add harmony knowledge base
1 parent 50f5e0b commit 0854dde

34 files changed

+1145
-0
lines changed

documents/agent/HarmonyBlock.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# HarmonyComponent block 组件生成 schema
2+
3+
HarmonyBlock 是一个区块组件。
4+
componentName 为渲染时候的组件名称,props 为组件绑定的属性,children 为子组件列表,id 为可以动态生成的唯一 id。
5+
6+
## block 组件生成 schema 代码示例
7+
8+
### 基本用法
9+
10+
```json
11+
{
12+
"componentName": "HarmonyBlock",
13+
"props": {
14+
"className": "component-base-style"
15+
},
16+
"children": [],
17+
"id": "42593436"
18+
}
19+
```

documents/agent/HarmonyButton.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# HarmonyComponent button 组件生成 schema
2+
3+
HarmonyButton 是一个按钮组件。
4+
componentName 为渲染时候的组件名称,props 为组件绑定的属性,children 为子组件列表,id 为可以动态生成的唯一 id。
5+
6+
## button 组件生成 schema 代码示例
7+
8+
### 基本用法
9+
10+
```json
11+
{
12+
"componentName": "HarmonyButton",
13+
"props": {
14+
"text": "按钮文案", // 可以设置按钮的文案。
15+
"className": "component-base-style",
16+
"size": "medium", // 可以设置按钮的大小。可选值为 large 、 medium 、 small 、 mini
17+
"disabled": true, // 可以设置按钮是否为禁用状态。
18+
"type": "primary", // 可以设置按钮的类型。可选值为 primary 、 success 、 warning 、 danger 、 info 、 text
19+
"round": true, // 可以设置按钮是否为圆角。
20+
"plain": true, // 可以设置按钮是否镂空,背景色透明。
21+
"autofocus": true, // 可以设置按钮是否自动聚焦。
22+
"loading": true // 可以设置按钮是否为加载中状态。
23+
},
24+
"children": [],
25+
"id": "36322253"
26+
}
27+
```

documents/agent/HarmonyCheckbox.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# HarmonyComponent checkbox 组件生成 schema
2+
3+
HarmonyCheckbox 是一个多选框组件。
4+
componentName 为渲染时候的组件名称,props 为组件绑定的属性,children 为子组件列表,id 为可以动态生成的唯一 id。
5+
6+
## checkbox 组件生成 schema 代码示例
7+
8+
### 基本用法
9+
10+
```json
11+
{
12+
"componentName": "HarmonyCheckbox",
13+
"props": {
14+
"checked": true, // 可以设置多选框的选中状态。
15+
"text": "多选框文案", // 可以设置多选框的文案。
16+
"className": "component-base-style",
17+
"disabled": true // 可以设置多选框是否为禁用状态。
18+
},
19+
"children": [],
20+
"id": "58523b45"
21+
}
22+
```

documents/agent/HarmonyEditor.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# HarmonyComponent editor 组件生成 schema
2+
3+
HarmonyEditor 是一个编辑器组件。
4+
componentName 为渲染时候的组件名称,props 为组件绑定的属性,children 为子组件列表,id 为可以动态生成的唯一 id。
5+
6+
## editor 组件生成 schema 代码示例
7+
8+
### 基本用法
9+
10+
```json
11+
{
12+
"componentName": "HarmonyEditor",
13+
"props": {
14+
"modelValue": "value", // 可以设置编辑器的绑定值。
15+
"className": "component-base-style",
16+
"read-only": true // 可以设置是否为只读模式。
17+
},
18+
"children": [],
19+
"id": "3255e443"
20+
}
21+
```

documents/agent/HarmonyForm.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# HarmonyComponent form 组件生成 schema
2+
3+
HarmonyForm 是一个表单组件。
4+
componentName 为渲染时候的组件名称,props 为组件绑定的属性,children 为子组件列表,id 为可以动态生成的唯一 id。
5+
6+
## form 组件生成 schema 代码示例
7+
8+
### 基本用法
9+
10+
```json
11+
{
12+
"componentName": "HarmonyForm",
13+
"props": {
14+
"className": "component-base-style",
15+
"report-submit": true, // 可以设置是否返回 formId 用于发送模板消息
16+
"report-submit-timeout": 100 // 可以设置返回 formId 的超时时间,单位为 ms
17+
},
18+
"children": [
19+
{
20+
"componentName": "HarmonyView",
21+
"props": {},
22+
"children": [
23+
{
24+
"componentName": "HarmonyView",
25+
"props": {
26+
"label": "用户名"
27+
},
28+
"children": [
29+
{
30+
"componentName": "HarmonyText",
31+
"props": {
32+
"text": "姓名"
33+
},
34+
"id": "45655522"
35+
}
36+
],
37+
"id": "5224f433"
38+
},
39+
{
40+
"componentName": "HarmonyView",
41+
"props": {
42+
"label": "用户名"
43+
},
44+
"children": [
45+
{
46+
"componentName": "HarmonyInput",
47+
"props": {
48+
"placeholder": "请输入用户名"
49+
},
50+
"id": "5533e24d"
51+
}
52+
],
53+
"id": "6c946365"
54+
}
55+
],
56+
"id": "d64452a5"
57+
}
58+
],
59+
"id": "53654522"
60+
}
61+
```

documents/agent/HarmonyImage.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# HarmonyComponent image 组件生成 schema
2+
3+
HarmonyImage 是一个图片组件。
4+
componentName 为渲染时候的组件名称,props 为组件绑定的属性,children 为子组件列表,id 为可以动态生成的唯一 id。
5+
6+
## image 组件生成 schema 代码示例
7+
8+
### 基本用法
9+
10+
```json
11+
{
12+
"componentName": "HarmonyImage",
13+
"props": {
14+
"src": "https://tinyengine-assets.obs.cn-north-4.myhuaweicloud.com/files/designer-default-icon.jpg", // 可以设置图片的源。
15+
"className": "component-base-style",
16+
"draggable": true, // 可以设置图片是否可拖拽。
17+
"mode": "scaleToFill" // 可以设置图片的缩放模式。可选值为 scaleToFill 、 aspectFit 、 aspectFill 、 widthFix 、 heightFix
18+
},
19+
"children": [],
20+
"id": "62256151"
21+
}
22+
```

documents/agent/HarmonyInput.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# HarmonyComponent input 组件生成 schema
2+
3+
HarmonyInput 是一个输入框组件。
4+
componentName 为渲染时候的组件名称,props 为组件绑定的属性,children 为子组件列表,id 为可以动态生成的唯一 id。
5+
6+
## input 组件生成 schema 代码示例
7+
8+
### 基本用法
9+
10+
```json
11+
{
12+
"componentName": "HarmonyInput",
13+
"props": {
14+
"placeholder": "请输入", // 可以设置输入框的提示文字。
15+
"modelValue": "value", // 可以设置输入框的绑定值。
16+
"className": "component-base-style",
17+
"type": "text", // 可以设置输入框的类型。
18+
"clearable": true, // 可以设置是否显示清除按钮。
19+
"disabled": true, // 可以设置是否禁用输入框。
20+
"maxlength": 10 // 可以设置输入框的最大长度。
21+
},
22+
"children": [],
23+
"id": "31365645"
24+
}
25+
```

documents/agent/HarmonyLabel.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# HarmonyComponent label 组件生成 schema
2+
3+
HarmonyLabel 是一个标签组件。
4+
componentName 为渲染时候的组件名称,props 为组件绑定的属性,children 为子组件列表,id 为可以动态生成的唯一 id。
5+
6+
## label 组件生成 schema 代码示例
7+
8+
### 基本用法
9+
10+
```json
11+
{
12+
"componentName": "HarmonyLabel",
13+
"props": {
14+
"className": "component-base-style",
15+
"for": "name" // 可以设置 label 标签的 for 属性,用于绑定对应的表单控件。
16+
},
17+
"children": [],
18+
"id": "5125653c"
19+
}
20+
```
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# HarmonyComponent navigator 组件生成 schema
2+
3+
HarmonyNavigator 是一个页面跳转组件。
4+
componentName 为渲染时候的组件名称,props 为组件绑定的属性,children 为子组件列表,id 为可以动态生成的唯一 id。
5+
6+
## navigator 组件生成 schema 代码示例
7+
8+
### 基本用法
9+
10+
```json
11+
{
12+
"componentName": "HarmonyNavigator",
13+
"props": {
14+
"open-type": "navigate", // 可以设置跳转方式。可选值为 navigate 、 redirect 、 switchTab 、 reLaunch 、 navigateBack
15+
"target": "self", // 可以设置跳转后页面的打开方式。可选值为 self 、 top 、 parent
16+
"className": "component-base-style",
17+
"url": "https://huaweicloud.com", // 可以设置跳转的页面路径。
18+
"delta": 1, // 可以设置回退的层数。当 open-type 为 'navigateBack' 时有效,表示回退的层数
19+
"animation-type": "pop-in", // 可以设置跳转页面的动画效果。可选值为 pop-in 、 pop-out 、 none
20+
"animation-duration": 1000, // 可以设置跳转页面的动画时长。单位为 ms
21+
"render-link": true // 可以设置是否给 navigator 组件加一层 a 标签控制 ssr 渲染。
22+
},
23+
"children": [
24+
{
25+
"componentName": "HarmonyButton",
26+
"props": {
27+
"text": "跳转页面"
28+
},
29+
"id": "62555236"
30+
}
31+
],
32+
"id": "55325f22"
33+
}
34+
```

documents/agent/HarmonyPicker.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# HarmonyComponent picker 组件生成 schema
2+
3+
HarmonyPicker 是一个选择器组件。
4+
componentName 为渲染时候的组件名称,props 为组件绑定的属性,children 为子组件列表,id 为可以动态生成的唯一 id。
5+
6+
## picker 组件生成 schema 代码示例
7+
8+
### 基本用法
9+
10+
```json
11+
{
12+
"componentName": "HarmonyPicker",
13+
"props": {
14+
"value": "1", // 可以设置选择器的初始值。
15+
"mode": "selector", // 可以设置选择器的模式。默认值为 selector,可选值为 selector 、 date 和 time
16+
"range": [
17+
{
18+
"value": "1",
19+
"label": "黄金糕"
20+
},
21+
{
22+
"value": "2",
23+
"label": "双皮奶"
24+
}
25+
], // 可以设置选择器的数据源。模式为 selector 时,range 为数组,数组的元素为对象,对象包含 value 和 label 属性。
26+
"className": "component-base-style",
27+
"disabled": true // 可以设置是否禁用选择器。
28+
},
29+
"children": [],
30+
"id": "54e34551"
31+
}
32+
```

0 commit comments

Comments
 (0)