1import router from '@ohos.router'; 2 3@Entry 4@Component 5struct Index { 6 aboutToAppear() { 7 console.info('TestAbility index aboutToAppear') 8 } 9 @State message: string = 'Hello World' 10 build() { 11 Row() { 12 Column() { 13 Text(this.message) 14 .fontSize(50) 15 .fontWeight(FontWeight.Bold) 16 Button() { 17 Text('next page') 18 .fontSize(20) 19 .fontWeight(FontWeight.Bold) 20 }.type(ButtonType.Capsule) 21 .margin({ 22 top: 20 23 }) 24 .backgroundColor('#0D9FFB') 25 .width('35%') 26 .height('5%') 27 .onClick(()=>{ 28 }) 29 } 30 .width('100%') 31 } 32 .height('100%') 33 } 34 }