From b5ab0f8cdca63dabbc8dc4308ad72787d640f361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E6=B5=A9?= Date: Tue, 12 Aug 2025 11:52:19 +0800 Subject: [PATCH] avoid import units which leads to compile problems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 何浩 --- api/@ohos.arkui.component.d.ets | 1 + api/graphics3d/Scene.d.ts | 16 +++++++++++++--- api/graphics3d/SceneResources.d.ts | 16 +++++++++++++--- .../config/none_arkui_files.json | 4 +--- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/api/@ohos.arkui.component.d.ets b/api/@ohos.arkui.component.d.ets index 461b86ba7a..fd7da3dd86 100644 --- a/api/@ohos.arkui.component.d.ets +++ b/api/@ohos.arkui.component.d.ets @@ -154,3 +154,4 @@ export * from './arkui/component/xcomponent'; export * from './arkui/component/resources'; export * from './arkui/component/lazyGridLayout'; export * from './arkui/component/pageTransition'; +export * from './arkui/component/component3d'; diff --git a/api/graphics3d/Scene.d.ts b/api/graphics3d/Scene.d.ts index 838408be3a..8b1de11d75 100644 --- a/api/graphics3d/Scene.d.ts +++ b/api/graphics3d/Scene.d.ts @@ -19,12 +19,22 @@ * @arkts 1.1&1.2 */ -/*** if arkts 1.2 */ -import { ResourceStr } from '../arkui/component/units'; -/*** endif */ import { Shader, MaterialType, Material, Animation, Environment, Image, MeshResource, Sampler, SceneResource } from './SceneResources'; import { Camera, LightType, Light, Node, NodeType, Geometry } from './SceneNodes'; import { Position3, Color, GeometryDefinition, Vec2, Vec3, Vec4 } from './SceneTypes'; +/*** if arkts 1.2 */ +import { Resource } from '../global/resource'; + +/** + * Defines the string which can use resource. + * + * @typedef { string | Resource } ResourceStr + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +declare type ResourceStr = string | Resource; +/*** endif */ /** * The scene resource parameters type. diff --git a/api/graphics3d/SceneResources.d.ts b/api/graphics3d/SceneResources.d.ts index c26828aa13..a6fc30b942 100644 --- a/api/graphics3d/SceneResources.d.ts +++ b/api/graphics3d/SceneResources.d.ts @@ -19,11 +19,21 @@ * @arkts 1.1&1.2 */ -/*** if arkts 1.2 */ -import { ResourceStr } from '../arkui/component/units'; -/*** endif */ import { Vec2, Vec3, Vec4, Aabb } from './SceneTypes'; import { Callback } from '../@ohos.base'; +/*** if arkts 1.2 */ +import { Resource } from '../global/resource'; + +/** + * Defines the string which can use resource. + * + * @typedef { string | Resource } ResourceStr + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +declare type ResourceStr = string | Resource; +/*** endif */ /** * The enum of SceneResource type. diff --git a/build-tools/arkui_transformer/config/none_arkui_files.json b/build-tools/arkui_transformer/config/none_arkui_files.json index 489bd127ec..6f5fba878a 100644 --- a/build-tools/arkui_transformer/config/none_arkui_files.json +++ b/build-tools/arkui_transformer/config/none_arkui_files.json @@ -1,5 +1,3 @@ { - "files": [ - "component3d" - ] + "files": [] } \ No newline at end of file -- Gitee