Secret Field

输入、保存和清除 API 密钥等机密信息,并显示已设置 / 未设置状态。

可用框架
  • Angular: 可用
  • Vue: 可用
  • React: 可用
  • React Native: 暂不可用

用法

API key Not set

Stored in the system keychain and never logged.

Workspace token Not set

导入

ts
import {
  SoneSecretFieldComponent,
} from "@surface-one/angular/secret-field";

API 参考

SoneSecretFieldComponent组件

选择器
sone-secret-field
输入
名称类型 默认值
hasKeyboolean | nullnull
busybooleanfalse
errorstring | nullnull
label—$localize`Status`
placeholderstring""
ariaLabelstring | nullnull
helpstring | nullnull
setLabel—$localize`Key set ✓`
unsetLabel—$localize`Not set`
saveLabel—$localize`Save key`
autocompletestring"off"
clearablebooleanfalse
输出
名称类型
save

The parent must not log or store this outside the Keychain.

string
clearvoid