未验证 提交 3c0deb26 编写于 作者: O openharmony_ci 提交者: Gitee

!9271 xcomponent文档整改-3.1release

Merge pull request !9271 from lanyi/cherry-pick-1662626694
......@@ -49,7 +49,7 @@ onDestroy(event: () => void )
## XComponentController
xcomponent 组件的控制器,可以将此对象绑定至XComponent组件,然后通过控制器调用组件方法。
xcomponent 组件的控制器,可以将此对象绑定至XComponent组件,然后通过控制器调用组件方法。
### 创建对象
......@@ -59,7 +59,7 @@ xcomponentController: XComponentController = new XComponentController()
### getXComponentSurfaceId
getXComponentSurfaceId(): string
getXComponentSurfaceId()
获取XComponent对应Surface的ID,供@ohos接口使用,比如camera相关接口。
......@@ -71,9 +71,10 @@ getXComponentSurfaceId(): string
| ------ | ----------------------- |
| string | XComponent持有Surface的ID。 |
### setXComponentSurfaceSize
setXComponentSurfaceSize(value: {surfaceWidth: number, surfaceHeight: number}): void
setXComponentSurfaceSize(value: {surfaceWidth: number, surfaceHeight: number})
设置XComponent持有Surface的宽度和高度。
......@@ -86,9 +87,10 @@ setXComponentSurfaceSize(value: {surfaceWidth: number, surfaceHeight: number}):
| surfaceWidth | number | 是 | XComponent持有Surface的宽度。 |
| surfaceHeight | number | 是 | XComponent持有Surface的高度。 |
### getXComponentContext
getXComponentContext(): Object
getXComponentContext()
获取XComponent实例对象的context。
......@@ -98,6 +100,7 @@ getXComponentContext(): Object
| ------ | ---------------------------------------- |
| Object | 获取XComponent实例对象的context,context包含的具体接口方法由开发者自定义。 |
## 示例
提供surface类型XComponent,支持相机预览等能力。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册