Image组件传入沙箱的图片路径不显示。
let uri = fileUri.getUriFromPath(`${item.basePath}`);
console.info("The name of FileUri is " + uri + '/' + item.name);
得到:
\.product/data/storage/el2/base/haps/phone/files/图片1.png
这个路径,然后在Image内展示:
Image('file://com.xxx.h.product/data/storage/el2/base/haps/phone/files/图片1.png') .width(100)
先创建下路径,再下载图片,点击回显、示例参考如下: