fix(@vben/common-ui): 修复爬虫 word 文件下载问题
- 添加文件名日志输出,便于调试- 修改下载链接为处理后的 fetchResult.value,确保正确获取文件- 更新文件下载逻辑,使用正确的文件名
This commit is contained in:
parent
6679761b9e
commit
e2e344255f
@ -182,7 +182,7 @@ const startPolling = async () => {
|
|||||||
style: { marginLeft: '10px' },
|
style: { marginLeft: '10px' },
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
const link = document.createElement('a');
|
const link = document.createElement('a');
|
||||||
link.href = `/spider${download_url}`;
|
link.href = fetchResult.value;
|
||||||
link.download = fetchResult.value;
|
link.download = fetchResult.value;
|
||||||
document.body.append(link);
|
document.body.append(link);
|
||||||
link.click();
|
link.click();
|
||||||
@ -261,10 +261,9 @@ const startFetching = async () => {
|
|||||||
// clearInterval(statusPollingInterval);
|
// clearInterval(statusPollingInterval);
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
} catch (error) {
|
} catch {
|
||||||
isFetching.value = false;
|
isFetching.value = false;
|
||||||
fetchResult.value = '';
|
fetchResult.value = '';
|
||||||
console.error(error);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (props.item.id === 'c736edd0-925d-4877-9223-56aab7342311') {
|
if (props.item.id === 'c736edd0-925d-4877-9223-56aab7342311') {
|
||||||
|
Loading…
Reference in New Issue
Block a user