ionic stepper
release: 1.1.0
Steppers componentes para ionic.
中文 Readme
ionic-angular: ^3.x@angular/animations: ^4.x $ npm install ionic-stepper
# or
$ yarn add ionic-stepper
importar em your-root.module.ts
import { BrowserModule } from '@angular/platform-browser' ;
import { BrowserAnimationsModule } from '@angular/platform-browser/animations' ;
import { ErrorHandler , NgModule } from '@angular/core' ;
import { IonicApp , IonicErrorHandler , IonicModule } from 'ionic-angular' ;
...
import { IonicStepperModule } from 'ionic-stepper' ;
@ NgModule ( {
...
imports : [
BrowserModule ,
BrowserAnimationsModule ,
IonicStepperModule ,
IonicModule . forRoot ( MyApp )
] ,
...
} )
export class AppModule { } your-component.ts
import { Component } from '@angular/core' ;
import { NavController } from 'ionic-angular' ;
@ Component ( {
selector : 'page-home' ,
template : `
<ion-stepper #stepper (selectIndexChange)="selectChange($event)">
<ion-step label="Step1"
description="Step1 description">
<h2>Step1 Content</h2>
<p>Step1 Content</p>
<button ion-button small ionicStepperNext>Next</button>
</ion-step>
<ion-step label="Step2 - Step2 - Step2"
description="Step1 description">
<h2>Step2 Content</h2>
<p>Step2 Content</p>
<button ion-button color="light" small ionicStepperPrevious>Previous</button>
</ion-step>
</ion-stepper>
`
} )
export class HomePage {
constructor ( public navCtrl : NavController ) { }
selectChange ( e ) {
console . log ( e ) ;
}
} ion-stepper | Nome | Tipo | Padrão | Descrição |
|---|---|---|---|
| [modo] | 'horizontal', 'vertical' | 'vertical' | orientação |
| (SelectIndexchange) | EventEmitter<number> | Evento de mudança de índice |
| Nome | Descrição |
|---|---|
| NextStep (): Void | Próximo passo |
| anteriorstep (): vazio | Etapa anterior |
| setstep (índice: número): booleano | Define o passo por índice |
ion-step | Nome | Tipo | Padrão | Descrição |
|---|---|---|---|
| [rótulo] | string | Etiqueta | |
| [descrição] | string | Descrição da etapa (somente o modo vertical é visível) | |
| [ícone] | icon | 'number' | Ícone da etapa, padrão Exibir o índice (ícones) |
| [status] | 'error', '' | '' | status da etapa |
| [Erroricon] | string | 'close' | Icon de status de erro |
[ionicStepperNext]se move para o próximo passo no passo
<button ion-button ionicStepperNext>Next</button>
[ionicStepperPrevious]move para a etapa anterior no passo
<button ion-button ionicStepperPrevious>Previous</button>
Este projeto está licenciado sob a licença do MIT - consulte o arquivo de licença para obter detalhes