Password | placeholder prop
parent
c6d34c9b60
commit
a1be1d24bc
|
@ -77,6 +77,12 @@ const PasswordProps = [
|
|||
default: "pi pi-eye",
|
||||
description: "Icon to show displaying the password as plain text."
|
||||
},
|
||||
{
|
||||
name: "placeholder",
|
||||
type: "string",
|
||||
default: "null",
|
||||
description: "Placeholder text for the input."
|
||||
},
|
||||
{
|
||||
name: "inputId",
|
||||
type: "string",
|
||||
|
|
|
@ -59,6 +59,10 @@ export interface PasswordProps extends InputHTMLAttributes {
|
|||
* Default value is 'pi pi-eye'.
|
||||
*/
|
||||
showIcon?: string | undefined;
|
||||
/**
|
||||
* Placeholder text for the input.
|
||||
*/
|
||||
placeholder?: string | undefined;
|
||||
/**
|
||||
* Identifier of the underlying input element.
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div :class="containerClass">
|
||||
<PInputText ref="input" :id="inputId" :type="inputType" :class="inputClass" :style="inputStyle" :value="modelValue" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel"
|
||||
:aria-controls="(panelProps&&panelProps.id)||panelId||panelUniqueId" :aria-expanded="overlayVisible" :aria-haspopup="true"
|
||||
:aria-controls="(panelProps&&panelProps.id)||panelId||panelUniqueId" :aria-expanded="overlayVisible" :aria-haspopup="true" :placeholder="placeholder"
|
||||
@input="onInput" @focus="onFocus" @blur="onBlur" @keyup="onKeyUp" v-bind="inputProps" />
|
||||
<i v-if="toggleMask" :class="toggleIconClass" @click="onMaskToggle" />
|
||||
<span class="p-hidden-accessible" aria-live="polite">
|
||||
|
@ -83,7 +83,10 @@ export default {
|
|||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
inputId: null,
|
||||
inputClass: null,
|
||||
inputStyle: null,
|
||||
|
|
|
@ -155,6 +155,12 @@ import Password from 'primevue/password';
|
|||
<td>pi pi-eye</td>
|
||||
<td>Icon to show displaying the password as plain text.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>placeholder</td>
|
||||
<td>string</td>
|
||||
<td>null</td>
|
||||
<td>Placeholder text for the input.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inputId</td>
|
||||
<td>string</td>
|
||||
|
|
Loading…
Reference in New Issue