mirror of
https://gitee.com/openharmony/applications_notes
synced 2024-11-26 17:20:25 +00:00
修复备忘录jscrash
Signed-off-by: zwx1126739 <zhanghong121@huawei.com>
This commit is contained in:
parent
9991ea9909
commit
bf29f3b262
@ -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() {
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user