diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index 5d6b5dd2c91f477e364c0213aca456237deaefd4..ec7b8d6d8279b00730b1ede62cd3cb418df89584 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 aab8950597c77fdc4e7a91530401be6a74f2ea19..b0a9408a679d9ec3e9eb7e983ab90719066dbfa5 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(); @@ -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/view/ProductList.ets b/entry/src/main/ets/view/ProductList.ets index 756107dafef0170528c7ec9fa8db67346f7ac694..a5ce99f2da012746c8798d0af9a921a8b90cba20 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); diff --git a/entry/src/main/ets/viewmodel/IconViewModel.ets b/entry/src/main/ets/viewmodel/IconViewModel.ets index 3dd3c6c33ddcf333db4e44b3ef3388dead523263..ff76971f872ee0ae9a2006fc202c516ef8fca8e6 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;