Commit c94c1501 authored by ibuler's avatar ibuler

[Update] 支持回车确认

parent 373d0550
......@@ -453,6 +453,10 @@ export class ManualPasswordDialogComponent implements OnInit {
this.dialogRef.close();
}
onEnter() {
this.dialogRef.close(this.data);
}
ngOnInit(): void {
}
}
......@@ -5,10 +5,13 @@
</mat-form-field>
<mat-form-field style="width: 100%">
<input matInput [type]="'password'" [(ngModel)]="data.password" [formControl]="PasswordControl" placeholder="{{'Password'|trans}}">
<input matInput [type]="'password'" [(ngModel)]="data.password"
[formControl]="PasswordControl" placeholder="{{'Password'|trans}}"
(keyup.enter)="onEnter()">
</mat-form-field>
<div style="float: right">
<button mat-raised-button (click)="onNoClick()" >{{"Cancel"|trans}}</button>
<button mat-raised-button color="primary" [type]="'submit'" [mat-dialog-close]="data" >{{"Confirm"|trans}}</button>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment