Files
youle_app_ohos/entry
lanterngamescnandClaude Sonnet 4.6 1902e4e5be fix(share): 截图改用 componentSnapshot 抓Web组件渲染像素(修WebGL黑屏) + 剪贴板图片改fd写入
- BridgeGameContainer: 大厅Web加 .id('web_lobby'),子游戏Web加 .id('web_subgame'),
  供 componentSnapshot.get 按组件id定位
- WebSlot: captureCanvas 整体替换为 componentSnapshot.get + image.ImagePacker.packToData,
  规避 WebGL canvas.toDataURL 黑屏;packToData 为 packing 的非废弃替代(§API13+);
  删除 parseJsString(仅被旧 captureCanvas 内联用,新实现不需要)
- ShareProvider: writeClipboardImage 改用 fileIo.openSync 取 fd 再
  createImageSource(fd),修复传路径字符串可能失败问题;补 import fileIo

API签名核对(devecocli docs):
  componentSnapshot.get(id, options) → Promise<PixelMap>(deprecated API18,仍可用)
  ImagePacker.packToData(pixelMap, PackingOption) → Promise<ArrayBuffer>(API13+,WARN无error)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 15:31:56 +08:00
..
2026-06-25 06:25:30 +08:00
2026-06-25 06:25:30 +08:00
2026-06-25 06:25:30 +08:00
2026-06-25 06:25:30 +08:00