From 0373019ef791a93916773060165026494a7f601e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E6=B5=A9=E7=A8=8B?= <798994511@qq.com> Date: Wed, 7 May 2025 16:57:54 +0800 Subject: [PATCH 1/3] 1 --- features/search/src/main/ets/view/SearchForHua.ets | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/features/search/src/main/ets/view/SearchForHua.ets b/features/search/src/main/ets/view/SearchForHua.ets index a48db0e..d2a1f51 100644 --- a/features/search/src/main/ets/view/SearchForHua.ets +++ b/features/search/src/main/ets/view/SearchForHua.ets @@ -24,7 +24,9 @@ export struct SearchForHua { build() { Column() { + // [Start 1] List() { + // [StartExclude 1] ForEach(SearchConstants.HUA_LIST, (item: string, index: number) => { ListItem() { Column() { @@ -52,9 +54,11 @@ export struct SearchForHua { }) } }) + // [EndExclude 1] } .lanes(this.currentWidthBreakpoint === BreakpointConstants.BREAKPOINT_LG ? SearchConstants.SEARCH_LIST_LANES[1] : SearchConstants.SEARCH_LIST_LANES[2]) + // [End 1] } .layoutWeight(1) .padding({ top: $r('app.float.search_hua_list_padding') }) -- Gitee From e56cd11a591929a593635210e308c7018c09d25d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E6=B5=A9=E7=A8=8B?= <798994511@qq.com> Date: Wed, 7 May 2025 17:19:12 +0800 Subject: [PATCH 2/3] 1 --- .../home/src/main/ets/view/BannerView.ets | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/features/home/src/main/ets/view/BannerView.ets b/features/home/src/main/ets/view/BannerView.ets index 9a27b63..2a68c09 100644 --- a/features/home/src/main/ets/view/BannerView.ets +++ b/features/home/src/main/ets/view/BannerView.ets @@ -57,7 +57,9 @@ export struct BannerView { Column() { // Banner layout. Row() { + // [Start 1] Swiper() { + // [StartExclude 1] LazyForEach(this.bannerDataSource, (item: Banner, index: number) => { Stack() { Image(this.currentWidthBreakpoint === BreakpointConstants.BREAKPOINT_SM ? item.getBannerImg().getImgSrcSm() : @@ -129,12 +131,18 @@ export struct BannerView { right: this.currentWidthBreakpoint === BreakpointConstants.BREAKPOINT_SM ? $r('app.float.banner_padding_sm') : 0 }) }, (item: Banner, index: number) => index + JSON.stringify(item)) + // [EndExclude 1] } - .index(2) - .tabIndex(getTabIndex(HomeConstants.DIRECTION_LIST[2])) .displayCount(this.currentWidthBreakpoint === BreakpointConstants.BREAKPOINT_SM ? 1 : HomeConstants.TWO) // Interval between banner images .itemSpace(HomeConstants.SWIPER_ITEM_SPACE) + .prevMargin(new BreakpointType($r('app.float.swiper_prev_next_margin_sm'), + $r('app.float.swiper_prev_next_margin_md'), $r('app.float.swiper_prev_next_margin_lg')) + .getValue(this.currentWidthBreakpoint)) + .nextMargin(new BreakpointType($r('app.float.swiper_prev_next_margin_sm'), + $r('app.float.swiper_prev_next_margin_md'), $r('app.float.swiper_prev_next_margin_lg')) + .getValue(this.currentWidthBreakpoint)) + // [End 1] // Setting the navigation point Style of the swiper. .indicator(this.currentWidthBreakpoint === BreakpointConstants.BREAKPOINT_SM ? Indicator.dot() .itemWidth($r('app.float.swiper_item_size')) @@ -151,12 +159,8 @@ export struct BannerView { (this.currentTopIndex === 1) ? Visibility.None : Visibility.Visible) .effectMode(EdgeEffect.None) // The sizes of the front and rear banners on the MD and LG devices are different. - .prevMargin(new BreakpointType($r('app.float.swiper_prev_next_margin_sm'), - $r('app.float.swiper_prev_next_margin_md'), $r('app.float.swiper_prev_next_margin_lg')) - .getValue(this.currentWidthBreakpoint)) - .nextMargin(new BreakpointType($r('app.float.swiper_prev_next_margin_sm'), - $r('app.float.swiper_prev_next_margin_md'), $r('app.float.swiper_prev_next_margin_lg')) - .getValue(this.currentWidthBreakpoint)) + .index(2) + .tabIndex(getTabIndex(HomeConstants.DIRECTION_LIST[2])) // Switch the tab to switch the banner display effect. Row({ space: HomeConstants.BANNER_ROW_SPACE }) { -- Gitee From 1e0fe930c2e8ed5957e0e88a8906165f6c55cac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E6=B5=A9=E7=A8=8B?= <798994511@qq.com> Date: Wed, 7 May 2025 17:23:48 +0800 Subject: [PATCH 3/3] 1 --- features/home/src/main/ets/view/BannerView.ets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/features/home/src/main/ets/view/BannerView.ets b/features/home/src/main/ets/view/BannerView.ets index 2a68c09..6c61d36 100644 --- a/features/home/src/main/ets/view/BannerView.ets +++ b/features/home/src/main/ets/view/BannerView.ets @@ -57,9 +57,9 @@ export struct BannerView { Column() { // Banner layout. Row() { - // [Start 1] + // [Start 2] Swiper() { - // [StartExclude 1] + // [StartExclude 2] LazyForEach(this.bannerDataSource, (item: Banner, index: number) => { Stack() { Image(this.currentWidthBreakpoint === BreakpointConstants.BREAKPOINT_SM ? item.getBannerImg().getImgSrcSm() : @@ -131,7 +131,7 @@ export struct BannerView { right: this.currentWidthBreakpoint === BreakpointConstants.BREAKPOINT_SM ? $r('app.float.banner_padding_sm') : 0 }) }, (item: Banner, index: number) => index + JSON.stringify(item)) - // [EndExclude 1] + // [EndExclude 2] } .displayCount(this.currentWidthBreakpoint === BreakpointConstants.BREAKPOINT_SM ? 1 : HomeConstants.TWO) // Interval between banner images @@ -142,7 +142,7 @@ export struct BannerView { .nextMargin(new BreakpointType($r('app.float.swiper_prev_next_margin_sm'), $r('app.float.swiper_prev_next_margin_md'), $r('app.float.swiper_prev_next_margin_lg')) .getValue(this.currentWidthBreakpoint)) - // [End 1] + // [End 2] // Setting the navigation point Style of the swiper. .indicator(this.currentWidthBreakpoint === BreakpointConstants.BREAKPOINT_SM ? Indicator.dot() .itemWidth($r('app.float.swiper_item_size')) -- Gitee