From 122768d2250a3a4e7fab681081e4b6a6eab47b58 Mon Sep 17 00:00:00 2001 From: WangYing225 Date: Thu, 19 Jun 2025 16:34:42 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=8C=91=E5=8D=95API20]=20XComponent=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E5=BC=8F=E8=8A=82=E7=82=B9=E6=94=AF=E6=8C=81=E8=B7=A8?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E5=B1=9E=E6=80=A7=E8=AE=BE=E7=BD=AE=E6=96=B0?= =?UTF-8?q?=E5=A2=9EAPI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: WangYing225 --- api/arkui/FrameNode.d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/api/arkui/FrameNode.d.ts b/api/arkui/FrameNode.d.ts index 93ab865dea..63f4f6a8e8 100644 --- a/api/arkui/FrameNode.d.ts +++ b/api/arkui/FrameNode.d.ts @@ -2023,6 +2023,22 @@ export namespace typeNode { */ function createNode(context: UIContext, nodeType: 'XComponent', parameters: NativeXComponentParameters): XComponent; + /** + * Get the attribute instance of FrameNode to set attributes. + * If the node is not created using ArkTS, cross-language access must be enabled; otherwise, undefined is returned. + * This API does not support declaratively created nodes. + * + * @param { FrameNode } node - the target FrameNode. + * @param { 'XComponent' } nodeType - node type. + * @returns { XComponentAttribute | undefined } - Return the attribute instance of FrameNode, and return undefined if it + * does not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + export function getAttribute(node: FrameNode, nodeType: 'XComponent'): XComponentAttribute | undefined; + /** * Define the FrameNode type for Checkbox. * -- Gitee