✨ 添加displayName字段显示解码后的文件名
- 后端返回文件列表时添加displayName字段(解码HTML实体) - 前端使用displayName显示文件名,保持原始name用于操作 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1373,10 +1373,10 @@
|
||||
<i v-else-if="file.name.match(/\.(zip|rar|7z|tar|gz)$/i)" class="fas fa-file-archive" style="font-size: 64px; color: #795548;"></i>
|
||||
<i v-else class="fas fa-file" style="font-size: 64px; color: #9E9E9E;"></i>
|
||||
</div>
|
||||
<div class="file-name" :title="file.name">{{ file.name }}</div>
|
||||
<div class="file-size">{{ file.isDirectory ? '文件夹' : file.sizeFormatted }}</div>
|
||||
</div>
|
||||
<div class="file-name" :title="file.displayName || file.name">{{ file.displayName || file.name }}</div>
|
||||
<div class="file-size">{{ file.isDirectory ? '文件夹' : file.sizeFormatted }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 列表视图 -->
|
||||
<div v-else class="file-list">
|
||||
@@ -1419,7 +1419,7 @@
|
||||
<i v-else-if="file.name.match(/\.(xls|xlsx)$/i)" class="fas fa-file-excel" style="font-size: 20px; color: #4CAF50; flex-shrink: 0;"></i>
|
||||
<i v-else-if="file.name.match(/\.(zip|rar|7z|tar|gz)$/i)" class="fas fa-file-archive" style="font-size: 20px; color: #795548; flex-shrink: 0;"></i>
|
||||
<i v-else class="fas fa-file" style="font-size: 20px; color: #9E9E9E; flex-shrink: 0;"></i>
|
||||
<span style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;" :title="file.name">{{ file.name }}</span>
|
||||
<span style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;" :title="file.displayName || file.name">{{ file.displayName || file.name }}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding: 10px; color: var(--text-secondary);">{{ file.isDirectory ? '-' : file.sizeFormatted }}</td>
|
||||
|
||||
Reference in New Issue
Block a user