diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 9784443a828630ddf4b61c8d1a57430122a843b5..4125f1444717c9d6773bfec6bd09d5cb13d835f1 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 dbf552087cfffae36963ba4677bf6729d934946f..6d6f2285df221c51ff7c61fb8c67a8b09e0f8237 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 85ca03e1cf40775f56d545396c94d05f0d31d799..53f3a4ce70763b269cfe06de57569f902d09c595 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 4e77cba4e4fd4379261454c61f83f4f826722708..07f7aff22b619d38d9e4ffb75fb781bd90074be4 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