跳到主要内容
版本:v8

密码可见性切换组件

shadow

InputPasswordToggle 组件是 Input 的配套组件。它允许用户在密码输入框内切换文本内容的可见性。

基本用法

信息

InputPasswordToggle 必须与 Input 组件配合使用,并且该 Input 的 type 属性必须设置为 'text''password'

使用任何其他 type 类型都会导致控制台输出警告信息。

属性

color

DescriptionThe color to use from your application's color palette. Default options are: "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information on colors, see theming.
Attributecolor
Type"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined
Defaultundefined

hideIcon

DescriptionThe icon that can be used to represent hiding a password. If not set, the "eyeOff" Ionicon will be used.
Attributehide-icon
Typestring | undefined
Defaultundefined

mode

DescriptionThe mode determines which platform styles to use.

This is a virtual property that is set once during initialization and will not update if you change its value after the initial render.
Attributemode
Type"ios" | "md"
Defaultundefined

showIcon

DescriptionThe icon that can be used to represent showing a password. If not set, the "eye" Ionicon will be used.
Attributeshow-icon
Typestring | undefined
Defaultundefined

事件

No events available for this component.

方法

No public methods available for this component.

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS 自定义属性

No CSS custom properties available for this component.

插槽

No slots available for this component.