VUE:axios接收后端文件流并下载文件

that.$axios
        .post(
          that.$Config.downLoad,
          {
            model_file_type: id
          },
          {
            responseType: "blob"
          }
        )
        .then(function(res) {
          let link = document.createElement("a");
          link.href = window.URL.createObjectURL(new Blob([res.data]));
          link.target = "_blank";
//文件名和格式 link.download = "话术逻辑文件模板.xlsx"; document.body.appendChild(link); link.click(); document.body.removeChild(link); });