可以尝试使用组件截图功能实现:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-arkui-componentsnapshot-V5注意componentSnapshot.get获取图片结果为image.PixelMap为像素分布,需要使用 imagePackerApi.packing转换为jpg/png等格式。参考链接:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-image-V5\#imagecreateimagepacker
可以尝试使用组件截图功能实现:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-arkui-componentsnapshot-V5
注意componentSnapshot.get获取图片结果为image.PixelMap为像素分布,需要使用 imagePackerApi.packing转换为jpg/png等格式。参考链接:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-image-V5\#imagecreateimagepacker