diff --git a/api/@internal/component/ets/xcomponent.d.ts b/api/@internal/component/ets/xcomponent.d.ts index 2d1a4f6588cf450e60e2d3e6f5e7d97c20ec4c95..714116d3f40cafafd3793cf02f96addbf08c1559 100644 --- a/api/@internal/component/ets/xcomponent.d.ts +++ b/api/@internal/component/ets/xcomponent.d.ts @@ -16,26 +16,37 @@ import { CommonMethod } from "./common"; /** + * Defines XComponentController * @since 8 + * @systemapi */ export declare class XComponentController { /** * constructor. * @since 8 + * @systemapi */ constructor(); /** * get the id of surface created by XComponent. * @since 8 + * @systemapi */ getXComponentSurfaceId(); } /** + * Defines XComponent. * @since 8 + * @systemapi */ interface XComponent extends XComponentAttribute { + /** + * Constructor parameters + * @since 8 + * @systemapi + */ (value: { id: string; type: string; @@ -45,18 +56,22 @@ interface XComponent extends XComponentAttribute { } /** + * Defines XComponentAttribute. * @since 8 + * @systemapi */ declare class XComponentAttribute extends CommonMethod { /** * Called when judging whether the xcomponent surface is created. * @since 8 + * @systemapi */ onLoad(callback: (event?: {}) => void): T; /** * Called when judging whether the xcomponent is destroyed. * @since 8 + * @systemapi */ onDestroy(event: () => void): T; } diff --git a/api/config/hml/basic/xcomponent.json b/api/config/hml/basic/xcomponent.json index f516db90b68147cc24e0ec9e0162ed5b59c57520..9a60c8bbbaa91a2101a8e5bc4696314839684a86 100644 --- a/api/config/hml/basic/xcomponent.json +++ b/api/config/hml/basic/xcomponent.json @@ -2,7 +2,7 @@ "name": "xcomponent", "version": [ { - "name": "v6.0" + "name": "v8.0" } ], "supportedDevices": ["phone", "tablet", "tv", "wearable"], @@ -13,22 +13,10 @@ } ], "attributes": [ - { - "name": "name", - "supportedDevices": ["phone", "tablet", "tv", "wearable"], - "required": false, - "description": [ - { - "name": "Name of the xcomponent component.", - "supportedDevices": ["phone", "tablet", "tv", "wearable"] - } - ], - "type": "string" - }, { "name": "id", "supportedDevices": ["phone", "tablet", "tv", "wearable"], - "required": false, + "required": true, "description": [ { "name": "Unique ID of a component.", @@ -62,10 +50,7 @@ "type": "enum", "options": [ { - "name": "texture" - }, - { - "name": "camera" + "name": "surface" } ] },