From 0acfea7d3bda329ae5aae43eb724295f13604dc2 Mon Sep 17 00:00:00 2001 From: WendongPang Date: Wed, 13 Aug 2025 15:08:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=83=E5=B1=80=E7=BB=84=E4=BB=B6=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E5=BC=8F=E8=8A=82=E7=82=B9=E9=80=82=E9=85=8DSDK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: WendongPang --- api/arkui/FrameNode.static.d.ets | 581 +++++++++++++++++++++++++++++++ 1 file changed, 581 insertions(+) diff --git a/api/arkui/FrameNode.static.d.ets b/api/arkui/FrameNode.static.d.ets index 22843b16f5..1c1b1fecf2 100644 --- a/api/arkui/FrameNode.static.d.ets +++ b/api/arkui/FrameNode.static.d.ets @@ -35,6 +35,7 @@ import { WaterFlowAttribute, WaterFlowOptions } from './component/waterFlow'; import { FlowItemAttribute } from './component/flowItem'; import { GridAttribute, GridLayoutOptions } from './component/grid'; import { GridItemAttribute, GridItemOptions } from './component/gridItem'; +import { Resource } from '../global/resource'; import { TextAttribute, TextOptions } from './component/text'; import { TextInputAttribute, TextInputOptions } from './component/textInput'; import { TextAreaAttribute, TextAreaOptions } from './component/textArea'; @@ -734,6 +735,39 @@ export declare abstract class TypedFrameNode extends FrameNode { * @since 20 */ export declare namespace typeNode { + /** + * Create a FrameNode. Overload for createNode functions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + overload createNode { + createTextNode, + createSearchNode, + createTextInputNode, + createTextAreaNode, + createSymbolGlyphNode, + createMarqueeNode, + createSwiperNode, + createListNode, + createListItemNode, + createListItemGroupNode, + createScrollNode, + createGridNode, + createGridItemNode, + createWaterFlowNode, + createFlowItemNode, + createColumnNode, + createRowNode, + createStackNode, + createFlexNode, + createRelativeContainerNode, + createGridRowNode, + createGridColNode, + createDividerNode, + createBlankNode + } + /** * Define the Column type of FrameNode. * @@ -1121,6 +1155,553 @@ export declare namespace typeNode { * @since 20 */ export function createListNode(context: UIContext, nodeType: 'List'): List; + + /** + * Define the ListItem type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class ListItemFrameNode extends TypedFrameNode { + /** + * Initialize ListItem FrameNode. + * + * @param { ListItemOptions } [options] - list item options. + * @returns { ListItemAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(options?: ListItemOptions): ListItemAttribute; + } + + /** + * Define the FrameNode type for ListItem. + * + * @typedef { ListItemFrameNode } ListItem + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type ListItem = ListItemFrameNode; + + /** + * Create a FrameNode of ListItem type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'ListItem' } nodeType - node type. + * @returns { ListItem } - Return ListItem type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createListItemNode(context: UIContext, nodeType: 'ListItem'): ListItem; + + /** + * Define the ListItemGroup type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class ListItemGroupFrameNode extends TypedFrameNode { + /** + * Initialize ListItemGroup FrameNode. + * + * @param { ListItemGroupOptions } [options] - list item group options. + * @returns { ListItemGroupAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(options?: ListItemGroupOptions): ListItemGroupAttribute; + } + + /** + * Define the FrameNode type for ListItemGroup. + * + * @typedef { ListItemGroupFrameNode } ListItemGroup + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type ListItemGroup = ListItemGroupFrameNode; + + /** + * Create a FrameNode of ListItemGroup type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'ListItemGroup' } nodeType - node type. + * @returns { ListItemGroup } - Return ListItemGroup type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createListItemGroupNode(context: UIContext, nodeType: 'ListItemGroup'): ListItemGroup; + + /** + * Define the Scroll type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class ScrollFrameNode extends TypedFrameNode { + /** + * Initialize Scroll FrameNode. + * + * @param { Scroller } [scroller] - The controller for scroll. + * @returns { ScrollAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(scroller?: Scroller): ScrollAttribute; + } + + /** + * Define the FrameNode type for Scroll. + * + * @typedef { ScrollFrameNode } Scroll + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type Scroll = ScrollFrameNode; + + /** + * Create a FrameNode of Scroll type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'Scroll' } nodeType - node type. + * @returns { Scroll } - Return Scroll type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createScrollNode(context: UIContext, nodeType: 'Scroll'): Scroll; + + /** + * Define the Grid type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class GridFrameNode extends TypedFrameNode { + /** + * Initialize Grid FrameNode. + * + * @param { Scroller } [scroller] - The controller for grid. + * @param { GridLayoutOptions } [layoutOptions] - Grid layout options. + * @returns { GridAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(scroller?: Scroller, layoutOptions?: GridLayoutOptions): GridAttribute; + } + + /** + * Define the FrameNode type for Grid. + * + * @typedef { GridFrameNode } Grid + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type Grid = GridFrameNode; + + /** + * Create a FrameNode of Grid type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'Grid' } nodeType - node type. + * @returns { Grid } - Return Grid type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createGridNode(context: UIContext, nodeType: 'Grid'): Grid; + + /** + * Define the GridItem type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class GridItemFrameNode extends TypedFrameNode { + /** + * Initialize GridItem FrameNode. + * + * @param { GridItemOptions } [options] - Grid item options. + * @returns { GridItemAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(options?: GridItemOptions): GridItemAttribute; + } + + /** + * Define the FrameNode type for GridItem. + * + * @typedef { GridItemFrameNode } GridItem + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type GridItem = GridItemFrameNode; + + /** + * Create a FrameNode of GridItem type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'GridItem' } nodeType - node type. + * @returns { GridItem } - Return GridItem type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createGridItemNode(context: UIContext, nodeType: 'GridItem'): GridItem; + + /** + * Define the WaterFlow type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class WaterFlowFrameNode extends TypedFrameNode { + /** + * Initialize WaterFlow FrameNode. + * + * @param { WaterFlowOptions } [options] - WaterFlow options. + * @returns { WaterFlowAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(options?: WaterFlowOptions): WaterFlowAttribute; + } + + /** + * Define the FrameNode type for WaterFlow. + * + * @typedef { WaterFlowFrameNode } WaterFlow + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type WaterFlow = WaterFlowFrameNode; + + /** + * Create a FrameNode of WaterFlow type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'WaterFlow' } nodeType - node type. + * @returns { WaterFlow } - Return WaterFlow type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createWaterFlowNode(context: UIContext, nodeType: 'WaterFlow'): WaterFlow; + + /** + * Define the FlowItem type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class FlowItemFrameNode extends TypedFrameNode { + /** + * Initialize FlowItem FrameNode. + * + * @returns { FlowItemAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(): FlowItemAttribute; + } + + /** + * Define the FrameNode type for FlowItem. + * + * @typedef { FlowItemFrameNode } FlowItem + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type FlowItem = FlowItemFrameNode; + + /** + * Create a FrameNode of FlowItem type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'FlowItem' } nodeType - node type. + * @returns { FlowItem } - Return FlowItem type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createFlowItemNode(context: UIContext, nodeType: 'FlowItem'): FlowItem; + + /** + * Define the Text type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class TextFrameNode extends TypedFrameNode { + /** + * Initialize Text FrameNode. + * + * @param { string | Resource } [content] - text content + * @param { TextOptions } [value] - text options + * @returns { TextAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(content?: string | Resource, value?: TextOptions): TextAttribute; + } + + /** + * Define the FrameNode type for Text. + * + * @typedef { TextFrameNode } Text + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type Text = TextFrameNode; + + /** + * Create a FrameNode of Text type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'Text' } nodeType - node type. + * @returns { Text } - Return Text type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createTextNode(context: UIContext, nodeType: 'Text'): Text; + + /** + * Define the Search type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class SearchFrameNode extends TypedFrameNode { + /** + * Initialize Search FrameNode. + * + * @param { SearchOptions } [value] - search options + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(value?: SearchOptions): SearchAttribute; + } + + /** + * Define the FrameNode type for Search. + * + * @typedef { SearchFrameNode } Search + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type Search = SearchFrameNode; + + /** + * Create a FrameNode of Search type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'Search' } nodeType - node type. + * @returns { Search } - Return Search type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createSearchNode(context: UIContext, nodeType: 'Search'): Search; + + /** + * Define the TextInput type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class TextInputFrameNode extends TypedFrameNode { + /** + * Initialize TextInput FrameNode. + * + * @param { TextInputOptions } [value] - textInput options + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(value?: TextInputOptions): TextInputAttribute; + } + + /** + * Define the FrameNode type for TextInput. + * + * @typedef { TextInputFrameNode } TextInput + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type TextInput = TextInputFrameNode; + + /** + * Create a FrameNode of TextInput type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'TextInput' } nodeType - node type. + * @returns { TextInput } - Return TextInput type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createTextInputNode(context: UIContext, nodeType: 'TextInput'): TextInput; + + /** + * Define the TextArea type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class TextAreaFrameNode extends TypedFrameNode { + /** + * Initialize TextArea FrameNode. + * + * @param { TextAreaOptions } [value] - textArea options + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(value?: TextAreaOptions): TextAreaAttribute; + } + + /** + * Define the FrameNode type for TextArea. + * + * @typedef { TextAreaFrameNode } TextArea + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type TextArea = TextAreaFrameNode; + + /** + * Create a FrameNode of TextArea type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'TextArea' } nodeType - node type. + * @returns { TextArea } - Return TextArea type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createTextAreaNode(context: UIContext, nodeType: 'TextArea'): TextArea; + + /** + * Define the SymbolGlyph type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class SymbolGlyphFrameNode extends TypedFrameNode { + /** + * Initialize SybolGlyph FrameNode. + * + * @param { Resource } [value] - symbolGlyph resource + * @returns { SymbolGlyphAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(value?: Resource): SymbolGlyphAttribute; + } + + /** + * Define the FrameNode type for SymbolGlyph. + * + * @typedef { SymbolGlyphFrameNode } SymbolGlyph + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type SymbolGlyph = SymbolGlyphFrameNode; + + /** + * Create a FrameNode of SymbolGlyph type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'SymbolGlyph' } nodeType - node type. + * @returns { SymbolGlyph } - Return SymbolGlyph type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createSymbolGlyphNode(context: UIContext, nodeType: 'SymbolGlyph'): SymbolGlyph; + + /** + * Define the Marquee type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class MarqueeFrameNode extends TypedFrameNode { + /** + * Initialize Marquee FrameNode. + * + * @param { MarqueeOptions } value + * @returns { MarqueeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(value: MarqueeOptions): MarqueeAttribute; + } + + /** + * Define the FrameNode type for Marquee. + * + * @typedef { MarqueeFrameNode } Marquee + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type Marquee = MarqueeFrameNode; + + /** + * Create a FrameNode of Marquee type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'Marquee' } nodeType - node type. + * @returns { Marquee } - Return Marquee type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createMarqueeNode(context: UIContext, nodeType: 'Marquee'): Marquee; + + /** + * Define the Swiper type of FrameNode. + * + * @extends TypedFrameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract class SwiperFrameNode extends TypedFrameNode { + /** + * Initialize FrameNode. + * + * @param { SwiperController } [controller] - a controller for Swiper container components. + * @returns { SwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + abstract initialize(controller?: SwiperController): SwiperAttribute; + } + + /** + * Define the FrameNode type for Swiper. + * + * @typedef { SwiperFrameNode } Swiper + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type Swiper = SwiperFrameNode; + + /** + * Create a FrameNode of Swiper type. + * + * @param { UIContext } context - uiContext used to create the FrameNode. + * @param { 'Swiper' } nodeType - node type. + * @returns { Swiper } - Return Swiper type FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function createSwiperNode(context: UIContext, nodeType: 'Swiper'): Swiper; } /** -- Gitee