From e37353e4279ec5134c6707d0a596dcbdfa314287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E5=8D=93=E4=BC=A6?= <2658469835@qq.com> Date: Thu, 15 May 2025 19:22:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=E6=B7=BB=E5=8A=A0=E5=90=8C=E6=BA=90?= =?UTF-8?q?=E6=A0=87=E8=AF=86(Question1Correct,Question1Incorrect,Question?= =?UTF-8?q?2Correct,Question2Incorrect,Question3Correct,Question3Incorrect?= =?UTF-8?q?,Question4Correct,Question4Incorrect,Question5Correct,Question5?= =?UTF-8?q?Incorrect,Question6Correct,Question6Incorrect,Question7Correct,?= =?UTF-8?q?Question7Incorrect,Question8Correct,Question8Incorrect)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/Question1Correct.ets | 9 +++++-- .../src/main/ets/pages/Question1Incorrect.ets | 8 ++++++- entry/src/main/ets/pages/Question2Correct.ets | 10 +++++++- .../src/main/ets/pages/Question2Incorrect.ets | 10 +++++--- entry/src/main/ets/pages/Question3Correct.ets | 8 +++++-- .../src/main/ets/pages/Question3Incorrect.ets | 5 ++-- entry/src/main/ets/pages/Question4Correct.ets | 8 +++++++ .../src/main/ets/pages/Question4Incorrect.ets | 14 +++++++++-- entry/src/main/ets/pages/Question5Correct.ets | 24 +++++++++++++++++-- .../src/main/ets/pages/Question5Incorrect.ets | 20 ++++++++++++++++ entry/src/main/ets/pages/Question6Correct.ets | 14 ++++++++++- .../src/main/ets/pages/Question6Incorrect.ets | 14 ++++++++++- entry/src/main/ets/pages/Question7Correct.ets | 6 ++++- .../src/main/ets/pages/Question7Incorrect.ets | 8 ++++++- entry/src/main/ets/pages/Question8Correct.ets | 6 ++++- .../src/main/ets/pages/Question8Incorrect.ets | 5 ++-- 16 files changed, 147 insertions(+), 22 deletions(-) diff --git a/entry/src/main/ets/pages/Question1Correct.ets b/entry/src/main/ets/pages/Question1Correct.ets index db2c403..57b6fa2 100644 --- a/entry/src/main/ets/pages/Question1Correct.ets +++ b/entry/src/main/ets/pages/Question1Correct.ets @@ -17,7 +17,7 @@ export function Question1CorrectBuilder() { Question1Correct() } - +// [Start Question1_correct ] @Component export struct Question1Correct { build() { @@ -39,15 +39,20 @@ export struct Question1Correct { .backgroundColor(Color.Orange) } } + // [StartExclude Question1_correct_part_one ] .padding({ left: 16, right: 16 }) + // [EndExclude Question1_correct_part_one ] } + // [StartExclude Question1_correct_part_two ] .hideTitleBar(true) .padding({ top: AppStorage.get('statusBarHeight') ?? 0, bottom: (AppStorage.get('naviIndicatorHeight') ?? 0) + 16 }) + // [EndExclude Question1_correct_part_two ] } -} \ No newline at end of file +} +// [End Question1_correct ] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question1Incorrect.ets b/entry/src/main/ets/pages/Question1Incorrect.ets index 3c0e3f6..270ccc0 100644 --- a/entry/src/main/ets/pages/Question1Incorrect.ets +++ b/entry/src/main/ets/pages/Question1Incorrect.ets @@ -18,6 +18,7 @@ export function Question1IncorrectBuilder() { Question1Incorrect() } +// [Start Question1_incorrect] @Component export struct Question1Incorrect { build() { @@ -37,17 +38,22 @@ export struct Question1Incorrect { .height(350) .backgroundColor(Color.Orange) } + // [StartExclude Question1_incorrect_part_one] .height('100%') .width('100%') .padding({ left: 16, right: 16 }) + // [EndExclude Question1_incorrect_part_one] } + // [StartExclude Question1_incorrect_part_two] .hideTitleBar(true) .padding({ top: AppStorage.get('statusBarHeight') ?? 0, bottom:( AppStorage.get('naviIndicatorHeight') ?? 0) + 16 }) + // [EndExclude Question1_incorrect_part_two] } -} \ No newline at end of file +} +// [End Question1_incorrect] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question2Correct.ets b/entry/src/main/ets/pages/Question2Correct.ets index 0b37820..e5f19c2 100644 --- a/entry/src/main/ets/pages/Question2Correct.ets +++ b/entry/src/main/ets/pages/Question2Correct.ets @@ -20,20 +20,24 @@ export function Question2CorrectBuilder() { Question2Correct() } +// [Start Question2_correct] @Component export struct Question2Correct { @State aspect: number = 9 / 16; // default video width/height ratio value + // [StartExclude Question2_correct_part_one] private xComponentController: XComponentController = new XComponentController(); private player?: AVPlayerUtil; aboutToDisappear(): void { this.player?.stopPlay(); } + // [EndExclude Question2_correct_part_one] build() { NavDestination() { Stack() { XComponent({ id: 'video_player_id', type: XComponentType.SURFACE, controller: this.xComponentController }) + // [StartExclude Question2_correct_part_two] .onLoad(() => { this.player = new AVPlayerUtil(); this.player.setSurfaceId(this.xComponentController.getXComponentSurfaceId()); @@ -41,12 +45,16 @@ export struct Question2Correct { this.aspect = aspect; }); }) + // [EndExclude Question2_correct_part_two] .aspectRatio(this.aspect) } .width('100%') .height('100%') .backgroundColor(Color.Black) } + // [StartExclude Question2_correct_part_three] .hideTitleBar(true) + // [EndExclude Question2_correct_part_three] } -} \ No newline at end of file +} +// [End Question2_correct] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question2Incorrect.ets b/entry/src/main/ets/pages/Question2Incorrect.ets index aab7594..18b374d 100644 --- a/entry/src/main/ets/pages/Question2Incorrect.ets +++ b/entry/src/main/ets/pages/Question2Incorrect.ets @@ -20,15 +20,16 @@ import { AVPlayerUtil } from '../common/AVPlayerUtil'; export function Question2IncorrectBuilder() { Question2Incorrect() } - +// [Start Question2_incorrect] @Component export struct Question2Incorrect { @State aspect: number = 9 / 16; // default video height/width ratio value @State xComponentWidth: number = px2vp(display.getDefaultDisplaySync().width); @State xComponentHeight: number = px2vp(display.getDefaultDisplaySync().width * this.aspect); + // [StartExclude Question2_incorrect_part_one] private xComponentController: XComponentController = new XComponentController(); private player?: AVPlayerUtil; - + // [EndExclude Question2_incorrect_part_one] aboutToDisappear(): void { this.player?.stopPlay(); } @@ -37,6 +38,7 @@ export struct Question2Incorrect { NavDestination() { Stack() { XComponent({ id: 'video_player_id', type: XComponentType.SURFACE, controller: this.xComponentController }) + // [StartExclude Question2_incorrect_part_two] .onLoad(() => { this.player = new AVPlayerUtil(); this.player.setSurfaceId(this.xComponentController.getXComponentSurfaceId()); @@ -46,6 +48,7 @@ export struct Question2Incorrect { this.xComponentWidth = px2vp(display.getDefaultDisplaySync().height * aspect); }); }) + // [EndExclude Question2_incorrect_part_two] .width(this.xComponentWidth) .height(this.xComponentHeight) } @@ -55,4 +58,5 @@ export struct Question2Incorrect { } .hideTitleBar(true) } -} \ No newline at end of file +} +// [End Question2_incorrect] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question3Correct.ets b/entry/src/main/ets/pages/Question3Correct.ets index bb80721..d0e2d64 100644 --- a/entry/src/main/ets/pages/Question3Correct.ets +++ b/entry/src/main/ets/pages/Question3Correct.ets @@ -18,21 +18,25 @@ export function Question3CorrectBuilder() { Question3Correct() } +// [Start Question3_correct] @Component export struct Question3Correct { build() { NavDestination() { Column() { Video({ src: $rawfile('testVideo2.mp4') }) + // [StartExclude Question3_correct_part] .height('100%') .width('100%') .autoPlay(true) - .objectFit(ImageFit.Contain) .controls(false) + // [EndExclude Question3_correct_part] + .objectFit(ImageFit.Contain) } .height('100%') .width('100%') } .hideTitleBar(true) } -} \ No newline at end of file +} +// [End Question3_correct] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question3Incorrect.ets b/entry/src/main/ets/pages/Question3Incorrect.ets index bfe6cdf..8460409 100644 --- a/entry/src/main/ets/pages/Question3Incorrect.ets +++ b/entry/src/main/ets/pages/Question3Incorrect.ets @@ -17,7 +17,7 @@ export function Question3IncorrectBuilder() { Question3Incorrect() } - +// [Start Question3_incorrect] @Component export struct Question3Incorrect { build() { @@ -34,4 +34,5 @@ export struct Question3Incorrect { } .hideTitleBar(true) } -} \ No newline at end of file +} +// [End Question3_incorrect] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question4Correct.ets b/entry/src/main/ets/pages/Question4Correct.ets index b5aa92d..eabafec 100644 --- a/entry/src/main/ets/pages/Question4Correct.ets +++ b/entry/src/main/ets/pages/Question4Correct.ets @@ -22,35 +22,42 @@ export function Question4CorrectBuilder() { @Component export struct Question4Correct { + // [Start Question4_correct_custom_dialog_comp] @Builder customDialogComp() { Column() { Text('Top') + // [StartExclude Question4_correct_part_one] .height(60) .width('100%') .textAlign(TextAlign.Center) .fontSize(24) .fontWeight(FontWeight.Bold) .backgroundColor('#2887DA') + // [EndExclude Question4_correct_part_one] Scroll() { Text('Middle') + // [StartExclude Question4_correct_part_two] .height('100%') .width('100%') .textAlign(TextAlign.Center) .fontSize(24) .fontWeight(FontWeight.Bold) .backgroundColor('#18A98D') + // [EndExclude Question4_correct_part_two] } .layoutWeight(1) Text('Bottom') + // [StartExclude Question4_correct_part_three] .height(60) .width('100%') .textAlign(TextAlign.Center) .fontSize(24) .fontWeight(FontWeight.Bold) .backgroundColor('#F69C00') + // [EndExclude Question4_correct_part_three] } .height(500) .justifyContent(FlexAlign.SpaceBetween) @@ -58,6 +65,7 @@ export struct Question4Correct { maxHeight: '90%' }) } + // [End Question4_correct_custom_dialog_comp] build() { NavDestination() { diff --git a/entry/src/main/ets/pages/Question4Incorrect.ets b/entry/src/main/ets/pages/Question4Incorrect.ets index 0cc00d4..08c5111 100644 --- a/entry/src/main/ets/pages/Question4Incorrect.ets +++ b/entry/src/main/ets/pages/Question4Incorrect.ets @@ -19,44 +19,52 @@ import { promptAction } from '@kit.ArkUI'; export function Question4IncorrectBuilder() { Question4Incorrect() } - +// [Start Question4_Incorrect] @Component export struct Question4Incorrect { + @Builder customDialogComp() { Column() { Text('Top') + // [StartExclude Question4_Incorrect_part_one] .height(60) .width('100%') .textAlign(TextAlign.Center) .fontSize(24) .fontWeight(FontWeight.Bold) .backgroundColor('#2887DA') + // [EndExclude Question4_Incorrect_part_one] Scroll() { Text('Middle') + // [StartExclude Question4_Incorrect_part_two] .height('100%') .width('100%') .textAlign(TextAlign.Center) .fontSize(24) .fontWeight(FontWeight.Bold) .backgroundColor('#18A98D') + // [EndExclude Question4_Incorrect_part_two] } .layoutWeight(1) Text('Bottom') + // [StartExclude Question4_Incorrect_part_three] .height(60) .width('100%') .textAlign(TextAlign.Center) .fontSize(24) .fontWeight(FontWeight.Bold) .backgroundColor('#F69C00') + // [EndExclude Question4_Incorrect_part_three] } .height(500) .justifyContent(FlexAlign.SpaceBetween) } build() { + // [StartExclude Question4_Incorrect_part_four] NavDestination() { Column() { Button('Show Dialog') @@ -83,5 +91,7 @@ export struct Question4Incorrect { top: AppStorage.get('statusBarHeight') ?? 0, bottom: (AppStorage.get('naviIndicatorHeight') ?? 0) + 16 }) + // [EndExclude Question4_Incorrect_part_four] } -} \ No newline at end of file +} +// [End Question4_Incorrect] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question5Correct.ets b/entry/src/main/ets/pages/Question5Correct.ets index 63dcbe8..69f621b 100644 --- a/entry/src/main/ets/pages/Question5Correct.ets +++ b/entry/src/main/ets/pages/Question5Correct.ets @@ -18,69 +18,89 @@ export function Question5CorrectBuilder() { Question5Correct() } +// [Start Question5_correct] @Component export struct Question5Correct { build() { NavDestination() { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { Text($r('app.string.login_page')) + // [StartExclude Question5_correct_part_one] .fontSize(24) .fontWeight(FontWeight.Medium) .fontColor($r('sys.color.font_primary')) + // [EndExclude Question5_correct_part_one] .displayPriority(4) Text($r('app.string.login_more')) + // [StartExclude Question5_correct_part_two] .fontSize(16) .fontColor($r('sys.color.font_secondary')) + // [EndExclude Question5_correct_part_two] .displayPriority(3) Image($r('app.media.login_pic')) + // [StartExclude Question5_correct_part_three] .width(200) .height(200) .margin({ bottom: 12, top: 35 }) + // [EndExclude Question5_correct_part_three] .displayPriority(2) Column() { TextInput({ placeholder: $r('app.string.account') }) + // [StartExclude Question5_correct_part_four] .maxLength(11) .type(InputType.Number) .inputStyle() + // [EndExclude Question5_correct_part_four] TextInput({ placeholder: $r('app.string.password') }) + // [StartExclude Question5_correct_part_five] .maxLength(8) .type(InputType.Password) .inputStyle() + // [EndExclude Question5_correct_part_five] } + // [StartExclude Question5_correct_part_fix] .margin({ top: 16 }) .borderRadius(24) + // [EndExclude Question5_correct_part_fix] .displayPriority(5) - + // [StartExclude Question5_correct_part_seven] Blank() .height(24) .displayPriority(3) - + // [EndExclude Question5_correct_part_seven] Button($r('app.string.login')) + // [StartExclude Question5_correct_part_eight] .width('100%') .height(40) .fontSize(16) .fontWeight(FontWeight.Medium) .backgroundColor($r('sys.color.brand')) .margin({ bottom: 12, top: 16 }) + // [EndExclude Question5_correct_part_eight] .displayPriority(5) } + // [StartExclude Question5_correct_part_nine] .height('100%') .width('100%') .align(Alignment.Center) .padding(12) + // [EndExclude Question5_correct_part_nine] } + // [StartExclude Question5_correct_part_ten] .hideTitleBar(true) .backgroundColor('#F1F3F5') .padding({ top: AppStorage.get('statusBarHeight') ?? 0 }) + // [EndExclude Question5_correct_part_ten] } } +// [End Question5_correct] @Extend(TextInput) function inputStyle() { diff --git a/entry/src/main/ets/pages/Question5Incorrect.ets b/entry/src/main/ets/pages/Question5Incorrect.ets index 0dcc30b..0fb1103 100644 --- a/entry/src/main/ets/pages/Question5Incorrect.ets +++ b/entry/src/main/ets/pages/Question5Incorrect.ets @@ -18,30 +18,38 @@ export function Question5IncorrectBuilder() { Question5Incorrect() } +// [Start Question5_incorrect] @Component export struct Question5Incorrect { build() { NavDestination() { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { Text($r('app.string.login_page')) + // [StartExclude Question5_incorrect_part_one] .fontSize(24) .fontWeight(FontWeight.Medium) .fontColor($r('sys.color.font_primary')) .margin({ top: 30 }) + // [EndExclude Question5_incorrect_part_one] Text($r('app.string.login_more')) + // [StartExclude Question5_incorrect_part_two] .fontSize(16) .fontColor($r('sys.color.font_secondary')) + // [EndExclude Question5_incorrect_part_one] Image($r('app.media.login_pic')) + // [StartExclude Question5_incorrect_part_three] .width(200) .height(200) .margin({ bottom: 12, top: 35 }) + // [EndExclude Question5_incorrect_part_three] Column() { TextInput({ placeholder: $r('app.string.account') }) + // [StartExclude Question5_incorrect_part_four] .maxLength(11) .type(InputType.Number) .inputStyle() @@ -54,33 +62,45 @@ export struct Question5Incorrect { right: 12 }) .backgroundColor('#0D182431') + // [EndExclude Question5_incorrect_part_four] TextInput({ placeholder: $r('app.string.password') }) + // [StartExclude Question5_incorrect_part_five] .maxLength(8) .type(InputType.Password) .inputStyle() + // [EndExclude Question5_incorrect_part_five] } + // [StartExclude Question5_incorrect_part_six] .margin({ top: 16 }) .borderRadius(24) + // [EndExclude Question5_incorrect_part_six] Button($r('app.string.login')) + // [StartExclude Question5_incorrect_part_seven] .width('100%') .height(40) .fontSize(16) .fontWeight(FontWeight.Medium) .backgroundColor($r('sys.color.brand')) .margin({ bottom: 12, top: 36 }) + // [EndExclude Question5_incorrect_part_seven] } + // [StartExclude Question5_incorrect_part_eight] .height('100%') .width('100%') .align(Alignment.Center) .padding(12) + // [EndExclude Question5_incorrect_part_eight] } + // [StartExclude Question5_incorrect_part_nine] .hideTitleBar(true) .backgroundColor('#F1F3F5') .padding({ top: AppStorage.get('statusBarHeight') ?? 0 }) + // [EndExclude Question5_incorrect_part_nine] } } +// [End Question5_incorrect] @Extend(TextInput) function inputStyle() { diff --git a/entry/src/main/ets/pages/Question6Correct.ets b/entry/src/main/ets/pages/Question6Correct.ets index db65921..4e85943 100644 --- a/entry/src/main/ets/pages/Question6Correct.ets +++ b/entry/src/main/ets/pages/Question6Correct.ets @@ -18,6 +18,7 @@ export function Question6CorrectBuilder() { Question6Correct() } +// [Start Custom_dialog_comp] @CustomDialog struct CustomDialogComp { controller: CustomDialogController = new CustomDialogController({ 'builder': '' }); @@ -25,31 +26,39 @@ struct CustomDialogComp { build() { Column() { Text($r('app.string.welcome')) + // [StartExclude Custom_dialog_comp_part_one] .fontColor($r('sys.color.font_primary')) .height(56) .fontSize(20) .textAlign(TextAlign.Center) .fontWeight(700) + // [EndExclude Custom_dialog_comp_part_one] Column() { Scroll() { Text($r('app.string.dialog_content')) + // [StartExclude Custom_dialog_comp_part_two] .fontSize(18) .lineHeight(25) .width('100%') + // [EndExclude Custom_dialog_comp_part_two] } } .layoutWeight(1) Row({ space: 12 }) { Button($r('app.string.disagree')) + // [StartExclude Custom_dialog_comp_part_three] .backgroundColor('rgba(0,0,0,0.05)') .fontColor('#0A59F7') .layoutWeight(1) .height(40) + // [EndExclude Custom_dialog_comp_part_three] Button($r('app.string.agree')) + // [StartExclude Custom_dialog_comp_part_four] .layoutWeight(1) .height(40) + // [EndExclude Custom_dialog_comp_part_four] } .height(56) .alignItems(VerticalAlign.Top) @@ -58,6 +67,7 @@ struct CustomDialogComp { maxHeight: '80%' }) .height(400) + // [StartExclude Custom_dialog_comp_part_five] .width('calc(100% - 32vp)') .padding({ left: 16, @@ -65,8 +75,10 @@ struct CustomDialogComp { }) .borderRadius(24) .backgroundColor(Color.White) + // [EndExclude Custom_dialog_comp_part_five] } } +// [End Custom_dialog_comp] @Component export struct Question6Correct { @@ -98,4 +110,4 @@ export struct Question6Correct { bottom: AppStorage.get('naviIndicatorHeight') ?? 0 }) } -} \ No newline at end of file +} diff --git a/entry/src/main/ets/pages/Question6Incorrect.ets b/entry/src/main/ets/pages/Question6Incorrect.ets index c8337e6..714dd39 100644 --- a/entry/src/main/ets/pages/Question6Incorrect.ets +++ b/entry/src/main/ets/pages/Question6Incorrect.ets @@ -18,6 +18,7 @@ export function Question6IncorrectBuilder() { Question6Incorrect() } +// [Start Custom_dialog_comp1] @CustomDialog struct CustomDialogComp1 { controller: CustomDialogController = new CustomDialogController({ 'builder': '' }); @@ -25,30 +26,38 @@ struct CustomDialogComp1 { build() { Column() { Text($r('app.string.welcome')) + // [StartExclude Custom_dialog_comp1_part_one] .fontColor($r('sys.color.font_primary')) .height(56) .fontSize(20) .textAlign(TextAlign.Center) .fontWeight(700) + // [EndExclude Custom_dialog_comp1_part_one] Column() { Scroll() { Text($r('app.string.dialog_content')) + // [StartExclude Custom_dialog_comp1_part_two] .fontSize(18) .lineHeight(25) .width('100%') + // [EndExclude Custom_dialog_comp1_part_two] } } Row({ space: 12 }) { Button($r('app.string.disagree')) + // [StartExclude Custom_dialog_comp1_part_three] .backgroundColor('rgba(0,0,0,0.05)') .fontColor('#0A59F7') .layoutWeight(1) .height(40) + // [EndExclude Custom_dialog_comp1_part_three] Button($r('app.string.agree')) + // [StartExclude Custom_dialog_comp1_part_four] .layoutWeight(1) .height(40) + // [EndExclude Custom_dialog_comp1_part_four] } .height(56) .alignItems(VerticalAlign.Top) @@ -60,6 +69,7 @@ struct CustomDialogComp1 { .constraintSize({ maxHeight: '90%' }) + // [StartExclude Custom_dialog_comp1_part_five] .height(400) .width('calc(100% - 32vp)') .padding({ @@ -68,6 +78,7 @@ struct CustomDialogComp1 { }) .borderRadius(24) .backgroundColor(Color.White) + // [EndExclude Custom_dialog_comp1_part_five] } } @@ -101,4 +112,5 @@ export struct Question6Incorrect { bottom: AppStorage.get('naviIndicatorHeight') ?? 0 }) } -} \ No newline at end of file +} +// [End Custom_dialog_comp1] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question7Correct.ets b/entry/src/main/ets/pages/Question7Correct.ets index 16c2aa0..4d74c21 100644 --- a/entry/src/main/ets/pages/Question7Correct.ets +++ b/entry/src/main/ets/pages/Question7Correct.ets @@ -20,6 +20,7 @@ export function Question7CorrectBuilder() { Question7Correct() } +// [Start Question7_correct] @Component export struct Question7Correct { private windowClass = (getContext(this) as common.UIAbilityContext).windowStage.getMainWindowSync(); @@ -49,6 +50,7 @@ export struct Question7Correct { } build() { + // [StartExclude Question7_correct_part] NavDestination() { Stack() { Image($r('app.media.game_bg')) @@ -74,5 +76,7 @@ export struct Question7Correct { } } .hideTitleBar(true) + // [EndExclude Question7_correct_part] } -} \ No newline at end of file +} +// [End Question7_correct] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question7Incorrect.ets b/entry/src/main/ets/pages/Question7Incorrect.ets index 7ed594a..d07e899 100644 --- a/entry/src/main/ets/pages/Question7Incorrect.ets +++ b/entry/src/main/ets/pages/Question7Incorrect.ets @@ -20,6 +20,7 @@ export function Question7IncorrectBuilder() { Question7Incorrect() } +// [Start Question7_incorrect] @Component export struct Question7Incorrect { private windowClass = (getContext(this) as common.UIAbilityContext).windowStage.getMainWindowSync(); @@ -35,16 +36,20 @@ export struct Question7Incorrect { build() { NavDestination() { Stack() { + // [StartExclude Question7_incorrect_part_one] Image($r('app.media.game_bg')) .height('100%') + // [EndExclude Question7_incorrect_part_one] Row() { Image($r('app.media.icon_pause')) + // [StartExclude Question7_incorrect_part_two] .height(40) .margin({ right: 16, top: 5 }) + // [EndExclude Question7_incorrect_part_two] .onClick(() => { promptAction.showToast({ message: 'Action success' @@ -59,4 +64,5 @@ export struct Question7Incorrect { } .hideTitleBar(true) } -} \ No newline at end of file +} +// [End Question7_incorrect] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question8Correct.ets b/entry/src/main/ets/pages/Question8Correct.ets index c2cbd1f..0491f64 100644 --- a/entry/src/main/ets/pages/Question8Correct.ets +++ b/entry/src/main/ets/pages/Question8Correct.ets @@ -20,6 +20,7 @@ export function Question8CorrectBuilder() { Question8Correct() } +// [Start Question8_correct] @Component export struct Question8Correct { private windowClass = (getContext(this) as common.UIAbilityContext).windowStage.getMainWindowSync(); @@ -33,6 +34,7 @@ export struct Question8Correct { } build() { + // [StartExclude Question8_correct_part] NavDestination() { Column() { Video({ src: $rawfile('testVideo1.mp4') }) @@ -46,5 +48,7 @@ export struct Question8Correct { .width('100%') } .hideTitleBar(true) + // [EndExclude Question8_correct_part] } -} \ No newline at end of file +} +// [End Question8_correct] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question8Incorrect.ets b/entry/src/main/ets/pages/Question8Incorrect.ets index 18f5335..edf37a0 100644 --- a/entry/src/main/ets/pages/Question8Incorrect.ets +++ b/entry/src/main/ets/pages/Question8Incorrect.ets @@ -17,7 +17,7 @@ export function Question8IncorrectBuilder() { Question8Incorrect() } - +// [Start Question8_incorrect] @Component export struct Question8Incorrect { build() { @@ -35,4 +35,5 @@ export struct Question8Incorrect { } .hideTitleBar(true) } -} \ No newline at end of file +} +// [End Question8_incorrect] \ No newline at end of file -- Gitee From 850b7fdfa67f078e7a21a1c8da13f109cd0795a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E5=8D=93=E4=BC=A6?= <2658469835@qq.com> Date: Sat, 17 May 2025 16:52:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E5=90=8C=E6=BA=90?= =?UTF-8?q?=E6=A0=87=E8=AF=86,=E5=B8=B8=E9=87=8F=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/Question1Correct.ets | 8 ++-- .../src/main/ets/pages/Question1Incorrect.ets | 8 ++-- entry/src/main/ets/pages/Question2Correct.ets | 12 ++--- .../src/main/ets/pages/Question2Incorrect.ets | 9 ++-- entry/src/main/ets/pages/Question3Correct.ets | 4 +- entry/src/main/ets/pages/Question4Correct.ets | 12 ++--- .../src/main/ets/pages/Question4Incorrect.ets | 16 +++---- entry/src/main/ets/pages/Question5Correct.ets | 48 +++++++++---------- .../src/main/ets/pages/Question5Incorrect.ets | 44 ++++++++--------- entry/src/main/ets/pages/Question6Correct.ets | 28 +++++------ .../src/main/ets/pages/Question6Incorrect.ets | 28 +++++------ entry/src/main/ets/pages/Question7Correct.ets | 4 +- .../src/main/ets/pages/Question7Incorrect.ets | 8 ++-- entry/src/main/ets/pages/Question8Correct.ets | 4 +- 14 files changed, 117 insertions(+), 116 deletions(-) diff --git a/entry/src/main/ets/pages/Question1Correct.ets b/entry/src/main/ets/pages/Question1Correct.ets index 57b6fa2..dd8a97a 100644 --- a/entry/src/main/ets/pages/Question1Correct.ets +++ b/entry/src/main/ets/pages/Question1Correct.ets @@ -39,20 +39,20 @@ export struct Question1Correct { .backgroundColor(Color.Orange) } } - // [StartExclude Question1_correct_part_one ] + // [StartExclude Question1_correct ] .padding({ left: 16, right: 16 }) - // [EndExclude Question1_correct_part_one ] + // [EndExclude Question1_correct ] } - // [StartExclude Question1_correct_part_two ] + // [StartExclude Question1_correct ] .hideTitleBar(true) .padding({ top: AppStorage.get('statusBarHeight') ?? 0, bottom: (AppStorage.get('naviIndicatorHeight') ?? 0) + 16 }) - // [EndExclude Question1_correct_part_two ] + // [EndExclude Question1_correct ] } } // [End Question1_correct ] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question1Incorrect.ets b/entry/src/main/ets/pages/Question1Incorrect.ets index 270ccc0..421c111 100644 --- a/entry/src/main/ets/pages/Question1Incorrect.ets +++ b/entry/src/main/ets/pages/Question1Incorrect.ets @@ -38,22 +38,22 @@ export struct Question1Incorrect { .height(350) .backgroundColor(Color.Orange) } - // [StartExclude Question1_incorrect_part_one] + // [StartExclude Question1_incorrect] .height('100%') .width('100%') .padding({ left: 16, right: 16 }) - // [EndExclude Question1_incorrect_part_one] + // [EndExclude Question1_incorrect] } - // [StartExclude Question1_incorrect_part_two] + // [StartExclude Question1_incorrect] .hideTitleBar(true) .padding({ top: AppStorage.get('statusBarHeight') ?? 0, bottom:( AppStorage.get('naviIndicatorHeight') ?? 0) + 16 }) - // [EndExclude Question1_incorrect_part_two] + // [EndExclude Question1_incorrect] } } // [End Question1_incorrect] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question2Correct.ets b/entry/src/main/ets/pages/Question2Correct.ets index e5f19c2..a5e2859 100644 --- a/entry/src/main/ets/pages/Question2Correct.ets +++ b/entry/src/main/ets/pages/Question2Correct.ets @@ -24,20 +24,20 @@ export function Question2CorrectBuilder() { @Component export struct Question2Correct { @State aspect: number = 9 / 16; // default video width/height ratio value - // [StartExclude Question2_correct_part_one] + // [StartExclude Question2_correct] private xComponentController: XComponentController = new XComponentController(); private player?: AVPlayerUtil; aboutToDisappear(): void { this.player?.stopPlay(); } - // [EndExclude Question2_correct_part_one] + // [EndExclude Question2_correct] build() { NavDestination() { Stack() { XComponent({ id: 'video_player_id', type: XComponentType.SURFACE, controller: this.xComponentController }) - // [StartExclude Question2_correct_part_two] + // [StartExclude Question2_correct] .onLoad(() => { this.player = new AVPlayerUtil(); this.player.setSurfaceId(this.xComponentController.getXComponentSurfaceId()); @@ -45,16 +45,16 @@ export struct Question2Correct { this.aspect = aspect; }); }) - // [EndExclude Question2_correct_part_two] + // [EndExclude Question2_correct] .aspectRatio(this.aspect) } .width('100%') .height('100%') .backgroundColor(Color.Black) } - // [StartExclude Question2_correct_part_three] + // [StartExclude Question2_correct] .hideTitleBar(true) - // [EndExclude Question2_correct_part_three] + // [EndExclude Question2_correct] } } // [End Question2_correct] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question2Incorrect.ets b/entry/src/main/ets/pages/Question2Incorrect.ets index 18b374d..45e2c1d 100644 --- a/entry/src/main/ets/pages/Question2Incorrect.ets +++ b/entry/src/main/ets/pages/Question2Incorrect.ets @@ -26,19 +26,20 @@ export struct Question2Incorrect { @State aspect: number = 9 / 16; // default video height/width ratio value @State xComponentWidth: number = px2vp(display.getDefaultDisplaySync().width); @State xComponentHeight: number = px2vp(display.getDefaultDisplaySync().width * this.aspect); - // [StartExclude Question2_incorrect_part_one] + // [StartExclude Question2_incorrect] private xComponentController: XComponentController = new XComponentController(); private player?: AVPlayerUtil; - // [EndExclude Question2_incorrect_part_one] + aboutToDisappear(): void { this.player?.stopPlay(); } + // [EndExclude Question2_incorrect] build() { NavDestination() { Stack() { XComponent({ id: 'video_player_id', type: XComponentType.SURFACE, controller: this.xComponentController }) - // [StartExclude Question2_incorrect_part_two] + // [StartExclude Question2_incorrect] .onLoad(() => { this.player = new AVPlayerUtil(); this.player.setSurfaceId(this.xComponentController.getXComponentSurfaceId()); @@ -48,7 +49,7 @@ export struct Question2Incorrect { this.xComponentWidth = px2vp(display.getDefaultDisplaySync().height * aspect); }); }) - // [EndExclude Question2_incorrect_part_two] + // [EndExclude Question2_incorrect] .width(this.xComponentWidth) .height(this.xComponentHeight) } diff --git a/entry/src/main/ets/pages/Question3Correct.ets b/entry/src/main/ets/pages/Question3Correct.ets index d0e2d64..27c3bc6 100644 --- a/entry/src/main/ets/pages/Question3Correct.ets +++ b/entry/src/main/ets/pages/Question3Correct.ets @@ -25,12 +25,12 @@ export struct Question3Correct { NavDestination() { Column() { Video({ src: $rawfile('testVideo2.mp4') }) - // [StartExclude Question3_correct_part] + // [StartExclude Question3_correct] .height('100%') .width('100%') .autoPlay(true) .controls(false) - // [EndExclude Question3_correct_part] + // [EndExclude Question3_correct] .objectFit(ImageFit.Contain) } .height('100%') diff --git a/entry/src/main/ets/pages/Question4Correct.ets b/entry/src/main/ets/pages/Question4Correct.ets index eabafec..1cca5d6 100644 --- a/entry/src/main/ets/pages/Question4Correct.ets +++ b/entry/src/main/ets/pages/Question4Correct.ets @@ -27,37 +27,37 @@ export struct Question4Correct { customDialogComp() { Column() { Text('Top') - // [StartExclude Question4_correct_part_one] + // [StartExclude Question4_correct_custom_dialog_comp] .height(60) .width('100%') .textAlign(TextAlign.Center) .fontSize(24) .fontWeight(FontWeight.Bold) .backgroundColor('#2887DA') - // [EndExclude Question4_correct_part_one] + // [EndExclude Question4_correct_custom_dialog_comp] Scroll() { Text('Middle') - // [StartExclude Question4_correct_part_two] + // [StartExclude Question4_correct_custom_dialog_comp] .height('100%') .width('100%') .textAlign(TextAlign.Center) .fontSize(24) .fontWeight(FontWeight.Bold) .backgroundColor('#18A98D') - // [EndExclude Question4_correct_part_two] + // [EndExclude Question4_correct_custom_dialog_comp] } .layoutWeight(1) Text('Bottom') - // [StartExclude Question4_correct_part_three] + // [StartExclude Question4_correct_custom_dialog_comp] .height(60) .width('100%') .textAlign(TextAlign.Center) .fontSize(24) .fontWeight(FontWeight.Bold) .backgroundColor('#F69C00') - // [EndExclude Question4_correct_part_three] + // [EndExclude Question4_correct_custom_dialog_comp] } .height(500) .justifyContent(FlexAlign.SpaceBetween) diff --git a/entry/src/main/ets/pages/Question4Incorrect.ets b/entry/src/main/ets/pages/Question4Incorrect.ets index 08c5111..be7591b 100644 --- a/entry/src/main/ets/pages/Question4Incorrect.ets +++ b/entry/src/main/ets/pages/Question4Incorrect.ets @@ -27,44 +27,44 @@ export struct Question4Incorrect { customDialogComp() { Column() { Text('Top') - // [StartExclude Question4_Incorrect_part_one] + // [StartExclude Question4_Incorrect] .height(60) .width('100%') .textAlign(TextAlign.Center) .fontSize(24) .fontWeight(FontWeight.Bold) .backgroundColor('#2887DA') - // [EndExclude Question4_Incorrect_part_one] + // [EndExclude Question4_Incorrect] Scroll() { Text('Middle') - // [StartExclude Question4_Incorrect_part_two] + // [StartExclude Question4_Incorrect] .height('100%') .width('100%') .textAlign(TextAlign.Center) .fontSize(24) .fontWeight(FontWeight.Bold) .backgroundColor('#18A98D') - // [EndExclude Question4_Incorrect_part_two] + // [EndExclude Question4_Incorrect] } .layoutWeight(1) Text('Bottom') - // [StartExclude Question4_Incorrect_part_three] + // [StartExclude Question4_Incorrect] .height(60) .width('100%') .textAlign(TextAlign.Center) .fontSize(24) .fontWeight(FontWeight.Bold) .backgroundColor('#F69C00') - // [EndExclude Question4_Incorrect_part_three] + // [EndExclude Question4_Incorrect] } .height(500) .justifyContent(FlexAlign.SpaceBetween) } build() { - // [StartExclude Question4_Incorrect_part_four] + // [StartExclude Question4_Incorrect] NavDestination() { Column() { Button('Show Dialog') @@ -91,7 +91,7 @@ export struct Question4Incorrect { top: AppStorage.get('statusBarHeight') ?? 0, bottom: (AppStorage.get('naviIndicatorHeight') ?? 0) + 16 }) - // [EndExclude Question4_Incorrect_part_four] + // [EndExclude Question4_Incorrect] } } // [End Question4_Incorrect] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question5Correct.ets b/entry/src/main/ets/pages/Question5Correct.ets index 69f621b..72b8321 100644 --- a/entry/src/main/ets/pages/Question5Correct.ets +++ b/entry/src/main/ets/pages/Question5Correct.ets @@ -24,80 +24,80 @@ export struct Question5Correct { build() { NavDestination() { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { - Text($r('app.string.login_page')) - // [StartExclude Question5_correct_part_one] + Text("Login Page") + // [StartExclude Question5_correct] .fontSize(24) .fontWeight(FontWeight.Medium) .fontColor($r('sys.color.font_primary')) - // [EndExclude Question5_correct_part_one] + // [EndExclude Question5_correct] .displayPriority(4) - Text($r('app.string.login_more')) - // [StartExclude Question5_correct_part_two] + Text("Login in to access more services") + // [StartExclude Question5_correct] .fontSize(16) .fontColor($r('sys.color.font_secondary')) - // [EndExclude Question5_correct_part_two] + // [EndExclude Question5_correct] .displayPriority(3) Image($r('app.media.login_pic')) - // [StartExclude Question5_correct_part_three] + // [StartExclude Question5_correct] .width(200) .height(200) .margin({ bottom: 12, top: 35 }) - // [EndExclude Question5_correct_part_three] + // [EndExclude Question5_correct] .displayPriority(2) Column() { - TextInput({ placeholder: $r('app.string.account') }) - // [StartExclude Question5_correct_part_four] + TextInput({ placeholder: "Account" }) + // [StartExclude Question5_correct] .maxLength(11) .type(InputType.Number) .inputStyle() - // [EndExclude Question5_correct_part_four] + // [EndExclude Question5_correct] - TextInput({ placeholder: $r('app.string.password') }) - // [StartExclude Question5_correct_part_five] + TextInput({ placeholder: "Password" }) + // [StartExclude Question5_correct] .maxLength(8) .type(InputType.Password) .inputStyle() - // [EndExclude Question5_correct_part_five] + // [EndExclude Question5_correct] } - // [StartExclude Question5_correct_part_fix] + // [StartExclude Question5_correct] .margin({ top: 16 }) .borderRadius(24) - // [EndExclude Question5_correct_part_fix] + // [EndExclude Question5_correct] .displayPriority(5) - // [StartExclude Question5_correct_part_seven] + // [StartExclude Question5_correct] Blank() .height(24) .displayPriority(3) - // [EndExclude Question5_correct_part_seven] + // [EndExclude Question5_correct] Button($r('app.string.login')) - // [StartExclude Question5_correct_part_eight] + // [StartExclude Question5_correct] .width('100%') .height(40) .fontSize(16) .fontWeight(FontWeight.Medium) .backgroundColor($r('sys.color.brand')) .margin({ bottom: 12, top: 16 }) - // [EndExclude Question5_correct_part_eight] + // [EndExclude Question5_correct] .displayPriority(5) } - // [StartExclude Question5_correct_part_nine] + // [StartExclude Question5_correct] .height('100%') .width('100%') .align(Alignment.Center) .padding(12) - // [EndExclude Question5_correct_part_nine] + // [EndExclude Question5_correct] } - // [StartExclude Question5_correct_part_ten] + // [StartExclude Question5_correct] .hideTitleBar(true) .backgroundColor('#F1F3F5') .padding({ top: AppStorage.get('statusBarHeight') ?? 0 }) - // [EndExclude Question5_correct_part_ten] + // [EndExclude Question5_correct] } } // [End Question5_correct] diff --git a/entry/src/main/ets/pages/Question5Incorrect.ets b/entry/src/main/ets/pages/Question5Incorrect.ets index 0fb1103..b61fb57 100644 --- a/entry/src/main/ets/pages/Question5Incorrect.ets +++ b/entry/src/main/ets/pages/Question5Incorrect.ets @@ -24,32 +24,32 @@ export struct Question5Incorrect { build() { NavDestination() { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center }) { - Text($r('app.string.login_page')) - // [StartExclude Question5_incorrect_part_one] + Text("Login Page") + // [StartExclude Question5_incorrect] .fontSize(24) .fontWeight(FontWeight.Medium) .fontColor($r('sys.color.font_primary')) .margin({ top: 30 }) - // [EndExclude Question5_incorrect_part_one] - Text($r('app.string.login_more')) - // [StartExclude Question5_incorrect_part_two] + // [EndExclude Question5_incorrect] + Text("Login in to access more services") + // [StartExclude Question5_incorrect] .fontSize(16) .fontColor($r('sys.color.font_secondary')) - // [EndExclude Question5_incorrect_part_one] + // [EndExclude Question5_incorrect] Image($r('app.media.login_pic')) - // [StartExclude Question5_incorrect_part_three] + // [StartExclude Question5_incorrect] .width(200) .height(200) .margin({ bottom: 12, top: 35 }) - // [EndExclude Question5_incorrect_part_three] + // [EndExclude Question5_incorrect] Column() { - TextInput({ placeholder: $r('app.string.account') }) - // [StartExclude Question5_incorrect_part_four] + TextInput({ placeholder: "Account" }) + // [StartExclude Question5_incorrect] .maxLength(11) .type(InputType.Number) .inputStyle() @@ -62,42 +62,42 @@ export struct Question5Incorrect { right: 12 }) .backgroundColor('#0D182431') - // [EndExclude Question5_incorrect_part_four] + // [EndExclude Question5_incorrect] - TextInput({ placeholder: $r('app.string.password') }) - // [StartExclude Question5_incorrect_part_five] + TextInput({ placeholder:"Password" }) + // [StartExclude Question5_incorrect] .maxLength(8) .type(InputType.Password) .inputStyle() - // [EndExclude Question5_incorrect_part_five] + // [EndExclude Question5_incorrect] } - // [StartExclude Question5_incorrect_part_six] + // [StartExclude Question5_incorrect] .margin({ top: 16 }) .borderRadius(24) - // [EndExclude Question5_incorrect_part_six] + // [EndExclude Question5_incorrect] Button($r('app.string.login')) - // [StartExclude Question5_incorrect_part_seven] + // [StartExclude Question5_incorrect] .width('100%') .height(40) .fontSize(16) .fontWeight(FontWeight.Medium) .backgroundColor($r('sys.color.brand')) .margin({ bottom: 12, top: 36 }) - // [EndExclude Question5_incorrect_part_seven] + // [EndExclude Question5_incorrect] } - // [StartExclude Question5_incorrect_part_eight] + // [StartExclude Question5_incorrect] .height('100%') .width('100%') .align(Alignment.Center) .padding(12) - // [EndExclude Question5_incorrect_part_eight] + // [EndExclude Question5_incorrect] } - // [StartExclude Question5_incorrect_part_nine] + // [StartExclude Question5_incorrect] .hideTitleBar(true) .backgroundColor('#F1F3F5') .padding({ top: AppStorage.get('statusBarHeight') ?? 0 }) - // [EndExclude Question5_incorrect_part_nine] + // [EndExclude Question5_incorrect] } } // [End Question5_incorrect] diff --git a/entry/src/main/ets/pages/Question6Correct.ets b/entry/src/main/ets/pages/Question6Correct.ets index 4e85943..1358e5b 100644 --- a/entry/src/main/ets/pages/Question6Correct.ets +++ b/entry/src/main/ets/pages/Question6Correct.ets @@ -25,40 +25,40 @@ struct CustomDialogComp { build() { Column() { - Text($r('app.string.welcome')) - // [StartExclude Custom_dialog_comp_part_one] + Text("Welcome to My App") + // [StartExclude Custom_dialog_comp] .fontColor($r('sys.color.font_primary')) .height(56) .fontSize(20) .textAlign(TextAlign.Center) .fontWeight(700) - // [EndExclude Custom_dialog_comp_part_one] + // [EndExclude Custom_dialog_comp] Column() { Scroll() { - Text($r('app.string.dialog_content')) - // [StartExclude Custom_dialog_comp_part_two] + Text("This is a user notice,This is a user notice,This is a user notice,This is a user notice,This is a user notice,This is a user notice,This is a user notice,This is a user notice,This is a user notice,This is a user notice") + // [StartExclude Custom_dialog_comp] .fontSize(18) .lineHeight(25) .width('100%') - // [EndExclude Custom_dialog_comp_part_two] + // [EndExclude Custom_dialog_comp] } } .layoutWeight(1) Row({ space: 12 }) { - Button($r('app.string.disagree')) - // [StartExclude Custom_dialog_comp_part_three] + Button("Disagree") + // [StartExclude Custom_dialog_comp] .backgroundColor('rgba(0,0,0,0.05)') .fontColor('#0A59F7') .layoutWeight(1) .height(40) - // [EndExclude Custom_dialog_comp_part_three] - Button($r('app.string.agree')) - // [StartExclude Custom_dialog_comp_part_four] + // [EndExclude Custom_dialog_comp] + Button("Agree") + // [StartExclude Custom_dialog_comp] .layoutWeight(1) .height(40) - // [EndExclude Custom_dialog_comp_part_four] + // [EndExclude Custom_dialog_comp] } .height(56) .alignItems(VerticalAlign.Top) @@ -67,7 +67,7 @@ struct CustomDialogComp { maxHeight: '80%' }) .height(400) - // [StartExclude Custom_dialog_comp_part_five] + // [StartExclude Custom_dialog_comp] .width('calc(100% - 32vp)') .padding({ left: 16, @@ -75,7 +75,7 @@ struct CustomDialogComp { }) .borderRadius(24) .backgroundColor(Color.White) - // [EndExclude Custom_dialog_comp_part_five] + // [EndExclude Custom_dialog_comp] } } // [End Custom_dialog_comp] diff --git a/entry/src/main/ets/pages/Question6Incorrect.ets b/entry/src/main/ets/pages/Question6Incorrect.ets index 714dd39..5a92ba1 100644 --- a/entry/src/main/ets/pages/Question6Incorrect.ets +++ b/entry/src/main/ets/pages/Question6Incorrect.ets @@ -25,39 +25,39 @@ struct CustomDialogComp1 { build() { Column() { - Text($r('app.string.welcome')) - // [StartExclude Custom_dialog_comp1_part_one] + Text("Welcome to My App") + // [StartExclude Custom_dialog_comp1] .fontColor($r('sys.color.font_primary')) .height(56) .fontSize(20) .textAlign(TextAlign.Center) .fontWeight(700) - // [EndExclude Custom_dialog_comp1_part_one] + // [EndExclude Custom_dialog_comp1] Column() { Scroll() { - Text($r('app.string.dialog_content')) - // [StartExclude Custom_dialog_comp1_part_two] + Text("This is a user notice,This is a user notice,This is a user notice,This is a user notice,This is a user notice,This is a user notice,This is a user notice,This is a user notice,This is a user notice,This is a user notice") + // [StartExclude Custom_dialog_comp1] .fontSize(18) .lineHeight(25) .width('100%') - // [EndExclude Custom_dialog_comp1_part_two] + // [EndExclude Custom_dialog_comp1] } } Row({ space: 12 }) { - Button($r('app.string.disagree')) - // [StartExclude Custom_dialog_comp1_part_three] + Button("Disagree") + // [StartExclude Custom_dialog_comp1] .backgroundColor('rgba(0,0,0,0.05)') .fontColor('#0A59F7') .layoutWeight(1) .height(40) - // [EndExclude Custom_dialog_comp1_part_three] - Button($r('app.string.agree')) - // [StartExclude Custom_dialog_comp1_part_four] + // [EndExclude Custom_dialog_comp1] + Button("Agree") + // [StartExclude Custom_dialog_comp1] .layoutWeight(1) .height(40) - // [EndExclude Custom_dialog_comp1_part_four] + // [EndExclude Custom_dialog_comp1] } .height(56) .alignItems(VerticalAlign.Top) @@ -69,7 +69,7 @@ struct CustomDialogComp1 { .constraintSize({ maxHeight: '90%' }) - // [StartExclude Custom_dialog_comp1_part_five] + // [StartExclude Custom_dialog_comp1] .height(400) .width('calc(100% - 32vp)') .padding({ @@ -78,7 +78,7 @@ struct CustomDialogComp1 { }) .borderRadius(24) .backgroundColor(Color.White) - // [EndExclude Custom_dialog_comp1_part_five] + // [EndExclude Custom_dialog_comp1] } } diff --git a/entry/src/main/ets/pages/Question7Correct.ets b/entry/src/main/ets/pages/Question7Correct.ets index 4d74c21..7851ff5 100644 --- a/entry/src/main/ets/pages/Question7Correct.ets +++ b/entry/src/main/ets/pages/Question7Correct.ets @@ -50,7 +50,7 @@ export struct Question7Correct { } build() { - // [StartExclude Question7_correct_part] + // [StartExclude Question7_correct] NavDestination() { Stack() { Image($r('app.media.game_bg')) @@ -76,7 +76,7 @@ export struct Question7Correct { } } .hideTitleBar(true) - // [EndExclude Question7_correct_part] + // [EndExclude Question7_correct] } } // [End Question7_correct] \ No newline at end of file diff --git a/entry/src/main/ets/pages/Question7Incorrect.ets b/entry/src/main/ets/pages/Question7Incorrect.ets index d07e899..51dcd1c 100644 --- a/entry/src/main/ets/pages/Question7Incorrect.ets +++ b/entry/src/main/ets/pages/Question7Incorrect.ets @@ -36,20 +36,20 @@ export struct Question7Incorrect { build() { NavDestination() { Stack() { - // [StartExclude Question7_incorrect_part_one] + // [StartExclude Question7_incorrect] Image($r('app.media.game_bg')) .height('100%') - // [EndExclude Question7_incorrect_part_one] + // [EndExclude Question7_incorrect] Row() { Image($r('app.media.icon_pause')) - // [StartExclude Question7_incorrect_part_two] + // [StartExclude Question7_incorrect] .height(40) .margin({ right: 16, top: 5 }) - // [EndExclude Question7_incorrect_part_two] + // [EndExclude Question7_incorrect] .onClick(() => { promptAction.showToast({ message: 'Action success' diff --git a/entry/src/main/ets/pages/Question8Correct.ets b/entry/src/main/ets/pages/Question8Correct.ets index 0491f64..0cdccfb 100644 --- a/entry/src/main/ets/pages/Question8Correct.ets +++ b/entry/src/main/ets/pages/Question8Correct.ets @@ -34,7 +34,7 @@ export struct Question8Correct { } build() { - // [StartExclude Question8_correct_part] + // [StartExclude Question8_correct] NavDestination() { Column() { Video({ src: $rawfile('testVideo1.mp4') }) @@ -48,7 +48,7 @@ export struct Question8Correct { .width('100%') } .hideTitleBar(true) - // [EndExclude Question8_correct_part] + // [EndExclude Question8_correct] } } // [End Question8_correct] \ No newline at end of file -- Gitee