From 49db426dc9d99a24205c215520e976035dc38a1e Mon Sep 17 00:00:00 2001 From: dhf <1511447814@qq.com> Date: Thu, 6 Nov 2025 10:26:09 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=87=E5=AD=97=E9=81=AE=E6=8C=A1?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/albumView/src/main/ets/views/SideColumn.ets | 1 + features/albumView/src/main/resources/base/element/string.json | 2 +- features/albumView/src/main/resources/en_US/element/string.json | 2 +- features/albumView/src/main/resources/zh_CN/element/string.json | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/features/albumView/src/main/ets/views/SideColumn.ets b/features/albumView/src/main/ets/views/SideColumn.ets index ce33b2f..ac839b4 100755 --- a/features/albumView/src/main/ets/views/SideColumn.ets +++ b/features/albumView/src/main/ets/views/SideColumn.ets @@ -41,6 +41,7 @@ export struct SideColumn { Row() { Stack({ alignContent: Alignment.Start }) { TextInput({ placeholder: AlbumViewConstants.SideConstants[0] }) + .placeholderFont({size :10}) .type(InputType.Normal) .enableKeyboardOnFocus(false) diff --git a/features/albumView/src/main/resources/base/element/string.json b/features/albumView/src/main/resources/base/element/string.json index 902950d..848e579 100755 --- a/features/albumView/src/main/resources/base/element/string.json +++ b/features/albumView/src/main/resources/base/element/string.json @@ -10,7 +10,7 @@ }, { "name": "sideConstants1", - "value": " Pics、Pers.、Loc..." + "value": " Pics、Pers.、Loc..." }, { "name": "sideConstants2", diff --git a/features/albumView/src/main/resources/en_US/element/string.json b/features/albumView/src/main/resources/en_US/element/string.json index 965047a..e750a0f 100644 --- a/features/albumView/src/main/resources/en_US/element/string.json +++ b/features/albumView/src/main/resources/en_US/element/string.json @@ -10,7 +10,7 @@ }, { "name": "sideConstants1", - "value": " Pics、Pers.、Loc..." + "value": " Pics、Pers.、Loc..." }, { "name": "sideConstants2", diff --git a/features/albumView/src/main/resources/zh_CN/element/string.json b/features/albumView/src/main/resources/zh_CN/element/string.json index d0b1a76..04bb9e8 100644 --- a/features/albumView/src/main/resources/zh_CN/element/string.json +++ b/features/albumView/src/main/resources/zh_CN/element/string.json @@ -10,7 +10,7 @@ }, { "name": "sideConstants1", - "value": " 照片、人物、地点..." + "value": " 照片、人物、地点..." }, { "name": "sideConstants2", -- Gitee From 5b7db32d71797aeca1ccd31bbff60fad3eb65a4e Mon Sep 17 00:00:00 2001 From: dhf <1511447814@qq.com> Date: Thu, 6 Nov 2025 11:11:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=BA=9F=E5=BC=83=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pictureView/src/main/ets/view/BottomBar.ets | 15 +++++++++++---- features/pictureView/src/main/ets/view/TopBar.ets | 15 +++++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/features/pictureView/src/main/ets/view/BottomBar.ets b/features/pictureView/src/main/ets/view/BottomBar.ets index 24723a5..28f5e89 100755 --- a/features/pictureView/src/main/ets/view/BottomBar.ets +++ b/features/pictureView/src/main/ets/view/BottomBar.ets @@ -15,6 +15,8 @@ import PictureViewConstants, { ActionInterface } from '../constants/PictureViewConstants'; import { BaseConstants } from '@ohos/commons'; +import { BusinessError } from '@kit.BasicServicesKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; @Preview @Component @@ -38,10 +40,15 @@ export struct BottomBar { .padding({ top: $r('app.float.icon_padding_top') }) } .onClick(() => { - let pushPath = - this.getUIContext().getHostContext()?.resourceManager.getStringSync(item.icon_name as Resource) as string; - if (pushPath === '编辑' || pushPath === 'edit') { - this.pageInfos.pushPath(new NavPathInfo('pictureEdit', [])); + try { + let pushPath = this.getUIContext() + .getHostContext()?.resourceManager.getStringSync((item.icon_name as Resource).id) as string; + if (pushPath === '编辑' || pushPath === 'edit') { + this.pageInfos.pushPath(new NavPathInfo('pictureEdit', [])); + } + } catch (error) { + let err = error as BusinessError; + hilog.error(0x0000, 'BottomBar', 'error code is ' + err.code); } }) .width(PictureViewConstants.ICON_LIST_WIDTH) diff --git a/features/pictureView/src/main/ets/view/TopBar.ets b/features/pictureView/src/main/ets/view/TopBar.ets index 2af1d70..3087083 100755 --- a/features/pictureView/src/main/ets/view/TopBar.ets +++ b/features/pictureView/src/main/ets/view/TopBar.ets @@ -15,6 +15,8 @@ import { BaseConstants, BreakpointConstants } from '@ohos/commons'; import PictureViewConstants, { ActionInterface } from '../constants/PictureViewConstants'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { BusinessError } from '@kit.BasicServicesKit'; const TITLE: string = '2020.12.24'; @@ -73,10 +75,15 @@ export struct TopBar { .width(BaseConstants.DEFAULT_ICON_SIZE) .margin({ left: $r('app.float.detail_image_left') }) .onClick(() => { - let pushPath = this.getUIContext() - .getHostContext()?.resourceManager.getStringSync(item.icon_name as Resource) as string; - if (pushPath === '编辑' || pushPath === 'edit') { - this.pageInfos.pushPath(new NavPathInfo('pictureEdit', [])); + try { + let pushPath = this.getUIContext() + .getHostContext()?.resourceManager.getStringSync((item.icon_name as Resource).id) as string; + if (pushPath === '编辑' || pushPath === 'edit') { + this.pageInfos.pushPath(new NavPathInfo('pictureEdit', [])); + } + } catch (error) { + let err = error as BusinessError; + hilog.error(0x0000, 'TopBar', 'error code is ' + err.code); } }) }, (item: ActionInterface, index: number) => index + JSON.stringify(item)) -- Gitee From 3d17bd7e6be7c4767b21235b692e13b83c7b0729 Mon Sep 17 00:00:00 2001 From: dhf <1511447814@qq.com> Date: Thu, 6 Nov 2025 12:03:33 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=8D=E5=8F=AF=E8=8E=B7=E7=84=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/albumView/src/main/ets/views/SideColumn.ets | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/features/albumView/src/main/ets/views/SideColumn.ets b/features/albumView/src/main/ets/views/SideColumn.ets index ac839b4..0cc806c 100755 --- a/features/albumView/src/main/ets/views/SideColumn.ets +++ b/features/albumView/src/main/ets/views/SideColumn.ets @@ -41,9 +41,10 @@ export struct SideColumn { Row() { Stack({ alignContent: Alignment.Start }) { TextInput({ placeholder: AlbumViewConstants.SideConstants[0] }) - .placeholderFont({size :10}) + .placeholderFont({ size: 10 }) .type(InputType.Normal) .enableKeyboardOnFocus(false) + .focusable(false) Image($r('app.media.search2')) .aspectRatio(1) -- Gitee