邵佳豪
4 years ago
10 changed files with 670 additions and 484 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,48 @@
|
||||
<div mat-dialog-title> |
||||
修改密码 |
||||
</div> |
||||
<div class="passwordCard" mat-dialog-content> |
||||
|
||||
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container"> |
||||
|
||||
<!-- <span class="cardLeft">原密码</span> |
||||
<mat-form-field> |
||||
<input matInput id="password" name="password" |
||||
required type="password" |
||||
ngModel #password="ngModel" placeholder="请输入原密码"> |
||||
</mat-form-field> --> |
||||
|
||||
<span class="cardLeft">新密码</span> |
||||
<mat-form-field> |
||||
<input matInput id="newPassword" name="newPassword" type="password" |
||||
required pattern="^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.+[\!\@\#\$\%\^\&\*\(\)\-\=\\\`\_\+\|\~\[\]\{\}\;\'\:\,\.\/\<\>\?])[A-Za-z0-9\!\@\#\$\%\^\&\*\(\)\-\=\\\`\_\+\|\~\[\]\{\}\;\'\:\,\.\/\<\>\?]{8,32}$" |
||||
ngModel #newPassword="ngModel" placeholder="请输入新密码"> |
||||
</mat-form-field> |
||||
<div *ngIf="newPassword.invalid && (newPassword.dirty || newPassword.touched)"> |
||||
<div class="group-error-content">密码格式为8-20位,大小写字母+数字+特殊字符</div> |
||||
</div> |
||||
|
||||
<span class="cardLeft">确认新密码</span> |
||||
<mat-form-field> |
||||
<input matInput id="newsPassword" name="newsPassword" type="password" |
||||
required |
||||
ngModel #newsPassword="ngModel" placeholder="请确认新密码" |
||||
[appConfirmpsw] = "newPassword.value"> |
||||
</mat-form-field> |
||||
<div *ngIf="newsPassword.touched&&newsPassword.invalid"> |
||||
<div class="group-error-content">密码输入不一致!</div> |
||||
</div> |
||||
<div *ngIf="errmsg" class="group-error-content"> |
||||
{{errmsg}} |
||||
</div> |
||||
|
||||
<div mat-dialog-actions class="btnbox"> |
||||
<button mat-raised-button color="primary" type="submit" |
||||
[disabled]="!form.form.valid"> |
||||
确定 |
||||
</button> |
||||
<button mat-raised-button color="primary" mat-dialog-close>取消</button> |
||||
</div> |
||||
|
||||
</form> |
||||
</div> |
@ -0,0 +1,15 @@
|
||||
.passwordCard { |
||||
width: 300px; |
||||
height: 100%; |
||||
} |
||||
.mat-form-field { |
||||
display: block; |
||||
width: 300px; |
||||
} |
||||
.group-error-content { |
||||
font-size: 12px; |
||||
color: red; |
||||
} |
||||
.mat-dialog-content { |
||||
overflow: visible |
||||
} |
Loading…
Reference in new issue