From 077558abc4375a6feed2959496368b5a8ac498cc Mon Sep 17 00:00:00 2001 From: yuxiaofei9 Date: Fri, 25 Jul 2025 16:12:47 +0800 Subject: [PATCH] =?UTF-8?q?[feate]=E9=AB=98=E7=BA=A7=E7=BB=84=E4=BB=B6Prog?= =?UTF-8?q?ressButtonV2arkts1.2=E8=AF=AD=E6=B3=95=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yuxiaofei9 --- ...ohos.arkui.advanced.ProgressButtonV2.d.ets | 79 +++++-- ...kui.advanced.ProgressButtonV2.static.d.ets | 195 ++++++++++++++++++ 2 files changed, 254 insertions(+), 20 deletions(-) create mode 100644 api/@ohos.arkui.advanced.ProgressButtonV2.static.d.ets diff --git a/api/@ohos.arkui.advanced.ProgressButtonV2.d.ets b/api/@ohos.arkui.advanced.ProgressButtonV2.d.ets index 81039add5e..7dfbec32b1 100644 --- a/api/@ohos.arkui.advanced.ProgressButtonV2.d.ets +++ b/api/@ohos.arkui.advanced.ProgressButtonV2.d.ets @@ -18,15 +18,26 @@ * @kit ArkUI */ +/*** if arkts 1.1 */ import { LengthMetrics } from './@ohos.arkui.node'; import { ColorMetrics } from './@ohos.arkui.node'; +/*** endif */ + +/*** if arkts 1.2 */ +import { ComponentV2 } from './arkui/component/customComponent'; +import { Require, Param, Once, Trace, ObservedV2 } from './arkui/stateManagement/decorator'; +import { ResourceStr } from './arkui/component/units'; +import { Builder } from './arkui/component/builder'; +import { LengthMetrics, ColorMetrics } from './arkui/Graphics'; +/*** endif */ /** * Declare Component ProgressButtonV2 * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @ComponentV2 export declare struct ProgressButtonV2 { @@ -36,7 +47,8 @@ export declare struct ProgressButtonV2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @Require @Param readonly progress: number; @@ -47,7 +59,8 @@ export declare struct ProgressButtonV2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @Require @Param readonly content: ResourceStr; @@ -58,7 +71,8 @@ export declare struct ProgressButtonV2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @Param @Once progressButtonWidth?: LengthMetrics; @@ -68,7 +82,8 @@ export declare struct ProgressButtonV2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @Param readonly onClicked: ClickCallback; @@ -78,7 +93,8 @@ export declare struct ProgressButtonV2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @Param readonly isEnabled: boolean; @@ -89,7 +105,8 @@ export declare struct ProgressButtonV2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @Param colorOptions?: ProgressButtonV2Color; @@ -100,9 +117,19 @@ export declare struct ProgressButtonV2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @Param progressButtonRadius?: LengthMetrics; + + /** + * The method to build component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + @Builder build(): void; } /** @@ -111,7 +138,8 @@ export declare struct ProgressButtonV2 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @ObservedV2 export declare class ProgressButtonV2Color { @@ -122,7 +150,8 @@ export declare class ProgressButtonV2Color { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @Trace progressColor?: ColorMetrics; @@ -133,7 +162,8 @@ export declare class ProgressButtonV2Color { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @Trace borderColor?: ColorMetrics; @@ -144,7 +174,8 @@ export declare class ProgressButtonV2Color { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @Trace textColor?: ColorMetrics; @@ -155,7 +186,8 @@ export declare class ProgressButtonV2Color { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ @Trace backgroundColor?: ColorMetrics; @@ -166,7 +198,8 @@ export declare class ProgressButtonV2Color { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ constructor(options: ProgressButtonV2ColorOptions); } @@ -177,7 +210,8 @@ export declare class ProgressButtonV2Color { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ export type ClickCallback = () => void; @@ -188,7 +222,8 @@ export type ClickCallback = () => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ export declare interface ProgressButtonV2ColorOptions { /** @@ -198,7 +233,8 @@ export declare interface ProgressButtonV2ColorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ progressColor?: ColorMetrics; @@ -209,7 +245,8 @@ export declare interface ProgressButtonV2ColorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ borderColor?: ColorMetrics; @@ -220,7 +257,8 @@ export declare interface ProgressButtonV2ColorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ textColor?: ColorMetrics; @@ -231,7 +269,8 @@ export declare interface ProgressButtonV2ColorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @crossplatform - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ backgroundColor?: ColorMetrics; } \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.ProgressButtonV2.static.d.ets b/api/@ohos.arkui.advanced.ProgressButtonV2.static.d.ets new file mode 100644 index 0000000000..4a56705c86 --- /dev/null +++ b/api/@ohos.arkui.advanced.ProgressButtonV2.static.d.ets @@ -0,0 +1,195 @@ +'use static' +/* + * 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 + * @arkts 1.2 + */ +import { ComponentV2 } from './arkui/component/customComponent'; +import { Require, Param, Once, Trace, ObservedV2 } from './arkui/stateManagement/decorator'; +import { ResourceStr } from './arkui/component/units'; +import { Builder } from './arkui/component/builder'; +import { LengthMetrics, ColorMetrics } from './arkui/Graphics'; +/** + * Declare Component ProgressButtonV2 + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@ComponentV2 +export declare struct ProgressButtonV2 { + /** + * Sets the ProgressButtonV2 progress. + * + * @type { number }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require + @Param readonly progress: number; + /** + * Sets the ProgressButtonV2 content. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require + @Param readonly content: ResourceStr; + /** + * Sets the ProgressButtonV2 progressButtonWidth. + * + * @type { ?LengthMetrics }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param @Once progressButtonWidth?: LengthMetrics; + /** + * Sets the ProgressButtonV2 onClicked. + * + * @type { ClickCallback }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param readonly onClicked: ClickCallback; + /** + * Sets the ProgressButtonV2 isEnabled state. + * + * @type { boolean }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param readonly isEnabled: boolean; + /** + * Set Color options of the ProgressButtonV2. + * + * @type { ?ProgressButtonV2Color } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param colorOptions?: ProgressButtonV2Color; + /** + * Set border rounded corner radius of progress. + * + * @type { ?LengthMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param progressButtonRadius?: LengthMetrics; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} +/** + * Declare ProgressButtonV2 Color. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@ObservedV2 +export declare class ProgressButtonV2Color { + /** + * Set progress color of the ProgressButtonV2. + * + * @type { ?ColorMetrics }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace progressColor?: ColorMetrics; + /** + * Set border color of the ProgressButtonV2. + * + * @type { ?ColorMetrics }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace borderColor?: ColorMetrics; + /** + * Set text color of the ProgressButtonV2. + * + * @type { ?ColorMetrics }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace textColor?: ColorMetrics; + /** + * Set background color of the ProgressButtonV2. + * + * @type { ?ColorMetrics }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace backgroundColor?: ColorMetrics; + /** + * The constructor of ProgressButtonV2 + * + * @param options { ProgressButtonV2ColorOptions } the options of the ProgressButtonV2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: ProgressButtonV2ColorOptions); +} +/** + * Defines ClickCallback of the ProgressButtonV2. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type ClickCallback = () => void; +/** + * Declare Color options interface of the ProgressButtonV2. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface ProgressButtonV2ColorOptions { + /** + * Set progress color of the ProgressButtonV2. + * + * @type { ?ColorMetrics }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + progressColor?: ColorMetrics; + /** + * Set border color of the ProgressButtonV2. + * + * @type { ?ColorMetrics }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + borderColor?: ColorMetrics; + /** + * Set text color of the ProgressButtonV2. + * + * @type { ?ColorMetrics }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textColor?: ColorMetrics; + /** + * Set background color of the ProgressButtonV2. + * + * @type { ?ColorMetrics }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundColor?: ColorMetrics; +} \ No newline at end of file -- Gitee