Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module:tree-select): add status (#7477)
* feat(module:tree-select): add status add 'nzStatus' , display diffrent status of tree-select * docs update 'nzStatus' docs * test add 'nzStatus' tests * docs(module:tree-select): update status docs * update 'status' demo * fix(module:tree-select): add 'NzSpaceModule' * fix module of demo need to depend on NzSpaceModule Co-authored-by: wethin <806769481@qq.com>
- Loading branch information
Showing
7 changed files
with
146 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select'; | ||
import { NzIconModule } from 'ng-zorro-antd/icon'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { NzSpaceModule } from 'ng-zorro-antd/space'; | ||
|
||
export const moduleList = [ FormsModule, NzTreeSelectModule, NzIconModule ]; | ||
|
||
export const moduleList = [ FormsModule, NzTreeSelectModule, NzIconModule , NzSpaceModule]; |
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,15 @@ | ||
--- | ||
order: 8 | ||
title: | ||
zh-CN: 自定义状态 | ||
en-US: Status | ||
--- | ||
|
||
## zh-CN | ||
|
||
使用 `nzStatus` 为 `TreeSelect` 添加状态,可选 `error` 或者 `warning`。 | ||
|
||
## en-US | ||
|
||
Add status to TreeSelect with `nzStatus`, which could be `error` or `warning`. | ||
|
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,31 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-tree-select-status', | ||
template: ` | ||
<nz-space nzDirection="vertical" style="width:100%;"> | ||
<nz-tree-select | ||
*nzSpaceItem | ||
[nzNodes]="nodes" | ||
nzStatus="error" | ||
nzPlaceHolder="Error" | ||
[(ngModel)]="value" | ||
style="width:100%;" | ||
></nz-tree-select> | ||
<nz-tree-select | ||
*nzSpaceItem | ||
nzMultiple | ||
[nzNodes]="nodes" | ||
nzShowSearch | ||
nzStatus="warning" | ||
nzPlaceHolder="Warning multiple" | ||
[(ngModel)]="value" | ||
style="width:100%;" | ||
></nz-tree-select> | ||
</nz-space> | ||
` | ||
}) | ||
export class NzDemoTreeSelectStatusComponent { | ||
value?: string; | ||
nodes = []; | ||
} |
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