其他分享
首页 > 其他分享> > 创建 a 标签,调用接口下载excel

创建 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)

标签:body,appendChild,www,elink,标签,excel,接口,vertex,document
来源: https://www.cnblogs.com/niluiquhz/p/15832513.html