npm i yogurt-excel-export -S
应用场景 :
1、直接访问后端链接下载
2、拿到后端数据前端组织下载
> 步骤 1:
cnpm i yogurt-excel-export -S
> 步骤 2:
const excel=require('yogurt-excel-export')
点击事件 = function(){
//excel.download(文件名,excel标题,excel数据)
excel.download('测试文件',['编号','姓名'],[
{id:1,title:'x'},{id:2,title:'y'}
])
}