From edcf9eb62d7d2095a6ec8d4431e4a60449bb9477 Mon Sep 17 00:00:00 2001 From: xiexiyun Date: Tue, 24 May 2022 15:52:48 +0800 Subject: [PATCH] add relative container interface Signed-off-by: xiexiyun Change-Id: I1e35d0ae9d6955c3c6ac68884a9bf84fa9fdbbf8 --- BUILD.gn | 1 + api/@internal/component/ets/common.d.ts | 11 ++++++- .../component/ets/relative_container.d.ts | 30 +++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 api/@internal/component/ets/relative_container.d.ts diff --git a/BUILD.gn b/BUILD.gn index f120e5ee08..db19fcb6e9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -82,6 +82,7 @@ ohos_copy("ets_component") { "api/@internal/component/ets/rating.d.ts", "api/@internal/component/ets/rect.d.ts", "api/@internal/component/ets/refresh.d.ts", + "api/@internal/component/ets/relative_container.d.ts", "api/@internal/component/ets/rich_text.d.ts", "api/@internal/component/ets/row.d.ts", "api/@internal/component/ets/row_split.d.ts", diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 5a7ca53289..8d99d6a6bf 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -1479,6 +1479,15 @@ declare class CommonMethod { lg?: number | { span: number; offset: number }; }): T; + alignRules(value: { + left?: { anchor: string, align: HorizontalAlign }; + right?: { anchor: string, align: HorizontalAlign }; + middle?: { anchor: string, align: HorizontalAlign }; + top?: { anchor: string, align: VerticalAlign }; + bottom?: { anchor: string, align: VerticalAlign }; + center?: { anchor: string, align: VerticalAlign }; + }): T; + /** * Specifies the aspect ratio of the current component. * @since 7 @@ -1817,4 +1826,4 @@ declare class View { * @since 7 */ create(value: any): any; -} +} \ No newline at end of file diff --git a/api/@internal/component/ets/relative_container.d.ts b/api/@internal/component/ets/relative_container.d.ts new file mode 100644 index 0000000000..3e44be95a6 --- /dev/null +++ b/api/@internal/component/ets/relative_container.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2021 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. + */ + +/** + * Provides ports for relative containers. + * @since 8 + */ +interface RelativeContainerInterface { +} + +/** +* @since 8 +*/ +declare class RelativeContainerAttribute extends CommonMethod { +} + +declare const RelativeContainer : RelativeContainerInterface; +declare const RelativeContainerInstance: RelativeContainerAttribute; -- Gitee