mirror of
https://github.com/openharmony/applications_notes.git
synced 2026-07-18 18:24:27 -04:00
@@ -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
|
||||
})
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user