From d07a30014d819c1c77c496d1febb327c37cd10a9 Mon Sep 17 00:00:00 2001 From: qp Date: Thu, 16 Jun 2022 18:06:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=AC=94=E8=AE=B0=E5=88=A0=E9=99=A4=E5=9B=BE=E7=89=87=E5=90=8E?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E6=88=90=E5=8A=9F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qp --- common/component/src/main/ets/components/NoteContent.ets | 1 + common/component/src/main/ets/components/NoteContentComp.ets | 1 + .../src/main/ets/components/NoteContentCompPortrait.ets | 1 + 3 files changed, 3 insertions(+) diff --git a/common/component/src/main/ets/components/NoteContent.ets b/common/component/src/main/ets/components/NoteContent.ets index b3a8ad8..f7de081 100644 --- a/common/component/src/main/ets/components/NoteContent.ets +++ b/common/component/src/main/ets/components/NoteContent.ets @@ -138,6 +138,7 @@ export struct NoteContent { } aboutToDisappear(): void{ + clearInterval(timeID) LogUtil.info(TAG, "aboutToDisappear") } } diff --git a/common/component/src/main/ets/components/NoteContentComp.ets b/common/component/src/main/ets/components/NoteContentComp.ets index 5959c0f..0f4f598 100644 --- a/common/component/src/main/ets/components/NoteContentComp.ets +++ b/common/component/src/main/ets/components/NoteContentComp.ets @@ -195,6 +195,7 @@ export struct NoteContentComp { } aboutToDisappear(): void{ + clearInterval(timeId) LogUtil.info(TAG, "aboutToDisappear") } diff --git a/common/component/src/main/ets/components/NoteContentCompPortrait.ets b/common/component/src/main/ets/components/NoteContentCompPortrait.ets index 3111f58..338eccb 100644 --- a/common/component/src/main/ets/components/NoteContentCompPortrait.ets +++ b/common/component/src/main/ets/components/NoteContentCompPortrait.ets @@ -145,6 +145,7 @@ export struct NoteContentCompPortrait { } aboutToDisappear(): void{ + clearInterval(time_id) LogUtil.info(TAG, "aboutToDisappear") } } -- Gitee From 7ab4557d5bdaf8d416a103534dcb7ef02aa0025a Mon Sep 17 00:00:00 2001 From: qp Date: Thu, 16 Jun 2022 18:54:34 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AC=94=E8=AE=B0?= =?UTF-8?q?=E4=B8=AD=E4=BF=AE=E6=94=B9=E6=A0=87=E9=A2=98=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=8C=89=E9=92=AE=E4=B8=8D=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E7=BD=AE=E7=81=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qp --- .../src/main/ets/components/CusDialogComp.ets | 38 ++++++++++++++----- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/common/component/src/main/ets/components/CusDialogComp.ets b/common/component/src/main/ets/components/CusDialogComp.ets index bda7a85..e577d9a 100644 --- a/common/component/src/main/ets/components/CusDialogComp.ets +++ b/common/component/src/main/ets/components/CusDialogComp.ets @@ -62,7 +62,7 @@ export struct NewOrEditFolderDialog { .borderRadius(15) .backgroundColor($r("app.color.New_folder_input_box_color")) .width('100%') - .padding({left: 12, bottom: -12}) + .padding({ left: 12, bottom: -12 }) .onChange((value: string) => { this.inputName = value FolderUtil.duplicateDetection(this.inputName, this.AllFolderArray).then(result => { @@ -75,14 +75,15 @@ export struct NewOrEditFolderDialog { .height(1) .margin({ left: 64, right: 24 }) .color((this.isExisted && this.inputName != this.oriInputName) ? $r("app.color.category_already_exist_divider_color") : $r("app.color.divider_color_182431")) - if(this.isExisted && this.inputName != this.oriInputName){ + if (this.isExisted && this.inputName != this.oriInputName) { Text($r("app.string.category_already_exist")) .fontSize(10) .margin({ left: 64, top: 4 }) .fontColor($r("app.color.category_already_exist_font_color")) .visibility((this.isExisted && this.inputName != this.oriInputName) ? Visibility.Visible : Visibility.None) - }else{ - Column(){} + } else { + Column() { + } .height(16) .width("100%") } @@ -199,7 +200,7 @@ export struct DeleteDialog { .textAlign(TextAlign.Center) .maxLines(1) .visibility(this.multiSelect == false || this.selectedFolderData.uuid == SysDefFolderUuid.RecentDeletes ? Visibility.None : Visibility.Visible) - } else if (this.CheckedNoteArray.length > 1){ + } else if (this.CheckedNoteArray.length > 1) { Text($r("app.string.deletePartNote", this.CheckedNoteArray.length)) .fontSize(14) .textAlign(TextAlign.Center) @@ -343,7 +344,10 @@ export struct NoteDataMoveDialog { }) }, noteItem => noteItem.uuid) ListItem() { - NoteDataMoveItemComp({ folderItem: this.NoteDataMoveArray[this.NoteDataMoveArray.length - 1], dividerShow: false }) + NoteDataMoveItemComp({ + folderItem: this.NoteDataMoveArray[this.NoteDataMoveArray.length - 1], + dividerShow: false + }) } .onClick(() => { this.noteDataMoveDialogCtl.close() @@ -373,6 +377,7 @@ export struct NoteDataMoveDialog { } let inSetValue = AppStorage.Link('inSetValue') + @CustomDialog export struct EditContentDialog { editContentDialogCtl: CustomDialogController @@ -381,9 +386,11 @@ export struct EditContentDialog { @StorageLink("inSetValue") inSetValue: number = 4 private circleColor: string private fontSize: number - aboutToAppear(){ + + aboutToAppear() { this.confirm("javascript:RICH_EDITOR.getFontSizes()") } + build() { Row() { Column() { @@ -642,6 +649,7 @@ export struct EditTitleDialog { editTitleDialog: CustomDialogController confirm: (newTitle: string) => void @State inputName: string = "" + private isChange: boolean= true build() { Column() { @@ -659,6 +667,12 @@ export struct EditTitleDialog { .backgroundColor($r("app.color.title_input_bg_color")) .width('90%') .onChange((value: string) => { + if (this.inputName == value) { + this.isChange = true + } + else { + this.isChange = false + } this.inputName = value }) }.margin({ bottom: 4, left: 24, right: 24 }) @@ -680,8 +694,8 @@ export struct EditTitleDialog { .strokeWidth(1) .color($r("app.color.divider_color_e4e4e4")) Text($r("app.string.save")) - .opacity((this.inputName == "") ? 0.4 : 1) - .enabled((this.inputName == "") ? false : true) + .opacity(this.isChange ? 0.4 : 1) + .enabled(this.isChange ? false : true) .fontSize(18) .textAlign(TextAlign.Center) .fontColor($r("app.color.button_color_419fff")) @@ -717,7 +731,11 @@ export struct EditContentDialogPortrait { Text($r("app.string.style")).margin({ top: 8 }) .fontSize(14).fontColor($r("app.color.font_stylecolor_AD182431")) - Image($r('app.media.cross')).height(16).width(16).margin({ top: 8 }).fillColor($r("app.color.font_stylecolor_AD182431")) + Image($r('app.media.cross')) + .height(16) + .width(16) + .margin({ top: 8 }) + .fillColor($r("app.color.font_stylecolor_AD182431")) .onClick(() => { this.editContentDialogCtl.close() }) -- Gitee From 6ae8163ab5eb1f576288dad9e865f2ad158a36fa Mon Sep 17 00:00:00 2001 From: qp Date: Thu, 16 Jun 2022 19:04:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9A=E5=A4=87=E5=BF=98=E5=BD=95-=E9=95=BF=E6=8C=89?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=90=8E=E9=80=89=E6=8B=A9=E4=B8=80=E6=9D=A1?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E7=BD=AE=E9=A1=B6=EF=BC=8C=E7=BD=AE=E9=A1=B6?= =?UTF-8?q?=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qp --- common/component/src/main/ets/components/NoteListComp.ets | 1 + 1 file changed, 1 insertion(+) diff --git a/common/component/src/main/ets/components/NoteListComp.ets b/common/component/src/main/ets/components/NoteListComp.ets index 61f4dfd..bac1a3b 100644 --- a/common/component/src/main/ets/components/NoteListComp.ets +++ b/common/component/src/main/ets/components/NoteListComp.ets @@ -803,6 +803,7 @@ export struct OperateNoteCompForPortrait { RdbStoreUtil.update(noteItem.toNoteObject(), predicates_note, null) }) this.longpress = false + this.refreshFlag = (this.refreshFlag == 0 ? 1 : 0) NoteUtil.unsetAllNotesChecked(this.CheckedNoteArray) }) Text($r("app.string.set_top")) -- Gitee