From dc7e0aa10c6a36412e2735d9bd1e482d22bb82c0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-9FJNTIC\\gyb" <121287102@qq.com> Date: Mon, 7 Jul 2025 16:12:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=86=E6=94=AF=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/Index.ets | 8 ++++---- entry/src/main/ets/viewmodel/IconViewModel.ets | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index aab8950..76aa7fb 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -81,7 +81,7 @@ struct Index { Row() { IconList3({ marginSpace: this.marginSpace }) } - .backgroundColor($r('sys.color.comp_background_primary')) + .backgroundColor($r('sys.color.background_secondary')) .width(StackConstant.FULL_PERCENT) .height($r('app.integer.icon_list_height3')) .opacity(this.opacityList) @@ -142,7 +142,7 @@ struct Index { this.isChange = true; this.opacityList = (yOffset - StackConstant.ICON_LIST_1_RAW) / StackConstant.MAX_MARGIN_SPACE; this.marginSpace = StackConstant.ICON_LIST_3_RAW - yOffset > StackConstant.MIN_MARGIN_SPACE ? - (StackConstant.ICON_LIST_3_RAW - yOffset) : StackConstant.MIN_MARGIN_SPACE; + (StackConstant.ICON_LIST_3_RAW - yOffset) : StackConstant.MIN_MARGIN_SPACE; } return { offsetRemain: offset }; }) @@ -168,9 +168,9 @@ struct Index { .padding({ top: px2vp(this.statusHeight), left: this.curBp === 'sm' ? $r('sys.float.padding_level8') : - this.curBp === 'md' ? $r('sys.float.padding_level12') : $r('sys.float.padding_level16'), + this.curBp === 'md' ? $r('sys.float.padding_level12') : $r('sys.float.padding_level16'), right: this.curBp === 'sm' ? $r('sys.float.padding_level8') : - this.curBp === 'md' ? $r('sys.float.padding_level12') : $r('sys.float.padding_level16'), + this.curBp === 'md' ? $r('sys.float.padding_level12') : $r('sys.float.padding_level16'), }) } } \ No newline at end of file diff --git a/entry/src/main/ets/viewmodel/IconViewModel.ets b/entry/src/main/ets/viewmodel/IconViewModel.ets index 3dd3c6c..ff76971 100644 --- a/entry/src/main/ets/viewmodel/IconViewModel.ets +++ b/entry/src/main/ets/viewmodel/IconViewModel.ets @@ -15,7 +15,7 @@ /** * Data class of the icon. -*/ + */ export class IconDataModel { public id: number; public span: number; -- Gitee From eeeda3d9e726e912e8e626d78e5c6da956114be3 Mon Sep 17 00:00:00 2001 From: "DESKTOP-9FJNTIC\\gyb" <121287102@qq.com> Date: Tue, 8 Jul 2025 17:31:07 +0800 Subject: [PATCH 2/2] =?UTF-8?q?key=E5=80=BC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/entryability/EntryAbility.ets | 2 +- entry/src/main/ets/pages/Index.ets | 2 +- entry/src/main/ets/view/ProductList.ets | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index 5d6b5dd..ec7b8d6 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -36,7 +36,7 @@ export default class EntryAbility extends UIAbility { } if (this.curBp !== newBp) { this.curBp = newBp; - AppStorage.setOrCreate('currentBreakpoint', this.curBp); + AppStorage.setOrCreate('componentStackBreakpoint', this.curBp); } } catch (error) { const err = error as BusinessError; diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 76aa7fb..b0a9408 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -31,7 +31,7 @@ struct Index { @StorageLink('statusHeight') statusHeight: number = 0; @StorageLink('bottomHeight') bottomHeight: number = 0; @StorageLink('screenHeight') screenHeight: number = 0; - @StorageLink('currentBreakpoint') curBp: string = StackConstant.BREAK_POINT_SM; + @StorageLink('componentStackBreakpoint') curBp: string = StackConstant.BREAK_POINT_SM; private scroller: Scroller = new Scroller(); private scroller2: Scroller = new Scroller(); diff --git a/entry/src/main/ets/view/ProductList.ets b/entry/src/main/ets/view/ProductList.ets index 756107d..a5ce99f 100644 --- a/entry/src/main/ets/view/ProductList.ets +++ b/entry/src/main/ets/view/ProductList.ets @@ -24,7 +24,7 @@ import { BusinessError } from '@kit.BasicServicesKit'; @Component export struct ProductList { private productData: ProductDataSource = new ProductDataSource(); - @StorageLink('currentBreakpoint') curBp: string = StackConstant.BREAK_POINT_SM; + @StorageLink('componentStackBreakpoint') curBp: string = StackConstant.BREAK_POINT_SM; aboutToAppear() { this.productData.pushData(PRODUCT_DATA); -- Gitee