Skip to content

Commit bbb0623

Browse files
authored
Add documentation for secret input component (#553)
1 parent ed414ee commit bbb0623

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

docs/developer-guide/form-schema.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,3 +791,32 @@ UI 效果:
791791
onValue: "active"
792792
offValue: "inactive"
793793
```
794+
795+
### secret
796+
797+
密钥输入组件,用于选择一个密钥资源。
798+
799+
:::note
800+
在 Halo 中,我们提供了一种更加安全的数据存储模型,即 Secret,通常我们使用 Secret 来存储敏感数据,比如密码、token、密钥等。
801+
802+
主要注意的是,此表单类型通常与后端配合使用,需要在后端查询密钥资源。
803+
:::
804+
805+
参数
806+
807+
- `requiredKeys`:所需的密钥字段,用于为用户说明所选的密钥资源中需要包含的字段,此字段为对象数组类型,对象包含以下属性:
808+
- `key`:密钥字段名称
809+
- `help`:密钥字段名称的描述
810+
811+
#### 示例
812+
813+
```yaml
814+
- $formkit: secret
815+
name: secret
816+
label: 密钥
817+
requiredKeys:
818+
- key: apiKey
819+
help: API 密钥
820+
- key: secretKey
821+
help: 密钥
822+
```

versioned_docs/version-2.22/developer-guide/form-schema.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,3 +791,32 @@ UI 效果:
791791
onValue: "active"
792792
offValue: "inactive"
793793
```
794+
795+
### secret
796+
797+
密钥输入组件,用于选择一个密钥资源。
798+
799+
:::note
800+
在 Halo 中,我们提供了一种更加安全的数据存储模型,即 Secret,通常我们使用 Secret 来存储敏感数据,比如密码、token、密钥等。
801+
802+
主要注意的是,此表单类型通常与后端配合使用,需要在后端查询密钥资源。
803+
:::
804+
805+
参数
806+
807+
- `requiredKeys`:所需的密钥字段,用于为用户说明所选的密钥资源中需要包含的字段,此字段为对象数组类型,对象包含以下属性:
808+
- `key`:密钥字段名称
809+
- `help`:密钥字段名称的描述
810+
811+
#### 示例
812+
813+
```yaml
814+
- $formkit: secret
815+
name: secret
816+
label: 密钥
817+
requiredKeys:
818+
- key: apiKey
819+
help: API 密钥
820+
- key: secretKey
821+
help: 密钥
822+
```

0 commit comments

Comments
 (0)