敏感 - 渲染一个可显示/隐藏的密码字段 可用于敏感信息 例如 API 密钥或秘密, 配置值, 等. 一个敏感字段可以根据用户的请求切换显示和隐藏.
一个包含先前输入值的敏感字段,在加载时其值将被占位符值替换,从而防止该值因长度被猜测或被复制。当揭示该值时,原始值将通过AJAX检索并填充到该字段中。
api_secret:
type: sensitive
allowCopy: false
hideOnTabChange: true以下 字段属性 受支持且常用。
| Property | Description |
|---|---|
| label | a name when displaying the form field to the user. |
| default | specifies a default string value, optional. |
| comment | places a descriptive comment below the field. |
| mode | display mode for the widget, either textarea or text. Default: text |
| allowCopy | adds a "copy" action to the sensitive field, allowing the user to copy the password without revealing it. Default: true |
| hiddenPlaceholder | sets the placeholder text that is used to simulate a hidden, unrevealed value. You can change this to a long or short string to emulate different length values. Default: __hidden__ |
| hideOnTabChange | if true, the sensitive field will automatically be hidden if the user navigates to a different tab, or minimizes their browser. Default: true |