摘要: 1、安装依赖: npm install -S file-saver npm install -S xlsx npm install -D script-loader 2、下载导入Blob.js和 Export2Excel.js 3、组件中使用: <div @click="outTab">导出</di 阅读全文
posted @ 2020-07-20 14:29 吴小明- 阅读(4337) 评论(2) 推荐(2) 编辑
摘要: 1、安装依赖: npm install -S file-saver npm install -S xlsx npm install -D script-loader 2、static文件夹下新建excel/Export2Excel.js (放在下面了。static中存放别人的文件,assets中存放 阅读全文
posted @ 2020-07-20 11:53 吴小明- 阅读(581) 评论(2) 推荐(0) 编辑
摘要: 1、安装依赖: npm install --save xlsx file-saver 2、在组件中引入: import FileSaver from 'file-saver' import XLSX from 'xlsx' 3、添加导出按钮: 4、导出函数: outTab() { let fix = 阅读全文
posted @ 2020-07-20 09:53 吴小明- 阅读(2049) 评论(0) 推荐(0) 编辑