Showing
1 changed file
with
2 additions
and
1 deletions
| @@ -278,6 +278,7 @@ export struct FeedBackActivity { | @@ -278,6 +278,7 @@ export struct FeedBackActivity { | ||
| 278 | // 其中包含Array<string>类型的photoUris,为返回图库选择后的媒体文件的uri数组;还包含boolean类型的isOriginalPhoto,指示返回图库选择后的媒体文件是否为原图。 | 278 | // 其中包含Array<string>类型的photoUris,为返回图库选择后的媒体文件的uri数组;还包含boolean类型的isOriginalPhoto,指示返回图库选择后的媒体文件是否为原图。 |
| 279 | // 声明变量array,其取值为PhotoSelectResult中的数组。 | 279 | // 声明变量array,其取值为PhotoSelectResult中的数组。 |
| 280 | array = PhotoSelectResult['photoUris']; | 280 | array = PhotoSelectResult['photoUris']; |
| 281 | + let beforeLen = this.pics.length; | ||
| 281 | let startIndex = this.pics.length-1; | 282 | let startIndex = this.pics.length-1; |
| 282 | let totalLen = this.pics.length+array.length; | 283 | let totalLen = this.pics.length+array.length; |
| 283 | if(totalLen > 3){ | 284 | if(totalLen > 3){ |
| @@ -293,7 +294,7 @@ export struct FeedBackActivity { | @@ -293,7 +294,7 @@ export struct FeedBackActivity { | ||
| 293 | mediaFlag = true; | 294 | mediaFlag = true; |
| 294 | Logger.info(TAG, `select image/video uri: ${value}`); | 295 | Logger.info(TAG, `select image/video uri: ${value}`); |
| 295 | }) | 296 | }) |
| 296 | - if(this.pics.length<3){ | 297 | + if(this.pics.length<=3 && beforeLen != 3){ |
| 297 | this.addPic.id = startIndex | 298 | this.addPic.id = startIndex |
| 298 | this.pics[this.pics.length-1]=this.addPic; | 299 | this.pics[this.pics.length-1]=this.addPic; |
| 299 | } | 300 | } |
-
Please register or login to post a comment