diff --git a/Ndk/Ndk2/NativeGetArkTSObject/src/main/ets/pages/Index.ets b/Ndk/Ndk2/NativeGetArkTSObject/src/main/ets/pages/Index.ets index 4933684f06bda67a03f78d4b2df40b15588c48cb..83b52e9ee5b9615d933c3893f4d2ceac25fcdf0f 100644 --- a/Ndk/Ndk2/NativeGetArkTSObject/src/main/ets/pages/Index.ets +++ b/Ndk/Ndk2/NativeGetArkTSObject/src/main/ets/pages/Index.ets @@ -20,14 +20,14 @@ // [Start native_get_ark_ts_object_ets] // index.ets import testNapi from 'libentry.so'; +import { PromptAction } from '@kit.ArkUI'; -const context = AppStorage.get("context") as UIContext; class A { name: string = 'username' onCall() { - context.getPromptAction().showToast({ + new PromptAction().showToast({ message: 'Message Info', duration: 2000 }); @@ -45,4 +45,5 @@ struct NativeGetArkTSObject { }) } } + // [End native_get_ark_ts_object_ets] \ No newline at end of file