added edit fonction
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {Component, Input, input} from '@angular/core';
|
||||
import {Component, Input, input, output} from '@angular/core';
|
||||
import { NzButtonModule } from 'ng-zorro-antd/button';
|
||||
import { NzModalModule } from 'ng-zorro-antd/modal';
|
||||
import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
@@ -10,9 +10,10 @@ import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
styleUrls: ['./modal-nav.css'],
|
||||
})
|
||||
export class ModalNav {
|
||||
@Input() nameIcon: string = '';
|
||||
@Input() name: string = '';
|
||||
|
||||
nameIcon = input.required<string>()
|
||||
name = input.required<string>()
|
||||
ok = output<void>();
|
||||
cancel = output<void>();
|
||||
isVisible = false;
|
||||
isOkLoading = false;
|
||||
|
||||
@@ -23,12 +24,14 @@ export class ModalNav {
|
||||
handleOk(): void {
|
||||
this.isOkLoading = true;
|
||||
setTimeout(() => {
|
||||
this.isVisible = false;
|
||||
this.ok.emit();
|
||||
this.isOkLoading = false;
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
handleCancel(): void {
|
||||
this.isVisible = false;
|
||||
this.cancel.emit();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user