import { Component , OnInit } from '@angular/core' ; import { ThyArrowSwitcherEvent } from 'ngx-tethys/arrow-switcher' ; @ Component ( { selector : 'thy-arrow-switcher-basic-example' , templateUrl : './basic.component.html' } ) export class ThyArrowSwitcherBasicExampleComponent implements OnInit { index = 0 ; totalCount = 10 ; constructor ( ) { } ngOnInit ( ) { } onPreviousClick ( event ) { console . log ( '点击上一条' + event . index ) ; } onNextClick ( event ) { console . log ( '点击下一条' + event . index ) ; } }