Test.ets 495 Bytes
@Entry
@Component
export struct Test {
  @Prop currentItem: string = '';
  @Prop @Watch('currentIndexChange') currentIndex: number = 0;
  @Prop index: number = 0;

  currentIndexChange() {
    console.log('currentIndexChange====', this.currentIndex);
  }

  build() {
    Row() {
      Column() {
        Text('currentItem:  ' + this.currentItem).fontSize(30)
        Text('currentIndex:  ' + this.currentIndex).fontSize(30)
        Text('index:  ' + this.index).fontSize(30)
      }
    }
  }
}