forked from NG-ZORRO/ng-zorro-antd
/
clickable.ts
25 lines (24 loc) 路 1 KB
/
clickable.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { Component } from '@angular/core';
@Component({
selector: 'nz-demo-steps-clickable',
template: `
<nz-steps [nzCurrent]="index" (nzIndexChange)="onIndexChange($event)">
<nz-step nzTitle="Finished" [nzDisabled]="disable" 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;
disable = false;
onIndexChange(index: number): void {
this.index = index;
}
}