From 629fe8dce4818c5b8789120c0451b7cc5ab29556 Mon Sep 17 00:00:00 2001 From: EasyGuohf <163991322+EasyGuohf@users.noreply.github.com> Date: Wed, 4 Jun 2025 20:57:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=812in1=E4=B8=8D?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=BE=93=E5=85=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/Index.ets | 12 +++++++++++- entry/src/main/resources/base/element/string.json | 4 ++++ entry/src/main/resources/en_US/element/string.json | 4 ++++ entry/src/main/resources/zh_CN/element/string.json | 4 ++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 9784443..4125f14 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -16,6 +16,7 @@ import Constants from '../common/Constants'; import { NavDestinationItem } from '../viewmodel/NavDestinationItem'; import { GlobalBuilderContext } from '../common/GlobalBuilderContext'; +import { promptAction } from '@kit.ArkUI'; @Entry @Component @@ -64,7 +65,16 @@ struct Index { .margin({ top: $r('sys.float.padding_level6') }) .backgroundColor($r('sys.color.comp_background_emphasize')) .onClick(() => { - this.pathInfos.pushPathByName(item.name, Constants.ZERO); + if (this.curBp === Constants.BREAKPOINTS[2] && (index === 0 || index === 2)) { + promptAction.showToast({ + message: $r('app.string.prompt_message'), + duration: 2000, + showMode: promptAction.ToastShowMode.DEFAULT, + bottom: 80, + }) + } else { + this.pathInfos.pushPathByName(item.name, Constants.ZERO); + } }) }, (item: NavDestinationItem) => JSON.stringify(item)) } diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index dbf5520..6d6f228 100644 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -111,6 +111,10 @@ { "name": "project_name", "value": "Collection Of Verification Codes" + }, + { + "name": "prompt_message", + "value": "Keyboard input is currently not supported on 2-in-1 devices." } ] } \ No newline at end of file diff --git a/entry/src/main/resources/en_US/element/string.json b/entry/src/main/resources/en_US/element/string.json index 85ca03e..53f3a4c 100644 --- a/entry/src/main/resources/en_US/element/string.json +++ b/entry/src/main/resources/en_US/element/string.json @@ -111,6 +111,10 @@ { "name": "project_name", "value": "Collection Of Verification Codes" + }, + { + "name": "prompt_message", + "value": "Keyboard input is currently not supported on 2-in-1 devices." } ] } \ No newline at end of file diff --git a/entry/src/main/resources/zh_CN/element/string.json b/entry/src/main/resources/zh_CN/element/string.json index 4e77cba..07f7aff 100644 --- a/entry/src/main/resources/zh_CN/element/string.json +++ b/entry/src/main/resources/zh_CN/element/string.json @@ -111,6 +111,10 @@ { "name": "project_name", "value": "验证码合集" + }, + { + "name": "prompt_message", + "value": "2in1设备暂不支持键盘输入!" } ] } \ No newline at end of file -- Gitee