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

!18475 【componentSnapshot】文档修改

Merge pull request !18475 from 卡哥/master
...@@ -19,7 +19,7 @@ import componentSnapshot from "@ohos.arkui.componentSnapshot"; ...@@ -19,7 +19,7 @@ import componentSnapshot from "@ohos.arkui.componentSnapshot";
get(id: string, callback: AsyncCallback<image.PixelMap>): void get(id: string, callback: AsyncCallback<image.PixelMap>): void
获取已加载的组件的截图,传入组件的[ID 标识](../arkui-ts/ts-universal-attributes-component-id.md#组件标识),找到对应组件进行截图。通过回调返回结果。 获取已加载的组件的截图,传入组件的[组件标识](../arkui-ts/ts-universal-attributes-component-id.md#组件标识),找到对应组件进行截图。通过回调返回结果。
> **说明:** > **说明:**
> >
...@@ -50,8 +50,8 @@ struct SnapshotExample { ...@@ -50,8 +50,8 @@ struct SnapshotExample {
Image(this.pixmap) Image(this.pixmap)
.width(300).height(300) .width(300).height(300)
// ...Component // ...Component
// ...Components // ...Component
// ...Components // ...Component
Button("click to generate UI snapshot") Button("click to generate UI snapshot")
.onClick(() => { .onClick(() => {
componentSnapshot.get("root", (error: Error, pixmap: image.PixelMap) => { componentSnapshot.get("root", (error: Error, pixmap: image.PixelMap) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册