tijaodaim
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div v-if="props.disabled">
|
||||
<div v-if="fileList.length === 0" class="flex justify-center items-center px-4 text-gray-400 bg-gray-50 rounded-md p">
|
||||
<el-icon class="mr-2 text-lg"><Document /></el-icon>
|
||||
<span class="text-sm">{{ $t('excel.noFiles') }}</span>
|
||||
<span class="text-sm">无</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div
|
||||
@@ -139,6 +139,13 @@ const baseUrl = import.meta.env.VITE_API_URL || '';
|
||||
|
||||
// 获取文件名
|
||||
const getFileName = (file: any): string => {
|
||||
// 优先使用 fileTitle,其次使用 name,最后从 URL 中提取
|
||||
if (file.fileTitle) {
|
||||
return file.fileTitle;
|
||||
}
|
||||
if (file.name) {
|
||||
return file.name;
|
||||
}
|
||||
return file.url ? other.getQueryString(file.url, 'fileName') || other.getQueryString(file.url, 'originalFileName') : 'File';
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user