fix(@vben/common-ui): 修复爬虫 word 文件下载问题

- 添加文件名日志输出,便于调试- 修改下载链接为处理后的 fetchResult.value,确保正确获取文件- 更新文件下载逻辑,使用正确的文件名
This commit is contained in:
vertoryao 2025-05-19 12:30:45 +08:00
parent 6679761b9e
commit e2e344255f

View File

@ -182,7 +182,7 @@ const startPolling = async () => {
style: { marginLeft: '10px' },
onClick: () => {
const link = document.createElement('a');
link.href = `/spider${download_url}`;
link.href = fetchResult.value;
link.download = fetchResult.value;
document.body.append(link);
link.click();
@ -261,10 +261,9 @@ const startFetching = async () => {
// clearInterval(statusPollingInterval);
// }
// });
} catch (error) {
} catch {
isFetching.value = false;
fetchResult.value = '';
console.error(error);
}
}
if (props.item.id === 'c736edd0-925d-4877-9223-56aab7342311') {