代码:
downloadFile(filePath, name) {
const link = document.createElement('a')
link.style.display = 'none'
link.href = filePath
link.setAttribute('download', name)
document.body.appendChild(link)
link.click()
},
handleDownload(row) {
const url = `/api/yh/maintain/file${row.attachPath}?token=${util.cookies.get('token')}`
this.downloadFile(url, row.attachOriginName)
},