ng-ytl-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
86 lines (76 loc) • 1.93 kB
text/typescript
import { Component } from '@angular/core';
import { NzMessageService } from '../../../index.showcase';
export class NzDemoStepsChangeComponent {
current = 0;
index = 'First-content';
pre() {
this.current -= 1;
this.changeContent();
}
next() {
this.current += 1;
this.changeContent();
}
done() {
this._message.success('done');
}
changeContent() {
switch (this.current) {
case 0: {
this.index = 'First-content';
break;
}
case 1: {
this.index = 'Second-content';
break;
}
case 2: {
this.index = 'third-content';
break;
}
default: {
this.index = 'error';
}
}
}
constructor(private _message: NzMessageService) {
}
}