updated supplier page
This commit is contained in:
@@ -1,21 +1,24 @@
|
||||
import {Component, input, Input} from '@angular/core';
|
||||
import {Component, input, Input, output} from '@angular/core';
|
||||
import {NzModalComponent} from "ng-zorro-antd/modal";
|
||||
import {NzButtonComponent} from "ng-zorro-antd/button";
|
||||
|
||||
@Component({
|
||||
selector: 'app-modal-button',
|
||||
selector: 'app-modal-button',
|
||||
imports: [
|
||||
NzModalComponent,
|
||||
NzButtonComponent,
|
||||
],
|
||||
templateUrl: './modal-button.html',
|
||||
styleUrl: './modal-button.css',
|
||||
templateUrl: './modal-button.html',
|
||||
styleUrl: './modal-button.css',
|
||||
})
|
||||
|
||||
export class ModalButton {
|
||||
name = input.required<string>()
|
||||
type = input<"primary" | "default" | "dashed" | "link" | "text">()
|
||||
|
||||
ok = output<void>();
|
||||
cancel = output<void>();
|
||||
|
||||
isVisible = false;
|
||||
isOkLoading = false;
|
||||
|
||||
@@ -26,12 +29,14 @@ export class ModalButton {
|
||||
handleOk(): void {
|
||||
this.isOkLoading = true;
|
||||
setTimeout(() => {
|
||||
this.ok.emit();
|
||||
this.isVisible = false;
|
||||
this.isOkLoading = false;
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
handleCancel(): void {
|
||||
this.cancel.emit();
|
||||
this.isVisible = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user