diff --git a/BUILD.gn b/BUILD.gn index 39dcd12045fa29a86b593903f370675d4885894a..96aa78f91ebb47c35cdbc1f09e4b4150742da6e3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -83,6 +83,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/remote_window.d.ts", "api/@internal/component/ets/rich_text.d.ts", "api/@internal/component/ets/row.d.ts", diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 23b05409b79f14a7a147b510e40d8cb51f47013e..d410c9d35a5e2e7a03c9743edc7914167f3059b2 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -1475,6 +1475,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 @@ -1813,4 +1822,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 0000000000000000000000000000000000000000..3e44be95a6358b719e2b8678c664f69638cedcc9 --- /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;