选择多张图片

This commit is contained in:
XiuYun CHEN
2025-08-18 16:33:10 +08:00
parent 110512d9cb
commit ccd4cdf328
2 changed files with 9 additions and 7 deletions
@@ -874,7 +874,7 @@ export struct ChatP2PPage {
MediaUtils.showImageVideoPicker().then((results) => {
if(results!=null&&results.length>0)
{
results.forEach(result=>{
for (const result of results) {
if (result.errorMsg == null && result.uri) {
if (result.type === photoAccessHelper.PhotoType.IMAGE) {
this.chatViewModel.sendImageMessage(result.uri);
@@ -882,7 +882,8 @@ export struct ChatP2PPage {
this.chatViewModel.sendVideoMessage(result.uri, result.duration, result.width, result.height);
}
}
})
}
}
})
@@ -1027,7 +1028,7 @@ export struct ChatP2PPage {
MediaUtils.showImageVideoPicker().then((results) => {
if(results!=null&&results.length>0)
{
results.forEach(result=>{
for (const result of results) {
if (result.errorMsg == null && result.uri) {
if (result.type === photoAccessHelper.PhotoType.IMAGE) {
this.chatViewModel.sendImageMessage(result.uri);
@@ -1035,7 +1036,8 @@ export struct ChatP2PPage {
this.chatViewModel.sendVideoMessage(result.uri, result.duration, result.width, result.height);
}
}
})
}
}
// if (result.errorMsg == null && result.uri) {
// if (result.type === photoAccessHelper.PhotoType.IMAGE) {