<h1 mat-dialog-title *ngIf="data?.object?.id">{{"编辑"}}-{{data?.object?.get("name")}}</h1>
<h1 mat-dialog-title *ngIf="!data?.object?.id">{{"创建新"}}{{data?.title}}</h1>
<div mat-dialog-content>
    <form *ngIf="isFormShow">
        <ng-container *ngFor="let field of data?.fieldsArray">
            <mat-form-field>
                <mat-label >{{field?.name}}</mat-label>
                <!-- [errorState]="requiredErrorMap[field?.key]" -->
                <input matInput [(ngModel)]="jsonData[field?.key]" [formControl]="formControlMap[field?.key]||null" >
                <mat-error *ngIf="requiredErrorMap[field?.key]">
                    {{field?.name}}<strong >必填</strong>
                </mat-error>
            </mat-form-field>
        </ng-container>
    </form>
</div>
<div mat-dialog-actions>
  <button mat-button [disabled]="isSaving" (click)="close()" >{{"取消"}}</button>
  <button mat-button [disabled]="isSaving" (click)="save()" >{{"保存"}}</button>
</div>