From eac6405433b3d4d9d84f0ee7ed9999f01ed6e566 Mon Sep 17 00:00:00 2001 From: caocan <1532643766@qq.com> Date: Tue, 26 Oct 2021 21:13:14 +0800 Subject: [PATCH] upload new features about dialog Signed-off-by: caocan <1532643766@qq.com> Change-Id: I5d66421ea7f5e9149c4287d05b6c6be78dd99425 --- BUILD.gn | 1 - .../component/ets/ability_component.d.ts | 5 ++ api/@internal/component/ets/action_sheet.d.ts | 1 + api/@internal/component/ets/alert_dialog.d.ts | 58 ++++++++++++++++++- .../ets/custom_dialog_controller.d.ts | 1 + .../component/ets/form_component.d.ts | 5 ++ api/@internal/component/ets/geometryView.d.ts | 51 ---------------- api/@internal/component/ets/index.d.ts | 1 - 8 files changed, 69 insertions(+), 54 deletions(-) delete mode 100644 api/@internal/component/ets/geometryView.d.ts diff --git a/BUILD.gn b/BUILD.gn index 8386556495..f83dbb92df 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -52,7 +52,6 @@ ohos_copy("ets_component") { "api/@internal/component/ets/forEach.d.ts", "api/@internal/component/ets/form_component.d.ts", "api/@internal/component/ets/gauge.d.ts", - "api/@internal/component/ets/geometryView.d.ts", "api/@internal/component/ets/gesture.d.ts", "api/@internal/component/ets/grid.d.ts", "api/@internal/component/ets/gridItem.d.ts", diff --git a/api/@internal/component/ets/ability_component.d.ts b/api/@internal/component/ets/ability_component.d.ts index 9c5cb73a28..a079915cb7 100644 --- a/api/@internal/component/ets/ability_component.d.ts +++ b/api/@internal/component/ets/ability_component.d.ts @@ -20,6 +20,7 @@ import {Want} from "../api/common/ability/want"; * controller of ability. * @devices phone, tablet, car. * @since 7 + * @systemapi */ export declare class AbilityController { /** @@ -55,6 +56,7 @@ export declare class AbilityController { /** * @devices phone, tablet, car. * @since 7 + * @systemapi */ export declare class AbilityComponentExtend extends AbilityComponentAttribute { } @@ -65,6 +67,7 @@ export declare class AbilityComponentExtend extends AbilityComponentAttribute * controller: Ability Controller. * @devices phone, tablet, car. * @since 7 + * @systemapi */ interface AbilityComponent extends AbilityComponentAttribute { (value: { want: Want, controller?: AbilityController }): AbilityComponent; @@ -74,6 +77,7 @@ interface AbilityComponent extends AbilityComponentAttribute { * The attribute of ability. * @devices phone, tablet, car. * @since 7 + * @systemapi */ declare class AbilityComponentAttribute extends CommonMethod { /** @@ -115,5 +119,6 @@ declare class AbilityComponentAttribute extends CommonMethod { /** * @devices phone, tablet, car. * @since 7 + * @systemapi */ export declare const AbilityComponentInterface: AbilityComponent; diff --git a/api/@internal/component/ets/action_sheet.d.ts b/api/@internal/component/ets/action_sheet.d.ts index cffda34912..765ca0ba16 100644 --- a/api/@internal/component/ets/action_sheet.d.ts +++ b/api/@internal/component/ets/action_sheet.d.ts @@ -82,6 +82,7 @@ declare class ActionSheetAttribute extends CommonMethod { autoCancel?: boolean; alignment?: DialogAlignment; offset?: { dx: number | string | Resource, dy: number | string | Resource }; + gridCount?: number; }); } diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts index f87e0485b4..93a5a2e418 100644 --- a/api/@internal/component/ets/alert_dialog.d.ts +++ b/api/@internal/component/ets/alert_dialog.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import {CommonMethod, Resource} from "./common" +import {CommonMethod, Resource, Color} from "./common" /** * The alignment of dialog, @@ -96,6 +96,20 @@ interface AlertDialog { */ value: string | Resource; + /** + * Text color of the confirmation button. + * @devices phone, tablet, car. + * @since 7 + */ + fontColor?: Color | number | string | Resource; + + /** + * Background color of the confirmation button. + * @devices phone, tablet, car. + * @since 7 + */ + backgroundColor?: Color | number | string | Resource; + /** * Method executed by the callback. * @devices phone, tablet, car. @@ -124,6 +138,13 @@ interface AlertDialog { * @since 7 */ offset?: { dx: number | string | Resource, dy: number | string | Resource }; + + /** + * Grid count of dialog. + * @devices phone, tablet, car. + * @since 7 + */ + gridCount?: number; } | { /** @@ -160,6 +181,20 @@ interface AlertDialog { */ value: string | Resource; + /** + * Text color of the confirmation button. + * @devices phone, tablet, car. + * @since 7 + */ + fontColor?: Color | number | string | Resource; + + /** + * Background color of the confirmation button. + * @devices phone, tablet, car. + * @since 7 + */ + backgroundColor?: Color | number | string | Resource; + /** * Method executed by the callback. * @devices phone, tablet, car. @@ -181,6 +216,20 @@ interface AlertDialog { */ value: string | Resource; + /** + * Text color of the confirmation button. + * @devices phone, tablet, car. + * @since 7 + */ + fontColor?: Color | number | string | Resource; + + /** + * Background color of the confirmation button. + * @devices phone, tablet, car. + * @since 7 + */ + backgroundColor?: Color | number | string | Resource; + /** * Method executed by the callback. * @devices phone, tablet, car. @@ -209,6 +258,13 @@ interface AlertDialog { * @since 7 */ offset?: { dx: number | string | Resource, dy: number | string | Resource }; + + /** + * Grid count of dialog. + * @devices phone, tablet, car. + * @since 7 + */ + gridCount?: number; }); } diff --git a/api/@internal/component/ets/custom_dialog_controller.d.ts b/api/@internal/component/ets/custom_dialog_controller.d.ts index e31974b2b8..5c1375b8b7 100644 --- a/api/@internal/component/ets/custom_dialog_controller.d.ts +++ b/api/@internal/component/ets/custom_dialog_controller.d.ts @@ -33,6 +33,7 @@ export declare class CustomDialogController { alignment?: DialogAlignment, offset?: { dx: number | string | Resource, dy: number | string | Resource }, customStyle?: boolean + gridCount?: number; }); /** diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts index 14652a9abb..a5efa0dfa7 100644 --- a/api/@internal/component/ets/form_component.d.ts +++ b/api/@internal/component/ets/form_component.d.ts @@ -18,6 +18,7 @@ import {CommonMethod, Visibility} from "./common"; /** * @devices phone, tablet, car. * @since 7 + * @systemapi */ export declare enum FormDimension { /** @@ -53,6 +54,7 @@ export declare enum FormDimension { * The card component is provided to display cards. * @devices phone, tablet, car. * @since 7 + * @systemapi */ export declare class FormComponentExtend extends FormComponentAttribute { } @@ -60,6 +62,7 @@ export declare class FormComponentExtend extends FormComponentAttribute { /** * @devices phone, tablet, car. * @since 7 + * @systemapi */ interface FormComponent extends FormComponentAttribute { /** @@ -73,6 +76,7 @@ interface FormComponent extends FormComponentAttribute { /** * @devices phone, tablet, car. * @since 7 + * @systemapi */ declare class FormComponentAttribute extends CommonMethod { /** @@ -135,5 +139,6 @@ declare class FormComponentAttribute extends CommonMethod { /** * @devices phone, tablet, car. * @since 7 + * @systemapi */ export declare const FormComponentInterface: FormComponent; diff --git a/api/@internal/component/ets/geometryView.d.ts b/api/@internal/component/ets/geometryView.d.ts deleted file mode 100644 index a5252584e6..0000000000 --- a/api/@internal/component/ets/geometryView.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - -import {CommonMethod} from "./common"; - -/** - * Creating a Geometry View - * @devices phone, tablet, car. - * @since 7 - */ -export declare class GeometryViewExtend extends GeometryViewAttribute { -} - -/** - * @devices phone, tablet, car. - * @since 7 - */ -interface GeometryView extends GeometryViewAttribute { - /** - * Callback function. - * @devices phone, tablet, car. - * @since 7 - */ - (callback: (geometry?: any) => void): GeometryView; -} - -/** - * Inherit Public - * @devices phone, tablet, car. - * @since 7 - */ -declare class GeometryViewAttribute extends CommonMethod { -} - -/** - * @devices phone, tablet, car - * @since 7 - */ -export declare const GeometryViewInterface: GeometryView; diff --git a/api/@internal/component/ets/index.d.ts b/api/@internal/component/ets/index.d.ts index 344a5e393d..c0d1864dbb 100644 --- a/api/@internal/component/ets/index.d.ts +++ b/api/@internal/component/ets/index.d.ts @@ -36,7 +36,6 @@ export * from './flex'; export * from './forEach'; export * from './form_component'; export * from './gauge'; -export * from './geometryView'; export * from './gesture'; export * from './grid'; export * from './gridItem'; -- Gitee