From 2f1cf1e95d70474d4021e595192cb592284da0a1 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Tue, 20 May 2025 15:43:03 +0800 Subject: [PATCH] composite_component Signed-off-by: wangweiyuan --- .../component/ets/composite_component.d.ts | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 api/@internal/component/ets/composite_component.d.ts diff --git a/api/@internal/component/ets/composite_component.d.ts b/api/@internal/component/ets/composite_component.d.ts new file mode 100644 index 0000000000..e5e2c4d86c --- /dev/null +++ b/api/@internal/component/ets/composite_component.d.ts @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + */ + +/** + * Provides a Composite Component, which groups multiple child components into a single, reusable component with + * unified properties, events, and lifecycle management. + * + * @interface CompositeComponentInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ +interface CompositeComponentInterface { + /** + * Creates a composite component with the specified content function. + * + * @param { Function } content - The content function that defines the structure and behavior of child components. + * @returns { CompositeComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + (): CompositeComponentAttribute; +} + +/** + * Defines the properties and methods available for a Composite Component. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare class CompositeComponentAttribute extends CommonMethod {} + +/** + * Defines the Composite Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare const CompositeComponent: CompositeComponentInterface; + +/** + * Defines the Composite Component instance type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare const CompositeComponentInstance: CompositeComponentAttribute; \ No newline at end of file -- Gitee