From d47612e1cb8fa5dc723aa6c3e3918d3980b7c00d Mon Sep 17 00:00:00 2001 From: caoliwen1 <14658249+caoliwen1@user.noreply.gitee.com> Date: Fri, 8 Nov 2024 15:01:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=B0=E7=BD=91=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/home/src/main/ets/pages/ContactsList.ets | 2 +- features/home/src/main/ets/pages/ConversationList.ets | 4 ++-- products/phone/src/main/ets/entryability/EntryAbility.ets | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/features/home/src/main/ets/pages/ContactsList.ets b/features/home/src/main/ets/pages/ContactsList.ets index 2526db7..44ea583 100755 --- a/features/home/src/main/ets/pages/ContactsList.ets +++ b/features/home/src/main/ets/pages/ContactsList.ets @@ -46,7 +46,7 @@ export struct ContactsList { build() { Flex({ direction: FlexDirection.Column }) { HomeTopSearch({ title: HomeConstants.CONTACTS_NAME }) - .height(Adaptive.ContactItemHeight(this.currentBreakpoint)) + .height('13%') Stack({ alignContent: Alignment.End }) { List({ scroller: this.listScroller }) { ListItem() { diff --git a/features/home/src/main/ets/pages/ConversationList.ets b/features/home/src/main/ets/pages/ConversationList.ets index 6d5270a..cd766b0 100755 --- a/features/home/src/main/ets/pages/ConversationList.ets +++ b/features/home/src/main/ets/pages/ConversationList.ets @@ -25,13 +25,13 @@ export struct ConversationList { @StorageProp('currentBreakpoint') currentBreakpoint: string = BreakpointConstants.BREAKPOINT_SM; @Link currentConversationUserName: Resource; @Link currentContactUserName: string; - @State private currentIndex: number = 0 + @State private currentIndex: number = 0; @Consume('pageInfo') pageInfo: NavPathStack; build() { Flex({ direction: FlexDirection.Column }) { HomeTopSearch({ title: HomeConstants.CONVERSATION_TITLE }) - .height(Adaptive.ContactItemHeight(this.currentBreakpoint)) + .height('13%') List() { ForEach(ConversationListData, (item: ConversationDataInterface, index: number) => { ListItem() { diff --git a/products/phone/src/main/ets/entryability/EntryAbility.ets b/products/phone/src/main/ets/entryability/EntryAbility.ets index 9f226fc..c65dc56 100755 --- a/products/phone/src/main/ets/entryability/EntryAbility.ets +++ b/products/phone/src/main/ets/entryability/EntryAbility.ets @@ -63,9 +63,9 @@ export default class EntryAbility extends UIAbility { private updateBreakpoint(windowWidth: number): void { let windowWidthVp = windowWidth / display.getDefaultDisplaySync().densityPixels; let curBp: string = ''; - if (windowWidthVp < BreakpointConstants.BREAKPOINT_SCOPE[1]) { + if (windowWidthVp < BreakpointConstants.BREAKPOINT_SCOPE[2]) { curBp = BreakpointConstants.BREAKPOINT_SM; - } else if (windowWidthVp < BreakpointConstants.BREAKPOINT_SCOPE[2]) { + } else if (windowWidthVp < BreakpointConstants.BREAKPOINT_SCOPE[3]) { curBp = BreakpointConstants.BREAKPOINT_MD; } else { curBp = BreakpointConstants.BREAKPOINT_LG; -- Gitee