downFiles 下载文件方法

全局使用 (推荐)
局部使用
  1. const res = await req.downFiles({
  2. path: "http://pic.topmeizi.com/wp-content/uploads/2017a/04/08/01.jpg",
  3. })
1.简单使用
2.带下载提示
  1. const res = await this.$req.downFiles({
  2. path: 'http://localhost:10086/static/hhyang.txt',
  3. title: "正在下载"
  4. })
3.带拦截下载
4.带额外参数下载
  1. const res = await this.$req.downFiles({
  2. title: "正在下载",
  3. name:'hhyang',
  4. ages:'21'
  5. })
  6. console.log(res)
5.带进度条下载
6.自定义header
  1. path: 'http://localhost:10086/static/hhyang.txt',
  2. title: "正在下载",
  3. header:{
  4. "Content-Type":"text/plain; charset=UTF-8"
  5. }
  6. console.log(res)