-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module:steps): support for clickable steps
- Loading branch information
Showing
8 changed files
with
135 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
order: 10 | ||
title: | ||
zh-CN: 可点击 | ||
en-US: Clickable | ||
--- | ||
|
||
## zh-CN | ||
|
||
订阅 `(nzIndexChange)` 后,Steps 变为可点击状态。 | ||
|
||
## en-US | ||
|
||
subscribe `(nzIndexChange)` makes Steps clickable. | ||
|
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,25 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-steps-clickable', | ||
template: ` | ||
<nz-steps [nzCurrent]="index" (nzIndexChange)="onIndexChange($event)"> | ||
<nz-step nzTitle="Finished" nzDescription="This is a description."></nz-step> | ||
<nz-step nzTitle="In Progress" nzDescription="This is a description."></nz-step> | ||
<nz-step nzTitle="Waiting" nzDescription="This is a description."></nz-step> | ||
</nz-steps> | ||
<nz-divider></nz-divider> | ||
<nz-steps nzDirection="vertical" [nzCurrent]="index" (nzIndexChange)="onIndexChange($event)"> | ||
<nz-step nzTitle="Finished" nzDescription="This is a description."></nz-step> | ||
<nz-step nzTitle="In Progress" nzDescription="This is a description."></nz-step> | ||
<nz-step nzTitle="Waiting" nzDescription="This is a description."></nz-step> | ||
</nz-steps> | ||
` | ||
}) | ||
export class NzDemoStepsClickableComponent { | ||
index = 0; | ||
|
||
onIndexChange(index: number): void { | ||
this.index = index; | ||
} | ||
} |
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,6 @@ | ||
import { NzStepsModule } from 'ng-zorro-antd/steps'; | ||
import { NzPopoverModule } from 'ng-zorro-antd/popover'; | ||
import { NzButtonModule } from 'ng-zorro-antd/button'; | ||
import { NzDividerModule } from 'ng-zorro-antd/divider'; | ||
|
||
export const moduleList = [ NzStepsModule, NzPopoverModule, NzButtonModule ]; | ||
export const moduleList = [ NzStepsModule, NzPopoverModule, NzButtonModule, NzDividerModule ]; |
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