From bc9989bd47e8da902fc5eddfee9ad5acdff58b1a Mon Sep 17 00:00:00 2001 From: guozejun Date: Tue, 10 May 2022 14:32:24 +0800 Subject: [PATCH] note layout on note list Signed-off-by: guozejun --- common/component/src/main/ets/components/NoteListComp.ets | 8 ++++---- product/tablet/src/main/ets/pages/NoteHome.ets | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/component/src/main/ets/components/NoteListComp.ets b/common/component/src/main/ets/components/NoteListComp.ets index 6669164..2668414 100644 --- a/common/component/src/main/ets/components/NoteListComp.ets +++ b/common/component/src/main/ets/components/NoteListComp.ets @@ -372,7 +372,7 @@ export struct NoteItemListComp { .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) .visibility((FolderUtil.getNoteCount(AppStorage.Get('AllNoteArray'), this.selectedFolderData.uuid) == 0) ? Visibility.None : Visibility.Visible) - Stack() { + Column() { Flex({ justifyContent: FlexAlign.Center }) { Text($r("app.string.permanently_delete_tips")) .fontSize(12) @@ -416,7 +416,7 @@ export struct NoteItemListComp { .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) }, noteItem => noteItem.uuid.toString()) } - .height("100%") + .layoutWeight(1) .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) .listDirection(Axis.Vertical) .edgeEffect(EdgeEffect.Spring) @@ -434,10 +434,10 @@ export struct NoteItemListComp { .visibility(this.search ? Visibility.Visible : Visibility.Hidden) } .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) - .flexGrow(1) + .flexShrink(1) } .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) - .flexGrow(1) + .flexShrink(1) .onClick(() => { this.search = false }) diff --git a/product/tablet/src/main/ets/pages/NoteHome.ets b/product/tablet/src/main/ets/pages/NoteHome.ets index 2fec720..b800fa2 100644 --- a/product/tablet/src/main/ets/pages/NoteHome.ets +++ b/product/tablet/src/main/ets/pages/NoteHome.ets @@ -87,7 +87,7 @@ export struct NoteHomeComp { .opacity(StyleConstants.OPACITY_10) NoteListComp({ controllerShow: this.controllerShow }) } - .flexShrink(0) + .flexShrink(1) .backgroundColor($r("app.color.notelist_bgcolor_f1f3f5")) .layoutWeight(2) .height(StyleConstants.PERCENTAGE_100)