This commit is contained in:
Taric Xin
2022-04-28 20:39:34 +08:00
parent de140ceec5
commit 075c61add9
4 changed files with 36 additions and 7 deletions

View File

@ -1,14 +1,17 @@
<nz-drawer [nzBodyStyle]="{ overflow: 'auto' }" [nzMaskClosable]="false" [nzWidth]="420" [nzVisible]="service.visible"
<nz-drawer [nzBodyStyle]="{ overflow: 'auto' }" [nzMaskClosable]="false" [nzWidth]="640" [nzVisible]="service.visible"
[nzMaskClosable]="true" nzTitle="筛选" [nzFooter]="footerTpl" (nzOnClose)="destroy()">
<div *nzDrawerContent>
<sf *ngIf="schema" #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'" [formData]="defaultValue">
<sf *ngIf="schema" #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'" [formData]="defaultValue"
layout="vertical">
</sf>
</div>
<ng-template #footerTpl>
<div style="float: right">
<button nz-button (click)="destroy()">关闭</button>
<button nz-button (click)="resetSF()">重置</button>
<button nz-button nzType="primary" (click)="search();;">查询</button>
<div style="display: flex;justify-content: space-between;">
<button nz-button (click)="destroy()">取消</button>
<div>
<button nz-button nzType="primary" (click)="search()"><i nz-icon nzType="search" nzTheme="outline"></i>查询</button>
<button nz-button (click)="resetSF()"><i nz-icon nzType="redo" nzTheme="outline"></i>重置</button>
</div>
</div>
</ng-template>
</nz-drawer>

View File

@ -10,7 +10,7 @@ import { SearchDrawerService } from './search-drawer.service';
})
export class SearchDrawerComponent implements OnInit, AfterViewInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
ui: SFUISchema = { '*': { spanLabelFixed: 95, grid: { span: 24, gutter: 4 } } };
ui: SFUISchema = { '*': { spanLabelFixed: 95, grid: { span: 12, gutter: 24 } } };
schema!: SFSchema;
loading = true;