HarmonyOS 组件截图componentSnapshot.createFromBuilder报错TypeError: is not callable
业务代码:
@Builder
function GroupIcon(imageArray: ResourceStr[]) {
GroupMemberAvatarsView({ imageArray: imageArray })
}
let groupIconBuilder: WrappedBuilder<[ResourceStr[]]> = wrapBuilder(GroupIcon)
export class ChatIconMgr {
public async createGroupIcon(imageArray: ResourceStr[]):Promise<image.PixelMap> {
return componentSnapshot.createFromBuilder(() => {
groupIconBuilder.builder(imageArray)
})
}
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
page页面调用
HarmonyOS
赞
收藏 0
回答 1
相关问题
HarmonyOS componentSnapshot.createFromBuilder长列表截图不全
849浏览 • 1回复 待解决
HarmonyOS 截屏componentSnapshot.createFromBuilder方法总是返回同一个图片
1167浏览 • 1回复 待解决
HarmonyOS 组件旋转后,使用componentSnapshot截图,截到的图片不是显示给用户显示的样子
573浏览 • 1回复 待解决
HarmonyOS 组件截图并发过多时,报错,截图失败。 错误码:100001
989浏览 • 1回复 待解决
HarmonyOS componentSnapshot页面截图保存图片到相册不完整
905浏览 • 1回复 待解决
使用BuilderParam在父组件调用this的方法报错:Error message:is not callable
2628浏览 • 1回复 待解决
HarmonyOS componentSnapshot目前可以支持长截图吗,或者有其他实现长截图的方法吗
936浏览 • 1回复 待解决
HarmonyOS lazyforeach报错,见截图
746浏览 • 1回复 待解决
请教:JS使用RdbPredicates报错TypeError: not a function
5301浏览 • 1回复 待解决
使用componentSnapshot.get能力报错
1326浏览 • 1回复 待解决
HarmonyOS 使用防截图API报错
596浏览 • 1回复 待解决
HarmonyOS 调试报错TypeError:Cannot read property xxx of undefined
2403浏览 • 1回复 待解决
HarmonyOS Web组件截图
583浏览 • 1回复 待解决
HarmonyOS 调用屏幕截图接口报错801
1103浏览 • 1回复 待解决
项目编译报错TypeError: Cannot read properties of undefined (reading 'newFileToResourceList')
2430浏览 • 1回复 待解决
HarmonyOS 页面跳转传递的参数,在回调中访问报错:Error message:is not callable
723浏览 • 1回复 待解决
HarmonyOS jscrash,代码报Error message:is not callable
1599浏览 • 1回复 待解决
HarmonyOS componentSnapshot.get 保存的图片无法显示
702浏览 • 1回复 待解决
升级IDE后编译报错:hvigor ERROR: Error: TypeError, Cannot read properties of undefined (reading 'getParameter
1792浏览 • 1回复 待解决
HarmonyOS 如何对web组件内容进行长截图?
876浏览 • 1回复 待解决
如何对某个组件实现局部截图?
893浏览 • 1回复 待解决
HarmonyOS 组件截图并保存到系统相册有延迟
748浏览 • 1回复 待解决
HarmonyOS组件截图保存到相册失败,预览图灰色
1310浏览 • 1回复 待解决
经过代码分析,componentSnapshot.createFromBuilder的参数使用了wrapBuilder封装的全局builder,当前该组件不支持全局builder。
https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-arkui-componentsnapshot-V5#componentsnapshotcreatefrombuilder-1