diff --git a/features/src/main/ets/components/CusDialogComp.ets b/features/src/main/ets/components/CusDialogComp.ets index 1a0405539a8cd26d2dc443abb3b4d12544c9fd49..6617af8cd8ca02d1b9a374d7450a562df05db077 100644 --- a/features/src/main/ets/components/CusDialogComp.ets +++ b/features/src/main/ets/components/CusDialogComp.ets @@ -749,7 +749,12 @@ export struct EditContentDialogPortrait { private fontSize: number aboutToAppear() { - this.confirm("javascript:RICH_EDITOR.getFontSizes()") + try { + this.confirm("javascript:RICH_EDITOR.getFontSizes()"); + LogUtil.info(TAG, `runJavaScript success.`); + } catch (error) { + LogUtil.error(TAG, `runJavaScript failed.code:${JSON.stringify(error.code)},message:${JSON.stringify(error.message)}`); + } } build() { diff --git a/features/src/main/ets/components/FolderListComp.ets b/features/src/main/ets/components/FolderListComp.ets index 02033558ed118398ef1da16645fd7964b6afc9fc..5b256600ef83755380a55418de86851c2ba63468 100644 --- a/features/src/main/ets/components/FolderListComp.ets +++ b/features/src/main/ets/components/FolderListComp.ets @@ -190,7 +190,7 @@ struct FolderItemComp { @Consume('PortraitModel') portraitModel: boolean controllerShow: WebviewController @State isLongPress: boolean = false - TAG = "FolderListComp" + TAG = "FolderItemComp" @StorageLink('isUpdate') isUpdate: boolean = false // Folder Edit Dialog folderEditDialogCtl: CustomDialogController = new CustomDialogController({ @@ -292,9 +292,14 @@ struct FolderItemComp { } // 刷新web界面 if (this.portraitModel == false) { - this.controllerShow.runJavaScript( - "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')" - ) + try { + this.controllerShow.runJavaScript( + "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')" + ) + LogUtil.info(this.TAG, `runJavaScript success.`); + } catch (error) { + LogUtil.error(this.TAG, `runJavaScript failed.code:${JSON.stringify(error.code)},message:${JSON.stringify(error.message)}`); + } } // save continue data let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject())