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/common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets b/common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets index f251f1d..fa17a64 100644 --- a/common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets +++ b/common/utils/src/main/ets/default/baseUtil/RdbStoreUtil.ets @@ -410,6 +410,9 @@ export default { * @param callback */ update(valueBucket, predicates, callback) { + if (!rdbStore) { + return; + } rdbStore.update(valueBucket, predicates).then((affectedRowCount) => { LogUtil.info(TAG, "update success, affectedRowCount is " + affectedRowCount) if (callback != null) { diff --git a/product/tablet/src/main/ets/pages/MyNoteHome.ets b/product/tablet/src/main/ets/pages/MyNoteHome.ets index 38b6da8..954459c 100644 --- a/product/tablet/src/main/ets/pages/MyNoteHome.ets +++ b/product/tablet/src/main/ets/pages/MyNoteHome.ets @@ -93,7 +93,7 @@ export struct MyNoteHomeComp { this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) } - onBackPress():void{ + onBackPress() { LogUtil.info(this.TAG, "onBackPress") // 退出键盘 inputMethod.getInputMethodController().stopInput(); diff --git a/product/tablet/src/main/ets/pages/NoteContentHome.ets b/product/tablet/src/main/ets/pages/NoteContentHome.ets index c279248..2dc3305 100644 --- a/product/tablet/src/main/ets/pages/NoteContentHome.ets +++ b/product/tablet/src/main/ets/pages/NoteContentHome.ets @@ -16,6 +16,7 @@ import {NoteContent} from '@ohos/component/src/main/ets/components/NoteContent' import {LogUtil} from '@ohos/utils/src/main/ets/default/baseUtil/LogUtil' import RdbStoreUtil from '@ohos/utils/src/main/ets/default/baseUtil/RdbStoreUtil' +import inputMethod from '@ohos.inputmethod' @Entry @Component @@ -40,6 +41,7 @@ struct NoteContentHome { LogUtil.info(this.TAG, "onBackPress") this.controllerShow.runJavaScript({ script: "RICH_EDITOR.setInputEnabled(false)" }) this.controllerShow.runJavaScript({ script: "get_html_content()" }) + inputMethod.getInputMethodController().stopInput() } aboutToAppear(): void{ 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)