Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(configurator): add configurator docs #631

Merged
merged 3 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
31 changes: 31 additions & 0 deletions packages/configurator/docs/CodeConfigurator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# CodeConfigurator

## 简介

代码设置器,是一个按钮,点击后会打开代码编辑器弹窗,用于编辑代码

## 展示

![示例图片](./CodeConfigurator.png)
![代码编辑器弹窗](./CodeConfiguratorDialog.png)

## 配置示例

```json
{
"component": "CodeConfigurator",
"props": {
"language": "json"
}
}
```

## Props说明

| Prop名称 | 类型 | 默认值 | 说明 |
| ------------- | ------------------------ | -------------- | ------------------ |
| title | `string \| object` | `''` | 代码编辑器弹窗标题 |
| language | `'javascript' \| 'json'` | `'javascript'` | 代码编辑器语言 |
| dataType | | | |
| showFormatBtn | `boolean` | `true` | 是否显示格式化按钮 |
| showErrorMsg | `boolean` | `true` | 是否显示错误信息 |
Binary file added packages/configurator/docs/CodeConfigurator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions packages/configurator/docs/CollectionConfigurator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# CollectionConfigurator

## 简介

数据源设置器,用于选择数据源

## 展示

![示例图片](./CollectionConfigurator.png)

## 配置示例

```json
{
"component": "CollectionConfigurator",
"props": {}
}
```

## Props说明

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions packages/configurator/docs/ColorConfigurator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ColorConfigurator

## 简介

颜色设置器

## 展示

![示例图片](./ColorConfigurator.png)

## 配置示例

```json
{
"component": "ColorConfigurator",
"props": {}
}
```

## Props说明

Binary file added packages/configurator/docs/ColorConfigurator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions packages/configurator/docs/InputConfigurator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# InputConfigurator

## 简介

类型为输入框的设置器,用于输入文本

## 展示

![示例图片](./InputConfigurator.png)

## 配置示例

```json
{
"component": "InputConfigurator",
"props": {
"type": "text",
"placeholder": "请输入id"
}
}
```

## Props说明

| Prop名称 | 类型 | 默认值 | 说明 |
| ----------- | ---------------------- | -------- | --------------------------------------------------------------------------- |
| type | `"text" \| "textarea"` | `"text"` | 输入框类型 |
| placeholder | `string` | -- | 输入框占位文本 |
| dataType | `"Array"` | -- | 当值为`"Array"`时,会将输入框的值使用英文逗号分割,然后将属性的值设置成数组 |
| rows | `number` | -- | 输入框行数,只对 `type="textarea"` 有效 |
hexqi marked this conversation as resolved.
Show resolved Hide resolved
Binary file added packages/configurator/docs/InputConfigurator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions packages/configurator/docs/SelectConfigurator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SelectConfigurator

## 简介

类型为选择器的设置器,用于选择选项

## 展示

![示例图片](./SelectConfigurator.png)

## 配置示例

```json
{
"component": "SelectConfigurator",
"props": {
"options": [
{
"label": "mini",
"value": "mini"
},
{
"label": "small",
"value": "small"
},
{
"label": "medium",
"value": "medium"
}
]
}
}
```

## Props说明

| Prop名称 | 类型 | 默认值 | 说明 |
| -------- | ---------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------ |
| options | `Array<{ label: string, value: string }>` | -- | 可选项 |
| multi | `boolean` | false | 是否允许选择多个选项 |
| groups | `Array<{ label: string, content: string[], disabled: boolean }>` | -- | 对可选项进行分组。`content`数组里面的项目为可选项的`value`,表示这些可选项属于这个组 |
Binary file added packages/configurator/docs/SelectConfigurator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions packages/configurator/docs/SwitchConfigurator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SwitchConfigurator

## 简介

类型为开关的设置器

## 展示

![示例图片](./SwitchConfigurator.png)

## 配置示例

```json
{
"component": "SwitchConfigurator",
"props": {}
}
```

## Props说明

Binary file added packages/configurator/docs/SwitchConfigurator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.