-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
729 additions
and
626 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,6 @@ npm install [email protected] --save | |
npm install [email protected] --save | ||
``` | ||
|
||
注意:v13.0.0(只包含多选框,简单表格,映射管道),推荐使用最新版本,具体 feature 请查看组件文档中基本使用下的版本 | ||
注意:v13.0.0(只包含多选框,简单表格,映射管道),推荐使用最新版本,具体 feature 请查看组件文档中使用下的版本 | ||
|
||
欢迎 star fork pr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,6 @@ export class AppModule {} | |
npm install [email protected] --save | ||
``` | ||
|
||
注意:v13.0.0(只包含多选框,简单表格,映射管道),推荐使用 15.0.0+以上版本,具体 feature 请查看组件文档中基本使用下的版本 | ||
注意:v13.0.0(只包含多选框,简单表格,映射管道),推荐使用 15.0.0+以上版本,具体 feature 请查看组件文档中使用下的版本 | ||
|
||
欢迎在 [github](https://github.com/EnochGao/ng-zorro-antd-extension) star fork pr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 61 additions & 46 deletions
107
components/configurable-query/configurable-query.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,66 @@ | ||
<form #queyForm class="nzx-query-container" nz-form [formGroup]="queryForm"> | ||
<div nz-row [nzGutter]="nzxGutter" [nzJustify]="nzxJustify"> | ||
<ng-container *ngFor="let config of controls; let i = index"> | ||
<nz-card> | ||
<form #queyForm class="nzx-query-container" nz-form [formGroup]="queryForm"> | ||
<div nz-row [nzGutter]="nzxGutter" [nzJustify]="nzxJustify"> | ||
<ng-container *ngFor="let config of controls; let i = index"> | ||
<div | ||
*ngIf="!config.hidden" | ||
nz-col | ||
[nzSpan]="config.nzxSpan || 24 / lineNumber" | ||
[hidden]="config.collapse" | ||
[nzOrder]="i" | ||
> | ||
<nzx-configurable-query-item | ||
*ngIf="config.controlName" | ||
[form]="queryForm" | ||
[control]="config" | ||
></nzx-configurable-query-item> | ||
</div> | ||
</ng-container> | ||
|
||
<div | ||
*ngIf="!config.hidden" | ||
class="nzx-query-btn" | ||
nz-col | ||
[nzSpan]="config.nzxSpan || 24 / lineNumber" | ||
[hidden]="config.collapse" | ||
[nzOrder]="i" | ||
[nzOrder]="controls.length" | ||
[nzSpan]="nzxBtnSpan || 24 / lineNumber" | ||
> | ||
<nzx-configurable-query-item | ||
*ngIf="config.controlName" | ||
[form]="queryForm" | ||
[control]="config" | ||
></nzx-configurable-query-item> | ||
</div> | ||
</ng-container> | ||
|
||
<div | ||
[nzOrder]="controls.length" | ||
class="nzx-query-btn" | ||
nz-col | ||
[nzSpan]="nzxBtnSpan || 24 / lineNumber" | ||
> | ||
<div nz-row nzJustify="end" nzAlign="middle"> | ||
<button | ||
nz-button | ||
nzType="primary" | ||
type="button" | ||
title="Enter" | ||
(click)="search()" | ||
> | ||
{{ locale['query'] }} | ||
</button> | ||
<button nz-button type="button" title="ctrl+r" (click)="reset()"> | ||
{{ locale['reset'] }} | ||
</button> | ||
<ng-content></ng-content> | ||
<a | ||
*ngIf="nzxCollapse" | ||
nz-button | ||
nzType="link" | ||
(click)="toggleCollapse()" | ||
> | ||
{{ collapseText }} | ||
<i nz-icon [nzType]="collapseIcon"></i> | ||
</a> | ||
<div nz-row nzJustify="end" nzAlign="middle"> | ||
<nz-space> | ||
<button | ||
*nzSpaceItem | ||
nz-button | ||
nzType="primary" | ||
type="button" | ||
title="Enter" | ||
(click)="search()" | ||
> | ||
{{ locale['query'] }} | ||
</button> | ||
<button | ||
*nzSpaceItem | ||
nz-button | ||
type="button" | ||
title="ctrl+r" | ||
(click)="reset()" | ||
> | ||
{{ locale['reset'] }} | ||
</button> | ||
<ng-container *nzSpaceItem> | ||
<ng-content></ng-content> | ||
</ng-container> | ||
<ng-container *ngIf="nzxCollapse"> | ||
<a | ||
*nzSpaceItem | ||
nz-button | ||
nzType="link" | ||
(click)="toggleCollapse()" | ||
> | ||
{{ collapseText }} | ||
<i nz-icon [nzType]="collapseIcon"></i> | ||
</a> | ||
</ng-container> | ||
</nz-space> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</form> | ||
</nz-card> |
8 changes: 0 additions & 8 deletions
8
components/configurable-query/configurable-query.component.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,10 @@ | ||
.nzx-query-container { | ||
padding: 12px; | ||
background-color: #fff; | ||
border-radius: 8px; | ||
|
||
[nz-form-label] { | ||
overflow: visible; | ||
} | ||
|
||
.nzx-query-btn { | ||
flex-grow: 2; | ||
max-width: none; | ||
|
||
button { | ||
margin: 0 4px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
category: component | ||
title: 动态表单 | ||
subtitle: nzx-dynamic-form | ||
order: 10 | ||
--- | ||
|
||
<alert type="warning">开发中...</alert> | ||
|
||
动态表单通过配置项快速实现表单 | ||
|
||
## 版本支持 | ||
|
||
<label type="success">v17.5.0+ </label> | ||
|
||
<label type="success">v18.2.0+ </label> | ||
|
||
## 使用 | ||
|
||
### 引入 | ||
|
||
```ts | ||
import { NzxDynamicFormModule } from 'ng-zorro-antd-extension/dynamic-form'; | ||
``` | ||
|
||
appModule 中 | ||
|
||
```ts | ||
@NgModule({ | ||
imports: [NzxDynamicFormModule.forRoot()], | ||
}) | ||
class AppModule {} | ||
``` | ||
|
||
### html | ||
|
||
```html | ||
|
||
``` |
Oops, something went wrong.