From 2b7e0256ed0492ed866a704832b6fdb607e679f5 Mon Sep 17 00:00:00 2001 From: GuoLi Date: Thu, 5 Sep 2024 19:41:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=90=9C=E7=B4=A2=E8=81=94?= =?UTF-8?q?=E7=B3=BB=E4=BA=BA=E8=8E=B7=E7=84=A6;=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E8=81=94=E7=B3=BB=E4=BA=BA=E6=9B=B4=E5=A4=9A=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: GuoLi --- .../src/main/ets/pages/contacts/accountants/Accountants.ets | 4 ++++ entry/src/main/ets/pages/contacts/search/ContactSearch.ets | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/entry/src/main/ets/pages/contacts/accountants/Accountants.ets b/entry/src/main/ets/pages/contacts/accountants/Accountants.ets index 2bc6991..1ca3ca1 100644 --- a/entry/src/main/ets/pages/contacts/accountants/Accountants.ets +++ b/entry/src/main/ets/pages/contacts/accountants/Accountants.ets @@ -135,7 +135,9 @@ struct Accountants { } aboutToDisappear() { + HiLog.i(TAG, 'the Page aboutToDisappear Begin !!!'); this.dialogController = null; + this.mPresenter.showMore = false; } onPageShow() { @@ -309,6 +311,8 @@ struct Accountants { this.mPresenter.contactInfoAfter.display_name = value; this.mPresenter.textChange(value); }) + .enableKeyboardOnFocus(true) + .defaultFocus(true) } .margin(this.curBp === 'lg' ? {} : { left: $r('app.float.id_card_margin_mid') }) } diff --git a/entry/src/main/ets/pages/contacts/search/ContactSearch.ets b/entry/src/main/ets/pages/contacts/search/ContactSearch.ets index 01fcd24..57b8f9a 100644 --- a/entry/src/main/ets/pages/contacts/search/ContactSearch.ets +++ b/entry/src/main/ets/pages/contacts/search/ContactSearch.ets @@ -79,6 +79,12 @@ export struct ContactSearch { this.presenter.inputKeyword = value this.presenter.getSearchContact(this.presenter.inputKeyword); }) + .onFocus(() => { + focusControl.requestFocus('searchContact'); + }) + .id('searchContact') + .enableKeyboardOnFocus(true) + .defaultFocus(true) Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { Image($r('app.media.ic_public_search')) -- Gitee