Fixed #1066 - hideIcon and showIcon for Password

pull/1281/head
Cagatay Civici 2021-05-18 12:57:22 +03:00
parent 6963002487
commit 092396ca9c
6 changed files with 37 additions and 1 deletions

View File

@ -70,6 +70,18 @@ const PasswordProps = [
type: "string",
default: "null",
description: "Style class of the input field."
},
{
name: "hideIcon",
type: "string",
default: "pi pi-eye-slash",
description: "Icon to hide displaying the password as plain text."
},
{
name: "showIcon",
type: "string",
default: "pi pi-eye",
description: "Icon to show displaying the password as plain text."
}
];

View File

@ -3,6 +3,7 @@ import { VNode } from 'vue';
interface AccordionProps {
multiple?: boolean;
activeIndex?: Number|[Number];
lazy?: boolean;
}
declare class Accordion {

View File

@ -12,6 +12,8 @@ interface PasswordProps {
inputStyle?: any;
inputClass?: string;
panelClass?: string;
hideIcon?: string;
showIcon?: string;
}
declare class Password {

View File

@ -66,6 +66,14 @@ export default {
type: Boolean,
default: false
},
hideIcon: {
type: String,
default: 'pi pi-eye-slash'
},
showIcon: {
type: String,
default: 'pi pi-eye'
},
inputClass: String,
inputStyle: null,
style: null,
@ -264,7 +272,7 @@ export default {
}];
},
toggleIconClass() {
return this.unmasked ? 'pi pi-eye-slash' : 'pi pi-eye';
return this.unmasked ? this.hideIcon : this.showIcon;
},
strengthClass() {
return `p-password-strength ${this.meter ? this.meter.strength : ''}`;

View File

@ -2,6 +2,7 @@ import { VNode } from 'vue';
interface TabViewProps {
activeIndex?: number;
lazy?: boolean;
}
declare class TabView {

View File

@ -141,6 +141,18 @@ import Password from 'primevue/password';
<td>string</td>
<td>null</td>
<td>Style class of the input field.</td>
</tr>
<tr>
<td>hideIcon</td>
<td>string</td>
<td>pi pi-eye-slash</td>
<td>Icon to hide displaying the password as plain text.</td>
</tr>
<tr>
<td>showIcon</td>
<td>string</td>
<td>pi pi-eye</td>
<td>Icon to show displaying the password as plain text.</td>
</tr>
</tbody>
</table>