downLoad (rows) {
      if (rows) {
        let params = {
          id: rows.id,
          fileNames: rows.docPath,
          type: 'doc'
        }
        downLoadFileZip(params).then(resp => {
          let blob = new Blob([resp.data], {type: 'application/zip'})
          if (window.navigator && window.navigator.msSaveOrOpenBlob) {
            window.navigator.msSaveOrOpenBlob(blob, `${rows.title}.zip`)
          } else {
            let url = window.URL.createObjectURL(blob)
            const link = document.createElement('a') // 创建a标签
            link.href = url
            link.download = `${rows.title}.zip` // 重命名文件
            link.click()
            URL.revokeObjectURL(url) // 释放内存
          }
        })
      }
    }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
  • 2021-12-02
  • 2022-02-26
  • 2022-12-23
猜你喜欢
  • 2021-10-20
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案