邵佳豪
3 years ago
6 changed files with 102 additions and 9 deletions
@ -0,0 +1,27 @@ |
|||||||
|
<div class="box"> |
||||||
|
<form nz-form [formGroup]="validateForm"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-control nzErrorTip=""> |
||||||
|
<nz-input-group> |
||||||
|
<input name="oldpassword" nz-input type="text" formControlName="oldpassword" placeholder="请输入原密码" autocomplete="off" /> |
||||||
|
</nz-input-group> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-control> |
||||||
|
<nz-input-group> |
||||||
|
<input name="newpassword" nz-input type="password" formControlName="newpassword" placeholder="请输入新密码" |
||||||
|
autocomplete="off" /> |
||||||
|
</nz-input-group> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-control> |
||||||
|
<nz-input-group> |
||||||
|
<input name="affirmpassword" nz-input type="password" formControlName="affirmpassword" placeholder="确认新密码" |
||||||
|
autocomplete="new-password" /> |
||||||
|
</nz-input-group> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</form> |
||||||
|
</div> |
@ -0,0 +1,22 @@ |
|||||||
|
import { Component, OnInit, Input } from '@angular/core'; |
||||||
|
import { NzModalRef } from 'ng-zorro-antd/modal'; |
||||||
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
||||||
|
import { HttpClient } from '@angular/common/http'; |
||||||
|
@Component({ |
||||||
|
selector: 'app-change-password', |
||||||
|
templateUrl: './change-password.component.html', |
||||||
|
styleUrls: ['./change-password.component.scss'] |
||||||
|
}) |
||||||
|
export class ChangePasswordComponent implements OnInit { |
||||||
|
|
||||||
|
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } |
||||||
|
validateForm!: FormGroup; |
||||||
|
ngOnInit(): void { |
||||||
|
this.validateForm = this.fb.group({ |
||||||
|
oldpassword: [null, [Validators.required]], |
||||||
|
newpassword: [null, [Validators.required]], |
||||||
|
affirmpassword: [null, [Validators.required]] |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue