Skip to content

Commit

Permalink
fix(uploader): 修复图片拉伸样式问题 #2026
Browse files Browse the repository at this point in the history
  • Loading branch information
richard1015 committed Feb 6, 2023
1 parent e61eb44 commit 06c486e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/packages/__VUE/uploader/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
position: relative;
width: $uploader-picture-width;
height: $uploader-picture-height;
display: flex;
align-items: center;
justify-content: center;
border-radius: 6px;
.close {
position: absolute;
right: 0;
Expand All @@ -141,8 +145,9 @@
@include oneline-ellipsis();
}
&__c {
height: 100%;
width: 100%;
max-width: 100%;
max-height: 100%;
border-radius: 6px;
}
&__file {
height: 100%;
Expand Down
1 change: 1 addition & 0 deletions src/packages/__VUE/uploader/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

<img
class="nut-uploader__preview-img__c"
mode="aspectFit"
@click="fileItemClick(item)"
v-if="item.type?.includes('image') && item.url"
:src="item.url"
Expand Down

0 comments on commit 06c486e

Please sign in to comment.