Skip to content

Commit

Permalink
Merge pull request #373 from jamebal/dev
Browse files Browse the repository at this point in the history
perf: 优化预览文件封面的效果
  • Loading branch information
jamebal authored Feb 20, 2025
2 parents 26ff42e + 57edbce commit bd9aa4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/Icon/IconFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@
<div v-if="item.tags && item.tags.length > 0 && !public">
<div v-if="pc">
<svg-icon v-if="grid" class="pc grid icon-tag" icon-class="tag2" :style="{left: 14 * index + 'px', color: tag.color}" v-for="(tag,index) in item.tags.slice(0, 3)" :key="tag.tagId"/>
<!-- 列表模式下只能显示一个标签 -->
<svg-icon v-else class="pc list icon-tag" icon-class="tag2" :style="{color: tag.color}" v-for="tag in item.tags.slice(0, 1)" :key="tag.tagId"/>
<svg-icon v-if="!grid" class="pc list icon-tag" icon-class="tag2" :style="{color: tag.color}" v-for="tag in item.tags.slice(0, 1)" :key="tag.tagId"/>
</div>
<div v-else>
<div v-if="!pc">
<svg-icon v-if="grid" class="mobile grid icon-tag" icon-class="tag2" :style="{left: 1 * index + 'rem', color: tag.color}" v-for="(tag,index) in item.tags.slice(0, 3)" :key="tag.tagId"/>
<svg-icon v-else class="mobile list icon-tag" icon-class="tag2" :style="{color: tag.color}" v-for="tag in item.tags.slice(0, 1)" :key="tag.tagId"/>
<svg-icon v-if="!grid" class="mobile list icon-tag" icon-class="tag2" :style="{color: tag.color}" v-for="tag in item.tags.slice(0, 1)" :key="tag.tagId"/>
</div>
</div>
<div v-if="item.ossFolder && !public">
Expand Down Expand Up @@ -191,9 +190,6 @@ export default {
line-height: 35px;
}
>>> .image-slot-error {
}
.icon-favorite {
position: absolute;
color: #f5222d;
Expand Down
2 changes: 2 additions & 0 deletions src/components/preview/FileDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ export default {
>>> .el-image.cover {
height: unset !important;
margin-bottom: 20px;
max-width: 100%;
max-height: 60vh;
}
>>> .el-dialog {
Expand Down

0 comments on commit bd9aa4b

Please sign in to comment.