File tree Expand file tree Collapse file tree 2 files changed +58
-0
lines changed
versioned_docs/version-2.22/developer-guide Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Original file line number Diff line number Diff 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+ ` ` `
Original file line number Diff line number Diff 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+ ` ` `
You can’t perform that action at this time.
0 commit comments