Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/theme-saas/src/upload-list/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@
@apply mr-10;
@apply pl-2;
@apply transition-colors duration-300;
@apply overflow-hidden;
@apply text-ellipsis;
@apply whitespace-nowrap;

.@{svg-prefix-cls} {
@apply text-sm;
Expand Down Expand Up @@ -306,6 +309,13 @@
&-title:not(.is-fail) {
@apply text-color-text-primary;
}

&-title {
@apply overflow-hidden;
@apply text-ellipsis;
@apply whitespace-nowrap;
width: 148px;
}
}

.@{upload-list-prefix-cls}__item {
Expand Down Expand Up @@ -474,6 +484,7 @@
&--picture &__item-name {
@apply block;
@apply ~'leading-[3.5rem]';
@apply overflow-visible;

.@{svg-prefix-cls} {
@apply text-sm;
Expand Down
4 changes: 4 additions & 0 deletions packages/theme/src/upload-list/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@
margin-right: 40px;
padding-left: 4px;
transition: color 0.3s;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

.@{svg-prefix-cls} {
font-size: var(--tv-UploadList-item-name-icon-font-size);
Expand Down Expand Up @@ -581,6 +584,7 @@
&--picture &__item-name {
display: block;
line-height: 56px;
overflow: visible;

.@{svg-prefix-cls} {
font-size: var(--tv-UploadList-item-name-icon-font-size);
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/file-upload/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export const fileUploadProps = {
},
maxNameLength: {
type: Number,
default: 20
default: 0
},
scale: {
type: [Number, String],
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/upload-list/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const uploadListProps = {
},
maxNameLength: {
type: Number,
default: 20
default: 0
},
scale: {
type: [Number, String],
Expand Down
4 changes: 3 additions & 1 deletion packages/vue/src/upload-list/src/mobile-first.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
class="flex-1 sm:mr-6 text-xs sm:text-sm leading-5.5 text-color-text-primary overflow-hidden text-ellipsis whitespace-nowrap"
>
<span :title="file.name">{{
file.name.length > maxNameLength ? file.name.substring(0, maxNameLength) + '...' : file.name
file.name.length > maxNameLength && maxNameLength
? file.name.substring(0, maxNameLength) + '...'
: file.name
}}</span>
</div>
<div
Expand Down
16 changes: 13 additions & 3 deletions packages/vue/src/upload-list/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@
<div class="file-name">
<div class="file-name-box">
<span :title="file.name">{{
file.name.length > maxNameLength ? file.name.substring(0, maxNameLength) + '...' : file.name
file.name.length > maxNameLength && maxNameLength
? file.name.substring(0, maxNameLength) + '...'
: file.name
}}</span>
</div>
<div class="operate-panel">
Expand Down Expand Up @@ -180,7 +182,11 @@
v-if="!isFolder"
:fill="isEdm && file.status === 'fail' ? '#f5222d' : ''"
class="tiny-svg-size"
/>{{ file.name.length > maxNameLength ? file.name.substring(0, maxNameLength) + '...' : file.name }}
/>{{
file.name.length > maxNameLength && maxNameLength
? file.name.substring(0, maxNameLength) + '...'
: file.name
}}
</a>
</tiny-tooltip>
<div :class="['tiny-upload-list__item-edminfo', { isFail: isEdm && file.status === 'fail' }]" v-if="isEdm">
Expand Down Expand Up @@ -307,7 +313,11 @@
:class="['tiny-upload-list__li-title', file.status === 'fail' && 'is-fail']"
:title="isFolderTitle ? (file.path || '') + file.name : file.name"
>
{{ file.name.length > maxNameLength ? file.name.substring(0, maxNameLength) + '...' : file.name }}
{{
file.name.length > maxNameLength && maxNameLength
? file.name.substring(0, maxNameLength) + '...'
: file.name
}}
</div>
</li>
</transition-group>
Expand Down
Loading