diff --git a/PageAndData02/02_Complete/entry/src/main/ets/pages/LoginPage.ets b/PageAndData02/02_Complete/entry/src/main/ets/pages/LoginPage.ets index ed7ca09bf6780a55e749a52a70fa5a2561ec5ecb..f2708c6f168e12a82a09e1d5a65f103662c613b6 100644 --- a/PageAndData02/02_Complete/entry/src/main/ets/pages/LoginPage.ets +++ b/PageAndData02/02_Complete/entry/src/main/ets/pages/LoginPage.ets @@ -64,7 +64,7 @@ struct LoginPage { login(result: boolean): void { if (this.account === '' || this.password === '') { - promptAction.showToast({ + this.getUIContext().getPromptAction().showToast({ message: $r('app.string.input_empty_tips') }) } else { diff --git a/PageAndData03/03_StartingPoint/entry/src/main/ets/pages/LoginPage.ets b/PageAndData03/03_StartingPoint/entry/src/main/ets/pages/LoginPage.ets index ed7ca09bf6780a55e749a52a70fa5a2561ec5ecb..f2708c6f168e12a82a09e1d5a65f103662c613b6 100644 --- a/PageAndData03/03_StartingPoint/entry/src/main/ets/pages/LoginPage.ets +++ b/PageAndData03/03_StartingPoint/entry/src/main/ets/pages/LoginPage.ets @@ -64,7 +64,7 @@ struct LoginPage { login(result: boolean): void { if (this.account === '' || this.password === '') { - promptAction.showToast({ + this.getUIContext().getPromptAction().showToast({ message: $r('app.string.input_empty_tips') }) } else {