fix: 文档查看下载文件名称?显示问题
This commit is contained in:
@@ -70,7 +70,8 @@ function fnDownload() {
|
|||||||
fetch(url)
|
fetch(url)
|
||||||
.then(response => response.blob())
|
.then(response => response.blob())
|
||||||
.then(blob => {
|
.then(blob => {
|
||||||
const fileName = url.substring(url.lastIndexOf('/') + 1);
|
let fileName = url.substring(url.lastIndexOf('/') + 1);
|
||||||
|
fileName = fileName.split('?')[0];
|
||||||
saveAs(blob, fileName);
|
saveAs(blob, fileName);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
|||||||
Reference in New Issue
Block a user