9 changed files with 111 additions and 9 deletions
@ -0,0 +1,12 @@ |
|||||||
|
<div class="box"> |
||||||
|
<form nz-form [formGroup]="validateForm"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-control> |
||||||
|
<nz-select nzMode="multiple" formControlName="script" nzPlaceHolder="请选择脚本"> |
||||||
|
<nz-option [nzValue]="'restartContainer'" nzLabel="restartContainer"></nz-option> |
||||||
|
<nz-option [nzValue]="'restartMonitor'" nzLabel="restartMonitor"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</form> |
||||||
|
</div> |
@ -0,0 +1,25 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
import { NzModalRef } from 'ng-zorro-antd/modal'; |
||||||
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; |
||||||
|
import { HttpClient } from '@angular/common/http'; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-script', |
||||||
|
templateUrl: './script.component.html', |
||||||
|
styleUrls: ['./script.component.scss'] |
||||||
|
}) |
||||||
|
export class ScriptComponent implements OnInit { |
||||||
|
|
||||||
|
validateForm!: FormGroup; |
||||||
|
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } |
||||||
|
|
||||||
|
ngOnInit(): void { |
||||||
|
this.validateForm = this.fb.group({ |
||||||
|
script: [null, [Validators.required]], |
||||||
|
}); |
||||||
|
} |
||||||
|
destroyModal(): void { |
||||||
|
this.modal.destroy({ data: 'this the result data' }); |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue