From 3fc340e5c34ef220bda689e70d8a685260ac5a94 Mon Sep 17 00:00:00 2001 From: guanzengkun Date: Thu, 10 Jul 2025 15:21:48 +0800 Subject: [PATCH] =?UTF-8?q?=20FrameNode=20update=20badge=20progress=20issu?= =?UTF-8?q?eNo:=20https://gitee.com/openharmony/interface=5Fsdk-js/issues/?= =?UTF-8?q?ICL8C4=3Ffrom=3Dproject-issue=20Description:=20=20FrameNode=20u?= =?UTF-8?q?pdate=20badge=20progress=20Sig:=20SIG=5FApplicationFramework=20?= =?UTF-8?q?Feature=20or=20Bugfix:Feature=20Binary=20Source:No=20TDD:Pass?= =?UTF-8?q?=20XTS:Pass=20=E9=A2=84=E6=B5=8B=E8=AF=95:Pass=20Signed-off-by:?= =?UTF-8?q?guanzengkun=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/arkui/FrameNode.d.ets | 407 ++++++++++++++++++++++++++++++++++++++ api/arkui/FrameNode.d.ts | 42 +--- 2 files changed, 409 insertions(+), 40 deletions(-) create mode 100644 api/arkui/FrameNode.d.ets diff --git a/api/arkui/FrameNode.d.ets b/api/arkui/FrameNode.d.ets new file mode 100644 index 0000000000..954a42b339 --- /dev/null +++ b/api/arkui/FrameNode.d.ets @@ -0,0 +1,407 @@ +/* + * Copyright (c) 2023 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 + */ + +/*** if arkts 1.2 */ +import { UIContext } from '@ohos.arkui.UIContext'; +import { UICommonEvent, UIGestureEvent, CommonAttribute } from './component/common' +import { ListOptions, ListAttribute } from './component/list' +import { QRCodeAttribute } from './component/qrcode'; +import { TextClockAttribute, TextClockOptions } from './component/textClock'; +import { SearchOptions, SearchAttribute } from './component/search'; +import { BadgeParamWithNumber, BadgeParamWithString, BadgeAttribute } from './component/badge'; +import { ProgressOptions, ProgressAttribute } from './component/progress'; +import { LoadingProgressAttribute } from './component/loadingProgress'; +import { TextTimerOptions, TextTimerAttribute } from './component/textTimer'; +/*** endif */ + +/** + * Provides methods to implement FrameNode. + * + * @namespace typeNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts{ '1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 + */ +export declare namespace typeNode { + /** + * overload for createNode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + overload createNode { createProgressNode, createLoadingProgressNode, createQRCodeNode, createBadgeNode, createTextClockNode, createTextTimerNode, createListNode }; + /** + * Define the Progress type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class ProgressFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { ProgressOptions } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(value: ProgressOptions): ProgressAttribute; + } + /** + * Define the FrameNode type for Progress. + * + * @typedef { ProgressFrameNode } Progress + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type Progress = ProgressFrameNode; + + /** + * Create a FrameNode of Progress type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'Progress' } nodeType - node type. + * @returns { Progress } - Return Progress type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export function createProgressNode(context: UIContext, nodeType: 'Progress'): Progress; + + /** + * Define the LoadingProgress type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class LoadingProgressFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(): LoadingProgressAttribute; + } + + /** + * Define the FrameNode type for LoadingProgress. + * + * @typedef { LoadingProgressFrameNode } LoadingProgress + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type LoadingProgress = LoadingProgressFrameNode; + + /** + * Create a FrameNode of LoadingProgress type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'LoadingProgress' } nodeType - node type. + * @returns { LoadingProgress } - Return LoadingProgress type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export function createLoadingProgressNode(context: UIContext, nodeType: 'LoadingProgress'): LoadingProgress; + + /** + * Define the QRCode type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class QRCodeFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { string } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(value: string): QRCodeAttribute; + } + /** + * Define the FrameNode type for QRCode. + * + * @typedef { QRCodeFrameNode } QRCode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type QRCode = QRCodeFrameNode; + + /** + * Create a FrameNode of QRCode type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'QRCode' } nodeType - node type. + * @returns { QRCode } - Return QRCode type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export function createQRCodeNode(context: UIContext, nodeType: 'QRCode'): QRCode; +/** + * Define the Badge type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class BadgeFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { BadgeParamWithNumber | BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(value: BadgeParamWithNumber | BadgeParamWithString): BadgeAttribute; + } + + /** + * Define the FrameNode type for Badge. + * + * @typedef { BadgeFrameNode } Badge + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type Badge = BadgeFrameNode; + + /** + * Create a FrameNode of Badge type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'Badge' } nodeType - node type. + * @returns { Badge } - Return Badge type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export function createBadgeNode(context: UIContext, nodeType: 'Badge'): Badge; +/** + * Define the TextClock type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class TextClockFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { TextClockOptions } [options] - TextClock options + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options?: TextClockOptions): TextClockAttribute; + } + + /** + * Define the FrameNode type for TextClock. + * + * @typedef { TextClockFrameNode } TextClock + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type TextClock = TextClockFrameNode; + + /** + * Create a FrameNode of TextClock type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'TextClock' } nodeType - node type. + * @returns { TextClock } - Return List type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export function createTextClockNode(context: UIContext, nodeType: 'TextClock'): TextClock; +/** + * Define the TextTimer type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class TextTimerFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { TextTimerOptions } [options] - TextTimer options + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options?: TextTimerOptions): TextTimerAttribute; + } + + /** + * Define the FrameNode type for TextTimer. + * + * @typedef { TextTimerFrameNode } TextTimer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type TextTimer = TextTimerFrameNode; + + /** + * Create a FrameNode of TextTimer type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'TextTimer' } nodeType - node type. + * @returns { TextTimer } - Return TextTimer type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export function createTextTimerNode(context: UIContext, nodeType: 'TextTimer'): TextTimer; + /** + * Define the List type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract class ListFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { ListOptions } [options] - list options + * @returns { ListAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + abstract initialize(options?: ListOptions): ListAttribute; + } + + /** + * Define the FrameNode type for List. + * + * @typedef { ListFrameNode } List + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type List = ListFrameNode; + + /** + * Create a FrameNode of List type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'List' } nodeType - node type. + * @returns { List } - Return List type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Create a FrameNode of List type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'List' } nodeType - node type. + * @returns { List } - Return List type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts{ '1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 + */ + export function createListNode(context: UIContext, nodeType: 'List'): List; +} \ No newline at end of file diff --git a/api/arkui/FrameNode.d.ts b/api/arkui/FrameNode.d.ts index 2fc0e0f338..984aad26be 100644 --- a/api/arkui/FrameNode.d.ts +++ b/api/arkui/FrameNode.d.ts @@ -1405,43 +1405,6 @@ export declare namespace typeNode { */ type List = TypedFrameNode; - /** - * Define the List type of FrameNode. - * - * @extends TypedFrameNode - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - abstract class ListFrameNode extends TypedFrameNode { - /** - * Initialize FrameNode. - * - * @param { ListOptions } [options] - list options - * @returns { ListAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - abstract initialize(options?: ListOptions): ListAttribute; - } - - /** - * Define the FrameNode type for List. - * - * @typedef { ListFrameNode } List - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - type List = ListFrameNode; - /** * Create a FrameNode of List type. * @@ -1460,10 +1423,9 @@ export declare namespace typeNode { * @returns { List } - Return List type FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts{ '1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ - export function createNode(context: UIContext, nodeType: 'List'): List; + function createNode(context: UIContext, nodeType: 'List'): List; /** * Define the FrameNode type for ListItem. -- Gitee