参考
密码输入 Password Input
PasswordInput:密码输入。显示/隐藏按钮安静地停在字段边缘并原位切换,不产生位移或噪声。部件:Root、Label、Control、Input、Indicator、VisibilityTrigger。
Root · Input · Label · Control · Indicator · VisibilityTrigger
#Control
纯造型的部件——自身没有属性,沿用部件结构的共享样式。
#Indicator
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
fallback | string | 密码隐藏时显示的替代内容 |
#Input
纯造型的部件——自身没有属性,沿用部件结构的共享样式。
#Label
纯造型的部件——自身没有属性,沿用部件结构的共享样式。
#Root
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
size | String as PropType<"sm" | "md" | "lg"> | "md" | 输入框和可见性切换按钮使用的控件高度档位 |
autoComplete | passwordInput.Props['autoComplete'] | 输入框的 autocomplete 属性 | |
defaultVisible | boolean | 密码是否默认可见 | |
disabled | boolean | 是否禁用输入框 | |
id | string | 组件内部状态机的唯一标识 | |
ids | passwordInput.Props['ids'] | 密码输入框各元素的 id,便于组合使用 | |
ignorePasswordManagers | boolean | 是否忽略密码管理器 | |
invalid | boolean | 输入框是否无效 | |
name | string | 输入框的 name 属性 | |
readOnly | boolean | 输入框是否只读 | |
required | boolean | 输入框是否必填 | |
translations | passwordInput.IntlTranslations | 无障碍元素及其状态使用的本地化文案 | |
visible | boolean | 密码是否可见 |
| 事件 | 载荷 |
|---|---|
visibilityChange | details: VisibilityChangeDetails |
update:visible | visible: boolean |
#VisibilityTrigger
纯造型的部件——自身没有属性,沿用部件结构的共享样式。