Merge remote-tracking branch 'origin/build' into build

This commit is contained in:
aixianling
2023-06-27 09:50:18 +08:00
7 changed files with 22 additions and 14 deletions

View File

@@ -47,7 +47,13 @@ export default {
methods: {
downFile(item) {
if (this.clickDownload) {
this.$download(item.url, item.name)
const link = document.createElement('a')
link.style.display = 'none'
link.href = item.url
link.setAttribute('download', item.name)
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
} else window.open(`${item.url}`)
}
}