From 3a1b816fb3ba0dfb1c6496465215036282280768 Mon Sep 17 00:00:00 2001 From: yuxiaofei9 Date: Tue, 12 Aug 2025 13:53:06 +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 --- ...kui.advanced.ProgressButtonV2.static.d.ets | 199 ++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 api/@ohos.arkui.advanced.ProgressButtonV2.static.d.ets 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..390bd9d96b --- /dev/null +++ b/api/@ohos.arkui.advanced.ProgressButtonV2.static.d.ets @@ -0,0 +1,199 @@ +'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 + * @noninterop + */ +@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 + * @noninterop + */ +@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 + * @noninterop + */ +export type ClickCallback = () => void; +/** + * Declare Color options interface of the ProgressButtonV2. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +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