From 761fb2c100c0a14a853273f258cf2f9acd050239 Mon Sep 17 00:00:00 2001 From: Pure Date: Thu, 26 Jun 2025 11:39:57 +0800 Subject: [PATCH] 1 --- Ndk/Ndk2/NativeGetArkTSObject/src/main/ets/pages/Index.ets | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Ndk/Ndk2/NativeGetArkTSObject/src/main/ets/pages/Index.ets b/Ndk/Ndk2/NativeGetArkTSObject/src/main/ets/pages/Index.ets index 4933684f..83b52e9e 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 -- Gitee