<div style="margin-top: 20px">
<el-button size="small" @click="downloadDemo">下载模板</el-button>
</div>
downloadDemo() {
window.location.href="./template.xlsx" }
将文件放到public下面,配置如下,即可实现excel本地表格下载
<div style="margin-top: 20px">
<el-button size="small" @click="downloadDemo">下载模板</el-button>
</div>
downloadDemo() {
window.location.href="./template.xlsx" }
将文件放到public下面,配置如下,即可实现excel本地表格下载