<nz-modal [(nzVisible)]="isShow" [nzTitle]="title" [nzContent]="modalContent" [nzFooter]="modalFooter" (nzOnCancel)="handleCancel()"><ng-template #modalContent><div class="content"></div></ng-template><ng-template #modalFooter><button nz-button [nzType]="'primary'" (click)="handleOk()" [nzLoading]="isLoading">确定</button>
<button nz-button [nzType]="'default'" (click)="handleCancel()">取消</button></ng-template></nz-modal>ts里得内容:public isShow = false;public isLoading = false;// 取消public handleCancel() {this.isShow = false;}// 确定public handleOk() {this.isLoading = true;this.param['name'] = this.inputValuethis.roleManagementService.addModifyDepartment(this.param).subscribe((res: any) => { if (res.status === 0) {
console.log(res.data)
} else {
console.log(res.data)
} this.isLoading = false; this.isShow = false;
});}
添加回答
举报
0/150
提交
取消