From 3b2480c6e89bd39b5c15aaad02d198a7f4d46a0f Mon Sep 17 00:00:00 2001 From: xushunjie Date: Fri, 17 Oct 2025 11:39:02 +0800 Subject: [PATCH] =?UTF-8?q?NativeNodeNapiSample=E4=B8=ADpage=5FgetDrawable?= =?UTF-8?q?Descriptor=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xushunjie --- .../NativeNodeNapiSample/entry/src/main/ets/pages/Index.ets | 6 +++--- ...rawableDescriptor.ets => page_getDrawableDescriptor.ets} | 4 ++++ .../entry/src/main/resources/base/element/string.json | 4 ++++ .../entry/src/main/resources/base/profile/main_pages.json | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) rename ArkUIKit/NativeNodeNapiSample/entry/src/main/ets/pages/{GetDrawableDescriptor.ets => page_getDrawableDescriptor.ets} (94%) diff --git a/ArkUIKit/NativeNodeNapiSample/entry/src/main/ets/pages/Index.ets b/ArkUIKit/NativeNodeNapiSample/entry/src/main/ets/pages/Index.ets index 437698a51e..ea93d9ee73 100644 --- a/ArkUIKit/NativeNodeNapiSample/entry/src/main/ets/pages/Index.ets +++ b/ArkUIKit/NativeNodeNapiSample/entry/src/main/ets/pages/Index.ets @@ -27,7 +27,7 @@ struct MenuIndex { [ { title: 'Navigation', url: 'pages/page_navigation' }, { title: 'add your router', url: 'pages/page_navigation' }, - { title: 'Mapping DrawableDescriptor', url: 'pages/GetDrawableDescriptor' }, + { title: 'Mapping DrawableDescriptor', url: 'pages/page_getDrawableDescriptor' }, { title: 'Animation', url: 'pages/page_animation' }, { title: 'Visual Effects', url: 'pages/page_visual_effects' }, ]; @@ -50,7 +50,7 @@ struct MenuIndex { .fontColor(Color.Black) .textAlign(TextAlign.Start) .height('100%') - .width('50%') + .width('70%') .padding($r('sys.float.padding_level10')) Text('>') .fontSize('25vp') @@ -58,7 +58,7 @@ struct MenuIndex { .textAlign(TextAlign.End) .fontColor(Color.Gray) .height('100%') - .width('50%') + .width('30%') .padding($r('sys.float.padding_level10')) } .width('100%') diff --git a/ArkUIKit/NativeNodeNapiSample/entry/src/main/ets/pages/GetDrawableDescriptor.ets b/ArkUIKit/NativeNodeNapiSample/entry/src/main/ets/pages/page_getDrawableDescriptor.ets similarity index 94% rename from ArkUIKit/NativeNodeNapiSample/entry/src/main/ets/pages/GetDrawableDescriptor.ets rename to ArkUIKit/NativeNodeNapiSample/entry/src/main/ets/pages/page_getDrawableDescriptor.ets index b82dc77985..9465c5404f 100644 --- a/ArkUIKit/NativeNodeNapiSample/entry/src/main/ets/pages/GetDrawableDescriptor.ets +++ b/ArkUIKit/NativeNodeNapiSample/entry/src/main/ets/pages/page_getDrawableDescriptor.ets @@ -24,6 +24,10 @@ struct Index { build() { Row() { Column() { + Button($r('app.string.GetDrawableDescriptor_return')).onClick(() => { + this.getUIContext().getRouter().back() + }) + Text($r('app.string.GetDrawableDescriptor_label')) .fontSize(20) .margin(20) diff --git a/ArkUIKit/NativeNodeNapiSample/entry/src/main/resources/base/element/string.json b/ArkUIKit/NativeNodeNapiSample/entry/src/main/resources/base/element/string.json index b825322faf..83f9d5d580 100644 --- a/ArkUIKit/NativeNodeNapiSample/entry/src/main/resources/base/element/string.json +++ b/ArkUIKit/NativeNodeNapiSample/entry/src/main/resources/base/element/string.json @@ -47,6 +47,10 @@ { "name": "GetDrawableDescriptor_result0", "value": "测试结果: " + }, + { + "name": "GetDrawableDescriptor_return", + "value": " 返回主页 " } ] } \ No newline at end of file diff --git a/ArkUIKit/NativeNodeNapiSample/entry/src/main/resources/base/profile/main_pages.json b/ArkUIKit/NativeNodeNapiSample/entry/src/main/resources/base/profile/main_pages.json index cbdc0fdc3d..e79ae471f8 100644 --- a/ArkUIKit/NativeNodeNapiSample/entry/src/main/resources/base/profile/main_pages.json +++ b/ArkUIKit/NativeNodeNapiSample/entry/src/main/resources/base/profile/main_pages.json @@ -2,7 +2,7 @@ "src": [ "pages/Index", "pages/page_navigation", - "pages/GetDrawableDescriptor", + "pages/page_getDrawableDescriptor", "pages/page_animation", "pages/animation/animationIndex1", "pages/animation/animationIndex2", -- Gitee