mirror of
https://gitee.com/openharmony/applications_notes
synced 2024-10-07 05:33:37 +00:00
!95 修改删除笔记后跳转问题;修改焦点问题;修改跳转桌面问题
Merge pull request !95 from nobbo/master
This commit is contained in:
commit
eb28c90556
@ -254,9 +254,11 @@ struct FolderItemComp {
|
||||
this.selectedFolderData = FolderUtil.getFolderData(this.AllFolderArray, SysDefFolderUuid.AllNotes)
|
||||
this.selectedNoteData = NoteUtil.getFirstNoteData(this.AllNoteArray, SysDefFolderUuid.AllNotes)
|
||||
// 刷新web界面
|
||||
this.controllerShow.runJavaScript({
|
||||
script: "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')"
|
||||
})
|
||||
if (this.portraitModel == false) {
|
||||
this.controllerShow.runJavaScript({
|
||||
script: "RICH_EDITOR.setHtml('" + this.selectedNoteData.content_text + "')"
|
||||
})
|
||||
}
|
||||
// save continue data
|
||||
let continueNote: string = JSON.stringify(this.selectedNoteData.toNoteObject())
|
||||
AppStorage.SetOrCreate<string>('ContinueNote', continueNote)
|
||||
|
@ -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({
|
||||
|
@ -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({
|
||||
|
@ -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 + "')"
|
||||
@ -403,12 +399,14 @@ export struct DeleteNoteComp {
|
||||
let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable)
|
||||
predicates_note.equalTo(NoteTableColumn.Uuid, this.selectedNoteData.uuid)
|
||||
RdbStoreUtil.update(this.selectedNoteData.toNoteObject(), predicates_note, null)
|
||||
routePage()
|
||||
} else {
|
||||
NoteUtil.removeNoteData(this.AllNoteArray, this.selectedNoteData.uuid)
|
||||
// delete note from db
|
||||
let predicates_note = RdbStoreUtil.getRdbPredicates(TableName.NoteTable)
|
||||
predicates_note.equalTo(NoteTableColumn.Uuid, this.selectedNoteData.uuid)
|
||||
RdbStoreUtil.delete(predicates_note, null)
|
||||
routePage()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -691,7 +691,7 @@ export struct SearchComp {
|
||||
.padding({ left:6, top:1 })
|
||||
.padding({left:6})
|
||||
.onEditChange((isEditing: boolean) => {
|
||||
this.search = isEditing
|
||||
// this.search = isEditing
|
||||
})
|
||||
.onChange((value: string) => {
|
||||
if (!this.longpress) {
|
||||
|
Loading…
Reference in New Issue
Block a user