mirror of https://github.com/abpframework/abp.git
2 changed files with 38 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||||
|
<div class="input-group"> |
||||
|
<div class="col-9 col-md-10 p-0"> |
||||
|
<input |
||||
|
[type]="fieldTextType ? 'text' : 'password'" |
||||
|
class="form-control" |
||||
|
[id]="prop.id" |
||||
|
[formControlName]="prop.name" |
||||
|
/> |
||||
|
</div> |
||||
|
<span class="input-group-text"> |
||||
|
<i |
||||
|
class="fa" |
||||
|
[ngClass]="{ |
||||
|
'fa-eye-slash': !fieldTextType, |
||||
|
'fa-eye': fieldTextType |
||||
|
}" |
||||
|
(click)="toggleFieldTextType()" |
||||
|
></i> |
||||
|
</span> |
||||
|
</div> |
||||
@ -0,0 +1,18 @@ |
|||||
|
import { Component, Input } from '@angular/core'; |
||||
|
import { EXTENSIBLE_FORM_VIEW_PROVIDER } from '../../tokens/extensible-form-view-provider.token'; |
||||
|
import { FormProp } from '../../models/form-props'; |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'abp-password', |
||||
|
templateUrl: `password.component.html`, |
||||
|
viewProviders: [EXTENSIBLE_FORM_VIEW_PROVIDER], |
||||
|
}) |
||||
|
export class PasswordComponent { |
||||
|
@Input() prop!: FormProp; |
||||
|
|
||||
|
fieldTextType: boolean; |
||||
|
|
||||
|
toggleFieldTextType() { |
||||
|
this.fieldTextType = !this.fieldTextType; |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue