From 2e5eaba98768e02f6b0809ff7e81b3f9764507a0 Mon Sep 17 00:00:00 2001 From: Yao yuchi Date: Wed, 13 Apr 2022 10:13:17 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=BF=BD=E5=8A=A0waterflow=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E7=9B=B8=E5=85=B3d.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yao yuchi --- api/@internal/component/ets/flow_item.d.ts | 59 +++++++++++++++ api/@internal/component/ets/water_flow.d.ts | 84 +++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 api/@internal/component/ets/flow_item.d.ts create mode 100644 api/@internal/component/ets/water_flow.d.ts diff --git a/api/@internal/component/ets/flow_item.d.ts b/api/@internal/component/ets/flow_item.d.ts new file mode 100644 index 0000000000..40c0e51bd4 --- /dev/null +++ b/api/@internal/component/ets/flow_item.d.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2021-2022 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. + */ + +/** + * 瀑布流网格容器中单项内容容器. + * @since 9 + */ +interface FlowItemInterface { + /** + * 返回FlowItem. + * @since 9 + */ + (): FlowItemAttribute; +} + +/** + * FlowItem属性 + * @since 9 + */ +declare class FlowItemAttribute extends CommonMethod { + /** + * Just use for genetate tsbundle + * @ignore ide should ignore this arrtibute + */ + create(): FlowItemAttribute; + + /** + * Just use for genetate tsbundle + * @ignore ide should ignore this arrtibute + */ + pop(): FlowItemAttribute; + + /** + * FlowItem占用行数. + * @since 9 + */ + rowSpan(value: number): FlowItemAttribute; + + /** + * FlowItem占用列数. + * @since 9 + */ + columnSpan(value: number): FlowItemAttribute; +} + +declare const FlowItem: FlowItemInterface +declare const FlowItemInstance: FlowItemAttribute; diff --git a/api/@internal/component/ets/water_flow.d.ts b/api/@internal/component/ets/water_flow.d.ts new file mode 100644 index 0000000000..d7422a04a5 --- /dev/null +++ b/api/@internal/component/ets/water_flow.d.ts @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2021-2022 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. + */ + +/** + * 瀑布流样式, 将网格容器划分成"行"和"列", FlowItem元素可以在网格容器内 + * 按照主轴、辅轴方向顺序布局排列。 + * crossSplice:辅轴方向的网格分割份数。 + * mainLength:主轴方向的宫格高度。可选参数,不指定的时候,网格为正方形。 + * @since 9 + */ +declare interface GridStyle { + crossSplice: number; + mainLength?: Length; +} + +/** + * 瀑布流容器, 二维容器, 支持GridStyle样式。 + * @since 9 + */ +interface WaterFlowInterface { + /** + * 返回WaterFlow. + * @since 9 + */ + (style: GridStyle, scroller?: Scroller): WaterFlowAttribute; +} + +/** + * WaterFlow组件属性 + * @since 9 + */ +declare class WaterFlowAttribute extends CommonMethod { + /** + * Just use for genetate tsbundle + * @ignore ide should ignore this arrtibute + */ + create(style: GridStyle, scroller?: Scroller): WaterFlowAttribute; + + /** + * Just use for genetate tsbundle + * @ignore ide should ignore this arrtibute + */ + pop(): WaterFlowAttribute; + + /** + * Just use for genetate tsbundle + * @ignore ide should ignore this arrtibute + * @since 9 + */ + debugLine(value: string): GridAttribute; + + /** + * 用于设置列与列的间距 + * @since 9 + */ + columnsGap(value: Length): WaterFlowAttribute; + + /** + * 用于设置行与行的间距 + * @since 9 + */ + rowsGap(value: Length): WaterFlowAttribute; + + /** + * 控制WaterFlow的布局方向 + * @since 9 + */ + layoutDirection(value: LayoutDirection): WaterFlowAttribute; +} + +declare const WaterFlow: WaterFlowInterface; +declare const WaterFlowInstance: WaterFlowAttribute; -- Gitee From 80919afa90b724ef25339b8d6f5a0ad490d4e207 Mon Sep 17 00:00:00 2001 From: Yao yuchi Date: Sun, 24 Apr 2022 14:13:16 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=BF=BD=E5=8A=A0waterflow=E7=BB=84?= =?UTF-8?q?=E4=BB=B6d.ts=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yao yuchi --- api/@internal/component/ets/index-full.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/@internal/component/ets/index-full.d.ts b/api/@internal/component/ets/index-full.d.ts index 25e737704e..62362a5484 100644 --- a/api/@internal/component/ets/index-full.d.ts +++ b/api/@internal/component/ets/index-full.d.ts @@ -37,6 +37,7 @@ /// /// /// +/// /// /// /// @@ -95,6 +96,7 @@ /// /// /// +/// /// /// /// -- Gitee From 46d8dbcf7778e44e0400c805a475c15e939f7431 Mon Sep 17 00:00:00 2001 From: Yao yuchi Date: Sun, 24 Apr 2022 14:17:33 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=BF=BD=E5=8A=A0gn=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yao yuchi --- BUILD.gn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 735000f5be..88bf8103e1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -53,6 +53,7 @@ ohos_copy("ets_component") { "api/@internal/component/ets/ellipse.d.ts", "api/@internal/component/ets/enums.d.ts", "api/@internal/component/ets/flex.d.ts", + "api/@internal/component/ets/flow_item.d.ts", "api/@internal/component/ets/for_each.d.ts", "api/@internal/component/ets/form_component.d.ts", "api/@internal/component/ets/gauge.d.ts", @@ -111,6 +112,7 @@ ohos_copy("ets_component") { "api/@internal/component/ets/toggle.d.ts", "api/@internal/component/ets/units.d.ts", "api/@internal/component/ets/video.d.ts", + "api/@internal/component/ets/water_flow.d.ts", "api/@internal/component/ets/web.d.ts", "api/@internal/component/ets/xcomponent.d.ts", ] -- Gitee From 31f8a1c245baa5168c2319d90492e62b20d93b27 Mon Sep 17 00:00:00 2001 From: Yao yuchi Date: Sun, 24 Apr 2022 15:47:41 +0800 Subject: [PATCH 4/5] =?UTF-8?q?waterflow=20d.ts=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yao yuchi --- api/@internal/component/ets/flow_item.d.ts | 12 ------------ api/@internal/component/ets/water_flow.d.ts | 19 ------------------- 2 files changed, 31 deletions(-) diff --git a/api/@internal/component/ets/flow_item.d.ts b/api/@internal/component/ets/flow_item.d.ts index 40c0e51bd4..de49d0f548 100644 --- a/api/@internal/component/ets/flow_item.d.ts +++ b/api/@internal/component/ets/flow_item.d.ts @@ -30,18 +30,6 @@ interface FlowItemInterface { * @since 9 */ declare class FlowItemAttribute extends CommonMethod { - /** - * Just use for genetate tsbundle - * @ignore ide should ignore this arrtibute - */ - create(): FlowItemAttribute; - - /** - * Just use for genetate tsbundle - * @ignore ide should ignore this arrtibute - */ - pop(): FlowItemAttribute; - /** * FlowItem占用行数. * @since 9 diff --git a/api/@internal/component/ets/water_flow.d.ts b/api/@internal/component/ets/water_flow.d.ts index d7422a04a5..12bc63441f 100644 --- a/api/@internal/component/ets/water_flow.d.ts +++ b/api/@internal/component/ets/water_flow.d.ts @@ -42,25 +42,6 @@ interface WaterFlowInterface { * @since 9 */ declare class WaterFlowAttribute extends CommonMethod { - /** - * Just use for genetate tsbundle - * @ignore ide should ignore this arrtibute - */ - create(style: GridStyle, scroller?: Scroller): WaterFlowAttribute; - - /** - * Just use for genetate tsbundle - * @ignore ide should ignore this arrtibute - */ - pop(): WaterFlowAttribute; - - /** - * Just use for genetate tsbundle - * @ignore ide should ignore this arrtibute - * @since 9 - */ - debugLine(value: string): GridAttribute; - /** * 用于设置列与列的间距 * @since 9 -- Gitee From 4506c41bc43f55c7ee6a5d178c2c0b59a27081fc Mon Sep 17 00:00:00 2001 From: Yao yuchi Date: Mon, 25 Apr 2022 09:24:00 +0800 Subject: [PATCH 5/5] =?UTF-8?q?middleclass=E6=96=87=E4=BB=B6=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yao yuchi --- api/@internal/component/ets/middle_class.d.ts | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/api/@internal/component/ets/middle_class.d.ts b/api/@internal/component/ets/middle_class.d.ts index adad7410a1..4c84022f14 100644 --- a/api/@internal/component/ets/middle_class.d.ts +++ b/api/@internal/component/ets/middle_class.d.ts @@ -2349,3 +2349,55 @@ declare class TSGestureGroupInterface { */ pop(): GestureGroupInterface; } + +declare class TSWaterFlowAttribute extends CommonMethod { + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 9 + */ + create(style: GridStyle, scroller?: Scroller): WaterFlowAttribute; + + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 9 + */ + pop(): WaterFlowAttribute; + + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 9 + */ + debugLine(value: string): WaterFlowAttribute; +} + +declare class TSFlowItemAttribute extends CommonMethod { + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 9 + */ + create(): FlowItemAttribute; + + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 9 + */ + pop(): FlowItemAttribute; + + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 9 + */ + debugLine(value: string): FlowItemAttribute; +} \ No newline at end of file -- Gitee