Showing
2 changed files
with
9 additions
and
8 deletions
| @@ -155,8 +155,8 @@ export struct MultiPictureDetailItemComponent { | @@ -155,8 +155,8 @@ export struct MultiPictureDetailItemComponent { | ||
| 155 | build() { | 155 | build() { |
| 156 | Swiper(this.swiperControllerItem){ | 156 | Swiper(this.swiperControllerItem){ |
| 157 | Row(){ // 居中显示 | 157 | Row(){ // 居中显示 |
| 158 | - List(){ | ||
| 159 | - ListItem(){ | 158 | + // List(){ |
| 159 | + // ListItem(){ | ||
| 160 | if(this.imageUri != null && (this.imageUri.includes('.gif') || this.imageUri.includes('.GIF'))){ | 160 | if(this.imageUri != null && (this.imageUri.includes('.gif') || this.imageUri.includes('.GIF'))){ |
| 161 | Image(this.imageUri)// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 | 161 | Image(this.imageUri)// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 |
| 162 | .alt($r('app.media.datail_imageLoading_w')) | 162 | .alt($r('app.media.datail_imageLoading_w')) |
| @@ -179,7 +179,7 @@ export struct MultiPictureDetailItemComponent { | @@ -179,7 +179,7 @@ export struct MultiPictureDetailItemComponent { | ||
| 179 | Image(this.imagePixelMap || 'app.media.datail_imageLoading_w')// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 | 179 | Image(this.imagePixelMap || 'app.media.datail_imageLoading_w')// TODO:知识点:宽高只根据其尺寸设置一个,通过保持宽高比来设置另一个属性 |
| 180 | .alt($r('app.media.datail_imageLoading_w')) | 180 | .alt($r('app.media.datail_imageLoading_w')) |
| 181 | .width(this.imageWidth) | 181 | .width(this.imageWidth) |
| 182 | - .objectFit(ImageFit.Auto)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能 | 182 | + .objectFit(ImageFit.Cover)// TODO:知识点:保持宽高比进行缩放,可以超出父组件,以便实现多图切换的增强功能 |
| 183 | .interpolation(ImageInterpolation.High) | 183 | .interpolation(ImageInterpolation.High) |
| 184 | .autoResize(false) | 184 | .autoResize(false) |
| 185 | .transform(this.matrix)// TODO:知识点:通过matrix控制图片的缩放 | 185 | .transform(this.matrix)// TODO:知识点:通过matrix控制图片的缩放 |
| @@ -189,14 +189,15 @@ export struct MultiPictureDetailItemComponent { | @@ -189,14 +189,15 @@ export struct MultiPictureDetailItemComponent { | ||
| 189 | x: this.imageOffsetInfo.currentX, | 189 | x: this.imageOffsetInfo.currentX, |
| 190 | y: this.imageOffsetInfo.currentY | 190 | y: this.imageOffsetInfo.currentY |
| 191 | }) | 191 | }) |
| 192 | + | ||
| 192 | .onComplete(event => { | 193 | .onComplete(event => { |
| 193 | this.imageWidth = '100%' | 194 | this.imageWidth = '100%' |
| 194 | }) | 195 | }) |
| 195 | } | 196 | } |
| 196 | - } | ||
| 197 | - } | ||
| 198 | - .alignListItem(ListItemAlign.Center) | ||
| 199 | - .scrollBarWidth(0) | 197 | + // } |
| 198 | + // } | ||
| 199 | + // .alignListItem(ListItemAlign.Center) | ||
| 200 | + // .scrollBarWidth(0) | ||
| 200 | } | 201 | } |
| 201 | .justifyContent(FlexAlign.Center) | 202 | .justifyContent(FlexAlign.Center) |
| 202 | } | 203 | } |
| @@ -172,7 +172,7 @@ export struct SaveNetWorkPictures { | @@ -172,7 +172,7 @@ export struct SaveNetWorkPictures { | ||
| 172 | if (this.imageBuffer !== undefined) { | 172 | if (this.imageBuffer !== undefined) { |
| 173 | await this.saveImage(this.imageBuffer); | 173 | await this.saveImage(this.imageBuffer); |
| 174 | promptAction.showToast({ | 174 | promptAction.showToast({ |
| 175 | - message: '成功', | 175 | + message: '保存成功', |
| 176 | duration: 2000 | 176 | duration: 2000 |
| 177 | }) | 177 | }) |
| 178 | } | 178 | } |
-
Please register or login to post a comment