修改备忘录问题

Signed-off-by: nobbo <gaoshang22@huawei.com>
This commit is contained in:
nobbo 2022-08-29 17:08:19 +08:00
parent 429a6c1ed1
commit 9be3f5eb33
3 changed files with 18 additions and 30 deletions

View File

@ -94,17 +94,13 @@ export struct NoteContent {
Web({ src: $rawfile('editor.html'), controller: this.controllerShow })
.javaScriptAccess(true)
.javaScriptProxy({
object: this.noteContent,
name: "callBackToApp", // html--> name.method
methodList: ["callbackhtml", "callbackScheduledSave"],
controller:this.controllerShow
})
.onPageEnd((e) => {
if (this.editContentFlag == false) {
this.controllerShow.registerJavaScriptProxy({
object: this.noteContent,
name: "callBackToApp", // html--> name.method
methodList: ["callbackhtml", "callbackScheduledSave"],
})
LogUtil.info(TAG, "finish register")
this.controllerShow.refresh()
this.editContentFlag = true
}
LogUtil.info(TAG, "finish loadurl")
if (this.selectedNoteData) {
this.controllerShow.runJavaScript({

View File

@ -130,17 +130,13 @@ export struct NoteContentComp {
Web({ src: $rawfile('editor.html'), controller: this.controllerShow })
.javaScriptAccess(true)
.javaScriptProxy({
object: this.noteContent,
name: "callBackToApp", // html--> name.method
methodList: ["callbackhtml", "callbackhtmlSave", "callbackScheduledSave", "callbackGetSize"],
controller:this.controllerShow
})
.onPageEnd((e) => {
if (this.editContentFlag == false) {
this.controllerShow.registerJavaScriptProxy({
object: this.noteContent,
name: "callBackToApp", // html--> name.method
methodList: ["callbackhtml", "callbackhtmlSave", "callbackScheduledSave", "callbackGetSize"],
})
LogUtil.info(TAG, "finish register")
this.controllerShow.refresh()
this.editContentFlag = true
}
LogUtil.info(TAG, "finish loadurl")
if(this.selectedNoteData){
this.controllerShow.runJavaScript({

View File

@ -99,17 +99,13 @@ export struct NoteContentCompPortrait {
Column() {
Web({ src: $rawfile('editor.html'), controller: this.controllerShow })
.javaScriptAccess(true)
.javaScriptProxy({
object: this.noteContent,
name: "callBackToApp", // html--> name.method
methodList: ["callbackhtml", "callbackScheduledSave"],
controller:this.controllerShow
})
.onPageEnd((e) => {
if (this.editContentFlag == false) {
this.controllerShow.registerJavaScriptProxy({
object: this.noteContent,
name: "callBackToApp", // html--> name.method
methodList: ["callbackhtml", "callbackScheduledSave"],
})
LogUtil.info(TAG, "finish register")
this.controllerShow.refresh()
this.editContentFlag = true
}
LogUtil.info(TAG, "finish loadurl")
this.controllerShow.runJavaScript({
script: "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')"