提示:我这是使用了element-ui样式框架,默认是您已经安装了element-ui
安装vue-json-excel插件
npm install vue-json-excel --save
引入vue-json-excel组件
<template>
<div>
<download-excel
:fields = "json_fields"
:data="multipleSelection"
:before-generate = "startDownload"
:before-finish = "finishDownload"
type="xls">
<el-button>导出</el-button>
</download-excel>
<el-table
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55">
</el-ta