创建 a 标签,调用接口下载excel

get 请求

      const elink = document.createElement('a')
      elink.href = `https://${this.$config.URL_PREFIX}www.baidu.com/data-lineages/download?vertex=${this.exportParams.vertex}&direct=bothV&times=1&isFilterPredicate=0`
      document.body.appendChild(elink)
      elink.click()
      document.body.removeChild(elink)
posted @ 2022-01-22 10:19  可乐雪碧芬达  阅读(317)  评论(0编辑  收藏  举报